i don't know if i'm on the right place.
but i'm a linux/kde user since about 1year and a half.
Lately i have been jealous to see gnome-volume-manager so i have started to play a bit with hotplug to make my own usb-storage and usbcam mounter that will interact with KDE.
i have been able by modifiying /etc/hotplug/usb.agent and by creating /usb/hotplug/usb-storage (wich is automatically called by hotplug deamon when a usb-torage device is plugged in). now in this script i want to warn the user so i have created some application that are configurable and that will help the kde user to know that those devices are configured and ready to use. but in my script i want to call my application with the users permissions not the root permission because i have some config files in the home, and of course for security reason.
here is the end of my script:
[code:1]
#execute the message box as a user. connected on :0
echo "#!/bin/sh" > /tmp/kdialog_cmd
echo "kdialog --msgbox \"usb-srorage detected mounted in your Storage Devices\"" >> /tmp/kdialog_cmd
chmod a+x /tmp/kdialog_cmd
su $(who | grep ":0" | awk '{print $1}') -c /tmp/kdialog_cmd
[/code:1]
so basically what i do here is i create a temp file and put the message box line in and change the permission then run it with the current user connected to X.
the script works flawlessly when i'm starting by hand but when , it's hotplug Deamon that call the script every other actions are done exept the part when i'm trying to sho the use a message box (eventually it wil be my little software).
so i'm a bit lost in all that at the moment.
so any help will be apreciated.
the distribution i use is called Munjoy (
http://www.munjoylinux.org) linux wich is a derivate of Knoppix.
if i'm not at the right place please don't flame me and tell me where i should post thoses kind of messages.
thanks
.
sorry for my english i'm french from Montreal ...[/url]