You are not logged in.

#1 2008-03-04 01:26:41

metalfan
Member
Registered: 2007-11-22
Posts: 99

Gnome autostart, simple bash script doesnt run

Hi,

ive added two scripts to gnome autostart (sytem/preferences/session/...)

the first runs just fine:

#!/bin/bash

echo "test.sh was started" >/tmp/test-output

The second script is not executed or not executed corretly, dunno.
Its supposed to make windows network shares accessible through ~/Netzwerk

#!/bin/bash

status=$(pgrep -u progger fusesmb);

if [ ! -n "$status" ]; then
        fusesmb ~/Netzwerk &
else
        echo "already started"
fi

The script itself runs fine, i can execute it with "sh fusesmb-start.sh" and it works.
Permissions on both scripts are identical:

ls -alh ~/bin/fusesmb-start.sh ~/bin/test.sh 
-rwxr-xr-x 1 progger progger 134 2008-02-27 01:26 /home/progger/bin/fusesmb-start.sh
-rwxr-xr-x 1 progger progger  58 2008-03-02 23:25 /home/progger/bin/test.sh

Offline

#2 2008-03-04 01:51:44

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Gnome autostart, simple bash script doesnt run

Can you run "fusesmb" command as regular user? (if it's autostarted by gnome the script will be run with regular user privileges)

Last edited by fwojciec (2008-03-04 01:52:01)

Offline

#3 2008-03-04 02:36:57

metalfan
Member
Registered: 2007-11-22
Posts: 99

Re: Gnome autostart, simple bash script doesnt run

Yes, as i wrote above i can run the script as user.

Offline

Board footer

Powered by FluxBB