Gentoo Archives: gentoo-user

From: Mike Kazantsev <mk.fraggod@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] high priority task as user (nice/ionice)
Date: Sun, 23 Aug 2009 14:06:47
Message-Id: 20090823200542.1d4aea32@coercion
In Reply to: [gentoo-user] high priority task as user (nice/ionice) by meino.cramer@gmx.de
1 On Sun, 23 Aug 2009 10:20:08 +0200
2 meino.cramer@×××.de wrote:
3
4 > Is there any chance to start guvcview with user rights AND to give the
5 > application higer priorities so that whatever guvcview wants from the
6 > system will be served as soon as possible to avoid stuttering videos?
7
8 You can create a simple script, say, /usr/local/bin/capture and give
9 permissions to lauch it as root via sudo.
10
11 Script might be one-liner like
12
13 #!/bin/sh
14 exec nice -n -10 ionice -c 1 capture-command
15
16 and sudo line might look like this:
17
18 user ALL=(root) NOPASSWD: /usr/local/bin/capture
19
20 NOPASSWD here means that you just have to type
21 'sudo /usr/local/bin/capture' to run the script as root, no questions
22 asked.
23
24 --
25 Mike Kazantsev // fraggod.net

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] high priority task as user (nice/ionice) meino.cramer@×××.de