LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   xstartup configured, Vnc still only loads grey screen on boot. (https://www.linuxquestions.org/questions/linux-software-2/xstartup-configured-vnc-still-only-loads-grey-screen-on-boot-226941/)

DeTHZiT 09-05-2004 11:38 AM

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?

david_ross 09-05-2004 11:47 AM

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.

DeTHZiT 09-05-2004 11:48 AM

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)

DeTHZiT 09-05-2004 11:51 AM

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

david_ross 09-05-2004 12:05 PM

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

DeTHZiT 09-05-2004 12:16 PM

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.

david_ross 09-05-2004 12:28 PM

Looks like that path needs to be set first. At the top of xstartup (before startkde) add:
PATH="/opt/kde/bin:"$PATH

DeTHZiT 09-05-2004 12:38 PM

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?)

david_ross 09-05-2004 12:45 PM

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.


All times are GMT -5. The time now is 06:48 AM.