Skip to contentSkip to conversation

Help Please

DISCUSSION Dalibor Malek 2 participants 2 messages May 19, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

I wonder if someone can help me.
I made a little script

#!/bin/bash

killall soffice.bin /opt/Openoffice.org/program/soffice.bin /media/sdb/text.sxi

When I start the script ./usb-storage.sh it’s running properly.

My problem is, where I have to tell the hotplug service that it should start my script.
Simply to call the script “usb-storage” and copy it under ////etc/hotplug/usb// with 777 doesn’t do it(I tried).

I just don’t get it how this is functioning(I already had to install my system three times cause I destroyed the hotplug scripts trying).

Does anyone have an Idea?

Thank You

Dalibor Malek

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id%62&alloc_ida84&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw

hi :)

Quoted 6 lines · Dalibor Malek

When I start the script ./usb-storage.sh it?s running properly.

My problem is, where I have to tell the hotplug service that it should start my script.
Simply to call the script ?usb-storage? and copy it under ////etc/hotplug/usb// with 777 doesn?t do it(I tried).

hotplug executes all scripts as root and with minimal environment. it does not have access to your x-server and thus cannot open any windows on your desktop (there may be even multiple users logged in, how should it know where it should display its windows)

you need a program that listens for hotplug events and starts openoffice when you insert your usb drive.
when you start that program from your x session, it has access to your display and thus can open windows.
look at gnome-volume-manager. it does exactly that.

Signature · 1 line
Martin Waitz