To start X Environment in a console window
At run level 5, the default run level of linux based desktop sessions, X environment is already started. In case linux is running at run level 3, then the X environment has to be started manually. To do so,
Login as the root user and on the command prompt type
This will start a GUI desktop session on the same terminal.
VNC setup on a Linux server
In a developement environment, it is a common scenario that the linux server on which the database is running or needs to be configured is in an isolated environment like a server room with limited access.
It then becomes essential for the administration team like dbas to connect to these servers remotely for maintenance activities on the server, database installations and upgrades. For such purposes VNC is a useful too.
VNC is supplied with the OS in Red Hat and Oracle Enterprise Linux distributions. To check whether VNC is currently running on your server run
# rpm -q vnc-server.
If the package is not installed install it from the linux distribution using
# yum install %rpm_name% OR
# rpm -ivh %rpm_name%
Once it is installed you can start it with the following command line
# service vncserver start
If you get the following error message when starting the server,
Starting VNC server: no displays configured [OK]
you need to add the following lines to /etc/sysconfig/vncservers
The server number must be configured when connecting from the client.
If you are setting up vnc for an oracle database installation, login as the oracle user and run vncpasswd.
You will be prompted for a password.
Once the password is set login as the root user and again start the server
# service vncserver start
you will get some diplay messages like
Starting vnc server, creating a new authority file, creating a startup script, path from where the startup command is issued and the log file path.
You now need to modify /home/oracle/.vnc/xstartup by uncommenting the below lines
Once this is done you can restart the vnc service again.
The vncserver service can be permanently enabled with the following line
#chkconfig vncserver on
This preceding command will start vncserver at run levels 2,3,4 and 5.
To check whether the vnc service is currently running type
# service vncserver status
Now to connect to the server from the client, you need to download vncviewer.
It is available from a number of sources such as www.realvnc.com.
Once downloaded and installed you give the server connection details on the UI and you are ready to go.
Another option to install Oracle 11g database in a client server architecture and you are using PUTTY – is to use the Xming X Server for the UI graphics display on Windows desktop.
You need to make one important setting in your putty window without which X-window system cannot find your PC for display.
In your putty window , under SSH category , click on X11.
Here check the “Enable X11 forwarding” checkbox and for
X display location enter “localhost 0:0”
Some of the uses of Xming are
1. You can execute commands via PuTTY terminals, and display via Xming, over your network.
2. Window’s drivers are often faster and more capable than Linux drivers for hardware-accelerated OpenGL
enabled graphics cards. Xming can exploit the capabilities of an OpenGL enabled device, on a Windows machine, by use of its -wgl option in all modes including XDMCP (i.e. -query).
3. Old slow redundant Windows machines can be easily re-cycled into slick Linux machines and then accessed
with Xming from your latest Windows computer. Xming elegantly and efficiently provides input control and graphical display for software that is running on the remote system.
For some general information
The different run levels in linux are
0 – System halt; no activity, the system can be safely powered down.
1 – Single user; rarely used.
2 – Multiple users, no NFS (network filesystem); also used rarely.
3 – Multiple users, command line (i.e., all-text mode) interface;
the standard runlevel for most Linux-based server hardware.
4 – User-definable
5 – Multiple users, GUI (graphical user interface);
the standard runlevel for most Linux-based desktop systems.
6 – Reboot; used when restarting the system.
Thought for the day
You may not know what is going to happen when you try. But if you do not try nothing will happen.