Chinaunix首页 | 论坛 | 博客
  • 博客访问: 598863
  • 博文数量: 83
  • 博客积分: 5453
  • 博客等级: 大校
  • 技术积分: 894
  • 用 户 组: 普通用户
  • 注册时间: 2006-06-10 13:51
文章分类

全部博文(83)

文章存档

2015年(2)

2014年(1)

2013年(1)

2012年(3)

2011年(14)

2010年(7)

2009年(7)

2008年(12)

2007年(17)

2006年(19)

我的朋友

分类: LINUX

2006-08-22 22:35:35

使用Gnome或者KDE,你能获得一个方便的桌面环境,但是你也同时失去了很多配置系统的自由。再者,一个庞大成熟的桌面系统,繁文缛节干扰了你学习的要点。如果你厌倦了束缚,厌倦了繁杂,并且原意拿出一点时间来配置自己的桌面,那么来到fluxbox的世界。


1.安装

fluxbox,桌面主体,能显示gnomekde菜单

fbpager,显示workspace状态的小窗口

feh,控制桌面背景

idesk , 桌面图标

以上在stable(sarge)里都有deb

conky,显示系统资源状态,若用的是sarge这个建议用checkinstall安装,testing(etch)有deb包


2.建立~/.xsession 或者~/.xinitrc,内容如下

#!/bin/sh
export LC_CTYPE=zh_CN.UTF-8
export LC_COLLATE=zh_CN.UTF-8
#export LC_ALL=zh_CN.UTF-8
export XMODIFIERS=@im=fcitx
export wpsetters=feh         // 设置背景变量
exec syndaemon -d &        // 控制synitics touchpad的
exec tpb &          // 用的thinkpad,控制功能键及其显示的
conky -d &
exec fcitx &
(sleep 1; idesk &)
#exec wmacpi &
exec fbpager -w &
exec rm $HOME/.serverauth.* &
exec startfluxbox
exit $?

3.配置~/.conkyrc

conky必须要有这个文件才能运行,可是不会自动产生。配置的不好也可能使它不能运行。可以到官方主页下载别人的.conkyrc,也可以在小孙的基础上修改。可惜这里不能上传文件。文字一大堆,粘贴吧,省事:-

# do not fork to background

background no


# font settings

use_xft yes

#xftfont NSimSun:size=9

xftfont Bitstream Vear Sans:size=9 //这个字体一般都有

uppercase no

override_utf8_locale yes


# bottom of the stack

on_bottom yes


# update every 2 secs

update_interval 2.0


# stay running forever

total_run_times 0


# draw to root window

own_window no


# avoid flickering

double_buffer yes


# size

minimum_size 309

maximum_width 309


# position

alignment top_left

gap_x 12

gap_y 12


# default colors

default_color white

default_shade_color black

default_outline_color white


# borders

draw_borders no

stippled_borders 8

border_margin 4

border_width 1


# shades

draw_shades no


# outline

draw_outline no


# spacer

use_spacer yes


# buffers

no_buffers yes


# sampling

cpu_avg_samples 1

net_avg_samples 1


# configuration

TEXT

${color}$nodename-$machine${alignr}$sysname-$kernel


${color lightgray}System:

${color lightgray} Uptime:${color} $uptime ${color lightgray} Load:${color} $loadavg

${color lightgray} CPU Frequency:${color} $freq MHz

${color lightgray} CPU:${color} $cpu% ${cpubar}

${color lightgray}${cpugraph cpu0 32,309 000000 ffffff}


${color lightgray} RAM:${color} $mem ($memperc%) ${membar}

${color lightgray} Cached:${color} $cached ${color lightgray} Buffers:${color} $buffers

${color lightgray} Swap:${color} $swap ($swapperc%) ${swapbar}

${color lightgray} Processes:${color} $processes ${color} Running:${color} $running_processes

${color lightgray} Disk IO:${color} $diskio

${color}${diskiograph 32,309 000000 ffffff}


${color lightgray}Networking (eth0):

${color lightgray} IPv4: ${color}${addr eth0} ${color lightgray}${alignr}IPv6: ${color} ${exec /sbin/ifconfig eth0|grep -q Scope:Global;echo $?|sed -e "s:0:yes:" -e "s:1:no:"}

${color lightgray} Down:${color} ${downspeed eth0} k/s ${color lightgray} Up:${color} ${upspeed eth0} k/s

${color}${downspeedgraph eth0 16,309 000000 ffffff}

${color}${voffset -11}${upspeedgraph eth0 16,309 000000 ffffff}


${color lightgray}Name PID CPU% MEM%

${color lightgray}TopCPU

${color} ${top name 1} ${alignr}${top pid 1} ${top cpu 1} ${top mem 1}

${color} ${top name 2} ${alignr}${top pid 2} ${top cpu 2} ${top mem 2}

${color} ${top name 3} ${alignr}${top pid 3} ${top cpu 3} ${top mem 3}


${color lightgray}TopMEM

${color} ${top_mem name 1} ${alignr}${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}

${color} ${top_mem name 2} ${alignr}${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}

${color} ${top_mem name 3} ${alignr}${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}


${color lightgray}Environment:

${color lightgray} Battery: ${alignc} ${color} $acpiacadapter, $battery

${color lightgray} Temperature: ${alignc} ${color} $acpitemp C


${color lightgray}File systems:

${color} / ${alignc} ${fs_used /}/${fs_size /}${alignr}${voffset +1}${fs_bar 12,120 /}

${color} /home ${alignc} ${fs_used /home}/${fs_size /home}${alignr}${voffset -1}${fs_bar 12,120 /home}


${color lightgray} Date:

${color} ${time %A} ${alignc 1} ${time %d}/${time %B}/${time %G} ${alignr} WeekNo.${time %W}


${color}${if_mounted /media/cdrom0} mounted on /cdrom ${endif}

${color}${if_mounted /mnt} mounted on /mnt ${endif}



4.配置fbpager

startfluxbox,自动产生~/.fluxbox

cd .fluxbox

vi fbpager,内容参见man fbpager里的例子。小孙给出一个参考:

fbpager.alpha: 255

fbpager.x: 0

fbpager.y: 745

fbpager.workspace.width: 21

fbpager.workspace.height: 21

fbpager.workspacesPerRow: 6400

fbpager.followDrag: false

fbpager.followMove: false

fbpager.changeWorkspaceButton: 1 1

fbpager.raiseWindowButton: 2

fbpager.lowerWindowButton: 3

fbpager.closeWindowButton: 3 3 1

fbpager.exitButton: 1 3 3

fbpager.nextWorkspaceButton: 4

fbpager.prevWorkspaceButton: 5

fbpager.moveInWorkspaceButton: 1

fbpager.dragToWorkspaceButton: 2

fbpager.align: LeftToRight

fbpager.color: black

fbpager.windowColor: #c06060 //这个颜色和小孙的styles协调

fbpager.focusedWindowColor: #33b0dc

fbpager.windowBorderColor: black

fbpager.backgroundColor: darkgray

fbpager.currentBackgroundColor: lightgray

fbpager.multiClickTime: 250

fbpager.icons: false

fbpager.windowBorderWidth: 1



5.制定自己的menu

vi ~/.fluxbox/menu

小孙仅给出一个例子,这个与默认的相比,更改很多:-

[begin] (fluxbox)

   [exec] (rxvt-unicode) {rxvt-unicode} 
   [exec] (Firefox) {firefox} 
   [exec] (rox-filer) {rox-filer} 
   [exec] (LumaQQ) {~/LumaQQ/lumaqq} 
   [exec] (OpenOffice) {openoffice} 
   [exec] (AdobeReader) {/usr/local/Adobe/Acrobat7.0/bin/acroread} 
   [exec] (Gimp) {gimp} 
   [submenu] (XShells) {} 
      [exec] (rxvt) {rxvt}
      [exec] (uxterm) {uxterm}
   [end]
   [separator]
   [submenu] (Help) {} 
      [exec] (Info) { x-terminal-emulator -T "Info" -e info}
      [exec] (Xman) {xman}
   [end]
   [workspaces] (Workspaces) 
   [reconfig] (Reconfigure) 
   [restart] (Restart) 
   [exit] (Exit) 

[end]


注意,要自己找图标,各个程序的安装目录里一般都有,大部分在/usr/share/pixmaps/,
再没有就安装
wm-icons,或者从网上下载别的。像素多少无关紧要,格式不对的用gimp另存为xpm格式。 6.制定自己的style 建议在原来的基础上修改,放到~/.fluxbox/styles 例如,cp /usr/share/fluxbox/styles/Twice ~/.fluxbox/styles/ vi ~/.fluxbox/styles/Twice 7.背景的更改。 fbsetbg -t ~/你的图片目录/某图片 -l //使用固定的图片 例如:fbsetbg -t ~/pocket/pictures/wallpaper/house.jpg -l fbsetbg -r ~/你的图片目录 -l //每次随机的使用图片 例如:fbsetbg -r ~/pocket/pictures/wallpaper/ -l vi ~/.fluxbox/init 修改的项目如下: session.screen0.rootCommand: fbsetbg -l vi ~/.fluxbox/lastwallpaper, 主要是去掉一个小”.0” $full|/home/night/pocket/pictures/wallpapers/house.jpg|:0 //注意这里是0 random|/home/night/pocket/pictures/wallpapers/|:0.0 8.桌面环境的配套软件 文件浏览器:rox-filer,KDE的konqueror在fluxbox下很好用 x终端模拟器:xterm中的uxtermrxvt-unicode或konsole 文本编辑器:openoffice,abiword,vi,emacs 网页浏览器和输入法:老一套,firefoxfcitx pdf阅览器:下载adobereaderrpm包,用alien安装。 其他的再说就是废话了。





9.idesk的设置
每一个图标都要在~/.idesktop/里有一个相应的lnk文件。
例如,eclipse.lnk
table Icon
Caption: Eclipse
CaptionTip: Java IDE
Icon: /home/night/.icons/eclipse.xpm
Width: 32
Height: 32
X: 455
Y: 239
Command[0]: ~/eclipse/eclipse -vm /usr/lib/j2sdk1.5-sun/bin/java
end


10.暂时想不起还需要什么。反正,小孙很喜欢fluxbox较大的自主性。

阅读(8677) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

zhenze123452009-03-16 14:53:57

那时候想学fluxbox,就是从你这里入门的,于是坚定的用fluxbox一年多了,真的很感谢!