How to position a startup app on Desktop? [SOLVED]

Themes, icons, wallpapers, etc.
Post Reply
Message
Author
User avatar
Sky Aisling
Posts: 1368
Joined: Sat 27 Jun 2009, 23:02
Location: Port Townsend, WA. USA

How to position a startup app on Desktop? [SOLVED]

#1 Post by Sky Aisling »

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: Select all

#!/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.
Attachments
Desired-Desktop-Position1.png
(124.32 KiB) Downloaded 378 times
UnDesired-Desktop-Position2.png
(114.08 KiB) Downloaded 338 times

User avatar
Sky Aisling
Posts: 1368
Joined: Sat 27 Jun 2009, 23:02
Location: Port Townsend, WA. USA

How to position a startup app on Desktop? [SOLVED]

#2 Post by Sky Aisling »

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. :D

Sky

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#3 Post by disciple »

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

User avatar
Sky Aisling
Posts: 1368
Joined: Sat 27 Jun 2009, 23:02
Location: Port Townsend, WA. USA

How to position a startup app on Desktop? [SOLVED]

#4 Post by Sky Aisling »

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

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#5 Post by disciple »

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

User avatar
Sky Aisling
Posts: 1368
Joined: Sat 27 Jun 2009, 23:02
Location: Port Townsend, WA. USA

How to position a startup app on Desktop? [SOLVED]

#6 Post by Sky Aisling »

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.
Attachments
OSMO-background1.png
(234.04 KiB) Downloaded 356 times

Post Reply