Active Topics

 


Reply
Thread Tools
Mikkosssss's Avatar
Posts: 645 | Thanked: 519 times | Joined on Apr 2012 @ Finland
#1
I made this .desktop file so I can kill CuteTube, OVP and Firefox because they run background after I close em.

Code:
[Desktop Entry]
Type=Application
Name=killall
Icon=/usr/share/icons/hicolor/80x80/apps/killall.png
Exec=killall cutetube 
Exec=killall openmediaplayer
Exec=killall fennec
But it works only for one comand (last one,fennec) How to have many comands working.
Code:
Exec=killall cutetube killall openmediaplayer killall fennec
Didint work


Then another thing how to open conversation with desktop shortcut without going to messaging and then pressing conversation from right down corner.

Thanks.

Last edited by Mikkosssss; 2012-12-30 at 15:07.
 
Posts: 5 | Thanked: 5 times | Joined on Mar 2012
#2
try write script and exec it

for exsample:

Code:
#!blah-blah-blah

killall cutetube
..and etc.
 

The Following User Says Thank You to xt4zy For This Useful Post:
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#3
Or maybe do something like:
Code:
Exec=killall cutetube && killall openmediaplayer && killall fennec
Though putting it in a separate script and then executing it might be more convenient. And && will only execute the next command if the first command executes correctly, so if 'killall cutetube' errors out, the other ones won't run. So a separate script is better, but this is something you can do if you don't feel like making the separate script.

Don't forget to make the script file executable though (chmod +x [scriptfile]) on the command-line, or some file managers might let you change it without having to go to the command-line, I wouldn't know.
 

The Following 2 Users Say Thank You to Mentalist Traceur For This Useful Post:
Posts: 33 | Thanked: 22 times | Joined on May 2012 @ ja_JP.UTF-8
#4
freedesktop.org is helpful.
freedesktop.org .desktop file Manual
 

The Following User Says Thank You to syake For This Useful Post:
coderus's Avatar
Posts: 6,436 | Thanked: 12,700 times | Joined on Nov 2011 @ Ängelholm, Sweden
#5
Code:
Exec=killall cutetube; killall openmediaplayer; killall fennec
then
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following 4 Users Say Thank You to coderus For This Useful Post:
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#6
someone know a one command to close all opened windows like a button on the multitasking screen when you do long press -> close all ?
 

The Following User Says Thank You to Schturman For This Useful Post:
Posts: 592 | Thanked: 1,167 times | Joined on Jul 2012
#7
Originally Posted by Schturman View Post
someone know a one command to close all opened windows like a button on the multitasking screen when you do long press -> close all ?
Hmm..isnt there one in the ovi store?
If not, there you have a good idea for an app
__________________
BWizz - best N9 bookmark editing tool! Check it out ->BWizz for Harmattan

LINKer - transform your N9's home view in a Desktop, give it the freedom it deserves! -> LINKer for Harmattan

QuickBar - Can't find the app you used yesterday in your overcrowded Home Screen? Want access to the QuickLaunch bar even in the home screen? QuickBar for Harmattan

If you like our work, and would like to support via PayPal : users.giulietta@gmail.com
 
Mikkosssss's Avatar
Posts: 645 | Thanked: 519 times | Joined on Apr 2012 @ Finland
#8
Originally Posted by coderus View Post
Code:
Exec=killall cutetube; killall openmediaplayer; killall fennec
then
Didint work only kills Firefox.

I think its time to learn to do script files.

See you after Google
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#9
Mikkosssss,

In your exec field you can have it as Exec=/home/user/kill.sh

with kill.sh contents being:

Code:
#!/bin/sh

1=cutetube
2=openvideoplayer
3=fennec

if ps -ae | grep -v grep | grep "$1" > /dev/null
then
kill `pgrep -f "$1"`
fi
if ps -ae | grep -v grep | grep "$2" > /dev/null
then
kill `pgrep -f "$2"`
fi
if ps -ae | grep -v grep | grep "$3" > /dev/null
then
kill `pgrep -f "$3"`
fi
Of course use top to check if those are the process names exactly first
 

The Following User Says Thank You to thedead1440 For This Useful Post:
Posts: 177 | Thanked: 152 times | Joined on Oct 2011
#10
Not an expert still my two cents
try
Exec=killall openmediaplayer cutetube fennec pulseaudio

please add pulseaudio only when media player is playing or you want to close it
 

The Following User Says Thank You to Sourav.dubey For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 12:44.