You are not logged in.

#1 2018-10-01 08:02:57

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

[Solved] X-Face with VNC problem (dbus)

I try to start up VNC server on virtual machine on boot in system mode like TigerVNC ArchWiki article describes. When I connect to VNC server via vncviewer Xface show message

Filed to connect to socket /tmp/dbus-xxxxxxxxxx: Connection refused

Then I get message

Unable to get connection to the message bus session
Could not connect: connection refused

And get empty workspace with X mouse cursor.
What's wrong?
When I start VNC server manually via SSH everything works fine.
My ~/.vnc/xstartup file is (I just copy it from .xinitrc)

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

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

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

[ -f /etc/xprofile ] && . /etc/xprofile
[ -f ~/.xprofile ] && . ~/.xprofile

twm &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &

/usr/bin/urxvtd -f -o

exec startxfce4

Last edited by Kirill Bugaev (2018-10-01 12:38:42)

Offline

#2 2018-10-01 12:37:37

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

Re: [Solved] X-Face with VNC problem (dbus)

I have found the solution: add dbus-launch to ExecStartPre= filed in vncserver@:1.service file.

[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target

[Service]
Type=simple
User=foo
PAMName=login
PIDFile=/home/%u/.vnc/%H%i.pid
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || : ; /bin/dbus-launch'
ExecStart=/usr/bin/vncserver %i -geometry 1440x900 -alwaysshared -fg
ExecStop=/usr/bin/vncserver -kill %i

[Install]
WantedBy=multi-user.target

Another words start dbus before VNC server.

Last edited by Kirill Bugaev (2018-10-01 13:11:20)

Offline

Board footer

Powered by FluxBB