View Single Post
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#61
hi folks... i'm struggeling with this one...

my desktop-file:
Code:
[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Application
Terminal=true
Name=RandomVid
Exec=/usr/bin/osso-xterm /etc/hildon-welcome.d/lalala.sh
Icon=terminal
#X-Window-Icon=
X-Window-Icon=     
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable
i did chmod:
Code:
chmod 755 /etc/hildon-welcome.d/lalala.sh
chmod a+x doesn't seem to help too.

and my script:
Code:
#!/bin/bash

# determine number of files in /dconfs
cd /etc/hildon-welcome.d/dconfs/
nof=$(ls *.conf | wc -l)

# get random number
rn=$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" ")

# in range of 1 - nof
let "rr = $rn % $nof + 1"

# choose random conf
rf="$rr.conf"
echo "$rr.conf"

# copy it over to default.conf
cp $rf ../default.conf

# exit
exit 0
if i click on the shortcut a terminal opens up but then closes itself after a few seconds.

when i try to execute it (i'm already in the right folder) with:
Code:
lalala.sh
or
Code:
./lalala.sh
there is an error "/bin/sh: lalala.sh: not found" or "/bin/sh: ./lalala.sh: not found"

it only works with
Code:
sh lalala.sh
the echo-line shows up and my file gets replaced correctly

but i can't get the shortcut to work ;(

help appreciated! thanks in advance!