Linux Remote Desktop Login settings __linux

Source: Internet
Author: User
Previously telnet to the Linux system through the SSH command line, and have been trying to find Xwindow telnet way, have not been able to find.
Today look at the Linux Server Hacks book, a section is a remote GUI connection, is used Vnc,ubuntu under the Vnc4server is better.

1. Enable XDMCP
System->administration->login Screen Setup
Tab security->enable XDMCP
tab xdmcp--> You can disable "Honor Indirect Requests"
2. Install Required Packages (Vncserver and xinetd)
sudo apt-get install vnc4server xinetd
3. Set the VNC passwd
sudo vncpasswd/root/.vncpasswd
4. ADD VNC service to XINETD:
sudo gedit/etc/xinetd.d/xvnc
Enter this into the new file:

Service Xvnc
{
Type = Unlisted
Disable = no
Socket_type = Stream
protocol = TCP
Wait = yes
user = root
Server =/usr/bin/xvnc
Server_args =-inetd:1-query localhost-geometry 1024x768-depth 16-once-fp/usr/share/x11/fonts/misc-disconnectclien ts=0-nevershared passwordfile=/root/.vncpasswd-extension xfixes
Port = 5901
}

5. Restart xinetd (usually there is no need to reboot, but occasionally it might)
sudo/etc/init.d/xinetd stop
sudo killall xvnc
sudo/etc/init.d/xinetd start
6. That ' s it! To test so this is working the same machine (the machine we just set up the VNC server on):
Vncviewer localhost:1

You should being prompted for the VNC password, and then the "GDM login" where you can login and start a new X Sessi On. If so works, you can now go ahead and try to connect the from remote machine using your favorite VNC client (remember to Fir St Close the local vncviewer we started above). Remember to use the VNC server machine's domain name or IP address, followed by:1 (e.g. 192.168.0.100:1). If connecting locally as shown above works, but connecting remotely fails, then it means you have a problem with a firew All which is blocking some ports. The notes below about how to deal and that.

Note about Ports:the VNC Server set up as shown uses TCP port 5901. If you are are using firewall software (e.g. Firestarter) on "That machine", you need to allow incoming in this port . If you are are using a router which assigns your machine a private address (e.g. 192.168.0.100) which be not accessible from t He Internet, then your need to forward TCP port 5901 from the router.

Note about Security:this the setup allows any user to start a x-session remotely by logging into using his regular password (a fter starting the VNC connection using the VNC password), so if the user disconnects without to logging out and any other user W Hich knows the VNC password can connect afterwards and resume the same session, the "the". So if you don't want to log out before disconnecting, it's advisable to in least lock your VNC x-session screen. Also Note this while a remote user are connected thru VNC, no other connection would be accepted. An idle VNC client would be disconnected after one hour, but this can is changed by using the '-idletimeout ' option in the Server_args line In/etc/xinetd.d/xvnc. For example, you can add "-idletimeout" to the change it to 5 minutes.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.