Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
TIGHTVNC configuration howto
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Impalatore-polacco
Apprentice
Apprentice


Joined: 15 Apr 2007
Posts: 203
Location: Campogalliano - bell'ITALIA

PostPosted: Tue Aug 05, 2008 4:29 pm    Post subject: TIGHTVNC configuration howto Reply with quote

Hi all,

I've just installed the tightvnc and I've setup a VNC server over SSH, but when I connect to it I see only the X server without window manager and without kde.
Somebody can help me to setup tightvnc to share the current display without creating new X session?

Kregards.
_________________
Ci stanno osservando, ci sono i pipistrelli....ne hai presa troppa bello, ne hai presa troppa
Back to top
View user's profile Send private message
ddriver
n00b
n00b


Joined: 24 Feb 2005
Posts: 67

PostPosted: Tue Aug 05, 2008 5:07 pm    Post subject: Reply with quote

There are several ways to set this up. I run the VNC servers from within the xdm config. I add a line such as:

:1 local /usr/bin/Xvnc :1 -geometry 1024x768 -rfbwait 120000 -rfbauth /home/userid/.vnc/passwd -rfbport 5901 -depth 24 -auth /root/.Xauthority

to my /etc/X11/xdm/Xservers file. Of course you have to be running xdm for this. I don't think it works as well with kdm or gdm.

There is another way to do it using xinetd, not sure how.
Back to top
View user's profile Send private message
Impalatore-polacco
Apprentice
Apprentice


Joined: 15 Apr 2007
Posts: 203
Location: Campogalliano - bell'ITALIA

PostPosted: Tue Aug 05, 2008 8:23 pm    Post subject: Reply with quote

Thanks, I've tryed but without success, my xdm is up and running but after setting up
Code:
:1 local /usr/bin/Xvnc :1 -geometry 1024x768 -rfbwait 120000 -rfbauth /home/userid/.vnc/passwd -rfbport 5901 -depth 24

nothing changed.

Thks for the interest.
_________________
Ci stanno osservando, ci sono i pipistrelli....ne hai presa troppa bello, ne hai presa troppa
Back to top
View user's profile Send private message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Tue Aug 05, 2008 8:52 pm    Post subject: Reply with quote

I change that in my server:~/.vnc/xstartup file
e.g.

Code:
#!/bin/sh
/usr/bin/e16 &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

_________________
emerge: there are no ebuilds to satisfy "moo"
Back to top
View user's profile Send private message
Impalatore-polacco
Apprentice
Apprentice


Joined: 15 Apr 2007
Posts: 203
Location: Campogalliano - bell'ITALIA

PostPosted: Tue Aug 05, 2008 9:21 pm    Post subject: Reply with quote

TO:coolsnowmen

OK thks...now I'm able to start a new kde session in my :1 display...but if I want to connect to the display :0 where there is a session already running maybe where is connected another user, how to configure the forward to display 1 from display 0?

I also receive an error when I try to restart the vnc-server session:
Code:
el-loco-asus test # /etc/init.d/vnc restart
 * Stopping TightVNC server ...                                                                        [ !! ]
 * WARNING:  vnc has already been started.

_________________
Ci stanno osservando, ci sono i pipistrelli....ne hai presa troppa bello, ne hai presa troppa
Back to top
View user's profile Send private message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Tue Aug 05, 2008 9:35 pm    Post subject: Reply with quote

As far as killing a vncserver, I am cli :-( so you'ld have to look at the service
I use
Code:
vncserver -kill :display


to share sessions like that you have to have X setup correctly...
If you havn't ever seen this: http://gentoo-wiki.com/HOWTO_Xvnc_terminal_server
There are some references to the X module, but it looked annoying (because tightvnc which I use, doesn't provide the xorg module so I never did it).

I'll be happy to try and help you understand/fix anything, but understand, if you read that page, you will basically know as much as me.
_________________
emerge: there are no ebuilds to satisfy "moo"
Back to top
View user's profile Send private message
Impalatore-polacco
Apprentice
Apprentice


Joined: 15 Apr 2007
Posts: 203
Location: Campogalliano - bell'ITALIA

PostPosted: Tue Aug 05, 2008 9:45 pm    Post subject: Reply with quote

Nope...I use the vncserver -kill :1 to kill the connection to that display, but I receive this error:
Code:
test@el-loco-asus ~ $ vncserver -kill :1

Can't find file /home/test/.vnc/el-loco-asus:1.pid
You'll have to kill the Xvnc process manually


but there is no trace of any vnc process...

And when I try to stop vnc:
Code:
el-loco-asus test # /etc/init.d/vnc stop
 * Caching service dependencies ...                                                                    [ ok ]
 * Stopping TightVNC server ...                                                                          [ !! ]


But after the restart if I kill the connection with vncserver command the operation end successfully, the problem appear when I try to restart the VNC service.

I have another question...there is a way to use the UDP protocol instead TCP? I want to use the port UDP 5901

EDIT:
Usually I use putty to create an SSH tunnel in order to forward the VNC client port to VNC serevr port, but I want to do the forward for UDP ports
_________________
Ci stanno osservando, ci sono i pipistrelli....ne hai presa troppa bello, ne hai presa troppa
Back to top
View user's profile Send private message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Tue Aug 05, 2008 9:57 pm    Post subject: Reply with quote

Impalatore-polacco wrote:
Nope...I use the vncserver -kill :1 to kill the connection to that display, but I receive this error:
Code:
test@el-loco-asus ~ $ vncserver -kill :1

Can't find file /home/test/.vnc/el-loco-asus:1.pid
You'll have to kill the Xvnc process manually



Did you run that on the server or the client? Did you run that as the same user the vnc runs as? But you shouldn't need to. if the service is setup right, it should beable to start and stop that server.

Do you know you can set this in /etc/conf.d/vnc , what does yours look like?
_________________
emerge: there are no ebuilds to satisfy "moo"
Back to top
View user's profile Send private message
Impalatore-polacco
Apprentice
Apprentice


Joined: 15 Apr 2007
Posts: 203
Location: Campogalliano - bell'ITALIA

PostPosted: Tue Aug 05, 2008 10:12 pm    Post subject: Reply with quote

I've executed
Code:
test@el-loco-asus ~ $ vncserver -kill :1

Can't find file /home/test/.vnc/el-loco-asus:1.pid
You'll have to kill the Xvnc process manually

with the same user of the connection, and I've tried a loopback connection to the server, so I have executed the command on the server machine.
_________________
Ci stanno osservando, ci sono i pipistrelli....ne hai presa troppa bello, ne hai presa troppa
Back to top
View user's profile Send private message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Tue Aug 05, 2008 10:17 pm    Post subject: Reply with quote

Is vnc even running?!
Code:
ps -aef | grep Xvnc

_________________
emerge: there are no ebuilds to satisfy "moo"
Back to top
View user's profile Send private message
Impalatore-polacco
Apprentice
Apprentice


Joined: 15 Apr 2007
Posts: 203
Location: Campogalliano - bell'ITALIA

PostPosted: Tue Aug 05, 2008 10:21 pm    Post subject: Reply with quote

Code:
ps -aef | grep Xvnc
test      8128  7848  0 00:21 pts/1    00:00:00 grep --colour=auto Xvnc

??

If I do the ps -A I cannot se any Xvnc

EDIT:

I'm going sleep now...I will reply you tomorrow.
_________________
Ci stanno osservando, ci sono i pipistrelli....ne hai presa troppa bello, ne hai presa troppa
Back to top
View user's profile Send private message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Tue Aug 05, 2008 10:25 pm    Post subject: Reply with quote

If vnc is not running, then I'm assuming you can't connect to it. Can you start one then...I feel lost in what problem you are currently having? Is it that you can't use the service to restart a vncserver?

Also, if using the service, what is the conf.d/vnc look like (I asked earlier too).
_________________
emerge: there are no ebuilds to satisfy "moo"
Back to top
View user's profile Send private message
Impalatore-polacco
Apprentice
Apprentice


Joined: 15 Apr 2007
Posts: 203
Location: Campogalliano - bell'ITALIA

PostPosted: Wed Aug 06, 2008 6:48 am    Post subject: Reply with quote

When I receive this errors I cannot connect to the VNC server and also I cannot start a new VNC session, it seems tightvnc hangon.

this is my conf.d/vnc:
Code:

DISPLAYS="test:1"

# Specify any of vncserver(1) and Xvnc(1) options. See the respective man pages for more information.
VNC_OPTS="-geometry 1280x800 -depth 16 -localhost"

_________________
Ci stanno osservando, ci sono i pipistrelli....ne hai presa troppa bello, ne hai presa troppa
Back to top
View user's profile Send private message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Fri Aug 08, 2008 2:03 am    Post subject: Reply with quote

how is your problem comming?
Are you connecting with user "test"? Do you even have a user "test"?
_________________
emerge: there are no ebuilds to satisfy "moo"
Back to top
View user's profile Send private message
Impalatore-polacco
Apprentice
Apprentice


Joined: 15 Apr 2007
Posts: 203
Location: Campogalliano - bell'ITALIA

PostPosted: Fri Aug 08, 2008 8:40 pm    Post subject: Reply with quote

Yep, test user is my default one.....the problem appear when I try to restart the vnc service. If I boot my gentoo box from off status and I do a clean login, the first thing I try to do is to restart the service of vnc but with no success.
_________________
Ci stanno osservando, ci sono i pipistrelli....ne hai presa troppa bello, ne hai presa troppa
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum