[maemo-developers] use shell script to start application

2006-01-18 Thread Johannes Eickhold
Hi,

I have hildonized gpsdrive a bit and want it to appear in the task
navigator after startup.

For the following PWD=/var/lib/install.

gpsdrive has to be started via the script "usr/bin/gpsdrive.sh".

If I specify this file in the .desktop file, gpsdrive can be started in
the correct way from the menu and via "run-standalone.sh
usr/bin/gpsdrive.sh" but doesn't show up in the task navigator.

If I specify ".../usr/bingpsdrive" (the binary executable) in
the .desktop file, only the application is startet broken (needed parts
from the script are not executed) BUT it shows up in the task navigator
after that. If I start it vi run-standalone.sh everyting is fine (e.g.
correct startup AND showing in task navigator).

How can I fix this?

Greets, Jonek.

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


Re: [maemo-developers] use shell script to start application

2006-01-20 Thread Johannes Eickhold
On Wed, 2006-01-18 at 15:18 +0100, Johannes Eickhold wrote:
> I have hildonized gpsdrive a bit and want it to appear in the task
> navigator after startup.
> 
> For the following PWD=/var/lib/install.
> 
> gpsdrive has to be started via the script "usr/bin/gpsdrive.sh".
> 
> If I specify this file in the .desktop file, gpsdrive can be started in
> the correct way from the menu and via "run-standalone.sh
> usr/bin/gpsdrive.sh" but doesn't show up in the task navigator.
> 
> If I specify ".../usr/bingpsdrive" (the binary executable) in
> the .desktop file, only the application is startet broken (needed parts
> from the script are not executed) BUT it shows up in the task navigator
> after that. If I start it via run-standalone.sh everyting is fine (e.g.
> correct startup AND showing in task navigator).
> 
> How can I fix this?

Since nobody answerd my question yet I'm going to share my thoughts with
you I had in the meantime.

First a thx to Florian Boor for pointing me to
http://maemo.org/platform/docs/tutorials/Maemo_tutorial.html#Automatic-connection
 which seems to descibe what I want to achieve. It says: "... This 
my_application.sh is then started from the desktop file where the runnable 
binary is normally specified. Read more about desktop files from this earlier 
chapter. ..." That leads to the question HOW to start the _script_ if Exec 
specifies the _binary_ ("gpsdrive.sh" vs. "gpsdrive")? That's not described in 
the referenced section.

Every time I specified the binary in Exec, only the binary was started.
Result: icon in task navigator but no script execution. Every time I
specified the script in Exec, only the script was executed. Result: no
icon in task navigator.

I tried this inside scratchbox and on the real device. After each change
to the desktop file maemo had to be restarted what I did.

So far the only possible solution seems to be to move the work done by
the script into the binary which in my opinion is ugly.

I realy would like to get enlightened!

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


Re: [maemo-developers] use shell script to start application

2006-01-20 Thread Florian Boor
Hi,

Johannes Eickhold wrote:
> Every time I specified the binary in Exec, only the binary was started.
> Result: icon in task navigator but no script execution. Every time I
> specified the script in Exec, only the script was executed. Result: no
> icon in task navigator.

its even more complex: Gaim e.g. is using a script for startup too and this one
works properly.

Greetings

Florian

-- 
The dream of yesterday  Florian Boor
is the hope of todayTel: 0271-771091-14
and the reality of tomorrow.Fax: 0271-771091-19
[Robert Hutchings Goddard, 1904][EMAIL PROTECTED]

6C 44 30 4C 43 20 6B 61  16 07 0F AA E6 97 70 A8
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] use shell script to start application

2006-01-20 Thread Jari Tenhunen
On Fri, Jan 20, 2006 at 12:37:03PM +0100, Johannes Eickhold wrote:
> > gpsdrive has to be started via the script "usr/bin/gpsdrive.sh".
> > If I specify this file in the .desktop file, gpsdrive can be started in
> > the correct way from the menu and via "run-standalone.sh
> > usr/bin/gpsdrive.sh" but doesn't show up in the task navigator.
> > 
> > If I specify ".../usr/bingpsdrive" (the binary executable) in
> > the .desktop file, only the application is startet broken (needed parts
> > from the script are not executed) BUT it shows up in the task navigator
> > after that. If I start it via run-standalone.sh everyting is fine (e.g.
> > correct startup AND showing in task navigator).
> > 
> > How can I fix this?

For me it works when I add the name of the binary (in this case
gpsdrive) to the StartupWMClass field of the .desktop file.

According to the tutorial, StartupWMClass is needed "when binary name is
different than D-BUS service name". Based on my experiments it is also
needed if there is no X-Osso-Service field in the .desktop file. 

To my knowledge, StartupWMClass should actually match the WM_CLASS
property of the application, which usually is the name of the binary but
not always. I recently had a similar problem where the application had a
weird WM_CLASS that differed from the binary name.

How this thing connects to the shell script issue, I don't know.


Br,
Jari 

-- 
Jari Tenhunen, stardate [-29]5191.33
:wq
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] use shell script to start application

2006-01-20 Thread Henry Tang
Just a wild guess. Did you change the .service file to reference the shell script too?
On 1/20/06, Johannes Eickhold <[EMAIL PROTECTED]> wrote:
On Wed, 2006-01-18 at 15:18 +0100, Johannes Eickhold wrote:> I have hildonized gpsdrive a bit and want it to appear in the task
> navigator after startup.>> For the following PWD=/var/lib/install.>> gpsdrive has to be started via the script "usr/bin/gpsdrive.sh".>> If I specify this file in the .desktop file, gpsdrive can be started in
> the correct way from the menu and via "run-standalone.sh> usr/bin/gpsdrive.sh" but doesn't show up in the task navigator.>> If I specify ".../usr/bingpsdrive" (the binary executable) in
> the .desktop file, only the application is startet broken (needed parts> from the script are not executed) BUT it shows up in the task navigator> after that. If I start it via run-standalone.sh everyting is fine (
e.g.> correct startup AND showing in task navigator).>> How can I fix this?Since nobody answerd my question yet I'm going to share my thoughts withyou I had in the meantime.First a thx to Florian Boor for pointing me to
http://maemo.org/platform/docs/tutorials/Maemo_tutorial.html#Automatic-connection which seems to descibe what I want to achieve. It says: "... This my_application.sh is then started from the desktop file where the runnable binary is normally specified. Read more about desktop files from this earlier chapter. ..." That leads to the question HOW to start the _script_ if Exec specifies the _binary_ ("
gpsdrive.sh" vs. "gpsdrive")? That's not described in the referenced section.Every time I specified the binary in Exec, only the binary was started.Result: icon in task navigator but no script execution. Every time I
specified the script in Exec, only the script was executed. Result: noicon in task navigator.I tried this inside scratchbox and on the real device. After each changeto the desktop file maemo had to be restarted what I did.
So far the only possible solution seems to be to move the work done bythe script into the binary which in my opinion is ugly.I realy would like to get enlightened!Thanks, Jonek.___
maemo-developers mailing listmaemo-developers@maemo.orghttps://maemo.org/mailman/listinfo/maemo-developers

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


Re: [maemo-developers] use shell script to start application

2006-01-20 Thread Johannes Eickhold
On Fri, 2006-01-20 at 13:58 +0100, Henry Tang wrote:
> Just a wild guess. Did you change the .service file to reference the
> shell script too?

So far gpsdrive has no .service file at all because it doesn't integrate
with dbus. Although that could be a feature request.

Greets, Jonek.

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