From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Date: Fri, 01 Feb 2002 23:58:31 +0000 Subject: Re: User-level Tasks in Hotplug Scripts? Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org > First question: Is the hotplug script the > right place for this? If not, where is? Sure. Setup scripts are often used to do such stuff. > Second question: If the hotplug script is > the right place, why doesn't the following > work? > > su - ryan -c "nautilus --display=:0.0 > /home/ryan/nautilus.log 2>&1" & My guess would be it's an X11 permissions problem, or maybe a PATH= problem (is nautilus in the path?) but what'd be most interesting would be the diagnostics from that "su" command. That'll say why it fails. The general issue with firing up GUI applications on hotplug events is that there's no standard way that a program running as one user (say, root) can locate the X server used by another (like "ryan", even assuming he is logged on only once :), and then get permission to talk to that server. As a rule, GUI IPC architectures use some intermediary process that runs some kind of combined naming/activation service (maybe based on CORBA) to talk to applications, rather than allowing users to talk directly to those X servers. After all, if you can talk directly, you can take over the whole desktop, snooping for passwords or whatever. - Dave _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel