Changes

From Amahi Wiki
Jump to: navigation, search
4,097 bytes added ,  12:03, 1 January 2014
m
no edit summary
yum install tigervnc-server
*The following example is if you wish to setup access under root control, if you wish to setup under normal user the see below under Multiply User Setup   *Once install we need to create a new configuration file, vncserver@.service is only a template file, from this we need t create a the following config file.
cp /lib/systemd/system/vncserver@.service /lib/systemd/system/vncserver@:1.service
systemctl disable vncserver@:1.service
systemctl stop vncserver@:1.service
 
 
= 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.
 
* First we need to create these user, either using the Amahi Dashboard under the USER setting or by the following commands under root control.
 
adduser <user name>
 
* For the example the commands will be
 
adduser tom
adduser dick
 
* Then create a password for that user using the following command
 
passwd <user name>
 
* For this example the command will be
 
passwd tom
passwd dick
 
* 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.
 
* Tom will be assigned the following config file using the following.
 
cp /lib/systemd/system/vncserver@.service /lib/systemd/system/vncserver@:2.service
 
* Dick will be assigned the following config file.
 
cp /lib/systemd/system/vncserver@.service /lib/systemd/system/vncserver@:3.service
 
* Once the config files are created we will need to modify them for the correct user access. Accessing the files using your favourite editor the config files need to be modified under [Service] to reflect the assigned user. For this example the files should look like the following.
 
* For Tom (under root control)
 
nano /lib/systemd/system/vncserver@:2.service
 
* Then modify the [Service] as followed
 
[Service]
Type=forking
# 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 -c "/usr/bin/vncserver %i"
PIDFile=/home/tom/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
 
* For Dick (under root control)
 
nano /lib/systemd/system/vncserver@:3.service
 
* Then modify the [Service] as followed
 
[Service]
Type=forking
# 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 -c "/usr/bin/vncserver %i"
PIDFile=/home/dick/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
 
* Once the config files are created we need to assign password to access vnc-server for each user, for this each user need to login in via terminal and
run the the command as above under the password section
 
vncpasswd
 
* Once each user has created a password, then each user needs to login in under terminal and modify the xstarup file to reflect the chosen desktop environment as listed above. Each user can access the file as followed.
 
cd ~/.vnc
nano xstartup
 
* For this example we will use the MATE-Desktop Environment, each user will copy the following into their xstartup file.
 
#!/bin/sh
#
# Uncomment the following two lines for normal 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" &
mate-session &
 
* Once each xstartup file is modified we need to start each service. Login as root and run the following commands.
 
systemctl enable vncserver@:2.service
systemctl enable vncserver@:3.service
systemctl start vncserver@:2.service
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.
 
* From the example tom's access ip address will be
 
192.168.1.10:2
 
* For dick's the access ip address will be
 
192.168.1.10:3
 
 
 
= Windows Client Software =
28

edits