Notices


Reply
Thread Tools
Posts: 3,664 | Thanked: 1,530 times | Joined on Sep 2009 @ Hamilton, New Zealand
#1
Hey guys I would like to know is it possible to run two commands one after another?

First I want to kill hildon-home and restart hildon-home again.
It's for the moment the device become a bit slow down.
 
Posts: 642 | Thanked: 486 times | Joined on Aug 2008
#2
Originally Posted by maxximuscool View Post
Hey guys I would like to know is it possible to run two commands one after another?

First I want to kill hildon-home and restart hildon-home again.
It's for the moment the device become a bit slow down.
Just write the start command after the kill command on the next line.

EDIT::

Oh there is no second line, so use this:

[first command] && [second command]

Last edited by rash.m2k; 2011-01-18 at 09:15.
 

The Following User Says Thank You to rash.m2k For This Useful Post:
Captwheeto's Avatar
Posts: 302 | Thanked: 193 times | Joined on Oct 2008 @ England
#3
I think this would be better written as

command 1 ; command 2
 

The Following User Says Thank You to Captwheeto For This Useful Post:
Posts: 3,664 | Thanked: 1,530 times | Joined on Sep 2009 @ Hamilton, New Zealand
#4
Originally Posted by Captwheeto View Post
I think this would be better written as

command 1 ; command 2
Tried all the above but didn't work.

&& and ; didn't run.

The commands I'm trying to run are:

dsmetool -k /usr/bin/hildon-home
dsmetool -t /usr/bin/hildon-home

Only one command ran and then the second command didn't get to execute.

dsmetool -k /usr/bin/hildon-home && dsmetool -t /usr/bin/hildon-home

dsmetool -k /usr/bin/hildon-home; dsmetool -t /usr/bin/hildon-home

Those worked fine in Terminal but not in Queen Beecon
 
Posts: 3,664 | Thanked: 1,530 times | Joined on Sep 2009 @ Hamilton, New Zealand
#5
Oh wait somewhat it is working now lol..
I don't know what happened before but it just won't work. It's magically work after I click it again.

Thanks guys. I knew I got the syntax right but may be I entered it wrong in the Queen Beecon.

I think I used the Advanced to entered the command that's why it won't work before. After removed the previous command and typed the whole things again then it just works.

Now it is saving me 10seconds of my time to keep going back and forth to the Terminal and type the commands.


Update:
Hmm... It stopped working again after the first click!

Is there a way to make the button renew its state once more?

Last edited by maxximuscool; 2011-01-18 at 10:42.
 
ndi's Avatar
Posts: 2,050 | Thanked: 1,425 times | Joined on Dec 2009 @ Bucharest
#6
Just make a script and call it from the widget:

echo comm1 > /moo.sh
echo comm2 >> /moo.sh

go to QB and add "sh /moo.sh"

I have several in a folder on my SD so it survives reflash. Temperature needs modprobe, e.g.
__________________
N900 dead and Nokia no longer replaces them. Thanks for all the fish.

Keep the forums clean: use "Thanks" button instead of the thank you post.
 

The Following User Says Thank You to ndi For This Useful Post:
Posts: 3,664 | Thanked: 1,530 times | Joined on Sep 2009 @ Hamilton, New Zealand
#7
sweet I'll make the shell script and echo like you suggest.
 
Posts: 3,664 | Thanked: 1,530 times | Joined on Sep 2009 @ Hamilton, New Zealand
#8
Originally Posted by ndi View Post
Just make a script and call it from the widget:

echo comm1 > /moo.sh
echo comm2 >> /moo.sh

go to QB and add "sh /moo.sh"

I have several in a folder on my SD so it survives reflash. Temperature needs modprobe, e.g.
it didn't work bud. How did you get yours to work.
I've created two files called:
Kill.sh
dsmetool -k /usr/bin/hildon-home

Revive.sh
dsmetool -t /usr/bin/hildon-home

but go back to QB add command

echo cmd > /media/mmc1/scripts/Kill.sh

But nothing happened.
 
Posts: 3,664 | Thanked: 1,530 times | Joined on Sep 2009 @ Hamilton, New Zealand
#9
Anyway this command seems to work better than shell script file.

dsmetool -k /usr/bin/hildon-home; sleep 2; dsmetool -t /usr/bin/hildon-home

This will kill the hildon-home and wait 2seconds before execute the revival of hildon-home. Which gives the command sometimes to kill off the process before starting it.

done this is closed
 
Posts: 326 | Thanked: 335 times | Joined on Feb 2010
#10
Maxxi loool
In the command you have to put

sh /patch/to/script.sh

or if it needs root:

echo "sh /patch/to/script.sh" | sudo gainroot

And the script must contain the 2 commands in 2 different lines...
To do this you can use an editor (pygtkeditor) or do this through the terminal with the said commands:

echo comm1 > /patch/to/script.sh

echo comm2 >> /patch/to/script.sh
__________________
______________________
______________________
 

The Following User Says Thank You to Dany-69 For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 20:39.