x11vnc much slower than Xvnc + how to get a Xubuntu session manually
I managed to answer the Alternative part of my question, i.e. use vnc4server or tightvncserver to start a Xubuntu session instead of a plain XFCE session. This is separate from LightDM, which can then be stopped or put on manual. I'll investigate Nicholas's suggestions later.
This is equivalent to logging in via LightDM with a Xubuntu session, it remains alive if my vnc connection dies or I disconnect, and I get to enjoy the Xubuntu customizations.
To do that, make ~/.vnc/xstartup
contain just the following:
#!/bin/sh
export XDG_CONFIG_DIRS=/etc/xdg/xdg-xubuntu:/etc/xdg:/etc/xdg
export XDG_DATA_DIRS=/usr/share/xubuntu:/usr/local/share/:/usr/share/:/usr/share
vncconfig -iconic &
. lightdm-session
You can replace . lightdm-session
with exec startxfce4
or startxfce4 &
. The former is really what LightDM calls, but it calls xfce4-session in the end.
This then starts a Xubuntu session, rather than a plain XFCE one, and you can stop LightDM altogether if X/keyboard access is not needed.
You can configure a daemon by placing the following in /etc/init/vncserver.conf
:
start on runlevel [2345]
stop on runlevel [016]
post-start script
su USER -c "vncserver :1 -geometry 1280x800 -depth 16 -localhost -SecurityTypes None"
end script
post-stop script
su USER -c "vncserver -kill :1"
end script
Then start/stop it with start vncserver
. The above is for vnc4server and will start Xvnc listening only on 127.0.0.1 and will not require a password. This is handy for me as I use an ssh tunnel anyway:
ssh -L6901:127.0.0.1:5901 [email protected]
If you use tightvncserver, then delete the option -SecurityTypes None as it doesn't understand it. Note that tightvncserver always asks for a password (you can't make it passwordless).
NOTE: if USER above is not root, or if you run "vncserver :1 [options]" as non-root, then inside XFCE there will be issues sudo-ing into GUI apps because the underlying sudo-ed app will not find an X display. I haven';t yet found a fix for this. With x11vnc it works because x11vnc connects to an existing X session, including the :0 one.
Related videos on Youtube
Mankka
Updated on September 18, 2022Comments
-
Mankka over 1 year
Can I change the way Maxima displays the transpose operator? The (default) of just printing "transpose" uses very much space and makes the formulae harder to read.
When I enter:
transpose(M)
I would like it to print something like
MT.I use Maxima through wxMaxima.
PS. There is no tag for wxMaxima on SO.
-
Admin over 10 yearsDisclaimer: I work for www.realvnc.com, but have you considered using our free version of Xvnc? Or our free version of x11vnc (we call it vncserver-x11)? Worth seeing if our packages are any easier to set up, or faster. Having said that though, LightDM might be a total pain to configure (I use gdm and wouldn't know), so it could be our software isn't any easier for you on that front.
-
Admin over 10 yearsThanks for replying. It doesn't dictate, really. Making Xvnc the X server for LightDM might be an option, I haven't thought of that. X is not hardcoded in lightdm, as it supports the option
xserver-command=X -depth 16
which can be set to anything. However, I think the host would want access to the vm as well via normal X. I shall try though. ALso, LightDM does support VNC natively via a [VNCServer] group in its .conf file, which will start Xvnc whenever someone connects to 5901. This is fast, but the whole session dies and kills all apps if my VNC connection dies, so that's not ideal. -
Admin over 10 yearsI tried vncserver-11 and couldn't quite managed. Keeps saying 'unable to open display'. I start LightDM normally, which starts X on :0 and then I tried "vncserver-11 --display=:0" or --display=0. The docs say to start vncserver-x11 while in X, but the machine is headless (I'm on ssh). I also tried "vncserver-x11-serviced" which seems to work but asks for a password upon connection which I don't know and is not the one set in /root/.vnc/passwd. Also, all options I place in /etc/vnc/config.d/vncserver-x11-serviced seem to be ignored (I added "-SecurityTypes None"). Any clues? I'm giving up...
-
Admin over 10 yearsRun two lightdms then-if it supports multiseat? To run vncserver-x11 or any X app you probably need to copy the XAUTHORITY variable from the console session. As for the serviced, if you have an Enterprise trial it'll be prompting for your system password (only root has access initially), otherwise you'll need to run "vncpasswd /root/.vnc/config.d/vncserver-x11" to set a VNC password. You set the security types for the daemon in /root/.vnc/config.d/vncserver-x11 too with an = to separate. Hope that helps, sorry for the frustration.
-
-
Mankka over 7 yearsNow I just have to find I way to fix it in wxMaxima too.