Active Topics

 


Reply
Thread Tools
felbutss's Avatar
Posts: 579 | Thanked: 286 times | Joined on Oct 2009 @ Australia
#1
hey guys i did a search before posting but havent been able to find anything.

well i have this bug https://bugs.maemo.org/show_bug.cgi?id=8723
every day i have to run the following command in xterminal to stop my n900 from not responding

sudo gainroot
killall hildon-desktop
killall hildon-home

im wondering how i can make it into a simple script and have a shortcut on the desktop?????

sorry. any help would be good im still learning and love it
 
daperl's Avatar
Posts: 2,427 | Thanked: 2,986 times | Joined on Dec 2007
#2
Whoa, that sucks.

Yes, I should be able to help, but you caught me at the worst possible time. If no one helps you within the next 24 hours I should be able to cook something up for you by then. In the meantime, here's a link that show an exec of a command line call and here's a very simple example of a desktop (home) applet. You need to add a widget that will signal your command line calls. Also, you probably need to open up your /etc/sudoers to allow "user" some more power.

Good luck!
__________________
N9: Go white or go home
 

The Following User Says Thank You to daperl For This Useful Post:
felbutss's Avatar
Posts: 579 | Thanked: 286 times | Joined on Oct 2009 @ Australia
#3
hey. im still a little confused. im a pro with microsoft but still learning linux


i need something like a bat/shell file. i want to be able to install it then add a shortcut to the desktop.

can someone make it for me please? i also want to see how you did it and what i do next. still learning


any help??
 
felbutss's Avatar
Posts: 579 | Thanked: 286 times | Joined on Oct 2009 @ Australia
#4
anyone? is it that hard? :S
 
daperl's Avatar
Posts: 2,427 | Thanked: 2,986 times | Joined on Dec 2007
#5
Copy and paste the following into a file called:

/home/user/killerapp.sh

Code:
#! /bin/sh

/usr/bin/sudo /usr/sbin/gainroot
/usr/bin/killall hildon-desktop
/usr/bin/killall hildon-home
Then, from a terminal, run the command:

Code:
chmod 777 /home/user/killerapp.sh
As root, copy and paste the following into a file called:

/usr/share/applications/hildon/killerapp.desktop

Code:
[Desktop Entry]
Type=Application
Name=App Killer
Exec=/usr/bin/osso-xterm /home/user/killerapp.sh
Now, got to the application manager. Be patient while it quickly updates itself. Then, go to the last page and verify that "App Killer" exists.

Add "App Killer" as a desktop shortcut.
__________________
N9: Go white or go home

Last edited by daperl; 2010-03-05 at 19:03.
 

The Following User Says Thank You to daperl For This Useful Post:
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#6
It does not work like this. The killall commands after the sudo command will not run as root.

But it should not be a problem, since hildon-home and hildon-desktop run as user, so there should not be a problem to run those commands as user as well.
__________________
My repository

"N900 community support for the MeeGo-Harmattan" Is the new "Mer is Fremantle for N810".

No more Nokia devices for me.
 

The Following 3 Users Say Thank You to Matan For This Useful Post:
daperl's Avatar
Posts: 2,427 | Thanked: 2,986 times | Joined on Dec 2007
#7
Originally Posted by Matan View Post
It does not work like this. The killall commands after the sudo command will not run as root.

But it should not be a problem, since hildon-home and hildon-desktop run as user, so there should not be a problem to run those commands as user as well.
Are you saying that

Code:
#! /bin/sh

/usr/bin/killall hildon-desktop
/usr/bin/killall hildon-home
would do what he wants it to do?

EDIT: Changed it in the above script.

Also, if he's not root, would he need a -9?
__________________
N9: Go white or go home

Last edited by daperl; 2010-03-05 at 19:06.
 

The Following User Says Thank You to daperl For This Useful Post:
felbutss's Avatar
Posts: 579 | Thanked: 286 times | Joined on Oct 2009 @ Australia
#8
thanks so much guys. ill have a play with it tonight . i want to try a few things with scripts. how do i run scripts as root though?

Last edited by felbutss; 2010-03-06 at 00:54.
 
daperl's Avatar
Posts: 2,427 | Thanked: 2,986 times | Joined on Dec 2007
#9
Originally Posted by felbutss View Post
thanks so much guys. ill have a play with it tonight . i want to try a few things with scripts. how do i run scripts as root though?
I'm not sure if this is the best advice, but if, as root, you add the following line to

/etc/sudoers

Code:
user ALL = NOPASSWD: ALL
you should be able to run anything as root by putting

sudo

in front of it. For instance,

Code:
sudo whoami
should output "root" and not "user."
__________________
N9: Go white or go home
 

The Following User Says Thank You to daperl For This Useful Post:
felbutss's Avatar
Posts: 579 | Thanked: 286 times | Joined on Oct 2009 @ Australia
#10
quick question. how do i set a icon??? sorry to break balls
 
Reply


 
Forum Jump


All times are GMT. The time now is 18:46.