Difference between revisions of "Remote display connections"
| (11 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
== Configuring your system - Remote display connections == | == Configuring your system - Remote display connections == | ||
| − | Windows users will be familiar with remote desktop, which uses the RDP protocol. There are a number of linux clients that provide connectivity using RDP. Before you continue, you may want to ensure the '''rdesktop''' USE flag is set in your '' | + | === Remote Desktop === |
| + | |||
| + | Windows users will be familiar with remote desktop, which uses the RDP protocol. There are a number of linux clients that provide connectivity using RDP. Before you continue, you may want to ensure the '''rdesktop''' USE flag is set in your ''make.conf'', or per-package as below. | ||
The rdesktop package provides command-line functionality for RDP connections. There is a gtk based frontend for the redesktop package called grdesktop, which is what we will focus on here. | The rdesktop package provides command-line functionality for RDP connections. There is a gtk based frontend for the redesktop package called grdesktop, which is what we will focus on here. | ||
| Line 7: | Line 9: | ||
Once the emerge has completed, you can start the gui and create an RDP connection using the Network -> Remotedesktop Client item in your menu. | Once the emerge has completed, you can start the gui and create an RDP connection using the Network -> Remotedesktop Client item in your menu. | ||
| − | === NX Client | + | === Inbound Remote Desktop Connections === |
| + | |||
| + | This is possible via a combination of tigerVNC and xrdp. First, make sure the ''server'' USE flag is configured for tigerVNC. | ||
| + | '''$''' sudo emerge -av xrdp | ||
| + | After the emerge, configure the tigerVNC server. | ||
| + | |||
| + | ==== Configure VNC Server ==== | ||
| + | |||
| + | You'll need to specify the user whose X environment should be virtualized, and the environment specifics. | ||
| + | '''$''' sudo nano /etc/conf.d/tigervnc | ||
| + | <pre> | ||
| + | DISPLAYS="username:1" | ||
| + | |||
| + | # Specify any of vncserver(1) and Xvnc(1) options. See the respective man pages for more information. | ||
| + | VNC_OPTS="-depth 24 -geometry 1280x800" | ||
| + | </pre> | ||
| + | You will also need to set a password for vnc. | ||
| + | '''$''' vncpasswd | ||
| + | When done, start the VNC server and add it to startup if desired. | ||
| + | '''$''' sudo /etc/init.d/tigervnc start | ||
| + | '''$''' sudo rc-update add tigervnc default | ||
| + | |||
| + | ==== Configure XRDP ==== | ||
| + | |||
| + | This [http://gentoo-en.vfose.ru/wiki/Xrdp guide] may be useful, but I found the following configurations necessary and sufficient. Note that the port is specified in the global section, and overridden in the user xrdp1 section: | ||
| + | '''$''' sudo nano /etc/xrdp/xrdp.ini | ||
| + | <pre> | ||
| + | [globals] | ||
| + | bitmap_cache=yes | ||
| + | bitmap_compression=yes | ||
| + | port=<your port> | ||
| + | crypt_level=low | ||
| + | channel_code=1 | ||
| + | max_bpp=24 | ||
| + | |||
| + | ... | ||
| + | |||
| + | [xrdp1] | ||
| + | #name=sesman-Xvnc | ||
| + | name=sesman | ||
| + | lib=libvnc.so | ||
| + | username=ask | ||
| + | password=ask | ||
| + | ip=127.0.0.1 | ||
| + | #port=5900 | ||
| + | port=-1 | ||
| + | </pre> | ||
| + | Once you've saved your changes, start the xrdp server and add it to startup. | ||
| + | '''$''' sudo /etc/init.d/xrdp start | ||
| + | '''$''' sudo rc-update add xrdp default | ||
| + | |||
| + | You may need to poke a hole in your firewalls, but you should now be able to connect to your server using a remote desktop client on the port specified above. | ||
| + | <!-- | ||
| + | |||
| + | == NX Client == | ||
NX is a free, open-source remote display suite founded by the good folks at http://www.nomachine.org . Client ports exist for all major operating systems, but the server portion is currently for Linux only. NX functions in basically the same way RDP does, except in the fact that it uses ssh for its tunneling rather than a distinct protocol using the default RDP port, 3389. | NX is a free, open-source remote display suite founded by the good folks at http://www.nomachine.org . Client ports exist for all major operating systems, but the server portion is currently for Linux only. NX functions in basically the same way RDP does, except in the fact that it uses ssh for its tunneling rather than a distinct protocol using the default RDP port, 3389. | ||
'''$''' sudo emerge -av nxclient | '''$''' sudo emerge -av nxclient | ||
| − | As with the rdesktop client, you can access the nx client via the same area of your menu. | + | As with the rdesktop client, you can access the nx client via the same area of your menu. |
| + | |||
| + | Note: if you are connecting to an xfce desktop instance, you'll need to select "Unix", "Custom" and then click the "Settings" button under the "Desktop" area of the "General" tab. Choose "Run the following command" and enter | ||
| + | startxfce4 | ||
| + | You will also want to choose "New Virtual Desktop" under "Options". | ||
| + | |||
| + | == NX Server == | ||
| + | |||
| + | To set up your system as an NX server so you can access you desktop using a GUI you'll need to emerge nxserver. | ||
| + | '''$''' sudo emerge -av nxserver-freenx | ||
| + | After the emerge has completed, you'll need to modify one of the configuration files if you've changed your ssh port from the default. | ||
| + | '''$''' sudo nano -w /etc/nxserver/node.conf | ||
| + | Change the appropriate line to | ||
| + | SSHD_PORT=<yourport> | ||
| + | To initialize the nxserver with default security, run the config tool. | ||
| + | '''$''' sudo nxsetup --install --setup-nomachine-key | ||
| + | Once the configuration is complete, start the service and add it to startup. | ||
| + | '''$''' sudo rc-update add nxserver default | ||
| + | '''$''' sudo /etc/init.d/nxserver start | ||
| + | Test your connection to the server using the nxclient on another machine. | ||
| − | + | --> | |
Latest revision as of 15:17, 24 November 2016
Configuring your system - Remote display connections
Remote Desktop
Windows users will be familiar with remote desktop, which uses the RDP protocol. There are a number of linux clients that provide connectivity using RDP. Before you continue, you may want to ensure the rdesktop USE flag is set in your make.conf, or per-package as below.
The rdesktop package provides command-line functionality for RDP connections. There is a gtk based frontend for the redesktop package called grdesktop, which is what we will focus on here.
$ sudo emerge -av grdesktop
Once the emerge has completed, you can start the gui and create an RDP connection using the Network -> Remotedesktop Client item in your menu.
Inbound Remote Desktop Connections
This is possible via a combination of tigerVNC and xrdp. First, make sure the server USE flag is configured for tigerVNC.
$ sudo emerge -av xrdp
After the emerge, configure the tigerVNC server.
Configure VNC Server
You'll need to specify the user whose X environment should be virtualized, and the environment specifics.
$ sudo nano /etc/conf.d/tigervnc
DISPLAYS="username:1" # Specify any of vncserver(1) and Xvnc(1) options. See the respective man pages for more information. VNC_OPTS="-depth 24 -geometry 1280x800"
You will also need to set a password for vnc.
$ vncpasswd
When done, start the VNC server and add it to startup if desired.
$ sudo /etc/init.d/tigervnc start $ sudo rc-update add tigervnc default
Configure XRDP
This guide may be useful, but I found the following configurations necessary and sufficient. Note that the port is specified in the global section, and overridden in the user xrdp1 section:
$ sudo nano /etc/xrdp/xrdp.ini
[globals] bitmap_cache=yes bitmap_compression=yes port=<your port> crypt_level=low channel_code=1 max_bpp=24 ... [xrdp1] #name=sesman-Xvnc name=sesman lib=libvnc.so username=ask password=ask ip=127.0.0.1 #port=5900 port=-1
Once you've saved your changes, start the xrdp server and add it to startup.
$ sudo /etc/init.d/xrdp start $ sudo rc-update add xrdp default
You may need to poke a hole in your firewalls, but you should now be able to connect to your server using a remote desktop client on the port specified above.