- 论坛徽章:
- 13
|
本帖最后由 ulovko 于 2012-06-09 09:31 编辑
8> 安装 Xfce4
关于Xorg配置 : http://blog.chinaunix.net/uid-25256412-id-2939430.html
- # pkg_add -v xfce4-session xfce-utils xfdesktop xfconf xfce4-mixer xfce4-settings xfce4-panel xfce4-terminal xfce4-places xfwm4 xfwm4-themes gamin
- # cat >>/etc/rc.conf.local<<EOF
- rc_scripts="dbus_daemon"
- EOF
- $ echo >~/.xinitrc startxfce4
- $ startx
- # echo >>/etc/rc.conf.local xdm_flags=""
- # exit
- $ echo >~/.xsession startxfce4 (如果使用xdm)
- # reboot
- OR: use gdm as login manager instead of xdm
- # pkg_add -v gdm
- # vim /etc/rc.conf.local
- xdm_flags=NO
- rc_scripts="dbus_daemon gdm"
- aucat_flags="" (enable the aucat sound daemon at boot time)
- :wq
- # aucat -l
复制代码 9> 常用 APP
Chromium/Thunderbird/FileZilla/Empathy(IM Client)/Xchat(IRC Only)/Mplayer/VLC/Audacious
- # pkg_add -v chromium (chrome的表哥)
- There are some things to do for Chromium to be a bit functional :
- # echo >>/etc/sysctl.conf kern.shminfo.shmall=32768
- # vim /etc/login.conf
- in the default section:
- add
- penfiles-max=400:\ (重启生效)
- # vim /usr/local/share/application/chromium.desktop
- [Desktop Entry]
- Version=1.0
- Type=Application
- Categories=Application;Network
- Name=Chromium
- Comment=Chromium Web browser
- Icon=/usr/local/chrome/product_logo_48.png
- Exec=chrome %u
- Path=
- Terminal=false
- StartupNotify=false
- :wq
- ---------------------------------
- 鸟儿:
- 一些我的小碎碎念;
- 浏览器这块,如果装firefox的话,要先把locale设置好,不然firefox启动异常,有进程,无界面。
- chromium 的话,root用户会报错,必须用下面的命令启动:
- chromium --user-data-dir=/yourpath
- 复制代码
- 如果你有4核或者主频高的cpu可以在/etc/rc.conf.local(没有建立一个)加入:
- apmd="-C" ## Or "-A"
- 复制代码
- 深度节能或者让OpenBSD自己管理。man apmd 讲的已经很好懂了。
- ---------------------------------
- # pkg_add -v mozilla-thunderbird (Email Client)
- # pkg_add -v filezilla (FTP Client)
- # pkg_add -v empathy (IM Client)
- # pkg_add -v xchat (IRC Only)
- # pkg_add -v mplayer (建议安装)
- # pkg_add -v vlc (VLC media player)
- # pkg_add -v audacious-plugins (Audio Player)
- PS: To have sound output in Audacious, be sure to select “Sndio output plugin” in preferences/audio.
复制代码 Mousepad/epdfview/GIMP/Ristretto/Thunar-archive/Galculator/LibreOffice
- # pkg_add -v mousepad (Text Editor)
- # pkg_add -v epdfview (PDF Viewer)
- # pkg_add -v gimp (Image Processing)
- # pkg_add -v ristretto (Image Displayer)
- # pkg_add -v thunar-archive (Archive Manager)
- # pkg_add -v galculator (Calculator)
- # pkg_add -v libreoffice-i18n-cn libreoffice-java (Openoffice的表弟)
- Add support for .rar archives rar/unrar
- # cd /usr/ports/archives/unrar && make install clean (没有binary)
复制代码 InputMethod : Scim / fcitx
- # pkg_add -v scim-pinyin
- # wget 'http://fcitx.googlecode.com/files/fcitx-4.2.3.tar.xz'
- # wget 'http://fcitx.googlecode.com/files/fcitx-4.2.3_dict.tar.xz' (带词库方便没有网络连接的机器!)
- 由于OpenBSD默认安装比较干净,所以来安装一下xz ^_^
- # pkg_add -v xz
- xz-5.0.3p1 : ok
- # xz -dk fcitx-4.2.3.tar.xz
- # tar -xvf fcitx-4.2.3.tar
- OR:
- # xzcat fcitx-4.2.3.tar.xz |tar -xvf -
- # more fcitx-4.2.3/INSTALL
- Basic Install
- ...
- ...
- # vim ~/.profile
- export XIM_PROGRAM=fcitx
- export XIM=fcitx
- export XMODIFIERS="@im=fcitx"
- export QT_IM_MODULE=XIM
- export GTK_IM_MODULE=XIM
- # vim ~/.xinitrc
- exec fcitx & (注意放到第一位优先执行)
- # reboot
复制代码 NOTE : the OpenBSD developers strongly suggest to use binary packages whenever possible.
10> TIPS
- # man afterboot
- # man intro
- # man 8 intro
- # man hier
- Manually update the files database so we can use the locate command to look for a file
- # /usr/libexec/locate.updatedb
- # locate <name>
- List installed packages
- # pkg_info |more
- Search for packages in repository (provided by PKG_PATH)
- # pkg_info -Q <search string>
- Update all packages on the system
- # pkg_add -v -u
- # vim /etc/fstab
-
- :wq
- (FFS records the last time a file was accessed, meaning the last time it was executed or
- read by any means. These updates consume a small but measurable amount of time and disk performance.
- "noatime" is very useful the hard disk and the screen are the two most power-hungry devices on a laptop
- and if you can reduce the amount of time your laptop's hard drive spins you will extend battery life.)
- (Soft update, or "softdep," mounts organize and arrange disk writes so that the file system metadata
- on the disk remains consistent, and it comes close to giving the performance of an "async"
- mount with the reliability of a "sync" mount.)
复制代码 11> Systrace
- One of the more exciting features in OpenBSD is systrace(1), a system call access manager.
- With systrace, a system administrator can say which system calls can be made by which programs,
- and how those calls can be made.
- Proper use of systrace can greatly reduce the risks inherent in running poorly written
- or exploitable programs.
复制代码 12> Insecure Console (Single-user mode)
When you boot FreeBSD in single-user mode, you get a root command
prompt. This is fine for your laptop and works nicely for servers in your
corporate datacenter, but what about machines in untrusted facilities?
- # man /etc/ttys
- /secure
- secure If on is also specified, allows users with a UID of 0 to log in
- on this line. If set for the console entry, then init(8) will
- start a single-user shell without asking for the superuser password.
复制代码 To make the console require a root login when booted into single-usermode,
change the secure to insecure.
- # vim /etc/ttys
- #
- # $OpenBSD: ttys,v 1.2 2008/01/09 17:39:42 miod Exp $
- #
- # name getty type status comments
- #
- console "/usr/libexec/getty std.9600" vt220 off insecure
- :wq
- # reboot
- >boot -s
复制代码 13> PF Basic Setup
详见 CU Blog: http://blog.chinaunix.net/uid-25256412-id-3223143.html
14> Basic FreeBSD Setup
详见 CU Blog: http://blog.chinaunix.net/uid-25256412-id-2939430.html
15> OpenBSD 下显示CPU 硬盘 主板温度 CPU风扇转速脚本
FROM: http://bbs.chinaunix.net/thread-1305553-1-1.html (wosl2001)
- #!/bin/sh
- typeset -i10 HDDCUR
- typeset -i10 HDDMAX
- typeset -i10 HDDMIN
- typeset -i10 CPU
- typeset -i10 MainBOARD
- typeset -i10 FAN
- RAWTEMP=`atactl /dev/sd0c readattr | grep Temperature | cut -f 5`
- HDDCUR=`echo $RAWTEMP | sed -e 's/0x.\{10\}/0x/'`
- HDDMAX=`echo $RAWTEMP | sed -e 's/0x.\{2\}/0x/' | sed -e 's/.\{8\}$//'`
- HDDMIN=`echo $RAWTEMP | sed -e 's/0x.\{6\}/0x/' | sed -e 's/.\{4\}$//'`
- CPU=`sysctl hw.sensors.it0.temp0 | cut -d '=' -f2 | cut -c1-2 `
- MainBOARD=`sysctl hw.sensors.it0.temp1 | cut -d '=' -f2 | cut -c1-2 `
- FAN=`sysctl hw.sensors.it0.fan0 | cut -d '=' -f2 | cut -c1-4 `
- echo "Current HDD Temp $HDDCUR degC (Min/Max $HDDMIN/$HDDMAX)"
- echo "Current CPU Temp $CPU degC"
- echo "Current MainBOARD Temp $MainBOARD degC"
- echo "Current CPU FAN $FAN rpm"
-
复制代码 16> Reserved for future use.... |
|