Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Alright when I starts the vncserver from my mandrake 10 linux box I hear the KDE start up sound indicating that (well I think at least) that a new X session is started. I can connect by using a vncviewer on my xp notebook but everything is missing. My open programs, and dialog boxes are gone (at least from a graphical persepctive). Is there any program that will allow me to view what is on my linux box in KDE on another computer over the network?
Your X display is number 0. The first time you start the vncserver it starts on display 1 (port 5901) If you start it again, it will be on display 2 (port 5902) etc etc. Your X session is on port 6000 and has nothing to do with VNC
Ok, so what do I have to change so that I can see what is on my current desktop? So do I have to start the program 100 times? I don't see anything in the man pages regarding changing the port for Xvnc or vncserver. Is what I'm asking not possible with vnc?
It helps to remember that linux is by nature a multi-user OS. You can't get VNC to display the "active" desktop the way it does for a windows box. There are plusses and minuses to it, I learned alot by watching my boss VNC into a windows box, but it won't happen in linux. You can be signed into your box as user1, then vnc in as user 1, and the 2 desktops will have nothing to do with one another. If you run ps -aux you'll see all the processes on both desktops, but you can't "see" or use the other ones.
extract and copy vnc.so to /usr/X11R6/lib/modules/extensions/
create a vnc passwd file using vncpasswd
open up your X config file (/etc/X11/XF86config(-4) or xorg.conf)
Under Section "Module" add
Under Section "Screen" add
Option "passwordFile" "/root/.vnc/passwd"
(change the path to wherever your password file is)
if you don't want password authentication for whatever reason add this line instead:
Option "securityTypes" "none"
restart X, now you can directly control the X session using vnc
If I may chime in, I did as you suggested, and as a result the vnc server starts when I launch my GUI (XFce4). But the drawback is, that the computer which is supposed to remote control the computer gets an XFce desktop, but not the current one. It gets its own desktop which is nice and well, but not the intended effect. I want to be able to see exactly the things on the remote controlled desktop which I see on that desktop itself. I'm led to believe that the KDE option does exactly that - in essence, it is supposed to look just as it does when you remote-control a Windows system which displays the mouse moves, programs etc. on its own screen which you start on the remote-controlling system.
The method I provided above is suppose to do just that, you control the running X session through VNC, ie when you move the mouse cursor in vncviewer on the remote computer, you see it moving on the monitor.
Make sure you're not connecting to other VNC sessions than the one started by X on display :0(you need to connect to the default port which is 5900)
When I tried the method yesterday, on the Win98 system running the viewer I could only see my usual XFce desktop, but not with the current windows open. Instead there was a terminal window open on the desktop, which in turn wasn't on the actual XFce screen, and the mouse movements were not replicated in either window.
The connection was to the display :1; :0 doesn't work at all, it gives an error 'no contact to server' or something to that effect. Where do I put that port? My vncviewer is the Windows version.
Addendum: It might be possible that the VNC session I actually did connect to yesterday was not one triggered by the setup you suggested but an older one I had started by hand. Today, when I tried it again, I could not make any connection at all with the module supposedly started by the lines in XF86config.
Let me describe what I did:
VNC was already installed on my system, and vnc.so was in /usr/X11R6/lib/modules, so I just made a symlink in the subdirectory /extensions.
I made a password as the user rather than root, and let the path point to the appropriate user directory rather than that of root. I also added the line which loads vnc. I restarted X and even tried rebooting, but vnc doesn't seem to start.
How can I verify whether vnc is actually running? On which display is it supposed to run? When I entered vncviewer in a terminal I got one I could connect to on :1, but there wasn't any other. this one of course was a new desktop with a very basic window manager only.
Thank you to all who made contributions to this thread. I had the exact same question as the originator of the thread, and I was able to set up VNC based onthe information taht was provided. I have a couple new questions though:
1. Is it possible to have a VNC viewer use a SSH connection if you want to connect remotely? I have looked around for information on that but haven't found anything yet. Or is it using SSH and I just don't know it??
2. When you are ready to close your VNC connection, how can you stop the various processes that were started by VNC? If I do a ps ax after loggin out of my VNC connection I still see many of the X processes running. Here are a few lines returned by ps ax:
15098 ? S 0:00 xscreensaver -nosplash
15109 ? S 0:00 gnome-panel --sm-client-id default2
15111 ? S 0:00 nautilus --no-default-window --sm-client-id default3
15113 ? S 0:00 magicdev --sm-client-id default4
15116 ? S 0:00 eggcups --sm-client-id default6
15118 ? S 0:00 pam-panel-icon --sm-client-id default0
How do I close those programs when I'm done with VNC?
I have been directed towards the perfect solution for my problem (I wanted to have the current X session displayed rather than a new one on a remote machine). The solution is x11vnc, and it can be downloaded and easily installed and run via the instructions found here: