Generally, we use ssh client to log in to Linux system remotely. As for the Linux remote login tool under the graphical interface, we generally think of vnc, but its security is not enough.
Here, I will introduce the installation and configuration method of XRDP. We can easily remotely linux through windows.
xrdp installation configuration method
Open terminal: install in turn
sudo apt-get install xrdp
sudo apt-get install vnc4server tightvncserver
Setting up xrdp
echo "gnome-session --session = gnome-classic"> ~ / .xsession
The effect of this command is because the gnome desktop is installed. There are multiple desktop managers for unity and GNOME in ubuntu12.04. You need to specify one when you start it, otherwise
Even after successful remote login authentication, it is only background.
The configuration file of xrdp is xrdp.ini and sesman.in in the / etc / xrdp directory. Generally, the default is selected.
Restart xrdp
sudo /etc/init.d/xrdp restart
Mstsc running Windows
That is, Windows remote desktop, open the remote IP, connect, enter the user password to remote linux.
Encountered an error
1, xrdp access ubuntu only see the background, not the solution to the menu bar
Method: Install gnome-panel
sudo apt-get install gnome-panel
2, Failed to load session "gnome"
Try it on ubuntu-2d for desktop
Type the command: echo "gnome-session –session = ubuntu-2d"> ~ / .xsession and restart xrdp.
3. An error occurred:
connecting to sesman ip 127.0.0.1 port 3350
sesman connect ok
sending login info to sesman
login successful for display 14
started connecting
connecting to 127.0.0.1 5914
error-problem connecting
The error under xrdp-sesman.log is:
[INFO] starting Xvnc session ...
[ERROR] X server for display 10 startup timeout [INFO] starting xrdp-sessvc-xpid = 2924-wmpid = 2923
[ERROR] X server for display 10 startup timeout
[ERROR] another Xserver is already active on display 10
[DEBUG] aborting connection ...
If your log also has something like X server for display 10 startup timeout and another Xserver is already active on display 10
The root cause of the problem is tightvnc. The version with the problem conflicts with the X font, which leads to an error connecting to the Xserver.
Solution:
apt-get purge tightvnc xrdp
apt-get install tightvncserver xrdp
At last:
Start the xrdp service and sudo /etc/init.d/xrdp restart. At this time, the corresponding port will be enabled. The configuration can be used by default.
Via command: netstat -tnl
Check 3350 3389 5910 These three ports are in LISTEN, generally no problem.
dpkg -L + package name, you can know what files this package contains.
4, ubuntu 13.10 and later without background:
Thanks to the children's shoes in the comments for the proposal:
xrdp cannot support gnome at 13.10, the solution is to install an xfce interface
sudo apt-get install xubuntu-desktop
then:
echo xfce4-session> ~ / .xsession
Set up the configuration file again
sudo gedit /etc/xrdp/startwm.sh
Insert before ./etc/X11/Xsession
xfce4-session
Restart xrdp
sudo service xrdp restart