From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ryan Shaw Date: Tue, 05 Feb 2002 15:05:36 +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 i didn't realize this was such a hot topic! On Mon, 4 Feb 2002 11:28:51 -0800 (PST) Jim Carter wrote: > On Fri, 1 Feb 2002, Ryan Shaw wrote: > > > Hotplugging scripts are run as root, so I have > > the following line to launch nautilus: [which won't start] > > > > su - ryan -c "nautilus --display=:0.0 > /home/ryan/nautilus.log 2>&1" & > > In your case, I'd suggest doing an imitation of xdm -- copy the auth file > to a file in /tmp owned by you and mode 600, and XAUTHORITY=/tmp/thatfile. > Then do the "su". Then if your kid in middle school is using your machine, > he/she can plug in the camera and see the pics, but can't do much damage > through the X authorization. (And, since the kid is the console user, the > auth file properly belongs to him, so essentially you've stolen it from > him, not him from you.) i tried this--no dice. but i'm starting to think that this is specifically a nautilus problem. just doing su - ryan -c "$PROGRAM --display=:0.0" in the hotplug script (without setting XAUTHORITY) works for about everything i've tried, including gnome apps, but not for nautilus. unfortunately, nautilus is not printing anything to stdout or stderr, so i can't figure out what it is missing, and no one on the nautilus-dev list seems to know either. anyway, thanks for the suggestions. i'm interested to see what comes out of the discussion i unintentionally sparked. ryan _______________________________________________ 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