View previous topic :: View next topic |
Author |
Message |
MatzeOne Guru
Joined: 07 Sep 2003 Posts: 579 Location: Hamburg, Germany
|
Posted: Sat Oct 11, 2003 4:23 pm Post subject: VNCServer (Linux) Setup and Client Configuration (Win) |
|
|
This is my first tutorial and english is not my first language, so please don't hack me
This tutorial should guide you trough the installation of a VNC Server on (Gentoo) Linux and the configuration for Windows Boxes. VNC stands for Virtual Network Computing. It is remote control software which allows you to view and interact with one computer (the "server") using a client on another computer. If you want to surf webpages at your work and your boss shouldn't know that, i'm your man
Before we start make sure you can answer at least the first four questions with yes:
- Do you have a Linux installed on your computer which you want to use as your server?
- Do you have a Windows installed on the computer which you want to use as your client?
- Do you have root access to your Server?
- Do you have a Secure Shell Daemon installed, configured and is it started?
- Do you know why you want to follow the following instructions?
---
So we can start now with the Linux Server.
I'm using the Gentoo distribution so i can't guarantee that this works on your box. I recommend Gentoo as the best distribution around, but that's not the topic
Log in as root.
Gentoo-users:
Update the portage tree with You make sure that you've the latest versions by updating the portage tree. Next get the vnc-package and compile it:
Now the server is ready
Non-Gentoo-Users:
You should get the package from http://www.realvnc.com manually. Follow the installation instructions.
Now start the server by typing this into the terminal, shell or whatever
When vncserver is started for the first time you have to enter a password. For security reasons don't use your root password or another password you are using Re-enter the password. The server should have been started and is listening to port 5901 per default.
You can check with
These ports should show up:
Code: | PORT STATE SERVICE
5801/tcp open vnc-http-1
5901/tcp open vnc-1
|
If you are behind a firewall, make sure port 5901 open. On port 5801 there is a webserver with a java-applet installed. You can access your machine by simply typing http://your-linux-server:5801 but then the data is not encrypted and the local system administrator may have some questions So just don't use this ^^
---
Client setup (Windows)
We need some programs to be installed
Download and install Putty - It's the SSH client. We use this because of security reasons
Download VNC for Windows. You don't need to fill our the fields on the download side. Just click on the checkbox left of Windows 9x/2000/NT/XP (x86) and proceed. You only need the viewer.
After Installing these programs we will configure Putty.
Start Putty
Session:
___Hostname: ip of server
___Port: port on which sshd listens (default: 22)
NOTE: by accessing your computer over a hostname instead of an ip, get you an account at http://www.dyndns.org per example.
Connection:
###Proxy: if you connect through a proxy to the internet, enter the information
Connection:
###SSH
________Tunnels:
________________Disable X11 Forwarding
________________(add new lokal port): Source port: 5901
____________________________________ Destination: localhost:5901
Save your Setting! (Session, Saved sessions, enter a session name, Save)
Now Press "Open"!!!
Login to your Server as a user.
Don't close Putty.
Start the VNC Viewer on your Windows machine (maybe over the program - menu )
VNC Server: localhost:1 (localhost, because putty tunneled the connection)
enter the password you've given the server... you should now see your X screen with the window manager twm...
I hope i could help.
MatzeOne _________________ Mit null lässt sich eine ganze Menge machen.
Sportschule Hamburg |
|
Back to top |
|
|
Malakin Veteran
Joined: 14 Apr 2002 Posts: 1692 Location: Victoria BC Canada
|
Posted: Sat Oct 11, 2003 7:29 pm Post subject: |
|
|
If you want a more responsive connection this is what I use to connect from a windows box:
tightvncviewer.exe /encodings tight /compresslevel 9 /quality 5 /nocursorshape -normalcursor -noremotecursor whatever.dyndns.org:1
I use tightvnc instead of the standard vnc, it has quite a few additional features and it's rock solid. jpeg support is one of the tightvnc features and it's much faster using it.
This enables jpeg compression and cranks up the cpu usage for compression although it's still very low on my systems. nocursorshape stops the cursor shape updates, normalcursor gives you a normal arrow cursor to work with and noremotecursor prevents the real cursor from being drawn. |
|
Back to top |
|
|
MatzeOne Guru
Joined: 07 Sep 2003 Posts: 579 Location: Hamburg, Germany
|
|
Back to top |
|
|
ferris5 n00b
Joined: 02 Sep 2003 Posts: 32
|
Posted: Tue Oct 21, 2003 4:54 pm Post subject: |
|
|
When i start vncserver i get the following : couldn't find "xauth" on your PATH.
what am i doing wrong? |
|
Back to top |
|
|
MatzeOne Guru
Joined: 07 Sep 2003 Posts: 579 Location: Hamburg, Germany
|
Posted: Wed Oct 22, 2003 5:30 pm Post subject: |
|
|
ferris5 wrote: | When i start vncserver i get the following : couldn't find "xauth" on your PATH.
what am i doing wrong? |
did you start the server as root?
so did i (yes... i know... i shouldn't do this...) and it worked for me _________________ Mit null lässt sich eine ganze Menge machen.
Sportschule Hamburg |
|
Back to top |
|
|
ferris5 n00b
Joined: 02 Sep 2003 Posts: 32
|
Posted: Thu Oct 23, 2003 6:32 am Post subject: |
|
|
Yes, that was the answer, thanks |
|
Back to top |
|
|
MatzeOne Guru
Joined: 07 Sep 2003 Posts: 579 Location: Hamburg, Germany
|
|
Back to top |
|
|
Hoshimaru Apprentice
Joined: 09 Nov 2003 Posts: 225 Location: Belgium
|
Posted: Wed Jan 21, 2004 10:28 pm Post subject: |
|
|
Very interesting ^^
However I only see a X shell window on a gray background.
I logged in using SSH.
# vncserver
# startx
Wether I run startx or not, I get the same gray bg with a shell window. Any idea ?
Edit: Screenshot |
|
Back to top |
|
|
Malakin Veteran
Joined: 14 Apr 2002 Posts: 1692 Location: Victoria BC Canada
|
Posted: Thu Jan 22, 2004 1:13 am Post subject: |
|
|
Quote: | Wether I run startx or not, I get the same gray bg with a shell window. Any idea ? | I think you need to edit your ~/.xinitrc file and add a line for a desktop.
Mine looks like this: Code: | /usr/kde/3.1/bin/startkde |
|
|
Back to top |
|
|
Hoshimaru Apprentice
Joined: 09 Nov 2003 Posts: 225 Location: Belgium
|
Posted: Thu Jan 22, 2004 7:58 am Post subject: |
|
|
Ok ^^
I'm going to find out what command is needed for Gnome
Edit: Screenshot - Direct access on the Gentoo box, without VNC and SSH |
|
Back to top |
|
|
Hoshimaru Apprentice
Joined: 09 Nov 2003 Posts: 225 Location: Belgium
|
Posted: Thu Jan 22, 2004 6:40 pm Post subject: |
|
|
I managed to get it working.
I commented everything in ~/.vnc/xstartup and wrote:
Code: |
#!/bin/sh
xset fp+ unix/:-1
/etc/X11/Sessions/Gnome
|
I found this on the gentoo forums during my coffee break at work, but I can't remember which thread it was.
Maybe this can help someone else too ?
Screenshot |
|
Back to top |
|
|
HomerSimpson l33t
Joined: 25 Jan 2003 Posts: 869 Location: Ohio, USA
|
Posted: Tue Mar 09, 2004 11:57 am Post subject: |
|
|
MatzeOne, if we are tunneling through ssh then why do we have to open 5901 in the firewall?
I ask this because I can't get this to work outside my lan. I am assuming that port 5901 needs to be open but I don't understand why and I don't want to open it if I don't have to.
Thx for the tutorial. _________________ The strong must protect the Sweet. |
|
Back to top |
|
|
marcowave Apprentice
Joined: 10 Feb 2004 Posts: 284 Location: Paris, France
|
Posted: Fri Apr 23, 2004 8:58 pm Post subject: |
|
|
MatzeOne wrote: | ferris5 wrote: | When i start vncserver i get the following : couldn't find "xauth" on your PATH.
what am i doing wrong? |
did you start the server as root?
so did i (yes... i know... i shouldn't do this...) and it worked for me |
it doesn't work for me...
I am root but I when I type vncserver I get this error:
couldn't find "xauth" on your PATH
_________________ Linux User #351189 --->A.K.A. "Johnny"<---
Acer TM292LMi: PentiumM 1,5 GHz - 1 GB ram - Radeon 9700M 64MB - Intel 802.11b/g WLAN - DVD-RW - Gentoo Linux - KDE 3.5.2
GentooServer: AMD Athlon 700 MHz - 512 MB ram - HD 80 GB - Kernel 2.6 - Fluxbox |
|
Back to top |
|
|
meulie l33t
Joined: 17 Jun 2003 Posts: 845 Location: a Dutchman living in Norway
|
Posted: Tue Jun 08, 2004 7:33 pm Post subject: |
|
|
marcowave wrote: | MatzeOne wrote: | ferris5 wrote: | When i start vncserver i get the following : couldn't find "xauth" on your PATH.
what am i doing wrong? |
did you start the server as root?
so did i (yes... i know... i shouldn't do this...) and it worked for me |
it doesn't work for me...
I am root but I when I type vncserver I get this error:
couldn't find "xauth" on your PATH
|
I had that as well. The following command solved it for me:
Code: |
source /etc/profile
|
_________________ Greetz,
Evert Meulie |
|
Back to top |
|
|
marcowave Apprentice
Joined: 10 Feb 2004 Posts: 284 Location: Paris, France
|
Posted: Wed Jun 09, 2004 1:27 pm Post subject: |
|
|
ok, now I have VNC working..
but it's too slow... I can't control my remote PC server with a Linux VNC server.. so I reinstalled win2000..
is there some other programs faster than VNC or is there a way to make VNC for linux faster? _________________ Linux User #351189 --->A.K.A. "Johnny"<---
Acer TM292LMi: PentiumM 1,5 GHz - 1 GB ram - Radeon 9700M 64MB - Intel 802.11b/g WLAN - DVD-RW - Gentoo Linux - KDE 3.5.2
GentooServer: AMD Athlon 700 MHz - 512 MB ram - HD 80 GB - Kernel 2.6 - Fluxbox |
|
Back to top |
|
|
meulie l33t
Joined: 17 Jun 2003 Posts: 845 Location: a Dutchman living in Norway
|
Posted: Wed Jun 09, 2004 2:40 pm Post subject: |
|
|
have you tried tightvnc? works pretty good on my systems here... _________________ Greetz,
Evert Meulie |
|
Back to top |
|
|
marcowave Apprentice
Joined: 10 Feb 2004 Posts: 284 Location: Paris, France
|
Posted: Wed Jun 09, 2004 2:48 pm Post subject: |
|
|
yep I try it...
it works well with a normal X session...
but if I use KDE it's very slow....
Are u using KDE? _________________ Linux User #351189 --->A.K.A. "Johnny"<---
Acer TM292LMi: PentiumM 1,5 GHz - 1 GB ram - Radeon 9700M 64MB - Intel 802.11b/g WLAN - DVD-RW - Gentoo Linux - KDE 3.5.2
GentooServer: AMD Athlon 700 MHz - 512 MB ram - HD 80 GB - Kernel 2.6 - Fluxbox |
|
Back to top |
|
|
meulie l33t
Joined: 17 Jun 2003 Posts: 845 Location: a Dutchman living in Norway
|
Posted: Wed Jun 09, 2004 3:32 pm Post subject: |
|
|
Yup. I use both Gnome & KDE.
My linux box is a 2.4G Celeron & my winXP is a Athlon XP 2000+. I've set tightvnc to max compression. _________________ Greetz,
Evert Meulie |
|
Back to top |
|
|
marcowave Apprentice
Joined: 10 Feb 2004 Posts: 284 Location: Paris, France
|
Posted: Fri Jun 25, 2004 2:24 pm Post subject: |
|
|
how have I to modify the file
#/home/johnny/.vnc/xstartup
Code: |
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
|
to make KDE starts up in a VNC session? _________________ Linux User #351189 --->A.K.A. "Johnny"<---
Acer TM292LMi: PentiumM 1,5 GHz - 1 GB ram - Radeon 9700M 64MB - Intel 802.11b/g WLAN - DVD-RW - Gentoo Linux - KDE 3.5.2
GentooServer: AMD Athlon 700 MHz - 512 MB ram - HD 80 GB - Kernel 2.6 - Fluxbox |
|
Back to top |
|
|
Malakin Veteran
Joined: 14 Apr 2002 Posts: 1692 Location: Victoria BC Canada
|
Posted: Fri Jun 25, 2004 6:50 pm Post subject: |
|
|
KDE has support for vnc. Control Center -> Internet & Network -> Desktop Sharing. From here you can tick "allow uninvited connections" and give it a password.
Not sure how fast KDE's built-in vnc support is, it may be a lot slower then tightvnc but I don't know since I haven't used it recently. |
|
Back to top |
|
|
marcowave Apprentice
Joined: 10 Feb 2004 Posts: 284 Location: Paris, France
|
Posted: Fri Jun 25, 2004 7:10 pm Post subject: |
|
|
Malakin wrote: | KDE has support for vnc. Control Center -> Internet & Network -> Desktop Sharing. From here you can tick "allow uninvited connections" and give it a password.
Not sure how fast KDE's built-in vnc support is, it may be a lot slower then tightvnc but I don't know since I haven't used it recently. |
yes I know.. but it is too slow..
and for fluxbox? what I have to change? _________________ Linux User #351189 --->A.K.A. "Johnny"<---
Acer TM292LMi: PentiumM 1,5 GHz - 1 GB ram - Radeon 9700M 64MB - Intel 802.11b/g WLAN - DVD-RW - Gentoo Linux - KDE 3.5.2
GentooServer: AMD Athlon 700 MHz - 512 MB ram - HD 80 GB - Kernel 2.6 - Fluxbox |
|
Back to top |
|
|
x20vmk4x n00b
Joined: 23 Aug 2003 Posts: 40
|
Posted: Fri Jun 25, 2004 8:14 pm Post subject: |
|
|
marcowave wrote: | Malakin wrote: | KDE has support for vnc. Control Center -> Internet & Network -> Desktop Sharing. From here you can tick "allow uninvited connections" and give it a password.
Not sure how fast KDE's built-in vnc support is, it may be a lot slower then tightvnc but I don't know since I haven't used it recently. |
yes I know.. but it is too slow..
and for fluxbox? what I have to change? |
just change the to |
|
Back to top |
|
|
pele_smk Tux's lil' helper
Joined: 06 Mar 2004 Posts: 94 Location: Phoenix, AZ
|
Posted: Mon Nov 01, 2004 5:33 am Post subject: *fixed* vncserver error |
|
|
ok I'm getting the error:
vncserver: Could not create /home/pelesmk/.vnc.
Any suggestions?
*FIXED* Wow an intersting one. Simple yet weird, It ended up being an ownership problem. As basic as not being allowed to write to /home/pelesmk/. Must have been a late night and I messed something up. All is well now. _________________ AMD64 3000+
Chaintech ZNF3-150
Chaintech ti4200 SE
WD 120gb && Maxtor 250gb && Maxtor 250gb,
Lite-On DVD+-RW
Coolermaster ATC-210
Thermalright slk & Tornado 92mm
It's still hot...... |
|
Back to top |
|
|
wesblake n00b
Joined: 25 Jun 2004 Posts: 52 Location: Sacramento
|
Posted: Sat Nov 06, 2004 12:22 am Post subject: Any ideas? |
|
|
Ok guys, this is the first time I've set up vncserver. I followed this guide, and my comp is at home behind a Wireless router. I set up the router to forward port requests for 5801 and 5901 to my box under "virtual server" tab.
I then started server (as normal user, not root) and got this:
bash-2.05b$ vncserver
You will require a password to access your desktops.
Password:
Verify:
xauth: (argv):1: bad display name "tux:1" in "add" command
New 'X' desktop is tux:1
Creating default startup script /home/daho/.vnc/xstartup
Starting applications specified in /home/daho/.vnc/xstartup
Log file is /home/daho/.vnc/tux:1.log
bash-2.05b$ nmap localhost
bash: nmap: command not found
bash-2.05b$ /sbin/nmap localhost
bash: /sbin/nmap: No such file or directory
bash-2.05b$ su
Password:
bash-2.05b# nmap localhost
bash: nmap: command not found
bash-2.05b# exit
exit
Well, I got on my Windows (laptop) and grabbed TightVNC, started it up, and entered my.ip.here:5901 and clicked ok, it says "Failed to connect to server"
So...I went to IE and put in http://my.ip.here:5801
The Java application comes up, I type in my password and click ok, it gives me a shell. I type startx, and it says "Server is already active for display 0", I'm assuming because I'm on it right now. But in the above output it said:
New 'X' desktop is tux:1
Doesn't this mean the VNC will use display 1?
Thanks for any help, I don't really want to use the web one, I'd like to use TightVNC. Also, what's the best way to connect from another linux box?
Thanks peeps. _________________ <kow`> "There are 10 types of people in the world... those who understand binary and those who don't." |
|
Back to top |
|
|
wesblake n00b
Joined: 25 Jun 2004 Posts: 52 Location: Sacramento
|
Posted: Sat Nov 06, 2004 12:25 am Post subject: One more thing.... |
|
|
Oh, and I'm assuming since I started the server under my login, and it asked me for a password then, it's only running the server for me to connect to? Basically, I want to get this thing set up so that I and one other user on my computer can both connect to it. Thanks again.
***edit***
Ok, so I got it to connect, I had to do my.ip.here:1
So it comes up on my TightVNC (Windows) but it's just a grey background with the X mouse icon I can move around, and a console. When I VNC into school, I get the login prompt and can login to an X-session. I'd like to use KDE as it's what I have installed on my linux box, how can I do that? Thanks.
***edit***
Sorry peeps, guess I asked the questions before looking for the answers, go figure. I think this is what I was looking for:
https://forums.gentoo.org/viewtopic.php?t=72893&highlight=vnc _________________ <kow`> "There are 10 types of people in the world... those who understand binary and those who don't." |
|
Back to top |
|
|
|