Reply
Thread Tools
Mikkosssss's Avatar
Posts: 645 | Thanked: 519 times | Joined on Apr 2012 @ Finland
#11
Cant find any help and http://harmattan-dev.nokia.com/ doesnt work??

Any other pages where you learn simple harmattan developer stuff. =S
Because I want learn these things for future

Last edited by Mikkosssss; 2012-12-30 at 11:01.
 
Posts: 592 | Thanked: 1,167 times | Joined on Jul 2012
#12
Originally Posted by Mikkosssss View Post
Cant find any help and http://harmattan-dev.nokia.com/ doesnt work??

Any other pages where you learn simple harmattan developer stuff. =S
Because I want learn these things for future

Harmattan-dev is down again. Welcome to the world of Nokia.
You can have a look at the Freedesktop XDG reference documentation to get an idea of things (and check against your n9).
Worked for me and for BWizz
__________________
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
 

The Following User Says Thank You to tortoisedoc For This Useful Post:
Mikkosssss's Avatar
Posts: 645 | Thanked: 519 times | Joined on Apr 2012 @ Finland
#13
Originally Posted by Sourav.dubey View Post
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
Works now and it was openvideoplayer miss spelled it there.
Thanks
 

The Following User Says Thank You to Mikkosssss For This Useful Post:
Mikkosssss's Avatar
Posts: 645 | Thanked: 519 times | Joined on Apr 2012 @ Finland
#14
Originally Posted by thedead1440 View Post
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
I got it working with desktop file.

But if theres way to add message displayed on script I will use script.
 
Posts: 592 | Thanked: 1,167 times | Joined on Jul 2012
#15
Originally Posted by Mikkosssss View Post
I got it working with desktop file.

But if theres way to add message displayed on script I will use script.
You mean notify the user?
http://talk.maemo.org/showthread.php?t=84624
__________________
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
 

The Following 3 Users Say Thank You to tortoisedoc For This Useful Post:
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#16
Hi,

I'm trying to put a script together for a desktopfile that turns standby screen on/off.
The idea is to have an icon in home screen that switches between the regular standby screen with clock, notifications and billboard and a blank black one.
In settings>phone>display> there is an option to turn standby screen off, but I wonder if it is really disabling it or just sets it to blank.
A notification via dbus (like tortoisedoc suggested) to display if its active or passive would be nice.
As you can guess from my name, I'm not into Linux at all.
So far I only have some breadcrumbs of code, so please help putting this right.
Here's what I have in mind:

LPSswitch.desktop:
Code:
[Desktop Entry]
Type=Application
Name=LPSswitch
Icon=/usr/share/icons/hicolor/80x80/apps/LPSswitch.png
Exec=/home/user/LPSswitch.sh
LPSswitch.sh:
Code:
#!/bin/sh

if {standby screen on}
then {kill com.nokia.systemui.ScreenLock}
and {dbus-send --print-reply --dest=com.meego.core.MNotificationManager /notificationmanager com.meego.core.MNotificationManager.addNotification uint32:0 uint32:0 string:'device' string:'' string:'standby screen off' string:'' string:'icon-m-toolbar-done' uint32:0}

if {standby screen off}
then {exec com.nokia.systemui.ScreenLock}
and {dbus-send --print-reply --dest=com.meego.core.MNotificationManager /notificationmanager com.meego.core.MNotificationManager.addNotification uint32:0 uint32:0 string:'device' string:'' string:'standby screen on' string:'' string:'icon-m-toolbar-done' uint32:0}
I can't wait to get this to work. I will then put up a new thread and present it like an app.
Thank you.
__________________
Nokia 5110 > 3310 > 6230 > N70 > N9 BLACK 64GB
Hildon Foundation Board member
Maemo Community e.V. co-creator, founder and director since Q4/2016
Current Maemo Community Council member
 

The Following User Says Thank You to Win7Mac For This Useful Post:
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#17
Win7Mac,

Are you sure that's the process name?

Get your process name and the below is something you can use; in the below example PROCESS_NAME should be replaced with your process name:

Code:
SERVICE=PROCESS_NAME

if ps -ae | grep -v grep | grep "$SERVICE" > /dev/null
then
        kill `pgrep -f "$SERVICE"`
        dbus-send --print-reply --dest=com.meego.core.MNotificationManager/notificationmanager com.meego.core.MNotificationManager.addNotification uint32:0 uint32:0 string:'device' string:'' string:"Standby Screen Off" string:'' string:'' uint32:0
else
        "$SERVICE" &
        dbus-send --print-reply --dest=com.meego.core.MNotificationManager/notificationmanager com.meego.core.MNotificationManager.addNotification uint32:0 uint32:0 string:'device' string:'' string:"Standby Screen On" string:'' string:'' uint32:0

fi

Last edited by thedead1440; 2012-12-30 at 15:33. Reason: typo
 

The Following User Says Thank You to thedead1440 For This Useful Post:
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#18
Originally Posted by thedead1440 View Post
Are you sure that's the process name?
No, it's only what sounded the most likely...
From here.
__________________
Nokia 5110 > 3310 > 6230 > N70 > N9 BLACK 64GB
Hildon Foundation Board member
Maemo Community e.V. co-creator, founder and director since Q4/2016
Current Maemo Community Council member
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#19
Originally Posted by Win7Mac View Post
No, it's only what sounded the most likely...
From here.
Ah that's a dbus service not a process name; i know very little of dbus; someone else needs to share their knowledge here...
 
Mikkosssss's Avatar
Posts: 645 | Thanked: 519 times | Joined on Apr 2012 @ Finland
#20
Originally Posted by Win7Mac View Post
Hi,

I'm trying to put a script together for a desktopfile that turns standby screen on/off.
The idea is to have an icon in home screen that switches between the regular standby screen with clock, notifications and billboard and a blank black one.
In settings>phone>display> there is an option to turn standby screen off, but I wonder if it is really disabling it or just sets it to blank.
A notification via dbus (like tortoisedoc suggested) to display if its active or passive would be nice.
I was going to try do same thing but I forgot whole thing waiting for your app.

 
Reply


 
Forum Jump


All times are GMT. The time now is 03:34.