germaebay.blogg.se

Ubuntu vnc server
Ubuntu vnc server








  1. UBUNTU VNC SERVER FULL
  2. UBUNTU VNC SERVER PASSWORD
  3. UBUNTU VNC SERVER FREE

The >/dev/null 2>&1 parameter will discard any output the script may produce.Įnter a suitable description in the Description field. home/htkh/MyScripts/StartVNC.sh >/dev/null 2>&1 into the Command box, replacing htkh with your own username, MyScripts with the name of the folder you created to store your scripts and StartVNC.sh with the script name.

UBUNTU VNC SERVER FULL

or paste the name of your script including the full path eg. Hint: your username appears in a Putty/Terminal session prompt. Then click the Create a new scheduled cron job option at the top of the screen that opens.Ĭlick the button next to the Execute cron job as and choose the username you created when you installed Ubuntu. So, within Webmin click on System and then Scheduled Cron Jobs. If you decide to go down the cron job route then from within Webmin you can very quickly see exactly what jobs are being run and can also easily enable and disable such jobs just by ticking a box. The easiest way to do this is to use Webmin. My personal preference is to create a cron job to run a script at boot time. Sudo update-rc.d -f StartVNC.sh remove Create a cron job to run the script If you ever change your mind and want to remove the script from the start-up, simply type the following command: Our script will now be run on boot and so our VNC session will be re-created each time the server is rebooted. This copies the script we created above into the /etc/init.d folder.

UBUNTU VNC SERVER PASSWORD

Assign the VNC script to a runlevelĪnd enter your password if prompted. Once the script has been created we can ensure it gets run in a few different ways one way is to add the script to one of the “runlevels” within the Ubuntu boot sequence. Next we need to make the file executable so, assuming you called your script StartVNC.sh then you’d type: Now press the key once and type the following:Īnd press to save and quit. NOTE: change the 1280×1024 to match the screen resolution of your Desktop computer and omit the “-depth 24” argument if you’re using Precise Pangolin 12.04LTS Next copy and paste the following contents (or simply type them): #!/bin/sh Now press the key once and add a couple of blank lines by pressing the key.

ubuntu vnc server

Again, the name of the file is not important. This will create a new file called StartVNC.sh and open it for editing. To switch into the folder we’ve just created type:

UBUNTU VNC SERVER FREE

Obviously the folder name is not important so feel free to pick something more suitable. Next we’ll create a folder called MyScripts below your home folder. This command switches us into that directory. So, either from a Putty session or a new Terminal Session within Ubuntu ( Applications -> Accessories) type the following commands: I personally put all my scripts in a directory below my “Home” folder in a folder called MyScripts. A script is basically a file containing a list of commands which will be executed each time you run it. Write a script to launch VNCĪn alternative (some say “better”) way is to create a small script. If you make a mistake editing the file then issue :q! instead of :wq to abort your changes.

ubuntu vnc server

Your VNC session should now be recreated each time you reboot the server. This should save your changes and bring you back to the command line.

ubuntu vnc server

Once you’ve done that press the key once and type the following: usr/bin/vncserver -geometry 1280x1024 -depth 24 Next, scroll up until your cursor is one line above the line which reads “exit 0” and then press the key once (to go into “edit” mode). This will open the file called rc.local which lives in the /etc folder. Simply type the following commands to do this:Īnd type your Ubuntu password if prompted. Perhaps the simplest way of ensuring the VNC session is re-created on boot is to add the “vncserver -geom….” command to a file called rc.local. There are a few ways of doing this and we’ll go through each of them in turn below. We can either launch a Putty session and re-type the vncserver -geometry 1280×1024 -depth 24 command after each reboot of the server or we can get the server to issue this command automatically at boot time. Having installed VNC to enable us to administer Ubuntu Server remotely using a GUI (Graphical User Interface) we now need to make sure VNC is launched at boot time. NOTE: If you’re jumping into this guide here then it’s worth mentioning that this guide has been tested on Lucid Lynx 10.04, Karmic Koala 9.10, 9.04 Jaunty, and 8.10 Intrepid.










Ubuntu vnc server