測試常用
簡要安裝備忘
- 要用 ssh 連線 => apt install ssh
- 要使用 xfce4 => apt install xfce4
- 要使用 xrdp => apt install xrdp
- 搜尋 package => apt-cache search stm32flash
xrdp 無法啟動 xfce4
在 Ubuntu Linux 上安裝 xrdp,但一直無法啟動 xfce4,部分錯誤訊息如下。
............
dbus-update-activation-environment: setting LC_PAPER=lzh_TW
xfce4-session-Message: 13:46:21.699: SSH authentication agent is already running
gpg-agent: a gpg-agent is already running - not starting a new one
(xfwm4:4332): xfwm4-WARNING **: 13:46:21.922: Unsupported GL renderer (SVGA3D; build: RELEASE; LLVM;).
(xfwm4:4332): xfwm4-WARNING **: 13:46:22.834: Failed to connect to session manager: Failed to connect to the session manager: IO error occured opening connection
Segmentation fault (core dumped)
在網路上找不到解決的辦法,就參考 Arch Linux 的作法。修改 /etc/xrdp/startwm.sh,讓使用者可以使用 ~/.xinitrc 來啟動。修改如下。
#!/bin/sh
# xrdp X session start script (c) 2015, 2017, 2021 mirabilos
# published under The MirOS Licence
# Rely on /etc/pam.d/xrdp-sesman using pam_env to load both
# /etc/environment and /etc/default/locale to initialise the
# locale and the user environment properly.
if test -r /etc/profile; then
. /etc/profile
fi
if [ -r ~/.xinitrc ]; then
. ~/.xinitrc
exit 0
fi
test -x /etc/X11/Xsession && exec /etc/X11/Xsession
exec /bin/sh /etc/X11/Xsession
紅色部分是多加上去的,判斷假如 ~/.xinitrc 存在,則執行它。.xinitrc 的內容如下。
#!/bin/sh
exec dbus-launch --sh-syntax startxfce4
可能需要執行 chmod +x .xinitrc,設成可執行。
沒有留言:
張貼留言