You are not logged in.

#1 2008-06-26 05:55:12

Reasons
Member
From: Washington
Registered: 2007-11-04
Posts: 572

Fsfn

I brought an old laptop back into use, a sony fs series one. I go to install the fsfn package and all works as expected, volume, brightness, suspend, everything. But it does have two special keys that you can assign in the file /etc/fsfn.conf that look like so

S1_CMD=su shawn & sonata
S2_CMD=epiphany

The problem is when they are run, they are run as root. As you can tell I've already (probably in vain) tried to swith to a user and then run but had no luck.

Offline

#2 2008-06-26 06:09:21

sniffles
Member
Registered: 2008-01-23
Posts: 275

Re: Fsfn

su shawn -c sonata

Offline

#3 2008-06-26 06:15:15

Reasons
Member
From: Washington
Registered: 2007-11-04
Posts: 572

Re: Fsfn

Thanks, it worked. I saw that on the help page but wasn't quite sure what it meant so could you try to explain it a bit?

Offline

#4 2008-06-26 07:42:07

sniffles
Member
Registered: 2008-01-23
Posts: 275

Re: Fsfn

I could just say "read the f..ine manual" but, ok. So the `su` utility is used to `change user ID or become superuser`. Its "-c" command line option will `specify a command that will be invoked by the shell using its -c`. In other words, "su shawn -c sonata" means : "run command sonata as user shawn", which seemed to be what you were looking for. Your initial setup: "su shawn & sonata" is the wrong way to do it for a number of reasons. First of all, I think you might have meant " && " instead of " & ", which has a different effect. But even "su shawn && sonata" would not have worked.

Last edited by sniffles (2008-06-26 07:42:50)

Offline

#5 2008-06-26 07:43:34

INCSlayer
Member
From: Sweden
Registered: 2007-09-06
Posts: 296
Website

Re: Fsfn

the -c means that it will run a program as the specified user


In Life or Death no one Shall have what is Black Jack Lee's

windoze: "for people that can't spell windows"

Offline

Board footer

Powered by FluxBB