Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi
I installed vnc server on linux and nvcviwer on windows. but when I connect to the vnc server, all i can see is the xterm window on the desktop, the rest of the desktop is now displayed, not even medu, not wallpaper.
why is that??
Check out the file "xstartup" in your .vnc directory. If you started vncserver as a particular user the .vnc directory will be located in that user's home dir.
It contains the programs run at the start of vncserver.
You have to define the resolution before starting the vncserver on linux. I've noticed that even though the default resolution for vncserver is 1024x768, you still have to define it or else it won't work. For example, if you have 1024x768 resolution on your linux box, you enter:
vncserver -geometry 1024x768 :1
make sure you kill any vncservers you started already. If you don't know how many you've started type:
vncserver -kill all
I think thats the command, or you can kill them all individually like:
vncserver -kill :1
vncserver -kill :2 ...etc.
when you use vncviewer in windows, enter the ip address of the linux box, then the vnc session you started like if you started "vncserver -geometry 1024x768 :1", then type this in the vnc viewer:
xxx.xxx.xxx.xxx:1
the x's are the ip address of your linux box. Hoped that helped.
thanks Amir,
I started vncserver with -geometry 1024x768 :1
vnc started with no problem.
but when i run the vncviewer on windows with xxx.xxx.xxx.xxx:1 it still hows me with blank background with only a terminal window. it looks like i am on the different session, coz what i run on the terminal window is not displayed on the actually desktop.
sounds like a SSH not vnc........ but this is what i experienced.
what could went wrong?
Just needed to set geomety and put the :1 on the end of the ip....
Many thanks!!
oh hang on....................that works locally, but how do i get it to work over the web?
Port forwarding is in place on the router.
hmm, thats something i need to figure out too. one thing i do know is that vnc is extremely slow over the net. So to optimize it you should set the depth to 8 (i donno if it goes any lower) and use tightvnc "best compression".
Even over my wireless (11mbps) network its a little slow.
Originally posted by taoweijia thanks Amir,
I started vncserver with -geometry 1024x768 :1
vnc started with no problem.
but when i run the vncviewer on windows with xxx.xxx.xxx.xxx:1 it still hows me with blank background with only a terminal window. it looks like i am on the different session, coz what i run on the terminal window is not displayed on the actually desktop.
sounds like a SSH not vnc........ but this is what i experienced.
what could went wrong?
Sorry dude, but i have no idea. What GUI are you using? Are you using vnc through ssh?
i am running VNC server on RH8 with Gnome desktop. win2k Server with VNC viewer.
not sure if SSH caused problem with VNC running at the same time, will check it out.
taoweijia,
The window manager you are seeing is twm, which vnc uses by default. If you want to use your regular X environment, get into your xstartup file in the .vnc directory, find the line that starts twm, comment it out and add the startup command for your favorite X environment.
Blop,
Do a search here for SSH and VNC and you'll find loads of threads on running VNC over the internet. But be sure to run VNC through an SSH tunnel because VNC does absolutely no encryption. Unless, of course, you enjoy being hacked .
so if you use X-terminal, you need to edit $home/.vnc/xstartup to look like this:
#!/bin/sh
Xsession &
This will tell VNC to run Xsession, which will give you a complete CDE desktop. All other lines in this file should either be deleted or commented out by inserting a '#' character at the first position on each line.
If you're using the GNOME desktop, your xstartup might be
#!/bin/sh
gnome-session &
If you're using the KDE desktop, your xstartup might be
My experience is that Gnome causes VNCviewer to freeze frequently. It is also pretty slow... could be a number of things, like large desktop images but it is NOT machine-performance related as I have a fast connection and a decent machine serving VNCServer.
Once I switch to TWM, VNC is likety-split fast. No problems, no freezes, no crashes.
This may be why you only get a terminal window... when you fire up VNC with twm as your manager, then all that shows up by default is VNCConfig and one xterm window.
1024x768, you still have to define it or else it won't work. For example, if you have 1024x768 resolution on your linux box, you enter:
This helped me to get the vncserver working for the first time...
But how do I set the as the default? I'm starting vncserver at bootup, and it seems to forget theses settings. Is tere any way to tell vncserver to use this setting everytime my linux box boots up?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.