Changes

From Amahi Wiki
Jump to: navigation, search
402 bytes removed ,  05:44, 29 December 2015
= Multiple User Setup =
* It is possible to setup multiple user login's other than root. For this example with will create 2 other users, Tom Dick & DickHarry.
* For the example the commands will be
adduser tom
adduser dick
adduser harry
* Then create a password for that user using the following command
* When requested enter a password and renter the password to verify it for each user created.
* Once the user are created we will need to assign configuration files for each user. For this will assign the following config files as followed. Carry out the below as root.
* Tom Dick will be assigned the following config file using the following.
cp /lib/systemd/system/vncserver@.service /lib/systemd/system/vncserver@:2.service
* Dick Harry will be assigned the following config file.
cp /lib/systemd/system/vncserver@.service /lib/systemd/system/vncserver@:3.service
* For Tom Dick (under root control)
nano /lib/systemd/system/vncserver@:2.service
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/sbin/runuser -l tom dick -c "/usr/bin/vncserver %i" PIDFile=/home/tomdick/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
* For Dick Harry (under root control)
nano /lib/systemd/system/vncserver@:3.service
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/sbin/runuser -l dick harry -c "/usr/bin/vncserver %i" PIDFile=/home/dickharry/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
* As above we can Log in as each user and run the following command to create the xstartup file either by. 
nano ~/.vnc/xstartup
* Or
systemctl start vncserver@:1.service
systemctl stop vncserver@:1.service
 * For this example we will use the MATE-Desktop Environment, each user will copy Again modify the following into their xstartup file.  #!/bin/sh # # Uncomment as above to use the following two lines for normal cinnamon 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/environment.Xresources xsetroot -solid grey vncconfig -iconic & x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & mate-session &
* Once each xstartup file is modified we need to start each service. Login as root and run the following commands.
systemctl start vncserver@:3.service
* Once the services are running then each user can access their remote desktop using a client software as listed below. The ip address will depend on how you have setup your HDA.
* From the example tom's Dicks access ip address will be
192.168.1.10:2
* For dick's Harrys the access ip address will be
192.168.1.10:3
 
= Multiple User/Multiply Desktop-Environment Setup =
28

edits