You are not logged in.

#1 2009-02-03 06:18:34

Heresyte
Member
Registered: 2008-07-10
Posts: 19

x

x

Last edited by Heresyte (2025-03-03 06:54:02)

Offline

#2 2009-02-03 07:20:48

darthaxul
Member
Registered: 2008-09-24
Posts: 156

Re: x

have u tried the su command?

Offline

#3 2009-02-03 08:31:11

Envil
Member
Registered: 2008-11-18
Posts: 52

Re: x

su with -c should do the trick

example: su nyx -c vncserver

Offline

#4 2009-02-03 12:41:00

Surgat_
Member
Registered: 2007-08-08
Posts: 317

Re: x

You can also put it in your .bashrc, so it will be executed every time you log in. For example, I have it set to mount my external disc if it's plugged but not mounted:

if [[ -r /dev/disk/by-label/disco-externo && `mount | grep disco-externo | wc -l` -eq 0 ]]
then
  sudo mount /dev/disk/by-label/disco-externo /mnt/disco-externo
fi

If you put the sudo away you can start any command as a regular user under certain circumstances.

Offline

#5 2009-02-03 17:03:40

Heresyte
Member
Registered: 2008-07-10
Posts: 19

Re: x

x

Last edited by Heresyte (2025-03-03 06:51:33)

Offline

#6 2009-02-03 17:35:31

Envil
Member
Registered: 2008-11-18
Posts: 52

Re: x

There shouldnt be any security issues or atleast i cant think of any ^^

su -c seems to be simpler than using sudo but no idea if theres any differences besides that.. most likely not.

Offline

Board footer

Powered by FluxBB