VerySimple Developer Blog
Technical Tips, Tricks and Rants.
 
Mar
30
Filed Under (*NIX) by Jason on 30-03-2006

I spent quite a bit of time trying to figure out how to remotely control my Mandrake 10 box as I do other Windows servers using Remote Desktop. I found that VNC seems to be the primary method of doing this. Only after compiling and configuring VNC server, though, did I realize that Mandrake 10 comes with an alternate service pre-loaded. There is one catch that I’ve discovered, though, which makes installing VNC still separately somewhat desirable.

The default Mandrake 10 installation includes the following app:

Start -> Internet -> Remote Access -> Virtual Network Connection

Running this application basically opens a Wizard-type application that prompts you with three choices:

1. Control Another Linux Box
2. Allow this machine to be controlled
3. Windows Terminal Service Client

When you select an option, it will launch the appropriate application:

1. Launches TightVNC client
2. Launches rfbdrake - (which is a VNC server)
3. Launches rdesktop (a windows remote desktop client)

Selecting option 2 starts rfbdrake, which starts a VNC service, allowing you to connect to your Linux box using any VNC client ( downloadable from www.tightvnc.com ).

This is pretty handy, but there is one major drawback. That is, you must physically be at the box to launch KDE or GNOME in the first place, then launch rfbdrake. So, if you reboot or your machine goes down, or rfbdrake crashes, you can no longer control the server without physically being at the box. I find this somewhat ironic, seeing as how i don’t normally want to remote control my box if i have physical access to it!

If you compile and install the VNC server, however, you have another option. The VNC server is interesting in that you can first SSH or Telnet into the server, startup VNC server, then login using a VNC client. It also supports multiple, concurrent user sessions, whereas rfbdrake only shares your current session. So, if you need to reboot or the machine goes down, you can always terminal back in and restart the VNC server. The installation process is somewhat complicated if you’re not used to compiling software. You need root permission. Downloading the Linux version of VNC server from www.tightvnc.com and following the basic instructions will do the trick.

The drawback to this is that VNC runs on a really bizarre low-level of X-windows. So, the windows environment will be somewhat uncomfortable and unusual for most people. But, at least you can run GUI apps. When you first start VNC server at the command prompt, a .vnc directory will be automatically created in your home directory. In this directory a file called xstartup will be created. This controls your VNC session. You can append the following line to the end of this file to launch VNC GNOME windows manager:

exec gnome-session &

Of course you have to restart the VNC service to recognize these changes. Starting and closing the VNC service is done using a shell script that is included with the app called vncserver. The one thing to note is that each time you start VNC server, it will create a new instance. So, you can have many instances running on the same machine. When you start the VNC service, it will tell you the ID number of the instance. The VNC instances are specified when you connect from the client like so:

192.168.1.150:1 (instance 1)
192.168.1.150:2 (instance 2)
etc..

to terminate an instance, you use the vncserver script again like so:

vncserver kill :1 (kills instance 1)

I know this is quite a bit of information all in one post. I hope that it at least gives you some clue and/or sends you off in the right direction!

 

Comments:
1 Comment posted on "Mandrake Linix 10 / Remote Desktop / Terminal Service / VNC"
veera on March 26th, 2008 at 12:52 pm #

hi i am using mandriva 2008. for using vnc i have launched rfbdrake server. but there is no .vnc folder created in home dirctory. can you tell me the exact location of the .vnc folder. also i cannot find vncserver under etc/sysconfig.
hope you may help it out.

also tell me how can i check vnc service .


Post a comment

Name: 
Email: 
URL: 
Comments: 
Close
  • Social Web

NOTE: Email is disabled

E-mail It