Active Topics

 



Notices


Reply
Thread Tools
Schturman's Avatar
Posts: 5,338 | Thanked: 4,119 times | Joined on Jan 2010 @ Israel
#1
Hello
I have script for some my stuff. I created icon with this lines:
Code:
[Desktop Entry]
Type=Application
Name=MYN9QT
Categories=System;
Exec=/usr/bin/meego-terminal -n -e sh /home/user/MyDocs/Modding/N9QuickTweak/MYN9QT
Icon=icon-l-terminal
It's work and it's allow me to access as USER, but most of my commands I need to run as ROOT (devel-su)
What I need to change in this line: /usr/bin/meego-terminal -n -e sh /home/user/MyDocs/Modding/N9QuickTweak/MYN9QT
that allow me to access to my script as ROOT (devel-su) ?
I tried like this:
Code:
/usr/bin/aegis-exec -s -u echo $PASSWORD | devel-su -c -l "/usr/bin/meego-terminal -n -e sh /home/user/MyDocs/Modding/N9QuickTweak/MYN9QT"
, but it's not work at all..

Another question..
When I run my script from Terminal as ROOT (devel-su), I have one command that I need to run as USER:
Code:
cp -r /home/user/MyDocs/.wallpapers/mywall.png /home/user/.wallpapers
and I always need to exit from ROOT and access to my script again as USER..
Is it possible to add something before my command, that will can perform my command without exiting from ROOT ?

Thanks


EDIT: Problem solved..

Last edited by Schturman; 2011-12-10 at 21:56.
 
Niwakame's Avatar
Posts: 120 | Thanked: 126 times | Joined on Nov 2011 @ Germany
#2
Would be great if you could share your solution to the community
 
Moderator | Posts: 5,320 | Thanked: 4,461 times | Joined on Oct 2009
#3
Think almedhi gave him some pointers (if im not mistaken) in his n9tweak script thread at forum.meego
 
Niwakame's Avatar
Posts: 120 | Thanked: 126 times | Joined on Nov 2011 @ Germany
#4
Yeah, but it would then be better to link to forum.meego for the solution ^^ I bet someone else will have the same problem again in a few days / weeks.
__________________
Served 2487 users with Instant Messaging Providers for N9 (~35.45 GB)
 
Schturman's Avatar
Posts: 5,338 | Thanked: 4,119 times | Joined on Jan 2010 @ Israel
#5
 
Schturman's Avatar
Posts: 5,338 | Thanked: 4,119 times | Joined on Jan 2010 @ Israel
#6
Hi
I got help from one guy (hxka) from Russian forum that explain to me how to do this. Important things are marked in red. For the first:

Code:
[Desktop Entry]
Type=Application
Name=N9 QTweak
Categories=System;
Exec=/usr/bin/meego-terminal -n -e devel-su -c "sh /home/user/MyDocs/N9QTweak/N9QT"
Icon=/usr/share/icons/hicolor/80x80/apps/N9quicktweak80.png
And for the second one:

Code:
devel-su user -c "cd /home/user/MyDocs/.wallpapers && cp -r mywall.png /home/user/.wallpapers"
Enjoy
 

The Following 2 Users Say Thank You to Schturman For This Useful Post:
Community Council | Posts: 4,438 | Thanked: 11,076 times | Joined on May 2012 @ Southerrn Finland
#7
This method launches up a terminal asking for the devel-su password.
How can I achieve the same thing without typing in a password, so that a script is launched with root credentials from a desktop icon.

I tried to set suid bits on the script but it does not seem to elevate my creds.
(and yes, of course this is an Open Mode device as I have no type of devices... )
 
Schturman's Avatar
Posts: 5,338 | Thanked: 4,119 times | Joined on Jan 2010 @ Israel
#8
Try
Code:
devel-su -c "echo rootme | sh /path/to/script.sh"
rootme = your root pass
 

The Following 2 Users Say Thank You to Schturman For This Useful Post:
Community Council | Posts: 4,438 | Thanked: 11,076 times | Joined on May 2012 @ Southerrn Finland
#9
Originally Posted by Schturman View Post
Try
Code:
devel-su -c "echo rootme | sh /path/to/script.sh"
rootme = your root pass
Okay, that did not work really as intended, but then I thought a bit of it and came up with the following which works:
Code:
echo rootme | devel-su -c "sh /path/to/script.sh"
 

The Following User Says Thank You to juiceme For This Useful Post:
Schturman's Avatar
Posts: 5,338 | Thanked: 4,119 times | Joined on Jan 2010 @ Israel
#10
yes, I meant what you wrote. sorry, I'm at work now, no time to think...
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 09:09.