Difference between revisions of "Remote display connections"

From gr0x0rd
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 13: Line 13:
 
This is possible via a combination of tigerVNC and xrdp. First, make sure the ''server'' USE flag is configured for tigerVNC.
 
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
 
  '''$''' sudo emerge -av xrdp
After the emerge, configure the tigerVNC server. You'll need to specify the user whose X environment should be virtualized, and the environment specifics.
+
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
 
  '''$''' sudo nano /etc/conf.d/tigervnc
 
<pre>
 
<pre>
Line 21: Line 25:
 
VNC_OPTS="-depth 24 -geometry 1280x800"
 
VNC_OPTS="-depth 24 -geometry 1280x800"
 
</pre>
 
</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.
 
<!--
 
<!--
  

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.