Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 21 Oct 2019, 11:23
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Eye Candy
How to position a startup app on Desktop? [SOLVED]
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
Sky Aisling


Joined: 27 Jun 2009
Posts: 1273
Location: Port Townsend, WA. USA

PostPosted: 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, Smile
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.
Desired-Desktop-Position1.png
Description 
png

 Download 
Filename  Desired-Desktop-Position1.png 
Filesize  124.32 KB 
Downloaded  184 Time(s) 
UnDesired-Desktop-Position2.png
Description 
png

 Download 
Filename  UnDesired-Desktop-Position2.png 
Filesize  114.08 KB 
Downloaded  160 Time(s) 
Back to top
View user's profile Send private message 
Sky Aisling


Joined: 27 Jun 2009
Posts: 1273
Location: Port Townsend, WA. USA

PostPosted: 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. Very Happy

Sky
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6980
Location: Auckland, New Zealand

PostPosted: 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
View user's profile Send private message 
Sky Aisling


Joined: 27 Jun 2009
Posts: 1273
Location: Port Townsend, WA. USA

PostPosted: 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.
Smile

Sky
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6980
Location: Auckland, New Zealand

PostPosted: 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
View user's profile Send private message 
Sky Aisling


Joined: 27 Jun 2009
Posts: 1273
Location: Port Townsend, WA. USA

PostPosted: 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.
OSMO-background1.png
Description 
png

 Download 
Filename  OSMO-background1.png 
Filesize  234.04 KB 
Downloaded  211 Time(s) 
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Eye Candy
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0552s ][ Queries: 13 (0.0243s) ][ GZIP on ]