LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-03-2007, 01:07 PM   #1
simonmorley
LQ Newbie
 
Registered: Aug 2006
Posts: 6

Rep: Reputation: 0
rc.local and scipts - command not found


Hi,

I'm trying to create a custom slackware livecd for a project and am almost there however, I'm having problems with rc.local and a script I want to run.

The script is as follows:

while true ; do
su - kiosk -c 'xinit'
done

If I run xinit from kiosk user, my firefox kiosk appears every time perfectly. If I however run rc.local as above, I get:

/bin/bash: xinit: command not found over and over.

If I try

while true ; do
su - kiosk -c '/usr/X11R6/bin/xinit'
done

I get the following error:

/usr/X11R6/bin/xinit: No such file or directory (errno 2): no server "X" in PATH

Use the -- option or make sure that /usr/X11R6/bin is in your path and the "X" is a program or a link to the right type of server for your display. Possible server names include:

Xorg X.Org displays

Giving up...

Having tested this on a debian machine it works fine. I feel like giving up too!

Can someone please help on the final part of the livecd project.

Thanks,

Simon

Last edited by simonmorley; 07-03-2007 at 01:21 PM.
 
Old 07-03-2007, 02:30 PM   #2
bioe007
Member
 
Registered: Apr 2006
Location: lynnwood, wa - usa
Distribution: archlinux
Posts: 654

Rep: Reputation: 30
I'm not 100% on this, but in slackware root is not supposed to have an .xinitrc and also in the 'root' user path there is not X11R6/bin. you might try modifying the $PATH while in rc.local something like:

Code:
# in rc.local
PATH=/usr/X11/bin:"$PATH"
while true ; do
su - kiosk -c '/usr/X11R6/bin/xinit'
done
and I think rc.local runs with root permissions, so you might have to create a dummy user, and have rc.local call a script with that user's permission?
 
Old 07-04-2007, 03:20 AM   #3
simonmorley
LQ Newbie
 
Registered: Aug 2006
Posts: 6

Original Poster
Rep: Reputation: 0
rc.local and scipts - command not found Reply to Thread

Hi, thanks for the reply.

Your suggestion gives the same error as before:


/usr/X11R6/bin/xinit: No such file or directory (errno 2): no server "X" in PATH

Use the -- option, or make sure that /usr/X11R6/bin is in your path and
that "X" is a program or a link to the right type of server
for your display. Possible server names include:

Xorg X.Org displays

Still confused why this works on Debian etc. but not here!

Not sure what you mean getting a dummy user - I'm sort of doing that with the kiosk user?

Simon
 
Old 07-04-2007, 03:31 AM   #4
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Try adding "/usr/X11R6/bin" to your default PATH variable for login sessions. For this you need to edit "/etc/login.defs" file. It will be clear where to add that path when you open login.defs in an editor.

Eric
 
  


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
bash: rpm: command not found && sudo: alien: command not found Java_Code Ubuntu 7 07-27-2006 11:57 PM
bash: <command name> command not found smash Programming 5 03-13-2006 08:48 AM
Custom script for particular domain: User not found in local recepient table. dlublink Linux - Networking 5 02-04-2006 01:30 PM
No workgroups found on local network Bauke P. Linux - Networking 2 08-10-2004 10:46 AM
users/passwords scipts Anthony Programming 1 03-27-2002 07:40 PM

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

All times are GMT -5. The time now is 06:00 PM.

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