我的OpenBSD配置檔案

2021-06-06 17:47:06 字數 3626 閱讀 2473

以kiss為原則的openbsd讓人非常喜歡, 記錄一下配置檔案以備用。

$cat /etc/profile

#pkg_path=

pkg_path=

[email protected]:/cvs

obdoc=/home/sw2wolf/qachina/db/doc/openbsd

if [ "$user" = root ]; then

path=/sbin:/usr/sbin:/bin:/usr/bin:/usr/x11r6/bin:/usr/local/bin:/usr/local/sbin

#ps1="\`hostname -s\`:\`pwd\`# "

ps1="\t (\j)(\w) :# "

else

path=/bin:/usr/bin:/usr/x11r6/bin:/usr/local/bin:/usr/local/sbin:/usr/games:.

ps1="\t (\j)(\w) :$ "

fiexport path ps1 cvsroot pkg_path obdoc

alias vi='vim'

$cat /etc/rc.conf.local

sendmail_flags=no

inetd_flags=no

xdm_flags=yes

網路 $ cat /etc/hostname.rl0

inet 192.168.1.5 255.255.255.0

$ cat/etc/mygate

192.168.1.1

$ cat /etc/resolv.conf

lookup file bind

nameserver 61.139.2.69

nameserver 8.8.8.8

$cat

/etc/mixerctl.conf

# output volume value for most audio cards

#outputs.master=200

outputs.master=200,200

outputs.master.mute=off

$ cat /etc/mk.conf

wrkobjdir=/usr/obj/ports

distdir=/usr/distfiles

package_repository=/usr/packages

fetch_cmd=/usr/local/bin/axel -a -s4

master_site_override=\

$ cat

~/.profile

export lang="zh_cn.utf-8"

export lc_ctype="zh_cn.utf-8"

export lc_collate="zh_cn.utf-8"

export lc_time="zh_cn.utf-8"

export lc_numeric="zh_cn.utf-8"

export lc_monetary="zh_cn.utf-8"

export lc_messages="zh_cn.utf-8"

export lc_all="zh_cn.utf-8"

path=$home/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/x11r6/bin:/usr/local/bin:/usr/local/sbin:/usr/games:.

export path home term

alias pkg_list='lynx -dump $pkg_path/index.txt > $home/pkglist.txt'

alias ls='ls -f'

xdm需要(直接聯結~/.xinitrc就可以了)

$ cat ~/.xsession

#!/bin/sh

export xim_program=/usr/local/bin/scim

export xmodifiers=@im=scim

export gtk_im_module=scim

export qt_im_module=scim

xsetroot -cursor_name left_ptr

xsetroot -solid black

xmodmap ~/.xmodmap

scim -d &

xterm  -e ~/bin/tmuxz &

exec /usr/local/bin/dwm

$cat ~/.xmodmap

keycode 115 = super_l

clear mod4

add mod4 = super_l !

! redefine capslock as control_l

!remove lock = caps_lock

keycode 0x42 = control_l

add control = control_l

!! swap caps_lock and control_l

!!remove lock = caps_lock

!remove control = control_l

!keysym control_l = caps_lock

!keysym caps_lock = control_l

!add lock = caps_lock

!add control = control_l

用xterm -e ~/bin/tmuxz啟動,將終端視窗分成上下兩個panel

$cat ~/bin/tmuxz

#!/bin/sh

cmd=$(which tmux)

session=$user@$hostname

if [ -z $cmd ]; then

echo "you need to install tmux."

exit 1

fi$cmd has -t $session

if [ $? != 0 ]; then

$cmd new -d -n work -s $session "ksh"

$cmd splitw -v -p 65 -t $session "ksh"

$cmd select-pane -t 1

fi$cmd att -t $session

exit 0

#xterm -geometry 159x25+0+438 -e "tmux -q has-session && exec tmux attach-session -d || exec tmux new-session -n$user -s$user@$hostname"

由於openbsd不支援wine及virtualbox, 只好用qemu跑一些windows程式 (效能較差,但有好過無)

$ cat ~/bin/xp

qemu -hda winxp.img -m 512 -boot c -nographic -daemonize -redir tcp:3389::3389

$ cat ~/bin/rxp

rdesktop -u sw2wolf -p *** -g 1440x880 -d -k -r sound:remote localhost:3389

我的vi配置檔案

syntax on set showcmd set showmatch set smartcase set expandtab set autowrite set mouse a set autoindent set smartindent set tabstop 4 set shiftwidth ...

我的VIM的配置檔案

root leo desktop cat vimrc 說明 將此檔案重新命名為.vimrc並拷貝到 下 將plugin下的檔案安裝 拷貝到 usr share vim vim71 plugin 下 set nu 設定行號 set autoindent 設定自動縮排 set cindent 設定c語言...

drbd配置檔案 drbd配置檔案

drbd配置檔案 vim usr local drbd etc drbd.d global common.conf global usage count yes 是否參加drbd使用者統計 common protocol c 使用drbd的第三種同步協議 disk 使用dpod功能保證在數 on i...