LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-06-2006, 06:31 AM   #1
mashed
LQ Newbie
 
Registered: Mar 2006
Location: Finland
Distribution: Fedora Core 5
Posts: 28

Rep: Reputation: 15
Start up script


How can I create a script to run at system startup that does following operation:

Log in as root
Start Xine
Exit Xine
Log out root

The reason I need to do this is, because my video card wont work properly until I have started xine as a root so, that xine atemps to use vidix as video driver. (vidix -option won't actually work correctly, but for some weird reason everything else works after I have attempted to use vidix as a root).

I have also tried to update video drivers, but I haven't been able to get runlevel 3 to work either so...
 
Old 04-06-2006, 08:03 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
You'll need to install sudo and configure /etc/sudoers:
- add the unprivileged user you use: "User_Alias XINE_USER = (insert account name here)"
- add the commands to run: "Cmnd_Alias XINE_RUN = /path/to/xine --plus --any --args"
- allow user to execute commands as root w/o asking for password: "XINE_USER LOCALHOST=NOPASSWD: XINE_RUN"
Save, close. Now make a script (or add as alias to their .bashrc), executable by the unprivileged user: "sudo /path/to/xine --plus --any --args". * If you have problems getting this to run please post actual error messages.
 
Old 04-06-2006, 08:25 AM   #3
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Rep: Reputation: 78
Couldn't you just put the commands in the /etc/rc.d/rc.local file. That way the commands are executed at boot time? The commands are executed as root. So if the command for xine is /bin/xine your /etc/rc.d/rc.local file will have entried like this.

/bin/xine
kill -all /bin/xine
 
  


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 up script... podollb Linux - Software 3 10-19-2004 04:38 PM
How to start a Tcl/Tk script by simply invoking the script file itself ? cyu021 Programming 2 10-10-2004 11:00 AM
Need to make a start up script chr0no Mandriva 4 08-05-2004 10:46 AM
Oracle Start Up Script linux_pioneer Linux - Software 1 09-16-2003 05:44 AM
what is the start-up script for slack?.... purpleburple Linux - Distributions 5 07-29-2002 11:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:45 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