Changes

From Amahi Wiki
Jump to: navigation, search
2,325 bytes removed ,  18:16, 7 May 2016
no edit summary
image =Warning.png|
heading =WARNING|
message = Proceed with extreme caution. This guidance has not been tested nor will be supported by Amahi. Continuing could break your HDA and a reinstall from scratch may be necessary.}}<div style="border: 1px solid #A3B1BF; padding: .8em 1em; background-color: #E6F2FF; margin: 0px 1em;">'''NOTE:''' The one-click [https://www.amahi.org/apps/vnc VNC App] has been discontinued for Amahi 7 for or greater. The reason is that it pulls a lot of packages, including desktop and that breaks DNS in Fedora 19.</div><br />Maintenance Support ONLY!}}
__TOC__
= Desktop Installation Amahi 8 (Fedora 21) Desktop Installation /9 =
For TigerVNC to work a Desktop Environment must be installed even if the HDA does not boot to the selected Desktop Environment.
This installation guidance is based on a clean installation of Amahi 8or 9, installing Fedora 21 using the [https://wiki.amahi.org/index.php/[Amahi_8_Install |Fedora 21 Server DVD] and following the installation instructions ] or [[https://wiki.amahi.org/index.php/Fedora_21_Server_Install Amahi_9_Install|Fedora 21 23 Server Install DVD]] install methodThe Cinnamon Desktop Environment was selected as it operates well on low spec computers. <div style="border: 1px solid #A3B1BF; padding: .8em 1em; background-color: #E6F2FF; margin: 0px 1em;">'''NOTE: there is a one-click [http://www.amahi.org/apps/vnc VNC App] in BETA'''</div> 
=== Cinnamon Desktop Environment =(Amahi 8/Fedora 21) ==
* As root, install Cinnamon Desktop Environment:
systemctl set-default graphical.target
 
== LXDE (Amahi 9/Fedora 23) ==
 
* As root, install LXDE Desktop Environment:
 
dnf group install lxde-desktop
= TigerVNC Server Installation =
 
* These steps are the same for Amahi 8 and Amahi 9
* It is recommended to only use TigerVNC on a secure network or via a VPN.
yum install tigervnc-server
Note: For Fedora 23, use dnf instead of yum
 
*Once install we need to create new configuration file, vncserver@.service is only a template file, from this we need t to create a the following config file.
cp /lib/systemd/system/vncserver@.service /lib/systemd/system/vncserver@:1.service
systemctl daemon-reload
 
 
* We now have to modify the firewall and open port 5901 in the iptables, run the command as root.
 
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 5901 -j ACCEPT
= Password Setup =
*These are universal for both Amahi 8 and 9
* Set the VNC password for the user as defined in the vncserver@:1.service, this will create the .VNC folder for each user and place a file called passwd inside the folder.
= Setup Desktop Environment Access =
* Modification of the ~/.vnc/xstartup will be required to match run the chosen Desktop-Environment. At this point the xstartup file doesn't exist so we have two optionsdo the following.
 For this example we need to login as rootthe user.
* Create the xstartup file using the command below then copy/paste the required xstartup for the chosen desktop enviroment.
nano ~/.vnc/xstartup
== Amahi 8 (Fedora 21) ==* Or we can use For the commands below to start/stop the vncserviceCinnamon Desktop on Amahi 8 (Fedora 21), this will create modify the default xstartup file which can then be modified. The service has to be stopped to allow the modification to work when restarted.  systemctl start vncserver@:1.service systemctl stop vncserver@:1below.service * Below are xstartup scripts for the various desktop environments, if the xstartup was made via your favourite editor then simply cut/paste the script required else if using the default xstartup remove its context and again cut/paste required script.  === MATE-Desktop Environment === 
#!/bin/sh
#
# Uncomment the following two lines for normal desktop: # unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS # exec /etcusr/X11bin/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" & matecinnamon-session &   === KDE-Desktop Environment ===
== Amahi 9 (Fedora 23) ==
For the LXDE Desktop on Amahi 9 (Fedora 23), modify the xstartup to the below.
#!/bin/sh
#
# Uncomment the following two lines for normal desktop: #unset SESSION_MANAGER #exec /etc/X11/xinit/xinitrcunset DBUS_SESSION_BUS_ADDRESS #lxterminal & [ -x /etcusr/vncbin/xstartup ] && exec /etc/vnc/xstartup [ lxsession -r $HOME/.Xresources ] &s LXDE & xrdb $HOME/.Xresources #xsetroot -solid grey #vncconfig -iconic & #xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & #twm & startkde lxterminal &
= Starting Tiger VNC =
=== Cinnamon-Desktop Environment ===   #!/bin/sh # # Uncomment * Log back in as root and run the following two lines for normal desktop: #unset SESSION_MANAGER #exec /etc/X11/xinit/xinitrc # [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/the commands below to enable and start the vncservice.Xresources #xsetroot -solid grey #vncconfig -iconic & #xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & #twm & cinnamon &
systemctl enable vncserver@:1.service
systemctl start vncserver@:1.service
= TigerVNC Server Commands=
= 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
* For this example the command will be
passwd tom
passwd dick
passwd harry
* 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 =
 
* It is possible to for each user to use the VNC under different desktop-environment. For this example Tom wants to use KDE whilst Dick wants to use Cinnamon.
 
 
As root
 
* Install each required desktop-environment.
 
* Stop Tom's and Dick's VCN services.
 
systemctl disable vncserver@:2.service
systemctl disable vncserver@:3.service
systemctl stop vncserver@:2.service
systemctl stop vncserver@:3.service
 
* As Tom login and alter the xstartup file to reflect the desktop-environment required.
 
nano ~/.vnc/xstartup
 
* As Dick login and alter the xstartup file to reflect the desktop-environment required.
 
nano ~/.vnc/xstartup
 
* As root restart all the services
 
systemctl enable vncserver@:2.service
systemctl enable vncserver@:3.service
systemctl start vncserver@:2.service
systemctl start vncserver@:3.service
 
* Each user will now be-able to use their desktop-environment of there choice.
 
= Windows Client Software =
[[File:UltraVNC_Screen1.png]]
If connection is successful it will as ask for a password, which is the password entered from the setup above. = Screenshots = Screenshot from the examples above showing root, tom & dick's VNC connections under different desktop-environments. [[File:Example desktop.png]]  Screenshot of KDE Remote Desktop
[[File:KDE Example.png]]
12,424

edits