On Sunday 14 December 2003 00:26, Don Rozenberg wrote:
> I am running KDE under Knoppix 3.3. I am writing a script that will be
> run when a digital camera is attached via USB.
>
> I would like to find a way of determing the userid of the person who
> logged in and started the KDE session. One script, usb-mount, looks at
> /dev/console and gets root as the answer. Is there a better way to
> determine the userid.
Appended are two scripts I use.
/etc/hotplug/active-user-display
/etc/hotplug/usb/usbcam
They support that the active session is on :0 or :1 etc
at the time the cammera is connected. The current active user
has also to be in group camera.
Achim
--
To me vi is Zen. To use vi is to practice zen. Every command is
a koan. Profound to the user, unintelligible to the uninitiated.
You discover truth everytime you use it.
-- reddy@lion.austin.ibm.com
Attachment:
active-user-display
Description: application/shellscript
Attachment:
usbcam
Description: application/shellscript