我在配置完我新装的dwm后想设置一个开机自启。首先参考了设置rc-local.server的方法。但是报错说
Failed to connect to bus: No medium found
dbus-update-activation-environment: error: unable to connect to D-bus: Using X11 for dbus-daemon autolaunch was disabled at compile time,set yourDBUS_SESSION_BUS_ADDRESS instead
/etc/X11/xinit/xinitrc: line 51: twm: command not found
/etc/X11/xinit/xinitrc: line 55: exec: xterm: not found
/etc/X11/xinit/xinitrc: line 54: xterm: command not found
/etc/X11/xinit/xinitrc: line 53: xterm: command not found
/etc/X11/xinit/xinitrc: line 52: xclock:command not found
xinit: connection to X server lost
waiting for X server to shutdown .(II) Server terminated successfully (0). Closing log file.
我暂时没弄明白这个怎么去修复但是我发现了一种直接写进你的登录bash的方法。
原网站:
[SOLVED]"failed to connect to bus : no medium found" (psd) / Newbie Corner / Arch Linux Forums
紧接着我点击在评论下方跟着的一行中最后一个 Your xinitrc
is broken:
xinit - ArchWiki (archlinux.org)
换了一种写法,可以实现登陆后自动运行xinit。我是在/etc/bash.bashrc里加上的。我会在后续写上BUS遗失的解决方案。
在安装dwm之后需要开机自启的话,去到/etc/zsh里面有/zprofile,在那里面改,因为我换shell了。