LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-24-2006, 01:01 PM   #1
JockVSJock
Senior Member
 
Registered: Jan 2004
Location: SATX
Distribution: RHEL/CentOS
Posts: 1,301
Blog Entries: 4

Rep: Reputation: 148Reputation: 148
Troubleshooting RealVNC on Slackware


I have two clients (laptop and desktop) running Slackware 10.2 and RealVNC 4.1...

1st question

When I use the desktop machine to get into the laptop, I am able to sucessfully VNC in, but I get the TWM and not KDE...
Under my home directory there is .vnc and a xstartup file and
I've made this change

Code:
#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# twm &
kde &
But I still get TWM, not KDE...How can I modify this?

And 2nd question:

I am unable to VNC from my desktop into the laptop, unable to make a connection is the error

-The VNC server is running
-I don't see a port 5900 under /etc/services

What would be the best way to troubleshoot this?

thanks
 
Old 10-24-2006, 01:05 PM   #2
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
Quote:
Originally Posted by JockVSJock
...
Code:
#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# twm &
kde &
But I still get TWM, not KDE...How can I modify this? ...
Have you tried startkde & instead of kde &?
That works for me
Code:
$ cat .vnc/xstartup
#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 1024x768 -ls -title "$VNCDESKTOP Desktop" &
startkde &
 
Old 10-24-2006, 01:26 PM   #3
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
Regarding the connection error, /etc/services is just a list of ports for standar services, some programs get the port they should listen using that list, but that's not the case of VNC.
If you're using a firewall you need to open the port so you can listen incoming connections on that port on the laptop. Outgoing connections may be blocked from the desktop, but it's not the usual setup.
 
Old 10-24-2006, 01:55 PM   #4
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 7,756

Rep: Reputation: 6339Reputation: 6339Reputation: 6339Reputation: 6339Reputation: 6339Reputation: 6339Reputation: 6339Reputation: 6339Reputation: 6339Reputation: 6339Reputation: 6339
Quote:
Originally Posted by JockVSJock
I am unable to VNC from my desktop into the laptop, unable to make a connection is the error

-The VNC server is running
-I don't see a port 5900 under /etc/services

What would be the best way to troubleshoot this?
You might find out more by examining the VNC log file at ~/.vnc/<hostname>:<displaynr>.log

Eric
 
Old 10-24-2006, 02:24 PM   #5
JockVSJock
Senior Member
 
Registered: Jan 2004
Location: SATX
Distribution: RHEL/CentOS
Posts: 1,301

Original Poster
Blog Entries: 4

Rep: Reputation: 148Reputation: 148
Quote:
Originally Posted by raska
Have you tried startkde & instead of kde &?
That works for me
Code:
$ cat .vnc/xstartup
#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 1024x768 -ls -title "$VNCDESKTOP Desktop" &
startkde &
Yup, your right...switching to startkde & works!

thanks!
 
Old 10-24-2006, 03:32 PM   #6
JockVSJock
Senior Member
 
Registered: Jan 2004
Location: SATX
Distribution: RHEL/CentOS
Posts: 1,301

Original Poster
Blog Entries: 4

Rep: Reputation: 148Reputation: 148
Quote:
Originally Posted by Alien Bob
You might find out more by examining the VNC log file at ~/.vnc/<hostname>:<displaynr>.log

Eric
Ok, so I looked under the log...This is coming from the vnc client (desktop which has the hostname of Ladytron) trying to login to the vnc server (laptop which has the hostname of probot)...I noticed that there were no logs under my user on the laptop...

Here is the log from the vnc client
Code:
24/10/06 13:20:02 Xvnc version 3.3.tight1.2.9
24/10/06 13:20:02 Copyright (C) 1999 AT&T Laboratories Cambridge.
24/10/06 13:20:02 Copyright (C) 2000-2002 Constantin Kaplinsky.
24/10/06 13:20:02 All Rights Reserved.
24/10/06 13:20:02 See http://www.uk.research.att.com/vnc for information on VNC
24/10/06 13:20:02 See http://www.tightvnc.com for TightVNC-specific information
24/10/06 13:20:02 Desktop name 'ladytron:2 (cmmiller)' (ladytron:2)
24/10/06 13:20:02 Protocol version supported 3.3
24/10/06 13:20:02 Listening for VNC connections on TCP port 5902
Font directory '/usr/X11R6/lib/X11/fonts/Speedo/' not found - ignoring
xrdb: No such file or directory
xrdb: can't open file '/home/cmmiller/.Xresources'
xset:  bad font path element (#37), possible causes are:
    Directory does not exist or has wrong permissions
    Directory missing fonts.dir
    Incorrect font server address or syntax
startkde: Starting up...
kbuildsycoca running...
Xlib:  extension "DPMS" missing on display ":2.0".
Xlib:  extension "MIT-SCREEN-SAVER" missing on display ":2.0".
Xlib:  extension "DPMS" missing on display ":2.0".
Xlib:  extension "MIT-SCREEN-SAVER" missing on display ":2.0".
kio (KDirWatch): Available methods: Stat, DNotify
kio (KDirWatch): addDir - recursive/watchFiles not supported in KDE 3.0
kio (KDirWatch): Added Dir /home/cmmiller/.kde/share/apps/basket/basket1 [KDirWatch-1]
kio (KDirWatch):  Setup DNotify (fd 128) for /home/cmmiller/.kde/share/apps/basket/basket1
kio (KDirWatch): KDirWatch-1 stopped scanning /home/cmmiller/.kde/share/apps/basket/basket1 (now 0 watchers)
kio (KDirWatch): KDirWatch-1 restarted scanning /home/cmmiller/.kde/share/apps/basket/basket1 (now 1 watchers)
kio (KDirWatch): addDir - recursive/watchFiles not supported in KDE 3.0
kio (KDirWatch): Added Dir /home/cmmiller/.kde/share/apps/basket/basket2 [KDirWatch-2]
kio (KDirWatch):  Setup DNotify (fd 129) for /home/cmmiller/.kde/share/apps/basket/basket2
kio (KDirWatch): KDirWatch-2 stopped scanning /home/cmmiller/.kde/share/apps/basket/basket1 (now 1 watchers)
kio (KDirWatch): KDirWatch-2 stopped scanning /home/cmmiller/.kde/share/apps/basket/basket2 (now 0 watchers)
kio (KDirWatch): KDirWatch-2 restarted scanning /home/cmmiller/.kde/share/apps/basket/basket2 (now 1 watchers)
Xlib:  extension "DPMS" missing on display ":2.0".
Xlib:  extension "MIT-SCREEN-SAVER" missing on display ":2.0".
Xlib:  extension "DPMS" missing on display ":2.0".
Xlib:  extension "MIT-SCREEN-SAVER" missing on display ":2.0".
Xlib:  extension "DPMS" missing on display ":2.0".
Xlib:  extension "MIT-SCREEN-SAVER" missing on display ":2.0".
                                                                                                                         1,1
 
Old 10-30-2006, 07:51 PM   #7
JockVSJock
Senior Member
 
Registered: Jan 2004
Location: SATX
Distribution: RHEL/CentOS
Posts: 1,301

Original Poster
Blog Entries: 4

Rep: Reputation: 148Reputation: 148
***bump***

Still working on trying to fix this and didn't want to make a new thread.

Here are some things I've noticed ---

I've setup my laptop and main desktop to run vncserver on startup, and I still have to go in and do ./vncserver...

On my main desktop, this is the message that I get:

Code:
cmmiller@ladytron:/usr/share/realvnc/vnc-4_1_2-x86_linux$ ./vncserver

Warning: ladytron:1 is taken because of /tmp/.X11-unix/X1
Remove this file if there is no X server ladytron:1

New 'ladytron:2 (cmmiller)' desktop is ladytron:2

Starting applications specified in /home/cmmiller/.vnc/xstartup
Log file is /home/cmmiller/.vnc/ladytron:2.log
Now from my laptop, I am able to use vncviewer to access the desktop ok...

If I run the same command from my laptop (./vncserver), this is what I get

Code:
cmmiller@probot:/usr/share/realvnc/vnc-4_1_2-x86_linux$ ./vncserver

You will require a password to access your desktops.

cmmiller@probot:/usr/share/realvnc/vnc-4_1_2-x86_linux$

Why am I not getting the hostname:1, when I start the vncserver on my laptop, which I believe is what is keeping me from vncing into it...

thanks again

Last edited by JockVSJock; 10-30-2006 at 07:54 PM.
 
Old 10-30-2006, 08:10 PM   #8
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
Well, check if they're really running on startup with ps. If not, you're not running the right command on rc.local.

On your desktop, the server being created is number two, that means you should point to port 5902 instead of 5901 (remember the port is 5900+display number). That lock file may remain from a badly shutdown of your vnc server, if you're not running more than one instance, safely delete it to start the server on display 1.

Remeber, if you want to run the server as your user, you should use in rc.local something like:
Code:
su - user -c 'source /etc/profile; /path/to/vncserver'

Last edited by gbonvehi; 10-30-2006 at 08:20 PM.
 
Old 10-30-2006, 10:59 PM   #9
JockVSJock
Senior Member
 
Registered: Jan 2004
Location: SATX
Distribution: RHEL/CentOS
Posts: 1,301

Original Poster
Blog Entries: 4

Rep: Reputation: 148Reputation: 148
Quote:
Originally Posted by gbonvehi
Well, check if they're really running on startup with ps. If not, you're not running the right command on rc.local.
I only had in /etc/rc.d/rc.local

Code:
./usr/share/realvnc/realvnc-4_1_2/vncserver
I added you line of code but I'm getting a :/bin/bash error message

Quote:
Originally Posted by gbonvehi
On your desktop, the server being created is number two, that means you should point to port 5902 instead of 5901 (remember the port is 5900+display number). That lock file may remain from a badly shutdown of your vnc server, if you're not running more than one instance, safely delete it to start the server on display 1.

Remeber, if you want to run the server as your user, you should use in rc.local something like:
Code:
su - user -c 'source /etc/profile; 
/path/to/vncserver'
How do you point vncserver to run on port 5902? THere is a vncconfig file, but I can't look at it...

From my desktop I still getting the an error when I try to get to my laptop via vnc, and I still don't get from my laptop when I start vncserver:

Code:
hostname:1
thanks again
 
Old 10-30-2006, 11:32 PM   #10
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
I meant you should point to port 5902 in the client side, the server listens by default on port 5900+display number, that means, hostname:0 means port 5900, hostname:1 port 5901 and so on.
If you want, you can change that with some parameters when calling vncserver, read it's man page.

If you get that error there's probably some syntax error:
Code:
su - user -c 'source /etc/profile; /usr/share/realvnc/realvnc-4_1_2/vncserver'
That should work, of course, change user to your user

Last edited by gbonvehi; 10-31-2006 at 12:34 AM.
 
Old 10-31-2006, 05:31 PM   #11
JockVSJock
Senior Member
 
Registered: Jan 2004
Location: SATX
Distribution: RHEL/CentOS
Posts: 1,301

Original Poster
Blog Entries: 4

Rep: Reputation: 148Reputation: 148
I forgot to add -c for /etc/rc.d/rc.local...my bad...

I still am confused, I have read vncserver.man a few times...

I am not sure how to setup vncserver and vnc client so when I try to log into my laptop I get the hostname:1 output from the vncserver?
 
Old 11-01-2006, 11:34 AM   #12
JockVSJock
Senior Member
 
Registered: Jan 2004
Location: SATX
Distribution: RHEL/CentOS
Posts: 1,301

Original Poster
Blog Entries: 4

Rep: Reputation: 148Reputation: 148
UPDATE:

Still can't realvnc into my server...Here is something that I've noticed...

On my desktop, which I can vnc into, I noticed the following:

Code:
cmmiller@ladytron:/usr/share/realvnc/vnc-4_1_2-x86_linux$ ps aux | grep vnc
cmmiller  3846  0.0  1.5  10064  8228 tty1     S    09:07   0:00 Xvnc :1 -desktop ladytron:1 (cmmiller) -auth /home/cmmiller/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /home/cmmiller/.vnc/passwd -rfbport 5901 -pn
cmmiller  4624  0.0  0.1   1792   600 pts/6    R+   10:29   0:00 grep vnc
On my server, I have vncserver running, but

I can't use the same ps aux | grep vnc, it doesn't return anything, but if I troll thru ps aux, I find...

Code:
cmmiller  4710  0.3  0.1   2448  1232 pts/1    S    10:33   0:00 /bin/sh /home/cmmiller/.vnc/xstartup
cmmiller  4711  0.0  0.0   2368   700 pts/1    S    10:33   0:00 xsetroot -solid grey
So I still don't understand the proper setup here to get realvnc running correctly...

thanks
 
Old 11-01-2006, 11:46 AM   #13
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
Mmm it seems that vnc hungs when running xstartup on your laptop.
 
Old 11-01-2006, 12:26 PM   #14
JockVSJock
Senior Member
 
Registered: Jan 2004
Location: SATX
Distribution: RHEL/CentOS
Posts: 1,301

Original Poster
Blog Entries: 4

Rep: Reputation: 148Reputation: 148
Any idea why it would hang like this?

I've googled around with the phrase 'realvnc process hanging' but I didn't find anything relevant to fixing the problem...
 
Old 11-01-2006, 12:59 PM   #15
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
Try not using (rename) the xstartup file and see what happens.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RealVNC on FC 3 excidy Linux - Software 1 04-04-2005 07:46 AM
RealVNC aidankitch Linux - Software 2 04-28-2004 04:58 AM
Slackware RealVNC multiuser intsall/config urbansound Slackware 1 04-03-2004 07:03 PM
booting with realvnc on slackware silversky Linux - Software 4 03-24-2004 03:48 AM
RealVNC compu73rg33k Linux - Software 5 03-13-2004 02:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration