OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: daniel3000 on February 01, 2007, 11:18:37 am

Title: Preloading?
Post by: daniel3000 on February 01, 2007, 11:18:37 am
Hi guys,

the recent discussion about prelinking brought me to these thoughts:

With a kind of a startup script in X one could indeed "pre-load" often-used apps which should be quickly at hand, such as KA/PI, KO/PI, Zbedic etc.

The tasks applet Meanie put into pdaXii13 contains code which is able to "remote-control" windows, i.e. minimize, maximize, close etc.
I think this is done using libwnck.

So it should be possible to write a program using this library, which starts up a (configurable) set of programs when X is started and minimizes them instantly.

Using the task applet, they are always quickly brought to the foreground (without cycling through all open windows with Alt-Tab).

And additionally, for the keyboard addicts, we would need a way to bring them to foreground using the application keys (calendar, address...), which should also be no problem using a custom-made program which uses these above mentioned functions from libwnck.

Meanie, would you be so kind to reveal the sources of your version of mb-applet-tasks? I think this is the key to preloading in pdaXrom.

I have always looked for a way to bring windows to the front using the application keys. libwnck should be able to make this possible.

daniel
Title: Preloading?
Post by: Meanie on February 01, 2007, 06:53:45 pm
Quote
Hi guys,

the recent discussion about prelinking brought me to these thoughts:

With a kind of a startup script in X one could indeed "pre-load" often-used apps which should be quickly at hand, such as KA/PI, KO/PI, Zbedic etc.

The tasks applet Meanie put into pdaXii13 contains code which is able to "remote-control" windows, i.e. minimize, maximize, close etc.
I think this is done using libwnck.

So it should be possible to write a program using this library, which starts up a (configurable) set of programs when X is started and minimizes them instantly.

Using the task applet, they are always quickly brought to the foreground (without cycling through all open windows with Alt-Tab).

And additionally, for the keyboard addicts, we would need a way to bring them to foreground using the application keys (calendar, address...), which should also be no problem using a custom-made program which uses these above mentioned functions from libwnck.

Meanie, would you be so kind to reveal the sources of your version of mb-applet-tasks? I think this is the key to preloading in pdaXrom.

I have always looked for a way to bring windows to the front using the application keys. libwnck should be able to make this possible.

daniel
[div align=\"right\"][a href=\"index.php?act=findpost&pid=153222\"][{POST_SNAPBACK}][/a][/div]

actually, I didn't change the task applet much besides giving it a nicer looking icon and adding the autoexec feature. so if it finds autoexec under .matchbox it will run that script. this is actually useful for preloading because the task applet is started after matchbox and openbox (ie the window manager) is started.

so you could place apps into autoexec and run xresizewindow or something similar to make them smaller, bigger or minimised...
Title: Preloading?
Post by: daniel3000 on February 06, 2007, 05:51:22 am
Quote
actually, I didn't change the task applet much besides giving it a nicer looking icon and adding the autoexec feature. so if it finds autoexec under .matchbox it will run that script. this is actually useful for preloading because the task applet is started after matchbox and openbox (ie the window manager) is started.

so you could place apps into autoexec and run xresizewindow or something similar to make them smaller, bigger or minimised...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=153254\"][{POST_SNAPBACK}][/a][/div]

Wow, great, I didn't realize there is an autostart feature in the new tasks applet!

Great and simple idea.
However, I don't know how to use xresizewindow e.g. on windows like these of KO/PI which change their titles depending on the title of the next appointment etc...
It seems xresizewidow needs the exact window title in order to handle the window.

daniel
Title: Preloading?
Post by: Meanie on February 06, 2007, 05:58:20 am
Quote
Quote
actually, I didn't change the task applet much besides giving it a nicer looking icon and adding the autoexec feature. so if it finds autoexec under .matchbox it will run that script. this is actually useful for preloading because the task applet is started after matchbox and openbox (ie the window manager) is started.

so you could place apps into autoexec and run xresizewindow or something similar to make them smaller, bigger or minimised...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=153254\"][{POST_SNAPBACK}][/a][/div]

Wow, great, I didn't realize there is an autostart feature in the new tasks applet!

Great and simple idea.
However, I don't know how to use xresizewindow e.g. on windows like these of KO/PI which change their titles depending on the title of the next appointment etc...
It seems xresizewidow needs the exact window title in order to handle the window.

daniel
[div align=\"right\"][a href=\"index.php?act=findpost&pid=153306\"][{POST_SNAPBACK}][/a][/div]

if you look at my updated rotate script (x11scr), then you will find an example of how I used xwininfo to get the name of the window to pass to xresizewindow... probably would be faster to write the whole thing in a single app instead of piping several cli apps but I am too lazy to learn the required api calls to make a dedicated app for that ...
Title: Preloading?
Post by: Meanie on February 06, 2007, 06:04:48 am
btw, if you want to ensure only one instance of an app is ever run, then you can add SingleInstance in its .desktop file and use the mb launcher to start it instead of starting the app directly...
Title: Preloading?
Post by: daniel3000 on February 06, 2007, 08:10:17 am
Quote
btw, if you want to ensure only one instance of an app is ever run, then you can add SingleInstance in its .desktop file and use the mb launcher to start it instead of starting the app directly...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=153308\"][{POST_SNAPBACK}][/a][/div]

Hi Meanie,

this would indeed be great if this worked, but i tried this several times, and I couldn't make that work.

No matter if I start that SingleInstance=true .desktop file using

mb-applet-launcher -s --desktop ..../xy.desktop

or without the direct start

mb-applet-launcher --desktop ..../xy.desktop

it always starts a second instance instead of bringing the already open instance to front.

Am I doing something wrong?
Did you make it work somehow?

I took the normal kopi.desktop file (of KO/PI) and added the SingleInstance=True line.

Thanks
daniel
Title: Preloading?
Post by: Drake01 on February 06, 2007, 07:56:13 pm
Quote
Hi guys,

the recent discussion about prelinking brought me to these thoughts:

With a kind of a startup script in X one could indeed "pre-load" often-used apps which should be quickly at hand, such as KA/PI, KO/PI, Zbedic etc.
...
Using the task applet, they are always quickly brought to the foreground (without cycling through all open windows with Alt-Tab).
...
I like this idea and I would love to have a faster way of starting apps.  Part of the reason I settled on the GPE* set of PIM apps is because they are quicker to load.  I came to the C1000 from a Palm-based PDA, which had relatively quick load times for the PIM apps.

Now that I've gotten that disclaimer out of the way...   How well would this work with the limited memory on a Z?  If there are a few of the most frequently used apps already eating up memory, what happens if I want to run another "full-sized" (i.e. large) app?  Will I run out of memory?  Will I need to have a swap partition enabled at all times?  I understand that running swap will reduce general system performance because of I/O.

I'm certainly not trying to say that this is a bad idea.  It just seems that memory utilization may be an issue that needs to be considered.  I remember KA/PI & KO/PI take a while to load, and I'm assuming a large part of that is due to the memory footprint.  Since I'm not currently using these apps, would you be able to post how much memory each consumes when loaded?