View Single Post
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#8
Originally Posted by evk View Post
It's not possible to use setuid?
I don't really know how to do it...

My first target was to create working rpm file, that can be installable/uninstallable from desktop. Finally I got it...
But... when we press on the icon it run my script as USER and many commands I need to run as ROOT when I already user.. In my first version (sudo not installed yet) I used devel-su many times in one script, for example to run this command (echo silent > /usr/share/jolla-mods/temp) I needed write it like this to get it work:
Code:
echo rootme|devel-su -c sh -c "echo root|devel-su -c echo silent > /usr/share/jolla-mods/temp"
where is rootme = nemo user pass (from dev mode) and root = is root user pass
Too much weird combination
Now with sudo I run the same command like this (much easily):
Code:
sudo sh -c "sudo echo silent > /usr/share/jolla-profchanger/temp"
like you can see I used sudo twice because even I have sudo USER can't write to ROOT directory...

Also when and if I will learn how to package with root permission (I don't know what to write to .spec file for this), something like aegis manifest on N9, when after installation by pressing on the icon it will run script automatically as ROOT, it will be nice. But also here I have a problem.. For example this command we need to run as USER:
Code:
dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:"silent"
I tried a meany diff variation to get i work under ROOT, but without success

Last edited by Schturman; 2014-01-29 at 07:47.