[plug] chvt as normal user?

Caleb Duggan caleb.duggan at gmail.com
Tue Apr 25 13:19:05 WST 2006


Thanks, that worked well.

On Tue, 25 Apr 2006 08:27:50 +0800, Hendrik Strydom <hns1 at iinet.net.au>  
wrote:

> On Tue, 2006-04-25 at 01:45 +0800, Caleb Duggan wrote:
>> when i run chvt as root, it works fine but when i run it as a normal  
>> user,
>> it says "Couldnt get a file descriptor referring to the console"
>>
>> Is there a way to make it work as a normal user? or do i need to use a
>> different command to change to another console as a normal user?
>>
>> thanks
>
> It seems you must either run the command from a console (where your user
> owns the device associated with the console) or be root.  An xterm is
> not a console and therefore the user does not own any device to control.
> I suspect the easiest way to do this is to enable sudo without a
> password for chvt.  To enable this only for yourself, add:
> <username> <hostname> = NOPASSWD: /usr/bin/chvt
> to the /etc/sudoers file using visudo, not you usual editor of choice.
> <username> and <hostname> must obviously be replaced with your user and
> host names.
> Also confirm that chvt is actually in /usr/bin for your distro.
>
> Regards
>   Hennie
>
> _______________________________________________
> PLUG discussion list: plug at plug.org.au
> http://www.plug.org.au/mailman/listinfo/plug
> Committee e-mail: committee at plug.linux.org.au



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



More information about the plug mailing list