LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-17-2004, 04:28 PM   #1
badmofo666
Member
 
Registered: Mar 2004
Location: Texas, USA
Distribution: Ubuntu 12 (notebook), Debian Squeeze (home server), OpenSuse 12 (desktop)
Posts: 96

Rep: Reputation: 15
How do I give a user to run the nice command?


I want to run ut2004 at nice -20 but it wont let me do it unless I'm root, is there a way to set the program to always run at this level or give a user permission to change the priority?
 
Old 03-17-2004, 04:47 PM   #2
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
As root, I just...

nice --19 su - steve -c 'export DISPLAY=localhost:0.0;xmms'
and ps -ef |grep xmms gives
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5196 steve 0 -19 928 928 772 S 0.0 0.4 0:00.02 su


You can substitute ut2004 for xmms. Also, with Suse, you need to export the display. I don't have to in Mandrake, so

nice --19 su - steve -c ut2004
should do it for you.

RO
 
Old 03-17-2004, 05:45 PM   #3
badmofo666
Member
 
Registered: Mar 2004
Location: Texas, USA
Distribution: Ubuntu 12 (notebook), Debian Squeeze (home server), OpenSuse 12 (desktop)
Posts: 96

Original Poster
Rep: Reputation: 15
nope, dont work still get permission denied, i'm using slackware 9.1 by the way. it's pretty much a bitch to get shit set up.
 
Old 03-17-2004, 07:01 PM   #4
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
Can a regular user run ut2004 without the nice command? If not, then that is another problem in itself? 'Steve' has to be able to run it regardless for the above to work.

There is always
chmod u+s ut2004

This allows the people who can execute this to become root for it's execution. If is truly a sticky app like Redhat's consolehelper app (resist sudo), it won't work, and you are stuck with root being the only one who can run it.

RO
 
  


Reply


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
[SOLVED] TVtime doesn't give a nice image bucovaina78 Linux - Software 1 10-26-2010 04:17 AM
run command as user BFEINZIMER Linux - Newbie 9 08-24-2005 10:21 PM
run mount command as user paul_mat Linux - Newbie 1 12-14-2004 06:28 PM
How to run a command on new mail for a user? pembo13 Linux - Networking 0 09-26-2004 07:37 AM
run command as alternate user joeca Linux - General 1 08-06-2003 04:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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