[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Hotplug running user scripts

This is more of a general X11/*nix question, I suppose.  When I plug
in a USB device into my laptop I want hotplug to run a script as a
specific user and I'd like to use GTK+ or Xdialog to prompt for some

What I'm not sure of is how to determine the user's $DISPLAY.

For example, when a USB camera is connected I'd like to pop up a dialog
and ask if the user wants to transfer photos to their $HOME/photos

I realize there may be more than one $DISPLAY running.  And there can
even be more than one set of display hardware on a given machine.  Not
to mention my knowledge of running an X server is limited.  So I'm not
clear how to accomplish this.

Any suggestions?

Bill Moseley

Reply to: