tightvnc - vncserver at startup?
I'm running a linux host that I'd like to be able to log in using vnc. I cannot find any instructions the show how to log in remotely without either:
1) having a session already started on the host machine or 2) logging in through port forwarding using ssh. Is it possible to have a vncserver start at boot and accept incoming connections for users without using either of the above two methods? Regards, Kurt |
|
If this is on a lan and security isn't an issue, you could use xdcmp logins. If over the internet, you could use a VPN tunnel.
|
Thanks for the info,
If I use: su - tred -c " cd /home/tred && vncserver :1 -geometry 1024x768 -depth 24" 1. is there a way to tell if it's running, and 2. is there a way to tell which port it is using? Regards, kurt |
Can nx leave a session open that I can reconnect to at a later time?
|
Quote:
Code:
ps ax | grep vncserver Code:
netstat -nt | grep 5900 |
Quote:
Possibly the best thing for you to do is stop asking hypothetical questions and worrying, and just install either vnc or nx or both. |
I was able to ps aux | grep vnc to see it was running.
I also had to set up a password using vncpasswd. Finally, I figured out that it was on port 5901 using the log file in my .vnc directory. I Unfortunately, despite adding startkde & to my xstartup, I just get a gray screen. I tried a local log in, and that shows a gray screen as well (vncviewer localhost:1). Any advice on what I might be doing wrong? Here's the output of my xstartup in .vnc: Code:
$ cat .vnc/xstartup |
Quote:
Quote:
|
Yes, that's on the remote machine. Should Xsession be commented out -- it seemed to make no difference between commenting it out and not, regardless, So, I'm not sure what the problem is, although I'm using Kubuntu, and there's no /etc/vnc directory nor any /etc/vnc.conf
Kurt |
I'm running kubuntu (6.06 and 8.04)
On server: Code:
tgar@server:~$ which vncviewer There are several vnc's, and you can have them all installed, but the one which is used when you just call vncserver is the one pointed to in /etc/alternatives, in my case /usr/bin/tightvncserver I have the following packages installed on server: tightvncserver vnc-common xtightvncviewer It works well. Maybe you are using different packages ? |
A follow-up: don't forget to "kill" any extra vncservers before you start new ones, or you'll have no idea of what ports they are working on, and you may find yourself looking at a "bad" screen (maybe setup with an old config) when the "good" one is running well on the next port up.
Hope this makes sense. |
Thanks, but I've been doing a reboot after each configuration change try.
Code:
$ which vncviewer Kurt |
I don't know what is happening here.
On your local PC try starting a vncserver and connecting to it locally. For me, it goes like this: Code:
tred@vaio:~$ vncserver :1 -geometry 800x600 -depth 24 if not, please post your local ~/.vnc/xstartup and take a look at the log. My xstartup just says Code:
#!/bin/sh No need to reboot (slow and boring): Code:
tred@vaio:~/.vnc$ ps -Al | grep vnc |
I tried changing my xstartup to just contain startkde &.
Code:
Code:
-rw-r--r-- 1 kpeters kpeters 2814 2009-07-29 11:10 E53A-EDA-DB:1.log |
Strange.
Anything helpful in the E53A-EDA-DB:1.log file? Mine is just called vaio:1.log I wonder why yours is different ? Is your hostname E53A-EDA-DB ? Horrible thought: Are you running a "virtual machine" ? |
OK, I got the checkered/ grey / gray screen to go away and it to work by chmod +x /etc/X11/xinit/xinitrc
That allows it to work if vncserver is started "locally." But it still gives me a gray screen if I try the "startup" in rc.local. THis is pretty confusing. Kurt |
All times are GMT -5. The time now is 12:48 AM. |