Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 01-15-2002, 11:22 PM   #1
Registered: Jan 2002
Location: UK
Distribution: Redhat 7.2
Posts: 35

Rep: Reputation: 15
Question VNCServer wierd happenings??

Trying to get VNC Server up and running on one of my Linux box. Due to lack of monitors and space in my room (and plugpoints) it needs to sit elsewhere.

Using RH7.2
Now the problem is when using the built in VNCServer it starts up OK but no display number is assigned (or is it?) hence when trying to connect to it returns an error.

Next I tried editing the /etc/sysconfig/vncserver file as appropriately and rebooted machine.. works fine display 1 assigned.. connected..OK
Then I rebooted again only to come across an error:
Display :1 is already in use
There is already afile in /tmp/.X.....blah blah
Starting VNC Server.. FAILED

Obviously the previous display is still hanging around..

I've also tried not using the built in VNC Server startup and started it in rc.local same error occurs..
Display :<number> is already in use.
blah blah..

Is there any solution to this??
Old 01-29-2002, 10:56 PM   #2
LQ Newbie
Registered: Jul 2001
Posts: 19

Rep: Reputation: 0
Go to this file: /tmp/.X11-unix/X1

It will solve your problem
Old 01-30-2002, 07:35 AM   #3
Registered: Jan 2002
Location: UK
Distribution: Redhat 7.2
Posts: 35

Original Poster
Rep: Reputation: 15
Yes I've been there and fixed the problem now..

Obviously the vncserver wasn't killing the displays properly on stop/shutdown so I put in this line in the vncserver init script:
rm -f /tmp/.X11-unix/X*.*

Thanks for replying anyway
Old 01-31-2002, 05:19 PM   #4
Registered: Feb 2001
Location: Texas
Distribution: Slackware, Mandrake, LFS
Posts: 306

Rep: Reputation: 30
decent temp solution, but you might just notice, did your shutdown script have

vncserver -kill :#

where # is the number of the display that was active? perhaps it might have had a variable there?
Old 01-31-2002, 07:50 PM   #5
Registered: Jan 2002
Location: UK
Distribution: Redhat 7.2
Posts: 35

Original Poster
Rep: Reputation: 15
yes it does, but for some reason it won't work,
here is the original 'stop' section from ../init.d/vncserver

echo -n $"Shutting down $prog: "
for display in ${VNCSERVERS}
 echo -n "${display}"
 initlog $INITLOG_ARGS -c \
  "su ${display##*:} -c \"vncserver -kill :${display%%:*} > /dev/null 2>&1\""
I know that for every display listed in file "VNCSERVERS" (located in /etc/sysconfig) it starts/kills it in the vncserver init script. Is there something wrong in the init script (RH7.2)

I have to add this line in order to remove the X0 and X1 thats left behind.
rm -f /tmp/.X11-unix/X*.*


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
Wierd happenings when securing SSH mattp Linux - Security 13 10-07-2005 08:00 AM
Robust vncserver startup file (rc.vncserver) arobinson74 Slackware 4 05-14-2005 06:33 AM
Wierd happenings after Kernel Compile on Fedora claudius753 Linux - Software 3 01-01-2005 12:24 AM
Strange happenings at the terminal michapma Debian 9 10-07-2004 06:11 AM
weird C happenings ...... purpleburple Programming 4 08-19-2002 01:09 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:28 PM.

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