Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-20-2006, 04:40 PM   #1
LQ Newbie
Registered: Jun 2006
Posts: 2

Rep: Reputation: 0
Boot config

Hi, I was wondering if someone could tell me what boot file to edit to run a superuser script for all users. I've tried inittab, .bashrc and .bash_profile. So far my script has only worked in the .bashrc for root, and I'd really like a startup script for all accounts- specifically my normal user account. I can su to root and execute it manually, but I'm trying to automate the running of the script WITHOUT a dangerous SUID script. I've heard some initial boot configuration scripts have root access by default, so I'd like to run it from there so it's still running when any user logs in. Also, if it's only run once at boot that would prevent the ERROR: INSTANCE ALREADY RUNNING messages whenever I su to root and the .bashrc file tries to run the script again(though I could setup my own "if not first instance" script, of course). It's my laptop brightness script to turn that down so I don't go blind(ack). Any help would be greatly appreciated. I suppose this isn't TOTAL newbie fodder, but it's newbie-ish for sysadmin considerations. Thanks for reading, hope you help!


P.S. Any books on this subject(general system administration/hacking) you could recommend? I've got Running Linux, 4th edition and Learning the Bash Shell, but those alone aren't cutting it anymore. Thanks!
Old 06-20-2006, 04:49 PM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977
you really need to explain what you're actually trying to do, rather than asking for ways to achieve what you think you need to achieve... sounds a lot like you actually just want to run somethign on boot, not on a per user basis.
Old 06-20-2006, 05:57 PM   #3
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
If what you want to do is reduce the gamma, you can do that in KDE and check on the "Save settings in Xorg.conf" box.

This will add a line to your "Monitor" section.
Section "Monitor"
  DisplaySize  332 207
  HorizSync    29-48
  Identifier   "Monitor[0]"
  ModelName    "ZV5000"
  Option       "DPMS"
  VendorName   "HP"
  VertRefresh  40-70
  UseModes     "Modes[0]"
  Gamma   1.20  1.20  1.20  # created by KGamma
You will want to use a number less than 1.00
Old 06-20-2006, 06:15 PM   #4
LQ Newbie
Registered: Jun 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Hey Acid_kewpie- yes, I want to run something on boot. I was trying to say that I hoped it would persist in running for any user(and I don't see why it wouldn't, so dumb phrasing). To execute something on boot, would I make an rc file for it or something? Would I stick it in sysinit instead of inittab? If it helps, I'm running the latest version of Mandriva.

Old 06-20-2006, 07:11 PM   #5
Registered: Apr 2004
Location: Statesboro, GA
Distribution: Arch Linux 2007.05 "Duke" (Kernel 2.6.21)
Posts: 447

Rep: Reputation: 30
If you want to run programs on boot up, just add the bash commands needed to do so into the /etc/rc.local file. (I think that most distros use this one, and not just Arch...)


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
dual boot config jnaylor Linux - Newbie 3 11-05-2005 01:48 PM
/boot/config* Gilion Linux - General 2 01-04-2005 08:05 PM
/boot/config <--What is it? rignes Linux - Newbie 4 05-06-2004 12:08 PM
Need Help - Boot config and/or Partitions alphademic Linux - Newbie 1 10-31-2003 01:39 PM
Need help with boot config Lok'thai Slackware 1 06-04-2003 10:21 PM > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration