maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   How to run script as ROOT from desktop icon ? (https://talk.maemo.org/showthread.php?t=92503)

Schturman 2014-01-24 13:00

How to run script as ROOT from desktop icon ?
 
Hi
Is it possible to execute script as ROOT from desktop icon ?
for example on N9 we could to run something like this:
Code:

Exec=sh -c "echo rootme | devel-su -c 'sh /path/to/script.sh'"
Can we do the same on Jolla ?

And second question, someone know what the command to show notification bar ? Or where I can check it ?

Thanks

nieldk 2014-01-24 13:31

Re: How to run script as ROOT from desktop icon ?
 
Quote:

Originally Posted by Schturman (Post 1408637)
Hi
Is it possible to execute script as ROOT from desktop icon ?
for example on N9 we could to run something like this:
Code:

Exec=sh -c "echo rootme | devel-su -c 'sh /path/to/script.sh'"
Can we do the same on Jolla ?

And second question, someone know what the command to show notification bar ? Or where I can check it ?

Thanks

well, isnt that easy to try out ?

coderus 2014-01-24 13:39

Re: How to run script as ROOT from desktop icon ?
 
he is always asking before :)

Schturman 2014-01-24 16:46

Re: How to run script as ROOT from desktop icon ?
 
I still not at home and yes I always asking before :D
But I also tried just command (without script), I tried killall sailfish-browser:
echo rootme | devel-su -c "killall sailfish-browser"

Not worked...

p.s. and what about notification command ?

meemorph 2014-01-24 17:58

Quote:

Originally Posted by Schturman (Post 1408693)
....I tried killall sailfish-browser:
echo rootme | devel-su -c "killall sailfish-browser"

Not worked...

p.s. and what about notification command ?

rootme is not the correct password. May be its nemo, I don't remember it - I have changed mine. Open a terminal and try devel-su manually.

Mikkosssss 2014-01-24 18:07

Re: How to run script as ROOT from desktop icon ?
 
You need to set password when you activate developer mode.

coderus 2014-01-24 18:13

Re: How to run script as ROOT from desktop icon ?
 
notifications should be same with meego

Schturman 2014-01-24 18:26

Re: How to run script as ROOT from desktop icon ?
 
Coderus thanks, will try..
I already set pass for nemo and root users..

Schturman 2014-01-24 20:38

Re: How to run script as ROOT from desktop icon ?
 
Ok, Finally I tried with script, it not work :( Also it not show any errors...
Here is the script:
Code:

#!/bin/bash

echo rootme | devel-su -c "killall sailfish-browser"

Also I tried to find the notification commands, but also without success:
Code:

[root@localhost ~]# dbus
-bash: dbus: command not found

Any advice ?

szopin 2014-01-24 20:52

Re: How to run script as ROOT from desktop icon ?
 
Quote:

Originally Posted by Schturman (Post 1408744)
Ok, Finally I tried with script, it not work :( Also it not show any errors...
Here is the script:
Code:

#!/bin/bash

echo rootme | devel-su -c "killall sailfish-browser"

Also I tried to find the notification commands, but also without success:
Code:

[root@localhost ~]# dbus
-bash: dbus: command not found

Any advice ?

If you install sudo and add nemo to sudoers file you should be able to simply run with 'sudo xyz'

edit: In /etc/sudoers you just need this line:
Code:

nemo ALL=(ALL) NOPASSWD: ALL
and no more password typing, so you can keep it longer/more randomized


All times are GMT. The time now is 13:03.

vBulletin® Version 3.8.8