Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 07-13-2005, 05:18 AM   #1
Senior Member
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,506

Rep: Reputation: 100Reputation: 100
How to execute root-privilege programs in KDE autostart?

Hi guys

How can I execute privileged operations (I want to run chmod and hdparm) whenever KDE starts up? I have tried putting a script in the ~/.kde/AutoStart directory, but since KDE runs as a normal user, the operations chmod and hdparm are to execute seem to fail. (This can also be because maybe KDE is not executing the script - see below).

1. Is this the correct way to use KDE's autostart? I. e. by placing executables or scripts into ~/.kde/AutoStart? Or do I need to somehow create a file that has the autostart "format", like

[Desktop Entry]

where "Exec=sh -f" and "Type=Script" and the file is called, say, startup.desktop?? So far, neither seem to work - just dropping the script in /Autostart, and creating such a "desktop format" file...

2. How can I run chmod and hdparm with root privs, without being root, if I can get autostart to execute my script as in (1) above?

Thanks - any help appreciated!

Old 07-13-2005, 06:25 AM   #2
Michael Johnson
Registered: Jul 2005
Location: Wagga Wagga, Australia
Posts: 262

Rep: Reputation: 30
The hdparm command can be put in your init scripts so that it executes during the boot sequence.
Why do you need to do a chmod before starting KDE?
Old 07-31-2005, 05:27 AM   #3
Registered: May 2005
Location: hiroshima
Distribution: debian
Posts: 75
Blog Entries: 9

Rep: Reputation: 17
could you amplify where hdparm should go on the startup scripts?

I have a related problem with a script I need to run to get my touchpad to work. If I try to get Gnome to execute it on login, I get a permission denied error. I need to put it somehwere where scripts are executed as root. Where would that be?


Old 07-31-2005, 05:40 AM   #4
Registered: May 2005
Location: hiroshima
Distribution: debian
Posts: 75
Blog Entries: 9

Rep: Reputation: 17
ok I found out

I made a link to it in /etc/rcS.d and I put S80 in front of the link name, since all the others followed that patter.

this is on debian


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
how to get root privilege in a script jpan Linux - General 5 01-07-2005 03:46 PM
Temp root privilege in program? ZX_SA Programming 1 07-22-2004 09:14 AM
Root can execute programs lawrencegoodman Linux - Newbie 11 01-28-2004 08:42 AM
some kde applications not execute in RHL 7.2 on login as root chinmay nautiya Linux - Software 5 01-18-2003 07:35 AM
How to get root privilege in program using c? whepin Programming 1 04-06-2002 06:27 AM > Forums > Linux Forums > Linux - Software

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