Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-05-2007, 01:59 AM   #1
LQ Newbie
Registered: Jan 2007
Posts: 20

Rep: Reputation: 0
Question hotplug action


I need to create a script which will start nautilus when a usb pen drive is inserted into the slot. I created a script in /etc/hotplug/usb/<usb-storage> as below.


echo "Storage is inserted " >/tmp/hahaha

case $ACTION in
echo "Action is to add storage device" >>/tmp/hahaha
echo "Display = $DISPLAY" >>/tmp/hahaha
nautilus /media/usbdisk 2>>/tmp/hahaha
echo "Action is to remove storage devide" >>/tmp/hahaha
echo "Default action = $ACTION"


This script doesn't open nautilus program. The following is the contents of /tmp/hahaha.

Storage is inserted
Action is to add storage device
Display = localhost:0.0
start nautilus

(nautilus:5820): Gtk-WARNING **: cannot open display:

how do I resolve this ?

Old 03-07-2007, 12:09 PM   #2
Registered: Mar 2007
Distribution: GNU/Linux debian unstable main
Posts: 93

Rep: Reputation: 17
I think use the --display argument eg. 'nautilus --display :0.0'
Old 03-16-2007, 04:55 PM   #3
LQ Newbie
Registered: Mar 2007
Location: limbo
Distribution: Debian unstable
Posts: 3

Rep: Reputation: 0
It might be an xauth problem. Does the user running the hotplug script have permission to use the X server? Do hotplug scripts just run as root? I guess in that case you'd need to xauth extract, then xauth merge while logged on as root.


hotplug, usbstorage

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
module not in action venkatesh111 Programming 1 03-23-2006 04:49 AM
Firmware/Hotplug problem with Hauppauge DEC2540-T, Hotplug and MythTV bezoomny Linux - Hardware 0 05-17-2004 01:37 PM
See CL in Action 2 Xterminator Conectiva 0 06-30-2003 10:14 AM
See CL 8 in action Xterminator Conectiva 1 09-26-2002 12:06 PM
Dumb action [2] :\ techplex Linux - Newbie 3 07-01-2002 05:20 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:11 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration