由于是自己用,想到哪里写哪里吧。
为啥用openbox 呢?很简单,,,笔记本是板载显卡,cpu也不大,干不了gpu的事,gnome已经吃不动了。。。。就用openbox吧。
安装很简单 sudo apt-get install openbox obmenu obconf 就可以了
openbox 安装后第一件事,就是配置关机
其他组件能省就省。tint2本来装上了,但越用越不舒服,就不用了。现在就是openbox 加个conky看看时间cpu而已
feh是必须到,这个也简单随便弄下就好了
因为关机到权限很高,所以不能直接做。还得修改权限文件
sudo visudo
添加
ALL ALL=NOPASSWD:/sbin/shutdown
然后openbox菜单里添加
<item label="Reboot">
<action name="Execute"> <execute>gksudo 'shutdown -r now'</execute> </action></item>
<item label="Shut down">
<action name="Execute"> <execute>gksudo 'shutdown -h now'</execute> </action></item>
就能关机重启了。
conky的配置贴一下,最简单到那种。
background yes
double_buffer yes
override_utf8_locale yes
own_window yes
own_window_transparent yes
own_window_type override
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
gap_x 10
gap_y 10
alignment top_left
update_interval 2
#colour
default_color 786E5B
own_window_colour 272521
#font
use_xft yes
xftfont 文泉驿正黑:pixelsize=14
cpu_avg_samples 2
TEXT
${color lightgrey}${time %b%d日星期%a}${alignr}${time %p%l:%M}
如果你真想做一件事,全世界都会帮你!
cpu1 : ${cpu cpu0}% , cpu2 : ${cpu cpu1}%
${cpubar /}
${alignr}${top name 1} ${top cpu 1}%
${alignr}${top name 2} ${top cpu 2}%
${alignr}${top name 3} ${top cpu 3}%
${alignr}${top name 4} ${top cpu 4}%
${alignr}${top name 5} ${top cpu 5}%
root : ${fs_used /}/${fs_size /} ( ${fs_free_perc /}% free)
${fs_bar /}
接下来是装jdk
tar -zxvf jdk-7-linux-i586.tar.gz
mv jdk1.7.0/ /usr/bin/jvm/
vim ~/.bashrc
添加:
export JAVA_HOME=/usr/bin/jvm
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
保存退出,输入以下命令使之生效
source ~/.bashrc
测试
java -version
然后是下载个eclipse 需要哪种就装那种吧,直接解压缩就可以运行。另外如果提示找不到jre就修改下eclipse.ini,
还有ubuntu 里有个破进程,经常占用100%的cpu 名字叫update-apt-xapi。其实就是编索引,直接删掉
sudo apt-get autoremove apt-xapian-inde
最后搞个截图到工具就ok了,用了网友到一个sh
建立文件 /usr/bin/snapshot
#!/bin/bash
DIR="${HOME}/图片/snapshots"
DATE="$(date +%Y%m%d@%H%M%S)"
NAME="${DIR}/snapshot-${DATE}.png"
LOG="${DIR}/snapshots.log"
# Check if the dir to store the screenshots exists, else create it:
if [ ! -d "${DIR}" ]; then mkdir -p "${DIR}"; fi
# Screenshot a selected window
if [ "$1" = "win" ]; then scrot -bs "${NAME}"; fi
# Screenshot the entire screen
if [ "$1" = "scr" ]; then scrot "${NAME}"; fi
# Screenshot a selected area
if [ "$1" = "area" ]; then scrot -cd 10 -s "${NAME}"; fi
if [[ $# = 0 ]]; then
# Display a warning if no area defined
echo "No screenshot area has been specified. Screenshot not taken."
echo "${DATE}: No screenshot area has been defined. Screenshot not taken." >> "${LOG}"
else
# Save the screenshot in the directory and edit the log
echo "${NAME}" >> "${LOG}"
fi
修改 snapshot 的文件属性
#chmod +x /usr/bin/snapshot
在 Openbox 的 rc.xml 增加快捷键
<keyboard>
...
<keybind key="Print">
<action name="Execute"><execute>/usr/bin/snapshot scr</execute></action>
</keybind>
<keybind key="C-Print">
<action name="Execute"><execute>/usr/bin/snapshot win</execute></action>
</keybind>
<keybind key="A-Print">
<action name="Execute"><execute>/usr/bin/snapshot area</execute></action>
</keybind>
...
<keyboard>
最后把openbox到程序绑定搞一下。
桌面分四个 first,web,qq,eclipse
<application name="Eclipse">
<maximized>true</maximized>
<desktop>4</desktop>
<decor>no</decor>
</application>
<application name="x-www-browser">
<maximized>true</maximized>
<desktop>2</desktop>
<decor>no</decor>
</application>
<application name="x-www-browser" title="*Q+ Web*">
<desktop>3</desktop>
<fullscreen>yes</fullscreen>
</application>
</applications>