View Single Post
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#10
Sorry for bumping, but maybe anyone have idea about it?:

Originally Posted by Estel View Post
Thanks for answer, ho ever, using Exec=sudo script.sh does nothing. Literally nothing, just nothing happens. That was the first thing I've tried after creating entry in sudoers.d I also got X-App-Loading-Image=none set.

When I execute "sudo script.sh" from terminal, it works as it should, so, probably, sudoers entry is ok.

// Edit

I've also tried to save terminal output from running desktop file, by:

Exec=sudo script.sh > /home/user/MyDocs/scriptlog.txt

(I've found it, while searching for solution - I don't know if it's right command)

...and scriptlog.txt was created, ho ever, contained nothing inside.
I just can't believe that it's not possible to set shortcut - via .desktop file - to some command that require root. Recently, I've also tried Queen BeeCon widget with command
Code:
sudo bnf.sh
, which exact same results - nothing (literally, nothing) happen when I execute it. Again, typing this manually in terminal works flawlessly.

For reference, I'm attaching actual version of script, + (more important for current problem, I think) .desktop file. Could anyone knowledgeable check it inside device? Maybe it's just "my" problem, not code problem?

Note:
Currently, there is:
Code:
Exec=sudo bnf.sh
...but I've tried also with
Code:
Exec='sudo bnf.sh'
Exec="sudo bnf.sh"
Exec=sudo 'bnf.sh'
Exec=sudo "bnf.sh"
...and every possible combination of these.

I can get it to (semi) work by:
Code:
Exec=osso-xterm -e "sudo bnf.sh"
... but that "flash" screen with terminal window poping up first, + is much slower to execute.

// Edit

Using ShortcutD, I can set:
Code:
sudo bnf.sh
...as custom command + set it for hardware button (i.e to execute, when I half-press camera button), but still no joy to make it working as desktop shortcut.

I got plans for some (maybe) useful and more complicated scripts, that would be handy with desktop shortcuts for them, but every single one require root. I have no idea why the heck it doesn't want to work with:
Exec=sudo <name>.sh

(Actual version is here:
http://talk.maemo.org/showpost.php?p...3&postcount=17)
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!

Last edited by Estel; 2011-09-11 at 19:51.
 

The Following User Says Thank You to Estel For This Useful Post: