dp

Remote Sessions with Linux

This covers only a linux remote desktop and a linux client (examples provided for Debian distributions). Also multi session, multi user respectively will be covered.

log in with a new gnome-session on a remote server with Xephyr

On the server you have to enable xdmcp. Therefore edit /etc/gdm/custom.conf and set the xdmcp section as follows:


[xdmcp]
Enable=true

Further options that can be set could be:

MaxPending
MaxSessions
MaxWait

That’s all on the remote host you want to access.

On the client install Xephyr with


sudo apt-get install xserver-xephyr

Then start the server with


Xephyr -ac -screen 1280x800 -br -reset -terminate 2> /dev/null :2 &

For some explanation of the options see this site or the man page.

As we need to restore the $DISPLAY later remember the output of


echo $DISPLAY

set the $DISPLAY value to your display shown on the top of your Xephyr-window, e.g.


export DISPLAY=:2.0

Then connect via SSH to your remote computer like
ssh -XfC -c blowfish username@host gnome-session

When you’re done close the Xephyr window, it should close properly, and restore the $DISPLAY variable.

Further information can be found here:

log in to an existing remote session

First you have to enable remote desktop on the machine you want to connect to, this can be done by opening the desktop System menu, select Preferences and a click on Remote Desktop (these steps may vary in different versions). Check the boxes you want and be careful with checking Ask for your confirmation which will open a popup window on the remote machine to confirm the incoming connection. You may also set a password to protect your desktop from unauthorized access.

In order to access the remote desktop you may use vinagre or vncviewer.


sudo apt-get install vinagre
vinagre hostname:0

sudo apt-get install xvnc4viewer
vncviewer hostname:port

If you’re connecting not only to a machine on the local network you may consider to install SSH on the remote machine and configure the firewall if used.


sudo apt-get install openssh-server

on the client connect via

ssh -L 5900:localhost:5900 hostname

and keep the terminal running. Start another terminal and use vinagre or vncviewer to access the remote desktop.


vinagre localhost:5900
vncviewer localhost::5900

If you want to create additional desktops on the remote machine you have to install vncserver


sudo apt-get install vnc4server

and assign different numbers to the new desktops (the one used is :0, so use :1 and so on)

In order to configure the VNC session to launch the correct desktop you have to kill the session and edit the startup file located at $home/.vnc/xstartup (you may consider making a backup of the original configuration) and finally restart the vncserver.


vncserver -kill :1

# start – new content of xstartup file
#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

#[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
#[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#xsetroot -solid grey
#vncconfig -iconic &
#xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &

unset SESSION_MANAGER
sh /etc/X11/xinit/xinitrc
# end – new content of xstartup file

vncserver :1

Use port 5901 respectively.

Further information can be found here:


Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/7/d395059870/htdocs/dp/wp-includes/class-wp-comment-query.php on line 405

Comments are closed.