Link to home
Start Free TrialLog in
Avatar of Mark
Mark

asked on

How does VNC work?

This question derives from https://www.experts-exchange.com/questions/28735461/Can-Linux-do-multi-user-with-GUI.html where I asked if I could view user desktops remotely from workstations. One of the suggestions was VNC. I want to pursue that here.

My environment is Slackware 64 and it has libvncserver-0.9.9-x86_64-2 and tigervnc-1.1.0-x86_64-1. I've found other versions of vnc out there including REALvnc, ultraVNC and tightVNC. Some of these are commercial and supported.

First question: I've come across lots of howtos about starting the various programs, program options, tunnelling, etc., but nothing that really tells me how to proceed step by step.

So, Let's say I'm a user sitting in front of a workstation in my office and I want to log into the Linux server in the computer room and get a desktop for my account on that server. What do I do?
SOLUTION
Avatar of CompProbSolv
CompProbSolv
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
With Windows you can set up shortcuts to the VNC viewer program and add the IP address of the destination after the command line.  This allows you to have icons to connect to a variety of computers.  If you change the port on the server (easily done in VNC server) then you would add a colon and the port number after the IP address when specifying the server.

If you want to get to computers behind a firewall (remote locations) you would set up port forwarding on the router to allow for it.
Avatar of Mark
Mark

ASKER

CompProbSolv: I appreciate your jumping in ...
On the Linux server in the computer room you would install VNC server.
To the best of my knowledge, VNC is installed.
You would set a password, make sure that the server runs on startup,
Here's where I start to run into problems. When I ran vncserver at the command line, from the root user I got:
$ vncserver

You will require a password to access your desktops.

Password:

New 'mail:1 (root)' desktop is mail:1

Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/mail:1.log

1 18:27:54 root@mail:~

Open in new window

It did ask for a password (more on that later) and created the startup scripts as show. I'm doing this remotely, so I can't see if something is happening on the server's monitor. After logging out and back in I ran it again, as root:
> vncserver

New 'mail:2 (root)' desktop is mail:2

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/mail:2.log

1 23:08:50 root@mail:~

Open in new window

Notice a different display number. Why? Also, is this really starting a "server" to handle any connection or is it just for user root? What about user 'mary'?  You wrote:
On the workstation, install or run the VNC viewer.  When it asks for a server name, type in the IP address of the Linux server and hit Enter.  You'll get to a login screen where you type the password you set up in VNC on the server.
which makes me think I have to start a vnc "server" for each user. Is that right? Not sure about your statement, "make sure that the server runs on startup" applied.

Maybe some linux vnc users need to jump in here too?
I'm afraid that we're running into the differences between how this is done in Linux and in Windows and my ignorance of the former.

With Windows, you can set the host end up as as system service and it runs for all users.

When I've used VNC, the password is not user-specific.

What happens when you try to connect to the server with VNC?  If it doesn't give you a prompt for login credentials, try adding :1 or :2 after the IP address for the server.
I would suggest you to use LTSP  (ltsp.org) in this case, A scalable and better option to setup a diskless nodes environment.

TY/SA
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark

ASKER

I found the Linux procedure, but CompProbSolv pointed me in the right direction. Thanks