Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
Due to network maintenance being performed by our provider, LQ will be down starting at 05:01 AM UTC. The exact duration of the downtime isn't currently known. We apologize for the inconvenience.
|
 |
02-18-2005, 06:24 PM
|
#1
|
|
LQ Newbie
Registered: Jul 2004
Location: Poland
Distribution: SuSE 9.2 Professional
Posts: 22
Rep:
|
Starting VNCserver on screen #1 everytime - HELP plz :)
Hello!
I have problem with starting Vncserver in my SuSE 9.2 distribution on the same screen after reboot or power down.
The problem is in file that vncserver makes on launch, in tmp directory (/tmp/.X11-unix). When the file is there, I can't run vncserver on the same screen number, vnc automatically launches on the next one.
How can I override it that everytime I start vnc it will run on the same screen, for example #1? Maybe delete the file before launch? Any other way?
|
|
|
|
02-19-2005, 03:51 PM
|
#2
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,702
|
how are you controlling the stopping and starting? if you're manually starting it in an informal script and then just shutting down without stop VNC, then naturally that lock file won't be taken care off. if you don't already have one, i'd suggest creating an rc.d script to both stop and start the service. with a stop of the service on close the file should be cleanly removed. alternatively ( or additionally) you can modify the startup script to run an rm on the potential lock file before runnign vncserver.
if you've not made a startup sctrip before, it's normally quite easy. just find an existing on in /etc/init.d/rc.d or a similar location on your system that is very basic, and copy and alter a few lines to suit.
|
|
|
|
02-19-2005, 07:38 PM
|
#3
|
|
LQ Newbie
Registered: Jul 2004
Location: Poland
Distribution: SuSE 9.2 Professional
Posts: 22
Original Poster
Rep:
|
Hey, thx for quick help.
I'm running the vncserver via vnc script (/var/bin/X11/vncserver), looks like I see the problem in it:
Code:
# If the unix domain socket exists then use that (DISPLAY=:n) otherwise use
# TCP (DISPLAY=host:n)
if (-e "/tmp/.X11-unix/X$displayNumber") {
$ENV{DISPLAY}= ":$displayNumber";
} else {
$ENV{DISPLAY}= "$host:$displayNumber";
}
$ENV{VNCDESKTOP}= $desktopName;
system("$xstartup >> " . "edString($desktopLog) . " 2>&1 &");
exit;
Can I delete this part? 
Last edited by the_reen; 02-19-2005 at 07:40 PM.
|
|
|
|
02-19-2005, 07:44 PM
|
#4
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,702
|
well no, as that's the official controlling script, after all, that lockfile is there for a reason. it's not unreasonable to blindly try to delete the file on a boot, as clearly it won't already be running, but editing the actual vncserver wrapper script isn't a great idea.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:49 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|