Install multi-user vncserver on ubuntu server

Create multiple users on the server before installing vncserver:

https://blog.csdn.net/taolusi/article/details/81304057

Refer to the above blog, after installing vnc, just open the vncserver service in each user environment, and log in remotely into the user's own account to connect to the personal server environment interface.

Next install vncserver:

安装vnc4server
sudo apt-get install vnc4server

Turn on vncserver
Use the vncserver command to turn on vncserver
and then set the password for the vnc connection

Considering that the native desktop that comes with ubuntu is displayed on the vnc client, it is recommended to use the gnome desktop

Install gnome related components first
sudo apt-get install gnome-core gnome-panel gnome-session gnome-settings-daemon gnome-terminal metacity nautilus

Close the opened vnc session
vncserver -kill :1

Then modify the vnc configuration startup file
sudo gedit ~/.vnc/xstartup The
overall file content is as follows:
 

#!/bin/sh

 

# Uncomment the following two lines fornormal desktop:

#unset SESSION_MANAGER

#unset DBUS_SESSION_BUS_ADDRESS

# exec /etc/X11/xinit/xinitrc

 

[ -x /etc/vnc/xstartup ] && exec/etc/vnc/xstartup

[ -r $HOME/.Xresources ] && xrdb$HOME/.Xresources

xsetroot -solid grey

vncconfig -iconic &

#x-terminal-emulator -geometry 80x24+10+10-ls -title "$VNCDESKTOP Desktop" &

#x-window-manager &

#gnome-session & 

export XKL_XMODMAP_DISABLE=1

unset SESSION_MANAGER

unset DBUS_SESSION_BUS_ADDRESS

 

gnome-session&

gnome-panel&

gnome-settings-daemon&

gnome-terminal&

metacity&

nautilus&

After that, there may be a problem that individual users do not have a taskbar or something. At this time, you need to make appropriate changes based on the parameters in the file.

Guess you like

Origin blog.csdn.net/wi162yyxq/article/details/99676900