Black screen after loging out in XFCE

967 views
Skip to first unread message

guil...@gmail.com

unread,
Mar 22, 2017, 10:34:15 AM3/22/17
to TigerVNC User Discussion/Support
Having a issue TigerVNC and XFCE, not sure what I'm doing wrong.

When I log out from the XFCE session, I can see the wallpaper, but if I resize the window, or I close TigerVNC and connect to the server again, I only can see a black window. Weirdly, if I left it run it, eventually it will show me the screen saver, but if I click the mouse or press a key, the window goes black again.

I did quite a bit of research, but no solution seems to work, not sure really if this is expected or not. (For the record, a solution would be to not log out anymore, but since this setup will be accessed by many users, I can't really trust they will not log off ever, even by mistake).

Any ideas?

This is my xstartup:


#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &


Tried this version too, but same result:

#!/bin/bash

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec /bin/sh /etc/xdg/xfce4/xinitrc # X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey

startxfce4 &


Pierre Ossman

unread,
Mar 22, 2017, 12:17:37 PM3/22/17
to guil...@gmail.com, TigerVNC User Discussion/Support
On 03/22/2017 03:34 PM, guil...@gmail.com wrote:
> Having a issue TigerVNC and XFCE, not sure what I'm doing wrong.
>
> When I log out from the XFCE session, I can see the wallpaper, but if
> I resize the window, or I close TigerVNC and connect to the server
> again, I only can see a black window. Weirdly, if I left it run it,
> eventually it will show me the screen saver, but if I click the mouse
> or press a key, the window goes black again.
>
> I did quite a bit of research, but no solution seems to work, not
> sure really if this is expected or not. (For the record, a solution
> would be to not log out anymore, but since this setup will be
> accessed by many users, I can't really trust they will not log off
> ever, even by mistake).
>
> Any ideas?
>

The default behaviour of vncserver is to keep the session around even if
xstartup terminates. You can specify -autokill to change this. However
in that case you need to also make sure that your xstartup script
doesn't exit until you want the session to end. In your case it should
be enough to remove the final &.

Regards
--
Pierre Ossman Software Development
Cendio AB https://cendio.com
Teknikringen 8 https://twitter.com/ThinLinc
583 30 Linköping https://facebook.com/ThinLinc
Phone: +46-13-214600 https://plus.google.com/+CendioThinLinc

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

guil...@gmail.com

unread,
Mar 23, 2017, 9:32:28 PM3/23/17
to TigerVNC User Discussion/Support, guil...@gmail.com

Thanks for the quick reply. I was able to do the changes, and indeed now the tigervnc ends the session. However, it is not possible to connect again after that, I suppose because the service is down.
I searched for a way to set an automatic restart for the service one is down, but systemd doesn't seems to find the service.
Could you let me know what would be the best way to set an automatic restart of the vncserver?
Thanks.

Pierre Ossman

unread,
Mar 30, 2017, 8:22:53 AM3/30/17
to guil...@gmail.com, TigerVNC User Discussion/Support
I'm afraid my knowledge of systemd isn't enough to help you here. :/
Perhaps you can make a wrapper script that just calls vncserver again in
an infinite loop?

guil...@gmail.com

unread,
Mar 31, 2017, 11:30:15 AM3/31/17
to TigerVNC User Discussion/Support, guil...@gmail.com
Ok, no problem, thanks.

dwar...@gmail.com

unread,
Jun 22, 2017, 8:47:41 AM6/22/17
to TigerVNC User Discussion/Support, guil...@gmail.com
Same issue, deleted ~/.Xauthority and that seemed to do the trick.
Reply all
Reply to author
Forward
0 new messages