Author Archives: andetc - Page 2

idesk を使ってデスクトップにアイコンを置く

x11/idesk

idesk 0.7.5_9

# cd /usr/ports/x11/idesk
# make config-recursive
# make install clean

で、

> idesk

としてみるが、~/.ideskrc が無いよ的なエラーが表示される。しかたがないので、README ファイルを読むことにした。なお、いろいろ試したが、ちょいと面倒な感じだったので結果のみ記載する。

/usr/local/share/doc/idesk/README の中に、何気なくサンプルっぽいのがあるので、これを ~/.ideskrc に転記する。

> vi ~/.ideskrc

内容は下記のような感じ(一部変更してある)。

table Config
  FontName: helvetica
  FontSize: 12
  FontColor: #FFFFFA
  FontNameTip: helvetica
  FontSizeTip: 9
  ForeColorTip: #0000FF
  BackColorTip: #FFFFFF
  PaddingX: 10
  PaddingY: 10
  Transparency: 75
  HighContrast: true
  Locked: false
  Shadow: false
  ShadowColor: #0006FA
  ShadowX: 2
  ShadowY: 2
  SnapShadow: true
  IconSnap: true
  SnapWidth: 10
  SnapHeight: 10
  SnapOrigin: BottomLeft
  SnapShadowTrans: 300
  CaptionOnHover: false
  Bold: true
  ToolTip.FontSize: 11
  ToolTip.FontName: gothic
  ToolTip.ForeColor: #0000FF
  ToolTip.BackColor: #FFFFFF
  ToolTip.CaptionOnHover: false
  ToolTip.CaptionPlacement: Right
  Background.Delay: 0
  Background.File: ~/images/freebsd.png
  Background.Mode: Mirror
  Background.Color: #C2CCFF
end

table Actions
  Lock: control right doubleClk
  Reload: middle doubleClk
  Drag: left hold
  EndDrag: left singleClk
  Execute[0]: left doubleClk
  Execute[1]: right doubleClk
end

ここまでで基本的な設定は、終わり。

さらに、

> mkdir ~/.idesktop
> mkdir ~/.idesktop/icons

としておいて、

デスクトップにアプリケーション起動用のアイコンを追加してみる。

まず、適当なアイコン(ここではファイル名を home.png)を ~/.idesktop/icons に入れる。

なお、今回は、Icones.pro からアイコン画像を使用させて頂くことにした。

さらに、

> vi ~/.idesktop/home.lnk

下記のような内容を記述する。じっくり見れば理解できる内容だ。

table Icon
  Caption: Home
  CaptionTip: This is my home
  Command: rox ~/
  Icon: /home/regza/.idesktop/icons/home.png
  Width: 32
  Height: 32
  X: 20
  Y: 20
end

注意点として、Icon: の項目は、~/.idesktop/icons/home.png などのような指定ではエラーが表示されるので、フルパスで記述する必要があるようだ(たぶん)。

一度、動かしてみる。

idesk 起動前の画面。

 

> idesk &

idesk 起動後の画面。 

背景画像が変わり、画面の左上にアイコンが表示された。

背景画像を変更したくない場合は、~/.ideskrc の Background.File: を消してしまえばよい。

HOMEアイコンをダブルクリックすると rox が起動する。これは、home.lnk に設定したCommand: によって動作を変更することができる。さらに、画面に表示されているアイコンは自由に移動することができる。動きがヌルヌルするので少し重いようだ。

恒常的に利用するのであれば、.xsession に追記すればよい。

よく使うブラウザやメーラーのアイコンを設置して完了。以下、画面イメージとアイコン設定ファイルを以下に列挙する。だんだんと、画面もそれらしい感じになってきた。

~/.idesktop/firefox.lnk

table Icon
  Caption: FireFox
  CaptionTip: Browser
  Command: firefox3
  Icon: /home/regza/.idesktop/icons/firefox.png
  Width: 32
  Height: 32
  X: 20
  Y: 80
end

~/.idesktop/chrome.lnk

table Icon
  Caption: Chrome
  CaptionTip: Browser
  Command: chrome
  Icon: /home/regza/.idesktop/icons/chrome.png
  Width: 32
  Height: 32
  X: 20
  Y: 140
end

~/.idesktop/mail.lnk

table Icon
  Caption: Mail
  CaptionTip: Sylpheed
  Command: sylpheed
  Icon: /home/regza/.idesktop/icons/mail.png
  Width: 32
  Height: 32
  X: 20
  Y: 200
end

~/.idesktop/edit.lnk

table Icon
  Caption: EDITOR
  CaptionTip: gedit
  Command: gedit
  Icon: /home/regza/.idesktop/icons/edit.png
  Width: 32
  Height: 32
  X: 20
  Y: 260
end

以降は wine で動かす windows アプリケーションの場合の例

~/.idesktop/teraterm.lnk

table Icon
  Caption: TeraTerm
  CaptionTip: TeraTerm
  Command: wine /home/regza/.wine/drive_c/Program\ Files/teraterm/ttermpro.exe
  Icon: /home/regza/.idesktop/icons/teraterm.png
  Width: 32
  Height: 32
  X: 20
  Y: 320
end

~/.idesktop/pictbear.lnk

table Icon
  Caption: PictBear
  CaptionTip: PictBear
  Command: wine /usr/home/regza/.wine/drive_c/Program\ Files/Fenrir\ Inc/PictBear\ Second\ Edition/PictBear.exe
  Icon: /home/regza/.idesktop/icons/pict.png
  Width: 32
  Height: 32
  X: 20
  Y: 380
end

~/.idesktop/word.lnk

table Icon
  Caption: Word
  CaptionTip: MS-Word
  Command: wine /home/regza/.wine/drive_c/Program\ Files/Microsoft\ Office/Office/WINWORD.EXE
  Icon: /home/regza/.idesktop/icons/word.png
  Width: 32
  Height: 32
  X: 20
  Y: 440
end

~/.idesktop/excel.lnk

table Icon
  Caption: Excel
  CaptionTip: MS-Excel
  Command: wine /home/regza/.wine/drive_c/Program\ Files/Microsoft\ Office/Office/EXCEL.EXE
  Icon: /home/regza/.idesktop/icons/excel.png
  Width: 32
  Height: 32
  X: 20
  Y: 500
end

 

FONT : msgothic.ttc msmincho.ttc

# mkdir /usr/local/share/font-ms
# cd /usr/local/share/font-ms
# cp ~/ms*.ttc ./
# mkfontdir
# mkfontscale
# cd /usr/local/share/fonts/TTF
# ln -s /usr/local/share/font-ms/msgothic.ttc msgothic.ttc
# ln -s /usr/local/share/font-ms/msmincho.ttc msmincho.ttc

 あとは、firefox 等で確認する。

 

 

ROX-Filer を使ってみる

今後継続して使っていこうと思っているウィンドウマネージャは、自分の中で使いやすいかなと思っている Fluxbox で落ち着きつつある。ただ、Blackbox 派生のウィンドウマネージャに Openbox などもあるとのことで興味はある。また時間ができたら Openbox も使ってみたいと思う。

さて、今回は、ROX-Filer。

ROX-Filer は、(Gnome や KDE のような)デスクトップ環境である ROX のベースになるファイラーだそうだ。デスクトップ環境としての ROX を試したことは無いが、ROX-Filer はちょいちょい使わせてもらっている。とても使い勝手のよいアプリケーションだと思う。

x11-fm/rox-filer

rox-filer-2.10_2

# cd /usr/ports/x11-fm/rox-filer
# make config-recursive
# make install clean

いままでは、ウィンドウマネージャに FluxBox を使用して、ROX-Filer をファイラーとして使っていた。次のような画面になる。

> rox

続いて、画面下部にパネルを表示する。PANE_1 は好きな文字。

> rox - -bottom=PANEL_1

さらに、ピンボードを表示する。DESK_ICON は好きな文字。

> rox - -pinboard=DESK_ICON

 

なお、この瞬間に背景画像が消えたが、 デスクトップ上を右クリックしてBackdrop を選択し、画像をドラッグ&ドロップすれば背景画像に設定できる。

 

 

squid-3.1.16

ちょっと脱線。squid をインストールするのでメモりながらやる。

www/squid31

# cd /usr/ports/www/squid31
# make config-recursive
# make install clean

オプションはデフォルトでインストールした。

===> post-installation information for squid-3.1.16:

     o You can find the configuration files for this package in the
       directory /usr/local/etc/squid.

     o The default cache directory is /var/squid/.
       The default log directory is /var/log/squid/.

       Note:
       You must initialize new cache directories before you can start
       squid.  Do this by running “squid -z” as ‘root’ or ‘squid’.
       If your cache directories are already initialized (e.g. after an
       upgrade of squid) you do not need to initialize them again.

     o The default configuration will deny everyone but the local host and
       local networks as defined in RFC 1918 for IPv4 and RFCs 4193 and
       4291 for IPv6 access to the proxy service.  Edit the “http_access
       allow/deny” directives in /usr/local/etc/squid/squid.conf
       to suit your needs.

     To enable Squid, set squid_enable=yes in either
     /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/squid
     Please see /usr/local/etc/rc.d/squid for further details.

     Note:
     If you just updated your Squid installation from an earlier version,
     make sure to check your Squid configuration against the 3.1 default
     configuration file /usr/local/etc/squid/squid.conf.default.
    
     /usr/local/etc/squid/squid.conf.documented is a fully annotated
     configuration file you can consult for further reference.

     Additionally, you should check your configuration by calling
     ‘squid -f /path/to/squid.conf -k parse’ before starting Squid.

===>   Compressing manual pages for squid-3.1.16
===>   Registering installation for squid-3.1.16
===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/libexec/squid/squid_radius_auth
/usr/local/sbin/squid

      This port has installed the following startup scripts which may cause
      these network services to be started at boot time.
/usr/local/etc/rc.d/squid

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type ‘make deinstall’
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage:

http://www.squid-cache.org/

とりあえず読みながらやってみる。

ローカル以外からのアクセすは DENY になっているとのこと。

設定ファイルは /usr/local/etc/squid/squid.conf  なので必要に応じて変更。

cache_dir ufs /var/squid/cache 1000 16 256

で、

# squid -z

これで、/var/squid/cache が作られた。

覚えておく部分のメモ

http_port 3128

このまま、/etc/rc.conf に追記する。

suqid_enable=”YES”

ここまでは、上記の説明に記載されているとおり。

で、squid を起動してみる。

/usr/local/etc/rc.d/squid start

OK。

 

 

Fluxbox のスタイルを変更する

Fluxbox インストール後にはいくつかのスタイルが選べる。

ここでは、zimek_green というスタイルを選んでみた。

右クリックメニューから、Fluxbox menu ⇒ System Styles ⇒ zimek_green

 

そして、再ログインすると次のようなイメージになる。緑茶が飲みたくなったぜ。

ウィンドウのタイトルバーやツールバーの文字が小さいので、スタイルの定義を変更をしたくなった。こういった場合は、共有のコンフィグファイルを、ユーザディレクトリにコピーしてから変更する。

# cd ~/.fluxbox
# mkdir styles
# cp -R /usr/local/share/fluxbox/styles/zimek_green styles
# cd styles/zimek_green
# chmod 644 theme.cfg
# vi theme.cfg

これで、ユーザスタイルが選択できるようになった。

右クリックメニューから、Fluxbox menu ⇒ User Styles ⇒ zimek_green

 

~/.fluxbox/styles/zimek_green/theme.cfg

フォントの種類やフォントのサイズを変更する場合は、次の箇所を編集する。

######### FONTS ##########

menu.frame.font:                    sans-9:bold
menu.title.font:                        sans-10:bold
toolbar.clock.font:                    sans-9:bold
toolbar.workspace.font:            sans-10:bold
toolbar.iconbar.focused.font:     sans-8:bold
toolbar.iconbar.unfocused.font:  sans-8
window.font:                            sans-8

↓ 例えば、次のように変更。

menu.frame.font:                      Kochi Gothic:style=regular:size=12
menu.title.font:                         Kochi Gothic:style=regular:size=12
toolbar.clock.font:                      Kochi Gothic:style=regular:size=12
toolbar.workspace.font:              Kochi Gothic:style=regular:size=12
toolbar.iconbar.focused.font:      Kochi Gothic:style=regular:size=12
toolbar.iconbar.unfocused.font:   Kochi Gothic:style=regular:size=12
window.font:                             Kochi Gothic:style=regular:size=12

ちなみに、ここで使用したフォントは japanese/font-kochi 。

設定ファイルを変更したら、画面上でリロードできる。

右クリックメニューから、Fluxbox menu ⇒ Reload config

ここまでの結果は、次のようになった。

 

次に、マウス右クリックによるメニューの行間隔が狭い感じなので、増やしてみた。

~/.fluxbox/styles/zimek_green/theme.cfg

########## MENU ###########

menu.bevelWidth:                                                1

menu.itemHeight:                                                19
#menu.titleHeight:                                              21

こっちの変更については Reload Config では反映されなかったので、再ログインして、結果次のようなイメージになった。

 最後に、綺麗な壁紙を貼り付けて、もちろん conky も表示して出来上がり。

Wallpaper : Floral Wallpaper by leon-99

 

x11-themes/fluxbox-tenr-styles-pack は、スタイルシートがたくさん入ったパッケージだが、試しにインストールしてみたら大量のスタイルが出てきた。ちょっとびっくり。こわいわっ!笑