[kwlug-disc] GUI Remote Access

B.S. bs27975.2 at gmail.com
Sat Jun 24 21:21:16 EDT 2017


Correction: ignore anything ssh, it doesn't apply to your use case.

Instead, the vnc alias given entirely suffices. e.g. vnc othermachine,
where othermachine is in your hosts file, or whatever.


On 06/24/2017 09:17 PM, B.S. wrote:
> On 06/23/2017 06:35 PM, Khalid Baheyeldin wrote:
>> Say you have two desktops, both running Ubuntu 16.04 with XFCE.
>>
>> What are the available packages to allow on to access the other from and to
>> the full GUI?
>>
>> VNC was a solution some time ago. Also there was NoMachine.
>>
>> What packages do I need at either end?
> 
> Assumptions:
> - you will be connecting via ssh first. i.e. You aren't expecting to
> native app connect across the internet via non-ssh ports, directly.
> [Could easily be a net only shell-less ssh connect, too.]
> - you aren't looking to create your own session that survives logoff.
> e.g. screen, or 2nd X session, etc.
> - you are looking to go from one desktop to another. DISPLAY=:0 on both
> sides.
> 
> 
> In /etc/kde4/kdm/Xsetup, or your appropriate place (often within /etc/xdg?):
> 
> HOME=/root /usr/bin/x11vnc -nossl -display :0 -rfbport 5900 -noipv6
> -shared -forever -tightfilexfer -rfbauth /etc/passwd-vnc-full -users
> +nobody -solid black -logfile /var/log/x11vnc -flag /var/log/x11vnc-port
> -rmflag create:/var/log/x11vnc-pid -skip_lockkeys -clear_mods
> -clear_keys -clear_all -gui simple,tray -unsafe -permitfiletransfer
> -alwaysshared -ncache 10 -ncache_cr -allow <A.B.C. of your net, e.g.
> '192.168.0.'> -bg > /var/log/x11vnc.log 2>&1
> 
> 
> I have an alias 'vnc' that auto-connects to the above. Executables
> fetched from http://www.tightvnc.com/download.php, I believe - TightVNC
> Java Viewer.
> 
> Looks like I run 1.6.0_41 (as later versions prompt / work directly over
> ssh, and I'm explicitly looking to not be prompted - if I need ssh, I
> will have started it already).
> 
> The script that the vnc alias calls includes:
> 
> eval "java -jar /usr/local/src/tightvnc-jviewer.jar $@ $server $passargs
> -AllowClipboardTransfer -ShareDesktop -CompressionLevel=1
> -JpegImageQuality=Lossless  -LocalPointer=On -ColorDepth=8
> -ScalingFactor=88 &> /dev/null &"
> 
> This all 'just works'.
> 
> 
> In some cases I've had remotes that autossh in to me (net only), others
> openvpn in. In the ssh cases I can set up auto-remote/local port
> forwards, in the vpn cases they have an ip so forwards aren't needed.
> 
> 
> More caveats:
> - The above describes vnc starting up with X, so you can see the initial
> login. And survive an X logout.
> - I auto-login to X with auto-screenlock set. i.e. X is started and all
> user initial X things completed by the time I get there. I still need to
> unlock the screen, but at least all the initial stuff has run.
> 
> If you don't start X with the system, that's OK - whenever you do ssh in
> and start X, vnc will come along for the ride, above.
> 
> If vnc fails along the way (usually because I've killed it for some
> reason), I have an alias to start it (while ssh'ed in):
> 
> alias startvnc='x11vnc -nossl -display :0 -shared -forever
> -tightfilexfer -avahi -allow A.B.C. -unsafe -q -N -rfbport 5900 -usepw
> -noipv6 -bg -gui tray'
> 
> 
> HTH. GL&HF.
> 
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
> 




More information about the kwlug-disc mailing list