Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-16-2007, 12:00 PM   #1
Registered: Jan 2004
Location: Hareid, Norway
Distribution: Ubuntu
Posts: 111

Rep: Reputation: 15
Can't run openoffice from bash-script with udev

I've made a script that copies an impress presentation from a thumbdrive, kills running openoffice and starts a new instance of openoffice in fullscreen.

The problem is, when I start the script in a root terminal in X (X running as the normal user), everything goes fine. But when it is excecuted from udev, openoffice will not start

Script goes as follows (more of a dramatation then a reproduction of the scipt)
>- copies file from device
>- umounts device
>- kills any running openoffice using ps -A | grep something and kill
>- starts openoffice with su user -c "openoffice -show presentation.odt"

How can I start a program from this script?
Old 04-16-2007, 12:17 PM   #2
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
You need to use fully qualified paths would be my guess. The environment that udev runs with probably doesn't include any PATH.



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
run-parts gives error on bash script ChoKamir Programming 9 04-11-2017 08:18 AM
Run my bash script as a daemon. jaimese Linux - Newbie 12 02-10-2011 04:28 PM
Run Bash Script @ login XaViaR Linux - General 5 01-26-2006 11:05 PM
how to run one bash script from within another? babag Programming 9 04-28-2005 01:12 AM
Run script at login instead of bash uzi4u Linux - General 2 04-28-2004 03:31 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:31 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