No Window manager in xvfb

Forum rules
Before you post please read how to get help
Post Reply
BernysPeur
Level 1
Level 1
Posts: 13
Joined: Wed Nov 07, 2012 3:27 pm

No Window manager in xvfb

Post by BernysPeur » Sat Aug 31, 2019 5:24 pm

Hello!

I am trying to setup a virtual desktop for remote access on a Mint 19.2 Mate. Previously I was using Mint 17.3 with tigervnc server but it seems to not work with Mint 19.2.

My goal is to control the remote machine just as if I was in front of it, with the Mate graphical interface. It was working with Mint 17.3 with tigervnc but now with Mint 19.2 the vnc client only displays a black screen and Mate crashes at client side.

As tigervnc do not wotk with Mint 19.2 I tryed to create a virtual frame buffer with xvfb

Code: Select all

Xvfb :99 -screen 0 800x600x24 &
then I run a x11vnc on this virtual frame buffer.

Code: Select all

x11vnc -display :99 -localhost &
At server side I export display to the virtual frame buffer

Code: Select all

export DISPLAY=:99
At client side I am able to see the virtual display using ssvnc.

The problem is that at client side I can see the useful part of the program (the inside of the window), but there is no actual window (no border, no title). It seems there is no window manager for this display.

How could I at least start a window manager in this virtual frame buffer? The best would be to have the full Mate environment

Thanks!

BernysPeur
Level 1
Level 1
Posts: 13
Joined: Wed Nov 07, 2012 3:27 pm

Re: No Window manager in xvfb

Post by BernysPeur » Tue Sep 03, 2019 4:36 am

Did I ask this question on the wrong forum?

User avatar
catweazel
Level 19
Level 19
Posts: 9182
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: No Window manager in xvfb

Post by catweazel » Tue Sep 03, 2019 4:39 am

BernysPeur wrote:
Tue Sep 03, 2019 4:36 am
Did I ask this question on the wrong forum?
Probably not. Perhaps there's nobody around that knows xvfb.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

rene
Level 11
Level 11
Posts: 3611
Joined: Sun Mar 27, 2016 6:58 pm

Re: No Window manager in xvfb

Post by rene » Tue Sep 03, 2019 7:18 am

At the very least the proposed solution to tigervnc not working seems a little crass. I.e., after sudo apt-get install vino and /usr/lib/vino/vino-server on a Mint 19.2 Xfce target I can connect with for example remmina from a Mint 19.2 Cinnamon system without issue. Run vino-server from the desktop startup applications if also for you; that was also the setup back when vino was still included, in 18, or 17.

rene
Level 11
Level 11
Posts: 3611
Joined: Sun Mar 27, 2016 6:58 pm

Re: No Window manager in xvfb

Post by rene » Tue Sep 03, 2019 7:33 am

Rereading this... err... why xvfb in the first place? If I simply run x11vnc on target directly I can also connect fine. Or, well, not fine in the sense that I seem to be experiencing significant screen corruption but certainly no "black screen". I'll assume the corruption some uninteresting local issue I'm not now going to chase....

[EDIT] Corruption solved by using tigervnc-viewer instead of remmina; server still just x11vnc. I.e., colour me confused as to what the issue was, unless it's (again) something MATE-specific. In that case I can really only advise to not use Mint MATE.

[EDIT] ... and now also tested with tigervnc-server-scraping (i.e., x0vncserver -SecurityTypes none) as the server. All well.

BernysPeur
Level 1
Level 1
Posts: 13
Joined: Wed Nov 07, 2012 3:27 pm

Re: No Window manager in xvfb

Post by BernysPeur » Wed Sep 04, 2019 2:11 pm

Thank you rene for you answer.

Actually I wanted to use xvfb because I was looking for a way to connect to the remote computer to a virtual desktop, I mean not the actual desktop displayed on the physical screen of the remote computer, but another desktop. That is what tigerVNC server did when I used it with MATE 17.3. I was remotely browsing the web on this computer's virtual desktop with tigerVNC server while my children were watching a movie on the actual physical screen of this computer.

Now after some tests I wonder if the problem is located in the xstartup file, that do not launch a window manager for the new desktop?

xstartup looks like this on my vnc server:
I'm not expert, but I don't see the startup of a window manager.
What could I do?

Code: Select all

#!/bin/sh

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
OS=`uname -s`
if [ $OS = 'Linux' ]; then
  case "$WINDOWMANAGER" in
    *gnome*)
      if [ -e /etc/SuSE-release ]; then
        PATH=$PATH:/opt/gnome/bin
        export PATH
      fi
      ;;
  esac
fi
if [ -x /etc/X11/xinit/xinitrc ]; then
  exec /etc/X11/xinit/xinitrc
fi
if [ -f /etc/X11/xinit/xinitrc ]; then
  exec sh /etc/X11/xinit/xinitrc
fi
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

rene
Level 11
Level 11
Posts: 3611
Joined: Sun Mar 27, 2016 6:58 pm

Re: No Window manager in xvfb

Post by rene » Thu Sep 05, 2019 4:18 am

Ah, I see. VNC is generally used to attach to an existing X server. But yes, it seems a change in D-Bus has fouled up formerly working setups. Had something working with an xstartup that did an explicit dbus-launch startxfce4 but....

You don't need VNC: X is quite by design network transparent and the on Mint used LightDM display manager makes that easy to use. Basically all you need is to on the target, the to be remotely accessed machine, edit /etc/lightdm/lightdm.conf and add

Code: Select all

[XDMCPServer]
enabled=true
and on the machine that is remotely accessing use e.g.:

Code: Select all

Xephyr :1 -screen <resolution> -query <target>
You can not / should not log in to an independent graphical session with the same user more than once concurrently; the children would be logged on to one account, you'd log in to another. During testing here this meant I needed to tweak autologin lest the XDMCP user would also try to autologin as that one user, so for completeness, I have this on target, a Mint 19.2 Xfce system (restart LightDM or reboot after editing):

Code: Select all

rene@hp8k:~$ cat /etc/lightdm/lightdm.conf
[Seat:*]
autologin-guest=false
autologin-user-timeout=0

[Seat:seat*]
autologin-user=rene

[XDMCPServer]
enabled=true
and access as, from a Mint 19.2 Cinnamon system:

Code: Select all

Xephyr :1 -screen 1024x768 -query hp8k
which gets me the LightDM login screen from where I can log in as a secondary user. You can of course make that a script or alias...

For some reason, adding

Code: Select all

[Seat:xdmcp*]
autologin-user=<secondary user>
does not work to autologin the XDMCP user even though the XDMCP seats are in fact called xdmcp0 and so on (seat0 and so on for local users). LightDM seems distressingly undocumented so I haven't tried hard. If you will be, note /var/log/lightdm/lightdm.log on target.

Now, mind you, even though the above works nicely, and while I find VNC to not be the right approach in this instance, LightDM can in fact also automatically do what you are more specifically asking. After adding

Code: Select all

[VNCServer]
enabled=true
to target's /etc/lightdm/lightdm.conf and, on target, sudo apt-get install tigervnc-common tigervnc-standalone-server you can also, after on the accessing system sudo apt-get install tigervnc-viewer, access the to be accessed system with vncviewer -- but this needs some additional setup w.r.t. either disabling or providing for authentication which I didn't bother with. Thought I'd still mention it but recommend sticking with XDMCP.

Post Reply

Return to “MATE”