You are not logged in.

#1 2011-01-14 15:32:59

Ockonal
Member
From: Ukraine
Registered: 2010-10-11
Posts: 48
Website

Leds activating

Hello, I'm writing plugin for pidgin to activated LEDS (Num, Caps, Lock) when new messages are received.
First time I used function for emulating key events from file 'X11/extensions/XTest.h'. But It won't set caps and scroll (num only).

I found 'setleds' tool but it requires root access for '/dev/ttyN'
The example is:

setleds -L +scroll < /dev/tty0
bash: /dev/tty0: Permission denied

Are there any ways to get acces for /dev/tty0 with regular user or maybe you know another way to activate leds?

Offline

#2 2011-01-14 15:40:47

linux-ka
Member
From: ADL
Registered: 2010-05-07
Posts: 232

Re: Leds activating

Why don't you just change the rights to access this device? When coding ICs you need to do the same for parport/serial connection. Using chmod will help a lot, I guess.

Offline

#3 2011-01-14 15:41:53

Ockonal
Member
From: Ukraine
Registered: 2010-10-11
Posts: 48
Website

Re: Leds activating

I'm not sure that's right way to change /dev/ttyX permissions smile

Offline

Board footer

Powered by FluxBB