[maemo-developers] launching applications via .desktop file, process priorities - scummvm problem

2006-01-18 Thread Frantisek Dufka

Hello,

it looks like when there is no service and non-maemo specific process is 
launched it runs with nice value of -1 i.e. it has higher priority than 
normal (example scummvm port). If it has service defined it has normal 
priority (example gaim). Both have similar .desktop files but the maemo 
specific one has some additional lines with service name etc.


Why the priorities differ? Can I tweak the priorities from the desktop 
file to set scummvm back to normal? Problem with scummvm is that the 
sound skips when it has higher priority. I suppose it is because sound 
daemon priority is lower.


One can find it with ps in xterm. scummvm has sign '' if launched from 
menu. One can change it via renice command. renice 0 PID removes '' 
renice 1 PID and above shows 'N'.


Is this bug or design issue?

Also what is the correct syntax for desktop file if I need to launch 
shell script and prevent it from being killed? Is it possible?
I cannot find list of maemo specific properties and their values and 
there is not much information here

http://www.maemo.org/platform/docs/howtos/howto_porting_an_existing_application.html#Adding-to-Menu
or here 
http://www.maemo.org/platform/docs/howtos/howto_new_application.html#Creating-desktop-file


Also the freedesktop specification does not help much
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-0.9.4.html

Frantisek
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] launching applications via .desktop file, process priorities - scummvm problem

2006-01-18 Thread Frantisek Dufka

Kimmo Hämäläinen wrote:


If it was launched by one of the DBus daemons then it seems a bug. What
version of DBus you have?


Sorry, should have said it before. It is on the device, official 51 
firmware. Looks like I should report it in buzilla then, right?


Frantisek
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] launching applications via .desktop file, process priorities - scummvm problem

2006-01-18 Thread Kimmo Hämäläinen
On Wed, 2006-01-18 at 15:53, ext Frantisek Dufka wrote:
 Kimmo Hämäläinen wrote:
 
  If it was launched by one of the DBus daemons then it seems a bug. What
  version of DBus you have?
 
 Sorry, should have said it before. It is on the device, official 51 
 firmware. Looks like I should report it in buzilla then, right?

The code for that is here (login guest/guest):
https://stage.maemo.org/svn/maemo/projects/haf/branches/dbus/0.23.4-9osso5/

It has 'spawn-priority.diff' in debian/patches. Maybe your program is
not started by DBus or it is SUID and sets the priority itself, or
something... You can see that the patch works, if you e.g. start Browser
and look at its priority.

BR; Kimmo

 
 Frantisek
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] launching applications via .desktop file, process priorities - scummvm problem

2006-01-18 Thread sampo . nurmentaus


Hi,


it looks like when there is no service and non-maemo specific process is
launched it runs with nice value of -1 i.e. it has higher priority than
normal (example scummvm port). If it has service defined it has normal
priority (example gaim). Both have similar .desktop files but the maemo
specific one has some additional lines with service name etc.


That's strange, because the DBus has been patched so that its children
(launched programs) do not inherit the priority.


I think that what happens is that if you don't have the d-bus service
field in desktop file, task navigator cannot launch the application using
D-BUS so this D-BUS patch won't help here.

If you don't have the service field defined  TN simply forks the
application and the application inherits the properties of the
desktop process.


Br,
Sampo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers