Author |
Message |
Sky Aisling

Joined: 27 Jun 2009 Posts: 1273 Location: Port Townsend, WA. USA
|
Posted: Sun 16 Dec 2018, 15:00 Post subject:
How to position a startup app on Desktop? [SOLVED] Subject description: Startup app position on Desktop? |
|
Hello,
Machine: HP Pavilion dm1 (64bit) RAM 4GB Display 1366x768 pixels
Distro: DPup(32bit)-7.5 Stretch
How do I position a startup app on the desktop in the position I choose?
Do I change the code in the app (in this case OSMO)?
Is this the correct code to change?
Or is there an easier way?
Location of app placed in startup: /user/bin/osmo
Code: | #!/bin/bash
killall osmo 2>/dev/null
SCRNXY=$(xwininfo -root | grep -o '\-geometry .*' | tr -s ' ' | cut -f 2 -d ' ' | cut -f 1 -d '+')
SCRN_X=$(echo -n "$SCRNXY" | cut -f 1 -d 'x')
SCRN_Y=$(echo -n "$SCRNXY" | cut -f 2 -d 'x')
GUI_X=$(expr $SCRN_X - 540)
GUI_Y=$(expr $SCRN_Y - 600)
sed -i "s/^.*window_x.*$/ <window_x>$GUI_X<\/window_x>/" $HOME/.osmo/config.xml
sed -i "s/^.*window_y.*$/ <window_y>$GUI_Y<\/window_y>/" $HOME/.osmo/config.xml
osmo |
Thank you in advance for any suggestions.
Description |
|

Download |
Filename |
Desired-Desktop-Position1.png |
Filesize |
124.32 KB |
Downloaded |
239 Time(s) |
Description |
|

Download |
Filename |
UnDesired-Desktop-Position2.png |
Filesize |
114.08 KB |
Downloaded |
206 Time(s) |
|
Back to top
|
|
 |
Sky Aisling

Joined: 27 Jun 2009 Posts: 1273 Location: Port Townsend, WA. USA
|
Posted: Tue 18 Dec 2018, 02:49 Post subject:
How to position a startup app on Desktop? [SOLVED] Subject description: /usr/bin/osmo correct exectutable |
|
My mistake.
I accidentally placed /usr/bin/osmo-reset into startup as the executable rather than /usr/bin/osmo into startup.
Apparently the ROX filer can remember where the window is placed from the last action. I aligned the frame where I wanted it, closed it, then placed /usr/bin/osmo into startup.
The osmo executable now presents itself in my choice of position on the desktop screen.
Sky
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6995 Location: Auckland, New Zealand
|
Posted: Tue 18 Dec 2018, 06:18 Post subject:
|
|
Glad your problem is sorted.
FYI rox filer is just a filer - it has nothing to do with placement of any other program's windows.That is the job of your window manager (typically JWM in Puppy).
But many programs will remember their previous position themselves - the code to do so is very simple for a GTK program. You may find if you look at Osmo''s configuration file that it is stored in there.
If you had a program that didn't restore its own geometry you could look at defining it in your window manager configuration. Alternatively, there is a standard "geometry" command line option that GTK programs usually accept, and in an extreme case there are other tools you can use to automatically position a window after it starts.
_________________ Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
|
Back to top
|
|
 |
Sky Aisling

Joined: 27 Jun 2009 Posts: 1273 Location: Port Townsend, WA. USA
|
Posted: Tue 18 Dec 2018, 10:05 Post subject:
How to position a startup app on Desktop? [SOLVED] Subject description: Clarification of ROX filer and JWM functions by disciple |
|
Thank you, disciple,
Your explanation is helpful. I wish I had time to truly understand the structure of a Puppy and the Linux system.
Actually, I have all the time in the world, it's just that I'm in the final run at this fantastic life and I'm choosy on where I spend my remaining time.
Sky
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6995 Location: Auckland, New Zealand
|
Posted: Tue 18 Dec 2018, 15:31 Post subject:
|
|
disciple wrote: | But many programs will remember their previous position themselves - the code to do so is very simple for a GTK program. You may find if you look at Osmo''s configuration file that it is stored in there. |
The window geometry itself I mean, not the code
_________________ Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
|
Back to top
|
|
 |
Sky Aisling

Joined: 27 Jun 2009 Posts: 1273 Location: Port Townsend, WA. USA
|
Posted: Tue 18 Dec 2018, 21:19 Post subject:
How to position a startup app on Desktop? [SOLVED] Subject description: Desktop Image with app in position |
|
Here is the finished product of the app positioned as I wanted it to appear.
I'll use the blank space to the left for a couple of other apps that are used a lot. The upper tray is hidden with mouse over activation.
Description |
|

Download |
Filename |
OSMO-background1.png |
Filesize |
234.04 KB |
Downloaded |
244 Time(s) |
|
Back to top
|
|
 |
|