LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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

Reply
 
Search this Thread
Old 09-05-2004, 10:38 AM   #1
DeTHZiT
LQ Newbie
 
Registered: Aug 2003
Location: Montreal, Quebec
Distribution: Gentoo, Slackware 9.1
Posts: 11

Rep: Reputation: 0
xstartup configured, Vnc still only loads grey screen on boot.


Hey, this is the first time I've posted a problem here, so I hope I get some help

I've configured my xstartup script to run "startkde &", and I created a starup script that runs vncserver as that partifular user.

Now here's my problem:

When the linux machine boots up, VNC starts, but kde doesn't load. I only get a grey screen and a terminal. If I stop the process (vncserver -kill :1) and restart it again, then everything works as expected.

Is there anything that I'm missing or overlooking?
 
Old 09-05-2004, 10:47 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Welcome to LQ.

Is vncserver running as the same user both times?

Can you post the output of:
ps -ef | grep vnc

before you kill it the first time and after you restart it.
 
Old 09-05-2004, 10:48 AM   #3
DeTHZiT
LQ Newbie
 
Registered: Aug 2003
Location: Montreal, Quebec
Distribution: Gentoo, Slackware 9.1
Posts: 11

Original Poster
Rep: Reputation: 0
BTW, I'm using slackware 9.1

This is my vnc xstartup:

#!/bin/sh

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
startkde &


This is my rc.vnc (runs at boot):

#!/bin/sh
#
# Startup/Stop script for vncservers for some users.
#

# Set the Path
#PATH=/usr/X11R6/bin

case "$1" in

'start')
/bin/su - user1 -c "export PATH=$PATH:/usr/X11R6/bin:/usr/local/bin ; /usr/local/bin/vncserver :1"
/bin/su - user2 -c "export PATH=$PATH:/usr/X11R6/bin:/usr/local/bin ; /usr/local/bin/vncserver :2"

;;

'stop')
/bin/su - user1 -c "export PATH=$PATH:/usr/X11R6/bin:/usr/local/bin ; /usr/local/bin/vncserver -kill :1"
/bin/su - user2 -c "export PATH=$PATH:/usr/X11R6/bin:/usr/local/bin ; /usr/local/bin/vncserver -kill :2"

;;

*)
echo "Usage: /etc/init.d/rc.vnc { start | stop }"
;;

esac



Okay, now, I would just like to mention that the export PATH needs to be there, because otherwise I get an xauth path not found error.
(it appears that the su doesn't load the users environment correctly)
 
Old 09-05-2004, 10:51 AM   #4
DeTHZiT
LQ Newbie
 
Registered: Aug 2003
Location: Montreal, Quebec
Distribution: Gentoo, Slackware 9.1
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by david_ross
Welcome to LQ.

Is vncserver running as the same user both times?

Can you post the output of:
ps -ef | grep vnc

before you kill it the first time and after you restart it.
Here is the output I get (with the usernames modified):

user1 728 1 0 11:29 ? 00:00:00 Xvnc :1 -desktop paulnet:1 (user1) -httpd /usr/local/vnc/classes -auth /home/user1/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /home/user1/.vnc/passwd -rfbport 5901 -pn -fp /opt/kde/share/fonts/override,/usr/X11R6/lib/X11/fonts/local/,/usr/X11R6/lib/X11/fon
user2 754 1 0 11:29 ? 00:00:00 Xvnc :2 -desktop paulnet:2 (user2) -httpd /usr/local/vnc/classes -auth /home/user2/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /home/user2/.vnc/passwd -rfbport 5902 -pn -fp /opt/kde/share/fonts/override,/usr/X11R6/lib/X11/fonts/local/,/usr/X11R6
user1 756 1 0 11:29 ? 00:00:00 vncconfig -iconic
user2 775 1 0 11:29 ? 00:00:00 vncconfig -iconic
root 828 800 0 11:51 pts/0 00:00:00 grep vnc
 
Old 09-05-2004, 11:05 AM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
You only seem to have shown the output before or after and havn't specified which - either way I don't think it is finding "startkde". Try using "/opt/kde/bin/startkde" instead of "startkde" in the xstartup script
 
Old 09-05-2004, 11:16 AM   #6
DeTHZiT
LQ Newbie
 
Registered: Aug 2003
Location: Montreal, Quebec
Distribution: Gentoo, Slackware 9.1
Posts: 11

Original Poster
Rep: Reputation: 0
Okay, I added the entire path to startkde, and it still doesn't work. However, when I load up vnc I get an error (from xwindows, I guess) that says: "Could not start kdeinit. Check your installation".


Btw, the output I listed was from BEFORE I restarted vnc.
 
Old 09-05-2004, 11:28 AM   #7
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Looks like that path needs to be set first. At the top of xstartup (before startkde) add:
PATH="/opt/kde/bin:"$PATH
 
Old 09-05-2004, 11:38 AM   #8
DeTHZiT
LQ Newbie
 
Registered: Aug 2003
Location: Montreal, Quebec
Distribution: Gentoo, Slackware 9.1
Posts: 11

Original Poster
Rep: Reputation: 0
Thank you!!!

That worked!



Do you (or anyone) have any idea why my path doesn't seem to carry over properly at boot? (especially when I do su?)
 
Old 09-05-2004, 11:45 AM   #9
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Your PATH variable will only last for a session. In slack, when you invoke a bash login shell it will read /etc/profile which in turn will source any scripts matching /etc/profile.d/*.sh - there is a kde.sh script and this is what normally loads the extra path.
 
  


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
boot into black screen/grey console zenith1107 Suse/Novell 2 06-22-2005 08:27 AM
VNC - the screen is a grey checked color rwtreke Linux - Newbie 1 02-01-2005 04:16 PM
Quick VNC question (xstartup geometry) jrmontg Linux - General 1 11-08-2004 06:44 PM
VNC xstartup problem aminry Linux - Software 2 04-27-2004 06:22 PM
Grey screen when trying to VNC to Gnome In2Deep General 7 02-05-2004 05:01 AM


All times are GMT -5. The time now is 08:33 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration