Windows multi-user remote link ubuntu system

Source: Internet
Author: User

This problem really bothered me for a long time, took me close to a week, looked at almost all the online blog, google Baidu has searched all over, the great God also asked several times, has not been done. Today, I finally felt the perfect solution.

Not to brag, this blog is definitely one of the few articles on the Chinese web that solves this problem.

1. First Ubuntu system, recommended to install English language, I loaded is 14.04 English language.

2. Then install Xubuntu Desktop (XFCE4): $ sudo apt-get install Xubuntu-desktop

3. Ubuntu system default is the GNOME desktop, we need to uninstall this desktop (the reason why we uninstall gnome, because Google said XRDP and GNOME components conflict will appear in the case of multi-user link Desktop gray blank): $ sudo apt-get Autoremove gnome-*

4. Install XRDP: $ sudo apt-get install XRDP, $ sudo apt-get install vnc4server tightvncserver

5. Next, refer to the link http://askubuntu.com/questions/581979/ Ubuntu-14-10-multiple-simultaneous-independent-remote-desktop-like-connection (Google can open it).

1) New User: $ sudo adduser test1   

2)Run vnc:$ vncserver, this step will be as follows:

  You will require a password to access your desktops.

 Password: Verify:
  Creating default startup script /home/test1/.vnc/xstartup  Starting applications specified in /home/test1/.vnc/xstartup  Log file is /home/test1/.vnc/server1:1.log
 
 3)  replace /home/test1/.vnc/xstartup content with below
  #!/bin/sh  unset SESSION_MANAGER  unset DBUS_SESSION_BUS_ADDRESS  startxfce4 &  [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup  [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources  xsetroot -solid grey  vncconfig -iconic &

 4)新建文件
/etc/init.d/vncserver,并在vucserver里面添加以下内容
  #!/bin/bash unset Vncserverargs vncservers= "" [-f/etc/vncserver/vncservers.conf] &&. /etc/vncserver/vncservers.conf prog=$ "VNC server" Start () {./lib/lsb/init-functions req_user=$2 echo-n $ "Starti ng $prog: "Ulimit-s-C 0 >/dev/null 2>&1 retval=0 for display and ${vncservers} do export user=" ${dis play##*:} "If Test-z" ${req_user} "-O" ${req_user} "= = ${user};    Then Echo-n "${display}" unset bash_env ENV disp= "${display%%:*}" Export vncuserargs= "${vncserverargs[${disp}]}"  Su ${user}-C "CD ~${user} && [-F. vnc/passwd] && vncserver: ${disp} ${vncuserargs}" fi done}   Stop () {./lib/lsb/init-functions req_user=$2 echo-n $ ' shutting down Vncserver: ' For display in ${vncservers} Do export user= "${display##*:}" If Test-z "${req_user}"-O "${req_user}" = = ${user}; Then Echo-n "${display}" unset bash_env ENV export user= "${display##*:}" su ${user}-C "Vncserver-kill: ${DISPL ay%%:*} ">/dev/null 2>&1 fi done echo-e" \ n "echo" Vncserver Stopped "} case" $ "in start) Start [email&  Nbsp;protected];;  stop) stop [email protected];;  restart|reload) Stop [email protected] sleep 3 start [email protected];; Condrestart) if [-f/var/lock/subsys/vncserver];  Then stop [email protected] sleep 3 start [email protected] fi;  status) status Xvnc;; *) echo $ "Usage: $ Start|stop|restart|condrestart|status}" Exit 1 Esac

5) Make the new file executable: $ sudo
chmod +x /etc/init.d/vncserver

6) To make vnc desktop sessions allocated for users at start up automatically, create following script in /etc/vncserver

 
sudo mkdir -p /etc/vncserver
  sudo vim /etc/vncserver/vncservers.conf  (这里也可以用gedit进行创建文件,用vim创建,添加内容后,输入":" 后输入wq保存)。添加以下内容(具体看你有几个用户,设定的屏幕分辨率多少):
  VNCSERVERS="3:test3 2:test2 1:test1"  VNCSERVERARGS[1]="-geometry 1024x768"  VNCSERVERARGS[2]="-geometry 1024x768"

sudo update-rc.d vncserver defaults 99

6. 最后就是reboot了,直接用window的远程连接,不用tightVNC或者其它远程平台。


 
 


 

 

Windows multi-user remote link ubuntu system

Related Article

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.