我按照Griffon的指南在Ubuntu18.04 (http://c-nergy.be/blog/?p=12761)上安装了xrdp,但是修改了/etc/xrdp/startwm.sh
,使其与gnome-flashback-metacity
一起使用:
#test -x /etc/X11/Xsession && exec /etc/X11/Xsession
#exec /bin/sh /etc/X11/Xsession
#gnome-session
gnome-session --session=gnome-flashback-metacity --disable-acceleration-check & gnome-panel
我可以从Windows客户端(会话: Xorg)登录,但是桌面似乎缺少了应用程序菜单(特别是终端)中的各种项目,以及指示器图标。我可以使用“右键单击主页,打开终端”来启动gnome终端。
注:根据过去的经验,我认为这可能与权限有关。但是,我无法判断这是xrdp或GNOME Flashback的问题,还是我的配置错误。在物理机器上定期登录可以正常工作。
Current /etc/xrdp/startwm.sh:
#!/usr/bin/env bash
#
# This script is an example. You might need to edit this script
# depending on your distro if it doesn't work for you.
#fixGDM-by-Griffon
gnome-shell-extension-tool -e ubuntu-appindicators@ubuntu.com
gnome-shell-extension-tool -e ubuntu-dock@ubuntu.com
if [ -f ~/.xrdp-fix-theme.txt ]; then
echo 'no action required'
else
gsettings set org.gnome.desktop.interface gtk-theme 'Ambiance'
#gsettings set org.gnome.desktop.interface icon-theme 'Humanity'
gsettings set org.gnome.desktop.interface icon-theme 'Ubuntu-mono-dark'
echo 'check file for xrdp theme fix' >~/.xrdp-fix-theme.txt
fi
#
# Uncomment the following line for debug:
# exec xterm
# Execution sequence for interactive login shell - pseudocode
#
# IF /etc/profile is readable THEN
# execute ~/.bash_profile
# END IF
# IF ~/.bash_profile is readable THEN
# execute ~/.bash_profile
# ELSE
# IF ~/.bash_login is readable THEN
# execute ~/.bash_login
# ELSE
# IF ~/.profile is readable THEN
# execute ~/.profile
# END IF
# END IF
# END IF
pre_start()
{
if [ -r /etc/profile ]; then
. /etc/profile
fi
if [ -r ~/.bash_profile ]; then
. ~/.bash_profile
else
if [ -r ~/.bash_login ]; then
. ~/.bash_login
else
if [ -r ~/.profile ]; then
. ~/.profile
fi
fi
fi
return 0
}
# When loging out from the interactive shell, the execution sequence is:
#
# IF ~/.bash_logout exists THEN
# execute ~/.bash_logout
# END IF
post_start()
{
if [ -r ~/.bash_logout ]; then
. ~/.bash_logout
fi
return 0
}
#start the window manager
wm_start()
{
if [ -r /etc/default/locale ]; then
. /etc/default/locale
export LANG LANGUAGE
fi
# debian
if [ -r /etc/X11/Xsession ]; then
pre_start
export DESKTOP_SESSION=gnome-flashback-metacity
export XDG_CURRENT_DESKTOP="GNOME-Flashback:GNOME"
export GDMSESSION=gnome-flashback-metacity
export XDG_SESSION_DESKTOP=gnome-flashback-metacity
. /etc/X11/Xsession
post_start
exit 0
fi
# el
if [ -r /etc/X11/xinit/Xsession ]; then
pre_start
. /etc/X11/xinit/Xsession
post_start
exit 0
fi
# suse
if [ -r /etc/X11/xdm/Xsession ]; then
# since the following script run a user login shell,
# do not execute the pseudo login shell scripts
. /etc/X11/xdm/Xsession
exit 0
fi
pre_start
xterm
post_start
}
#. /etc/environment
#export PATH=$PATH
#export LANG=$LANG
# change PATH to be what your environment needs usually what is in
# /etc/environment
#PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
#export PATH=$PATH
# for PATH and LANG from /etc/environment
# pam will auto process the environment file if /etc/pam.d/xrdp-sesman
# includes
# auth required pam_env.so readenv=1
wm_start
exit 1
Current . .xsession:
/usr/lib/gnome-session/run-systemd-session gnome-session-flashback.target
发布于 2018-12-15 12:44:27
结果是配置错误,并且误解了GNOME Flashback环境通常是如何初始化的。在查看了相关的配置文件-- /usr/lib/systemd/user/gnome-session.service
和/usr/share/xsessions/gnome-flashback-metacity.desktop
之后,我做了以下修改,以模拟xrdp的相同行为:
/etc/xrdp/startwm.sh:
# these global variables are set during normal login through gdm greeter
export DESKTOP_SESSION=gnome-flashback-metacity
export XDG_CURRENT_DESKTOP="GNOME-Flashback:GNOME"
export GDMSESSION=gnome-flashback-metacity
export XDG_SESSION_DESKTOP=gnome-flashback-metacity
这些导出应该在. /etc/X11/Xsession
之前的某个位置设置(当xsession启动时)
~/..xsession:
# starting the session through systemd, just like normal login through gdm greeter
/usr/lib/gnome-session/run-systemd-session gnome-session-flashback.target
直接运行gnome-session
命令会导致指示符图标不显示(类似于Gnome-面板小程序“指示小程序完成”缺少图标.)。因此,虽然使用run-systemd-session
已经解决了这一问题,但我还没有确定在正常登录期间启动gnome-panel
(包含指示图标的面板)的部分,因此对于xsession,我必须向启动应用程序添加gnome-panel
。
https://askubuntu.com/questions/1101012
复制相似问题