LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 03-12-2004, 08:59 PM   #1
luegner
Member
 
Registered: Jul 2003
Location: Henderson, NV
Distribution: Slackware
Posts: 47

Rep: Reputation: 15
Slackware vncserver start/boot script


Anyone have a boot script for vncserver on slackware. I've been trying to write my own but I have not gotten it to work. When I execute vncserver directly, I get a normal KDE screen but when I run the script I created, it doesn't work. (Obviously "someusername" is substituted for a user on my linux box).
Here's the script:

#!/bin/sh
# Start/stop/restart the VNC server.


vnc_start(){
echo "Starting VNC Server..."
/bin/su someusername -c "/usr/local/bin/vncserver :2"
}

vnc_stop(){
echo "Stopping VNC Server..."
/bin/su someusername -c "/usr/local/bin/vncserver -kill :2"
}

vnc_restart() {
vnc_stop
sleep 1
vnc_start
}


case "$1" in
'start')
vnc_start
;;
'stop')
vnc_stop
;;
'restart')
vnc_restart
;;
*)
echo "usage $0 start|stop|restart"
esac
 
Old 03-12-2004, 09:02 PM   #2
luegner
Member
 
Registered: Jul 2003
Location: Henderson, NV
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: 15
I already ran chmod 755 /etc/rc.d/rc.vnc on this shell script as well and the chown is root.root

It executes fine when stopping the vncserver but it doesn't run properly when starting as I just get a grey screen when using the vncviewer.
 
  


Reply



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
start vncserver. bruse Linux - Networking 1 09-10-2005 12:21 PM
how to start the vncserver ust Linux - Software 1 05-11-2005 02:23 AM
getting script to start at boot short101 Debian 2 01-24-2005 06:32 AM
Script to start NoIP at boot downinthemine Linux - Software 3 04-20-2004 10:38 AM
vncserver won't start from rc.local GD_19 Linux - Software 5 03-13-2004 12:27 AM

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

All times are GMT -5. The time now is 11:39 AM.

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
Open Source Consulting | Domain Registration