<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.amahi.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Paul+Rodriguez</id>
	<title>Amahi Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.amahi.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Paul+Rodriguez"/>
	<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php/Special:Contributions/Paul_Rodriguez"/>
	<updated>2026-04-12T05:46:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://wiki.amahi.org/index.php?title=VNC&amp;diff=58802</id>
		<title>VNC</title>
		<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php?title=VNC&amp;diff=58802"/>
		<updated>2012-08-14T15:49:15Z</updated>

		<summary type="html">&lt;p&gt;Paul Rodriguez: Added instructions for starting super user level graphical programs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border: 1px solid #A3B1BF; padding: .8em 1em; background-color: #E6F2FF; margin: 0px 1em;&amp;quot;&amp;gt;&lt;br /&gt;
'''NOTE: there is now a one-click [http://www.amahi.org/apps/vnc VNC App]'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Using VNC to use a remote desktop in the HDA =&lt;br /&gt;
&lt;br /&gt;
Using [http://realvnc.com/ VNC] is useful if:&lt;br /&gt;
&lt;br /&gt;
* You would like a Linux desktop to the HDA remotely&lt;br /&gt;
* You run your HDA headless (no monitor) and like to still use a desktop in it&lt;br /&gt;
* You would like to use a GUI to configure printer(s) or have a scanner or other device that requires a desktop program to configure and the machine is headless&lt;br /&gt;
&lt;br /&gt;
= What you need =&lt;br /&gt;
&lt;br /&gt;
* A server&lt;br /&gt;
* A client&lt;br /&gt;
&lt;br /&gt;
= Client: Installation =&lt;br /&gt;
&lt;br /&gt;
Download the client software and install:&lt;br /&gt;
&lt;br /&gt;
* Windows:  [http://realvnc.com RealVNC], [http://www.uvnc.com UltraVNC], [http://www.tightvnc.com TightVNC]&lt;br /&gt;
* MAC:  [http://sourceforge.net/projects/chicken/ Chicken], [http://cotvnc.sourceforge.net/ Chicken of the VNC] (do not use internal vnc client as there are some issues)&lt;br /&gt;
* For Linux, you have the vncviewer package, available in most, if not all distros.  For Fedora 12, do the following as [[Open_Terminal_as_root|'''root''']] user:&lt;br /&gt;
        yum -y install tigervnc&lt;br /&gt;
&lt;br /&gt;
= Server Installation =&lt;br /&gt;
&lt;br /&gt;
There are various ways to get the server going in your HDA. All of them require the server software.&lt;br /&gt;
# [http://www.amahi.org/apps/VNC VNC]:  one-click install&lt;br /&gt;
# Manually as described below (notes may require some revision)&lt;br /&gt;
&lt;br /&gt;
=== Manual Install ===&lt;br /&gt;
* As root, install the server:&lt;br /&gt;
&lt;br /&gt;
        yum -y install tigervnc-server&lt;br /&gt;
&lt;br /&gt;
== Method 1 ==&lt;br /&gt;
* Open a terminal, become root and install the VNC server (tigervnc-server) as stated in the Manual Install section.&lt;br /&gt;
    When the install has completed, press ctrl-D to end the root session. Leave the terminal open, or open one now.&lt;br /&gt;
&lt;br /&gt;
*The following commands are entered as '''User'''.&lt;br /&gt;
&lt;br /&gt;
* Type vncpasswd and press enter.&lt;br /&gt;
    The system will prompt you for a password. Type a password and press the enter key.&lt;br /&gt;
    The system will prompt you to verify the password. Type the password a second time and press the enter key.&lt;br /&gt;
&lt;br /&gt;
* Type vncserver and press the enter key. The system will create the configuration files. You should see output similar to this:&lt;br /&gt;
      xauth: creating new authority file /home/user/.xauthority&lt;br /&gt;
      New 'host.localdomain:1 (user)' desktop is host.localdomain:1&lt;br /&gt;
      Creating default startup script /home/user/.vnc/xstartup&lt;br /&gt;
      Starting applications specified in /home/user/.xauthority&lt;br /&gt;
      Log file is /home/user/.vnc/host.localdomain:1.log&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* You can edit the configuration files using your choice of editor. Nano is used below.&lt;br /&gt;
    Note that when &amp;quot;user&amp;quot; is shown, you need to enter your user name.&lt;br /&gt;
   &lt;br /&gt;
* Type nano /home/user/.vnc/xstartup and press the enter key. Nano will open the file.&lt;br /&gt;
    Find the following line:&lt;br /&gt;
      twm &amp;amp;&lt;br /&gt;
    Change that line to read:&lt;br /&gt;
      exec gnome-session &amp;amp;&lt;br /&gt;
  This change will open the VNC display with a Gnome desktop, even if the server is starting in Init 3 by default. &lt;br /&gt;
    Press ctrl-X to exit Nano. You will see the prompt at the bottom &amp;quot;Save modified buffer (ANSWERING &amp;quot;No&amp;quot; WILL DESTROY CHANGES) ?&lt;br /&gt;
    Press the Y key. The prompt will change, showing you the file name.&lt;br /&gt;
    Press the enter key, this will store your change and exit Nano.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*The following commands are entered as '''Root'''.&lt;br /&gt;
&lt;br /&gt;
* Type su and press the enter key followed by the root password&lt;br /&gt;
&lt;br /&gt;
You can edit the configuration files using your choice of editor. Nano is used below.&lt;br /&gt;
Note that when &amp;quot;username&amp;quot; is shown, you need to enter your user name.&lt;br /&gt;
   &lt;br /&gt;
* Type nano /etc/sysconfig/vncservers and press the enter key. Nano will open the file.&lt;br /&gt;
    Find the following lines:&lt;br /&gt;
      '#' VNCSERVERS=&amp;quot;1:username&amp;quot;&lt;br /&gt;
      '#' VNCSERVERARGS[1]=&amp;quot;-geometry 800x600 -nolisten tcp -localhost&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Uncomment both lines by removing the # at the beginning of the lines.	&lt;br /&gt;
    Edit the lines so they appear as follows:&lt;br /&gt;
      VNCSERVERS=&amp;quot;1:username&amp;quot;&lt;br /&gt;
      VNCSERVERARGS[1]=&amp;quot;-geometry 1024x768 -nolisten tcp&amp;quot;&lt;br /&gt;
  Enter your username in place of &amp;quot;username&amp;quot;. After &amp;quot;geometry&amp;quot;, you can enter any resolution you desire. You can come back and change this if necessary.&lt;br /&gt;
    Press ctrl-X to exit Nano. You will see the prompt at the bottom &amp;quot;Save modified buffer (ANSWERING &amp;quot;No&amp;quot; WILL DESTROY CHANGES) ?&lt;br /&gt;
    Press the Y key. The prompt will change, showing you the file name.&lt;br /&gt;
    Press the enter key, this will store your change and exit Nano.&lt;br /&gt;
&lt;br /&gt;
* Finally, type chkconfig vncserver on and press the enter key. This will make the VNC server start when the computer starts.&lt;br /&gt;
&lt;br /&gt;
* Press ctrl-D to end the root session, and then press ctrl-D again to close the terminal.&lt;br /&gt;
&lt;br /&gt;
* That's it - Run your VNC Client and enter hda:1 as the host/IP address. You should now see your HDA Desktop screen.&lt;br /&gt;
*If you are interested in more security for your VNC connection, check the link listed below under &amp;quot;General Instructions&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Repeat the configuration for each user you wish to be able to connect via VNC.&lt;br /&gt;
* Note you can have displays for users 1-9 and each will connect to their VNC session at port 590n (some VNC clients 'know' the 590 part and only have you enter n). Make certain that you have forwarded the correct port(s), or the range 5901 through 5909.&lt;br /&gt;
* Add -localhost to options if you are connecting through a ssh tunnel or only locally. This adds some security.&lt;br /&gt;
&lt;br /&gt;
== Method 2 ==&lt;br /&gt;
* To start the server in your HDA, you need install tigervnc-server rpm package:&lt;br /&gt;
* From the '''root''' user:&lt;br /&gt;
        yum -y install xinetd&lt;br /&gt;
        chkconfig vncserver off&lt;br /&gt;
        service vncserver stop&lt;br /&gt;
* Create /etc/gdm/custom.conf file and add the following:&lt;br /&gt;
        #GDM configuration storage&lt;br /&gt;
        [xdmcp]&lt;br /&gt;
        Enable=true&lt;br /&gt;
        [chooser]&lt;br /&gt;
        [security]&lt;br /&gt;
        DisallowTCP=false&lt;br /&gt;
        [debug]&lt;br /&gt;
* Create /etc/xinetd.d/vnc1024 file and add the following (you can change the screen resolution by changing the geometry setting):&lt;br /&gt;
        service vnc1024&lt;br /&gt;
        {&lt;br /&gt;
        disable = no&lt;br /&gt;
        socket_type = stream&lt;br /&gt;
        protocol = tcp&lt;br /&gt;
        group = tty&lt;br /&gt;
        wait = no&lt;br /&gt;
        user = nobody&lt;br /&gt;
        server = /usr/bin/Xvnc&lt;br /&gt;
        server_args = -inetd -query localhost -geometry 1024×768 -depth 16 -once -fp /usr/share/X11/fonts/misc -securitytypes=none&lt;br /&gt;
        }&lt;br /&gt;
* Edit /etc/services and comment out the two lines as listed below:&lt;br /&gt;
        #vnc-server      5900/tcp                # VNC Server&lt;br /&gt;
        #vnc-server      5900/udp                # VNC Server&lt;br /&gt;
* Add this line below the two lines you commented out and save the changes:&lt;br /&gt;
        vnc1024         5900/tcp                # VNC and GDM&lt;br /&gt;
* Now restart the xinetd service&lt;br /&gt;
        service xinetd restart&lt;br /&gt;
* Run your VNC Client and enter your HDA IP address for host/IP address.  You should now see your HDA Desktop login screen.  If you don't see the login screen, a reboot of the HDA may be required.  This can be done via the dashboard or by executing the following as '''root''' user:&lt;br /&gt;
        reboot now&lt;br /&gt;
&lt;br /&gt;
== Method 3 (the cpg method) ==&lt;br /&gt;
&lt;br /&gt;
* Every time the HDA is rebooted, when VNC is needed, ssh to the HDA&lt;br /&gt;
* The first time without do:&lt;br /&gt;
      vncserver -geometry 1550x1100&lt;br /&gt;
* After the first time, I type vncs. I have an alias in ~/.bashrc:&lt;br /&gt;
      alias vncs='vncserver -geometry 1550x1100 &amp;amp;&amp;gt; /dev/null &amp;amp;';&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
* Why that resolution? That fits my monitors with the VNC window and frame enough to not display scrollbars and move around nicely. Change at will!&lt;br /&gt;
* It does involve the dreaded CLI.&lt;br /&gt;
* Since my HDA does not get rebooted often, this is not a huge problem&lt;br /&gt;
&lt;br /&gt;
== Method 4 (Ubuntu) ==&lt;br /&gt;
[http://wiki.amahi.org/index.php/Install_VNC_server_on_Ubuntu_Server_12.04 This] page details two methods for installing a vncserver onto the Ubuntu Server.&lt;br /&gt;
&lt;br /&gt;
= General Instructions =&lt;br /&gt;
&lt;br /&gt;
VNC does not respect the normal rules of elevating the current user through the use of entering the admin password. The only way to run many graphical programs that require the super user is to open a command line terminal within the VNC session and start the program with the &amp;quot;sudo&amp;quot; command. Two programs that may come in handy that work in this fashion are gparted and Synaptic Package Manager.&lt;br /&gt;
&lt;br /&gt;
To start gparted:&lt;br /&gt;
&lt;br /&gt;
In a VNC terminal window type:&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code = sudo gparted&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
To start Synaptic Package Manager:&lt;br /&gt;
&lt;br /&gt;
In a VNC terminal window type:&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code = sudo synaptic&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
More detailed instructions are available [http://www.g-loaded.eu/2005/11/10/configure-vnc-server-in-fedora/ here].&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting for Vista =&lt;br /&gt;
&lt;br /&gt;
This helpful page has helped with [http://www.windowsreference.com/internet-explorer/windows-has-blocked-this-software-because-it-cant-verify-the-publisher/ blocking VNC]&lt;br /&gt;
&lt;br /&gt;
= Images for the App =&lt;br /&gt;
[[Image:VNC-logo.png]]&lt;br /&gt;
[[Image:VNC-sshot.png]]&lt;/div&gt;</summary>
		<author><name>Paul Rodriguez</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.amahi.org/index.php?title=Install_VNC_server_on_Ubuntu_Server_12.04&amp;diff=58796</id>
		<title>Install VNC server on Ubuntu Server 12.04</title>
		<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php?title=Install_VNC_server_on_Ubuntu_Server_12.04&amp;diff=58796"/>
		<updated>2012-08-14T15:39:10Z</updated>

		<summary type="html">&lt;p&gt;Paul Rodriguez: Added tips and tricks for starting super user level graphical programs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border: 1px solid #A3B1BF; padding: .8em 1em; background-color: #E6F2FF; margin: 0px 1em;&amp;quot;&amp;gt;&lt;br /&gt;
'''NOTE: there is now a one-click [http://www.amahi.org/apps/vnc VNC App]'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
{{MessageBox|&lt;br /&gt;
backgroundcolor	= #faa|&lt;br /&gt;
image	=Warning.png|&lt;br /&gt;
heading	=WARNING|&lt;br /&gt;
message = This is recommended only for advanced users, proceed with caution.}}&lt;br /&gt;
&lt;br /&gt;
=Method 1=&lt;br /&gt;
&lt;br /&gt;
Install vncServer in Ububtu 12.04 server to create a virtual desktop on another computer&lt;br /&gt;
&lt;br /&gt;
These are the instructions for installing vncserver on Ubuntu 12.04 server edition. They may also work on Desktop, but I haven't tested them on it. &lt;br /&gt;
&lt;br /&gt;
First install ubuntu 12.04 server&lt;br /&gt;
&lt;br /&gt;
Install Amahi using the instructions provided elsewhere on the wiki.&lt;br /&gt;
&lt;br /&gt;
After reboot go to your HDA and login, then go to apps and install OpenSSH and webmin using the links in your HDA.&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = sudo reboot now -h}}&lt;br /&gt;
&lt;br /&gt;
From here on I used vim but you can use any editor you are comfortable with just replace vim with your choice.&lt;br /&gt;
&lt;br /&gt;
A quick and short tutorial on vim:&lt;br /&gt;
&lt;br /&gt;
Move the cursor to where you want to edit then press i&lt;br /&gt;
Edit as needed, when finished press esc then :wq to save your changes&lt;br /&gt;
If you make a mistake press :q! you exit without saving changes, then start again.&lt;br /&gt;
&lt;br /&gt;
A cheat sheet for vim commands can be found here:&lt;br /&gt;
&lt;br /&gt;
http://www.tuxfiles.org/linuxhelp/vimcheat.html &lt;br /&gt;
&lt;br /&gt;
Now go to another machine, I used windows 7, and download putty. &lt;br /&gt;
&lt;br /&gt;
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)&lt;br /&gt;
&lt;br /&gt;
From here on it will be all copy and paste in putty. (makes it easy)&lt;br /&gt;
&lt;br /&gt;
Start putty&lt;br /&gt;
&lt;br /&gt;
In Host Name (or IP address) enter the static ip address of your server, you can find it in your control panel on Amahi.org. For example: 192.168.1.55 &lt;br /&gt;
&lt;br /&gt;
DO NOT enter http://&lt;br /&gt;
&lt;br /&gt;
Leave the Port at 22&lt;br /&gt;
&lt;br /&gt;
[[File:PUTTY1.gif]] &lt;br /&gt;
&lt;br /&gt;
If you want you can save it for easier later use by adding a name in Saved Sessions and clicking Save&lt;br /&gt;
&lt;br /&gt;
Now click Yes&lt;br /&gt;
&lt;br /&gt;
A terminal will open and another window asking you to confirm the server click okay&lt;br /&gt;
&lt;br /&gt;
[[File:PUTTY2.gif]]&lt;br /&gt;
&lt;br /&gt;
Enter your ubuntu username and password when asked&lt;br /&gt;
&lt;br /&gt;
[[File:PUTTY3.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will be connected to your server.&lt;br /&gt;
&lt;br /&gt;
all the following commands can be copied and pasted into putty with a simple right click.&lt;br /&gt;
&lt;br /&gt;
Copy and paste  &lt;br /&gt;
&lt;br /&gt;
{{Code|Code = sudo apt-get update}}&lt;br /&gt;
&lt;br /&gt;
when complete&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = sudo aptitude safe-upgrade}}&lt;br /&gt;
&lt;br /&gt;
reboot server type &lt;br /&gt;
&lt;br /&gt;
{{Code|Code = sudo reboot now -h}}&lt;br /&gt;
&lt;br /&gt;
A: Install Gnome basic desktop. &lt;br /&gt;
&lt;br /&gt;
log in with putty again from your windows machine.&lt;br /&gt;
&lt;br /&gt;
I installed the server version of Ubuntu, so to be able to have a desk top when I log into vnc I need to install a few things in Ubuntu.&lt;br /&gt;
&lt;br /&gt;
First off we need to install the Gnome components for our virtual desktop. Type or copy and paste:&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = sudo apt-get install gnome-core}}&lt;br /&gt;
&lt;br /&gt;
when prompted type Y and then press Enter. This will install the gnome desktop components.&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = sudo reboot now -h}}&lt;br /&gt;
&lt;br /&gt;
To keep the desktop and login window from opening in Ubuntu everytime it starts we want to mask out the few lines which start the service.&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = sudo vim /etc/init/gdm.conf}}&lt;br /&gt;
&lt;br /&gt;
The first few lines of the script should look like this once you've edited it:&lt;br /&gt;
{{Code|Code = &lt;br /&gt;
&lt;br /&gt;
# gdm - GNOME Display Manager&lt;br /&gt;
#&lt;br /&gt;
# The display manager service manages the X servers running on the&lt;br /&gt;
# system, providing login and auto-login services&lt;br /&gt;
&lt;br /&gt;
description &amp;quot;GNOME Display Manager&amp;quot;&lt;br /&gt;
author &amp;quot;William Jon McCann &amp;lt;mccann@jhu.edu&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#start on ((filesystem&lt;br /&gt;
# and runlevel [!06]&lt;br /&gt;
# and started dbus&lt;br /&gt;
# and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1&lt;br /&gt;
# or stopped udev-fallback-graphics))&lt;br /&gt;
# or runlevel PREVLEVEL=S)&lt;br /&gt;
&lt;br /&gt;
stop on runlevel [016]&lt;br /&gt;
&lt;br /&gt;
emits login-session-start&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
esc :wq to save the changes or :q! to start over. Now the desktop and login won't start in Ubuntu.&lt;br /&gt;
&lt;br /&gt;
NOTE: This only installs a basic desktop, if you want to be able to use programs from your virtual desktop, network manager, media players, office, etc, they will need to be installed after vnc server is installed. &lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = sudo reboot now -h}}&lt;br /&gt;
&lt;br /&gt;
B: We need to install VNC server to be able to interact with the gnome components for the desktop.&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = sudo apt-get install vnc4server}}&lt;br /&gt;
&lt;br /&gt;
When prompted type Y and press Enter. This will install VNC Server which is required for running a virtual desktop on another machine.&lt;br /&gt;
&lt;br /&gt;
Next type:&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = vncserver}}&lt;br /&gt;
&lt;br /&gt;
You'll then be prompted to create and verify a new password. &lt;br /&gt;
&lt;br /&gt;
We now need to kill the session we just created and make change the startup script for VNCServer to make it work properly. &lt;br /&gt;
&lt;br /&gt;
So, type the following command to kill the session:&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = vncserver -kill :1}}&lt;br /&gt;
&lt;br /&gt;
Now type the following command to open up the file we need to edit:&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = sudo vim .vnc/xstartup}}&lt;br /&gt;
&lt;br /&gt;
Change it to look like this:&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = &lt;br /&gt;
&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
# Uncomment the following two lines for normal desktop:&lt;br /&gt;
unset SESSION_MANAGER&lt;br /&gt;
#exec /etc/X11/xinit/xinitrc&lt;br /&gt;
gnome-session --session=gnome-classic &amp;amp;&lt;br /&gt;
&lt;br /&gt;
[ -x /etc/vnc/xstartup ] &amp;amp;&amp;amp; exec /etc/vnc/xstartup&lt;br /&gt;
[ -r $HOME/.Xresources ] &amp;amp;&amp;amp; xrdb $HOME/.Xresources&lt;br /&gt;
xsetroot -solid grey&lt;br /&gt;
vncconfig -iconic &amp;amp;&lt;br /&gt;
#x-terminal-emulator -geometry 1280x1024+10+10 -ls -title &amp;quot;$VNCDESKTOP Desktop&amp;quot; &amp;amp;&lt;br /&gt;
#x-window-manager &amp;amp;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
When you're done editing the file press the Esc key once and type :wq&lt;br /&gt;
&lt;br /&gt;
This should save the changes and bring you back to the command line. If you make a mistake editing the file then issue :q! instead of :wq to abort your changes.&lt;br /&gt;
&lt;br /&gt;
Next type the following command to create the VNC Session once more:&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = vncserver -geometry 1680x1050}}&lt;br /&gt;
&lt;br /&gt;
where 1280x1024 is the resolution of your DESKTOP COMPUTER.&lt;br /&gt;
&lt;br /&gt;
Download and install TightVNC onto your desktop computer.&lt;br /&gt;
&lt;br /&gt;
http://www.tightvnc.com/download.html&lt;br /&gt;
&lt;br /&gt;
When you launch it type your hda server name followed by a colon and the number 1 (this is the name you gave it when you installed Ubuntu)for example: Ubuntu-1204:1&lt;br /&gt;
&lt;br /&gt;
[[File:vnc.jpg]]&lt;br /&gt;
&lt;br /&gt;
Or use it's static ip address and :1 eg: 192.168.1.55:1 in the VNCServer box. &lt;br /&gt;
&lt;br /&gt;
[[File:vnc1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Then click Connect, enter the password you created when you typed after installing vncserver.&lt;br /&gt;
&lt;br /&gt;
[[File:vnc2.jpg]]&lt;br /&gt;
&lt;br /&gt;
You now see the desktop screen.&lt;br /&gt;
&lt;br /&gt;
[[File:vnc3.jpg]]&lt;br /&gt;
&lt;br /&gt;
________________________&lt;br /&gt;
&lt;br /&gt;
C: Write a script to launch VNC&lt;br /&gt;
&lt;br /&gt;
A script is basically a file containing a list of commands which&lt;br /&gt;
will be executed each time you run it. I put all my scripts in a &lt;br /&gt;
directory below my &amp;quot;home&amp;quot; folder in a folder called scripts.&lt;br /&gt;
&lt;br /&gt;
So, from a Putty session:&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = cd /home/xxxx}}&lt;br /&gt;
&lt;br /&gt;
where xxxx is your Ubuntu username. This command switches us into that directory.&lt;br /&gt;
&lt;br /&gt;
Next we'll create a folder called MyScripts below your home folder. So type:&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = mkdir scripts}}&lt;br /&gt;
&lt;br /&gt;
Switch into the folder we've just created type:&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = cd scripts}}&lt;br /&gt;
&lt;br /&gt;
Next type:&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = vim StartVNC.sh}}&lt;br /&gt;
&lt;br /&gt;
This will create a new file called StartVNC.sh and open it for editing.&lt;br /&gt;
&lt;br /&gt;
Press the i key once and copy and paste the following contents:&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = &lt;br /&gt;
&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
echo &amp;quot;JOB RUN AT $(date)&amp;quot;&lt;br /&gt;
echo &amp;quot;============================&amp;quot;&lt;br /&gt;
echo &amp;quot;&amp;quot;&lt;br /&gt;
/usr/bin/vncserver -geometry 1680x1050&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
NOTE: change the 1680x1050 to match the screen resolution of your Desktop computer&lt;br /&gt;
&lt;br /&gt;
Press the ESC key once and type :wq and press Enter to save. &lt;br /&gt;
&lt;br /&gt;
Next we need to make the file executable so, assuming you called your script StartVNC.sh then you'd type:&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = chmod a+x StartVNC.sh}}&lt;br /&gt;
&lt;br /&gt;
Test the script by typing the following:&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = vncserver -kill :1}}&lt;br /&gt;
&lt;br /&gt;
To make sure vncserver isn't running, then:&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = ./StartVNC.sh}}&lt;br /&gt;
&lt;br /&gt;
A new vnc session should start.&lt;br /&gt;
&lt;br /&gt;
D: Create a cron job in webmin to run the script on boot&lt;br /&gt;
&lt;br /&gt;
Stop vncserver&lt;br /&gt;
&lt;br /&gt;
{{Code|Code = vncserver -kill :1}}&lt;br /&gt;
&lt;br /&gt;
Now open your browser and go to your HDA and click on the webmin app you already installed, click continue to this website at the cert warning.&lt;br /&gt;
&lt;br /&gt;
[[File:webmin1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Enter user and password as required. &lt;br /&gt;
&lt;br /&gt;
[[File:webmin2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Within Webmin click on System and then Scheduled Cron Jobs in the left column. Then click the Create a new scheduled cron job option at the top of the screen that opens.&lt;br /&gt;
&lt;br /&gt;
Click the button next to the Execute cron job as and choose the username you created when you installed Ubuntu. Hint: your username appears in a Putty/Terminal session prompt. eg. yourusernameappearshere@Myhdaserver.&lt;br /&gt;
&lt;br /&gt;
Type or paste the name of your script including the full path &lt;br /&gt;
&lt;br /&gt;
{{Code|Code = /home/xxxx/scripts/StartVNC.sh &amp;gt;/dev/null}}&lt;br /&gt;
&lt;br /&gt;
into the Command box, replacing xxxx with your own usernam. The &amp;quot;&amp;gt;/dev/null&amp;quot; parameter will discard any output the script may produce.&lt;br /&gt;
&lt;br /&gt;
Enter a suitable description in the Description field.&lt;br /&gt;
&lt;br /&gt;
In the When to Execute - Simple schedule drop-down list choose When system boots then click the Create button at the bottom of the screen.&lt;br /&gt;
&lt;br /&gt;
It should look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:webmin3.jpg]]&lt;br /&gt;
&lt;br /&gt;
First test that you've set the job up correctly within Webmin. You can do this by clicking on the job you've just created from the long list of cron jobs (not checking the box but clicking on the name). In the new window that opens click the Run Now button at the bottom of the screen. You should see a message similar to the one you saw when you tested it from a Putty/Terminal session.&lt;br /&gt;
&lt;br /&gt;
Now let's check the script works on boot. So from the System -&amp;gt; Bootup and Shutdown menu within Webmin scroll down to the bottom of the screen and click the Reboot System button. Alternatively type &lt;br /&gt;
&lt;br /&gt;
{{Code|Code = sudo reboot now -h}}&lt;br /&gt;
&lt;br /&gt;
in a Putty/Terminal session.&lt;br /&gt;
&lt;br /&gt;
After reboot go to your Windows machin and open Tight VNC Viewer and connect to your ubuntu virtual desktop. VNC Server now starts automatically on boot.&lt;br /&gt;
&lt;br /&gt;
That's it you should now have vnc server start on boot and a virtual desktop for your server on another machine.&lt;br /&gt;
&lt;br /&gt;
Most of this information was obtained from: www.havetheknowhow.com.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Alternate Method=&lt;br /&gt;
This is just what I found on how to install a VNC for Ubuntu 12.04LTS after figuring out that TigerVNC (the above methods) do not work for Ubuntu. The method is copied from [http://coddswallop.wordpress.com/2012/05/09/ubuntu-12-04-precise-pangolin-complete-vnc-server-setup/ here]. This will result in the gnome GUI, not Unity.&lt;br /&gt;
&lt;br /&gt;
* First we need to update our repositories and install gnome.&lt;br /&gt;
&lt;br /&gt;
{{Code|sudo apt-get update&lt;br /&gt;
sudo apt-get install gnome-core gnome-session-fallback}}&lt;br /&gt;
&lt;br /&gt;
* Next we install VNC4Server. Follow the instructions.&lt;br /&gt;
&lt;br /&gt;
{{Code|sudo apt-get install vnc4server}}&lt;br /&gt;
&lt;br /&gt;
* We need to test the VNC, and then close the session. In the process we are prompted for a password to use everytime we try to connect using our VNC client.&lt;br /&gt;
&lt;br /&gt;
{{Code|vncserver&lt;br /&gt;
vncserver -kill :1}}&lt;br /&gt;
&lt;br /&gt;
* We open the startup file that we need to edit to make gnome show up in the VNC, and not just a terminal:&lt;br /&gt;
&lt;br /&gt;
{{Code|cp .vnc/xstartup .vnc/xstartup.bak&lt;br /&gt;
nano .vnc/xstartup}}&lt;br /&gt;
&lt;br /&gt;
* We edit the file to uncomment the second line, and add &amp;quot;gnome-session -session=gnome-classic &amp;amp;&amp;quot;. So it will look like this:&lt;br /&gt;
&lt;br /&gt;
{{Text|Text=&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;!/bin/sh&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; Uncomment the following two lines for normal desktop:&lt;br /&gt;
unset SESSION_MANAGER&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;exec /etc/X11/xinit/xinitrc&lt;br /&gt;
gnome-session –session=gnome-classic &amp;amp;&lt;br /&gt;
&lt;br /&gt;
[ -x /etc/vnc/xstartup ] &amp;amp;&amp;amp; exec /etc/vnc/xstartup&lt;br /&gt;
[ -r $HOME/.Xresources ] &amp;amp;&amp;amp; xrdb $HOME/.Xresources&lt;br /&gt;
xsetroot -solid grey&lt;br /&gt;
vncconfig -iconic &amp;amp;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;x-terminal-emulator -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &amp;amp;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;x-window-manager &amp;amp;&lt;br /&gt;
}}&lt;br /&gt;
* And finally we quit nano and save the file.&lt;br /&gt;
      ctrl + x&lt;br /&gt;
      y (for confirmation that yes, we do want the file to be overwritten with the new information)}}&lt;br /&gt;
* To start the VNC just type the following into a terminal (using something like [[Key-based SSH Logins With Putty|Putty]]. This will start a new VNC session.&lt;br /&gt;
{{Code|vncserver}}&lt;br /&gt;
&lt;br /&gt;
=Tips and Tricks =&lt;br /&gt;
&lt;br /&gt;
VNC does not respect the normal rules of elevating the current user through the use of entering the admin password. The only way to run many graphical programs that require the super user is to open a command line terminal within the VNC session and start the program with the &amp;quot;sudo&amp;quot; command. Two programs that may come in handy that work in this fashion are gparted and Synaptic Package Manager.&lt;br /&gt;
&lt;br /&gt;
To start gparted:&lt;br /&gt;
&lt;br /&gt;
In a VNC terminal window type:&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code = sudo gparted&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
To start Synaptic Package Manager:&lt;br /&gt;
&lt;br /&gt;
In a VNC terminal window type:&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code = sudo synaptic&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Paul Rodriguez</name></author>
		
	</entry>
</feed>