I was using Ubuntu for web developing purpose several years. At the beginning, I'm not so familiar with pure command line. So I started with Ubuntu Server with Gnome installation. Until I get more familiar with command line, and there are few useful web-based tools to manage linux server, then I have more confidence to run Ubuntu Server without GUI.
Unfortunately, I have got many problems to develop shell scripts on Windows and try to run on Linux Server (I'm using NotePad++). So, I still use Ubuntu Desktop on VMware Player on my Notebook to develop all shell scripts and recently I'm using Debian for production webserver. Another use of GUI is my File Server at my office. I'm running Ubuntu Server 10.04 as a Home-Office SAMBA File Server for Windows clients. As this server will run in local network, so I can remote access to manage the files easily via vncviewer.
Install Ubuntu Desktop on Ubuntu Server
There were several articles wrote about how to install GUI on Ubuntu Server, the most common one is...
sudo aptitude install ubuntu-desktop
Which from my experience is the best solution. There were few articles mentioned how to install only Gnome, or other light-weight GUI, because to install all ubuntu-desktop package means to install OpenOffice, and other Application more or less like Ubuntu Desktop. If you did not really has a problem about disk space, or internet bandwidth problem.
I recommend to just simply install ubuntu-desktop, this method is much more reliable, do not miss any important package later on. I faced a lot of problems about missing packages when I installed ubuntu-desktop with "no-install-recommends" option. It makes me a lot of headache at that time.
If you really has the problem about disk space, or internet bandwidth, the alternative ways are
#install only Gnome
sudo aptitude install --no-install-recommends ubuntu-desktop
#install lightweight desktop xfce
sudo apt-get install xubuntu-desktop
#install KDE
sudo apt-get install kubuntu-desktop
Thanks to:
Disable user list in GDM Login Screen on Ubuntu
The reason I have to disable user list because my file server, it show all unix users on the login screen but nobody gonna use file server directly anyway. In the past, the how to articles to disable user list are so many steps and much more difficult than this, now it just only simple single line of command.
sudo -u gdm gconftool-2 --set --type boolean /apps/gdm/simple-greeter/disable_user_list true
When I search the information to write this blog, I just found out that on Ubuntu 10.04, there is a very easy way to disable it!
- Simply go to System –> Administration –> Login Screen.
- Click "Unlock"
- Uncheck "Show list of users"
Note: This option was not shown on my Ubuntu Desktop. May be I already disabled it by command line
Thanks to:
- http://ubuntu-tutorials.com/2009/12/23/remove-the-user-list-from-ubuntu-9-10-gdm-login-screen/
- http://www.liberiangeek.net/2010/09/enabledisable-user-list-logon-screen-ubuntu-10-0410-10-maverick-meerkat/
Install VNCServer on Ubuntu Server
Once you installed ubuntu-desktop. There will be an option System -> Preferences -> Remote Desktop, which I do not recommend to use. This option will works only when user logged in the gnome session on the server directly, and when you access the server via vncviewer, it will take over the current user session who logged in on the server directly.
The proper way to enable the GUI session for users is to install the vncserver. There are few vncserver in Ubuntu repository. My choice is vnc4server
#install vncserver
sudo aptitude install vnc4server
This vnc4server is more or less like on-demand vncserver. If you want to remote access via vncviewer, you have to start the service by command line vncserver
#Start VNC Server
vncserver
#Example
sexdrum@hanuman:~$ vncserver
New 'hanuman:1 (sexdrum)' desktop is hanuman:1
Starting applications specified in /home/sexdrum/.vnc/xstartup
Log file is /home/sexdrum/.vnc/hanuman.sky.co.th:1.log
The most common way is access via SSH and run this command line. If you use System -> Preferences -> Remote Desktop method, it will use the default vnc session port is 5900 (or :0) which less secure. But you use vncserver method, it will generate vnc session on demand, and the port number start from port number 5901 (or display number :1) and it can provide multiple vnc sessions for multiple users in the same time with different port number.
When you finish your job on vnc session, you just terminate the vncserver by following command
#Stop VNC Server
vncserver -kill :<display-number>
#Example
sexdrum@hanuman:~$ vncserver -kill :1
Killing Xvnc4 process ID 22068
Thanks to: http://www.ehow.com/how_5089245_install-vnc-server-ubuntu.html
VNCViewer
If you are looking for vncviewer, there are many vnc in the market, most of them are free, and it contains both vncserver and vncviewer. Because vncserver also the alternate solution for remote desktop on Windows as well. But what I need is just only the vncviewer. My choice is UltraVNC, it is quite popular for very long time, available both vncviewer and vncserver, easy to use and support windows Vista 32/64-bit.
Once when you started the vncserver session in SSH. you have to remote access to your server via vncviewer by specific port shown in your SSH. For example, in this case it started on port number 5901 (or display number :1), you have to connect to your servername:5901 or servername:1.
Minimal Gnome Desktop
| Next > |
|---|
