配置:
- Hyper-V 虚拟机,第一代
- Manjaro 18.00 具有出色的 WM
- xrdp 服务器已安装并正在运行(https://wiki.archlinux.org/index.php/xrdp)
使用远程桌面连接程序从 Microsoft 机器连接到此 VM 会导致 WM 启动不完整(无任务栏)。
通过以下方式开始
exec /usr/bin/awesome >> ~/.cache/awesome/stdout 2>> ~/.cache/awesome/stderr
显示如下:
2019-02-25 15:13:23 W: awesome: xerror:1038: X error: request=CreateWindow (major 1, minor 0), error=BadMatch (8)
2019-02-25 15:13:23 W: awesome: xerror:1038: X error: request=CreateGC (major 55, minor 0), error=BadDrawable (9)
2019-02-25 15:13:23 W: awesome: xerror:1038: X error: request=CreateWindow (major 1, minor 0), error=BadMatch (8)
2019-02-25 15:13:23 W: awesome: xerror:1038: X error: request=CreateWindow (major 1, minor 0), error=BadMatch (8)
2019-02-25 15:13:23 W: awesome: xerror:1038: X error: request=CopyArea (major 62, minor 0), error=BadDrawable (9)
2019-02-25 15:13:23 W: awesome: xerror:1038: X error: request=CopyArea (major 62, minor 0), error=BadDrawable (9)
2019-02-25 15:13:23 W: awesome: xerror:1038: X error: request=CopyArea (major 62, minor 0), error=BadDrawable (9)
(light-locker:3097): Gtk-WARNING **: 15:13:23.158: Theme parsing error: gtk.css:12:80: 'gtkalpha' is not a valid color name
(light-locker:3097): Gtk-WARNING **: 15:13:23.158: Theme parsing error: gtk.css:15:80: 'gtkalpha' is not a valid color name
** (light-locker:3097): ERROR **: 15:13:23.230: Environment variable XDG_SESSION_PATH not set. Is LightDM running?
(blueman-applet:3121): Gtk-WARNING **: 15:13:23.302: Theme parsing error: gtk.css:12:80: 'gtkalpha' is not a valid color name
(blueman-applet:3121): Gtk-WARNING **: 15:13:23.302: Theme parsing error: gtk.css:15:80: 'gtkalpha' is not a valid color name
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/dbus/bus.py", line 175, in activate_name_owner
return self.get_name_owner(bus_name)
File "/usr/lib/python3.7/site-packages/dbus/bus.py", line 361, in get_name_owner
's', (bus_name,), **keywords)
File "/usr/lib/python3.7/site-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.bluez': no such name
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/sbin/blueman-applet", line 121, in <module>
BluemanApplet()
File "/sbin/blueman-applet", line 63, in __init__
self.Plugins.Load()
File "/usr/lib/python3.7/site-packages/blueman/main/PluginManager.py", line 90, in Load
__import__(self.module_path.__name__ + ".%s" % plugin, None, None, [])
File "/usr/lib/python3.7/site-packages/blueman/plugins/applet/AuthAgent.py", line 9, in <module>
import blueman.main.applet.BluezAgent as BluezAgent
File "/usr/lib/python3.7/site-packages/blueman/main/applet/BluezAgent.py", line 23, in <module>
from blueman.bluez.Agent import Agent, AgentMethod
File "/usr/lib/python3.7/site-packages/blueman/bluez/Agent.py", line 48, in <module>
class Agent(dbus.service.Object):
File "/usr/lib/python3.7/site-packages/blueman/bluez/Agent.py", line 56, in Agent
@AgentMethod
File "/usr/lib/python3.7/site-packages/blueman/bluez/Agent.py", line 38, in AgentMethod
if BlueZInterface.get_interface_version()[0] < 5:
File "/usr/lib/python3.7/site-packages/blueman/bluez/BlueZInterface.py", line 16, in get_interface_version
obj = dbus.SystemBus().get_object('org.bluez', '/')
File "/usr/lib/python3.7/site-packages/dbus/bus.py", line 241, in get_object
follow_name_owner_changes=follow_name_owner_changes)
File "/usr/lib/python3.7/site-packages/dbus/proxies.py", line 248, in __init__
self._named_service = conn.activate_name_owner(bus_name)
File "/usr/lib/python3.7/site-packages/dbus/bus.py", line 180, in activate_name_owner
self.start_service_by_name(bus_name)
File "/usr/lib/python3.7/site-packages/dbus/bus.py", line 278, in start_service_by_name
'su', (bus_name, flags)))
File "/usr/lib/python3.7/site-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.bluez': timed out (service_start_timeout=25000ms)
2019-02-25 15:14:00 W: awesome: xerror:1038: X error: request=CopyArea (major 62, minor 0), error=BadDrawable (9)
~/.xinitrc 的内容是
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# awesome is kept as default
DEFAULT_SESSION=awesome
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
get_session(){
local dbus_args=(--sh-syntax --exit-with-session)
case $1 in
awesome) dbus_args+=(awesome) ;;
bspwm) dbus_args+=(bspwm-session) ;;
budgie) dbus_args+=(budgie-desktop) ;;
cinnamon) dbus_args+=(cinnamon-session) ;;
deepin) dbus_args+=(startdde) ;;
enlightenment) dbus_args+=(enlightenment_start) ;;
fluxbox) dbus_args+=(startfluxbox) ;;
gnome) dbus_args+=(gnome-session) ;;
i3|i3wm) dbus_args+=(i3 --shmlog-size 0) ;;
jwm) dbus_args+=(jwm) ;;
kde) dbus_args+=(startkde) ;;
lxde) dbus_args+=(startlxde) ;;
lxqt) dbus_args+=(lxqt-session) ;;
mate) dbus_args+=(mate-session) ;;
xfce) dbus_args+=(xfce4-session) ;;
openbox) dbus_args+=(openbox-session) ;;
*) dbus_args+=($DEFAULT_SESSION) ;;
esac
echo "dbus-launch ${dbus_args[*]}"
}
exec $(get_session)
有人能提供一个 .xinitrc 文件或一些如何正确设置 xrdp 的方法吗?无需远程桌面连接即可登录,一切正常。
难道 lightdm 执行 /etc/lightdm/Xsession 而不仅仅是 ~/.xinitrc?...
答案1
这个问题与 AwesomeWM 没有直接关系。上面的堆栈跟踪是 Python 的,而 AwesomeWM 是用 Lua 编写的。BlueZ 是蓝牙堆栈。无论如何,它在远程桌面上没有什么意义。它不是由 AwesomeWM 启动的,所以我猜你有另一个脚本启动它(可能是来自 AwesomeWM 自己的rc.lua
?另一种可能性是,你有一些脚本~/.config/autostart/
,它们(不知何故)被执行了(AwesomeWM 也不.xinitrc
会这样做)。
在这两种情况下,答案都是“使用远程桌面时不要启动蓝牙服务,dbus 会话显然不同,并且不起作用”