maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   start emelfm2 as root !? (https://talk.maemo.org/showthread.php?t=41189)

no mercy 2010-01-18 14:54

start emelfm2 as root !?
 
i need root rights in emelfm2 (optified version)

i tried to type sudo gainroot in the command line. output -> root shell enabled.

but i dont have root rights :-(

i also started emelfm2 via xterm : xterm - sudo gainroot - emelfm2.

now i have root rights


how can i made my emelfm2 sudo gainrooted???

zwer 2010-01-18 15:30

Re: start emelfm2 as root !?
 
Have you tried: echo emelfm2 | sudo gainroot

bunanson 2010-01-18 15:35

Re: start emelfm2 as root !?
 
different way to kill a cat, :) never realize you can do it that way, thanks, zwer.

I usually do it this way,
xterm
sudo gainroot
emelfm2

bun

zwer 2010-01-18 15:37

Re: start emelfm2 as root !?
 
Yes, but I was under the impression that he wants to start it without starting the xterm. His problem is somewhat vague.

no mercy 2010-01-18 15:45

Re: start emelfm2 as root !?
 
i want something like a desktop shortcut ;)

Bec 2010-01-18 17:39

Re: start emelfm2 as root !?
 
Read here :http://talk.maemo.org/showthread.php?t=40698&page=2
Watch out what you modify :)

fatalsaint 2010-01-18 17:46

Re: start emelfm2 as root !?
 
I would definitely not recommend editing the sudoers files.

Zwer's is the best method.. try it in a terminal that does not have root rights already:

Code:

echo emelfm2 | sudo gainroot
Or
echo emelfm2 | root

If that works you can build your own .desktop file with that in it and name it something like "root terminal".

no mercy 2010-01-18 18:36

Re: start emelfm2 as root !?
 
echo emelfm2 | sudo gainroot


works, but how can i make a desktop file?

i found this

desktop files are read from directory:

/usr/share/applications/hildon/

Example .desktop file for opening top in terminal:

[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Application
Terminal=true true = opens xterm window where the application is run / i think false is better???
Name=topx the name that appears to menu
Exec=/usr/bin/osso-xterm top the command that is executed when / ???????? dont know

icon is clicked
Icon= Icon for shortcut
#X-Window-Icon=timerwidget
X-Window-Icon=
X-HildonDesk-ShowInToolbar=true Show app in toolbar
X-Osso-Type=application/x-executable



what is the name of the file? xxx.desktop??

:confused:

i tried

[Desktop Entry]
Encoding=UTF-8
Name=emelFM2
GenericName=emelFM
Exec=/usr/bin/osso-xterm echo emelfm2 | sudo gainroot
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=emelFM2


saved as emelfm.desktop in udf-8 format.

i cant find the shortcut :-(

YoDude 2010-01-18 20:20

Re: start emelfm2 as root !?
 
This is perhaps, not a good idea.

On a number of times I have just tossed the N900 in my jacket pocket after using it to check the weather or something. It's easy to do if your in a hurry and I'm thinkin' others have done this as well.

More often than not, in the time it takes the screen to auto lock a bump, or even the act of putting it back in my pocket will hit a short-cut on one of the desktops. The next time I "wake" the thing up, I find a program running.

I can easily imagine that program being emelfm2 opening to the last directory I was working on, another bump or pocket swipe could select a group of files, and another one or two bumps could very well delete them. :eek:

Oh what joy that would bring. :rolleyes:

Bec 2010-01-18 20:30

Re: start emelfm2 as root !?
 
Well as long as it's not on the desktop... It's not likely.
I've also tried to see what happens when you "just toss it" and I found out that the screen is only activated by a surface of a certain size, so full pocket cloth is not likely do do much harm even with emelfm2 open as it would either be in contact wit too much surface to react, or pressing more than one item at the time would not register.

Practicing ways of launching apps is a good exercise for anyone who wants to learn more and I've actually learnt quite a few interesting things by doing this;)


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

vBulletin® Version 3.8.8