Tahr32 "QuickPet" icon placement [SOLVED]

Moderator: Forum moderators

Post Reply
User avatar
greengeek
Posts: 1384
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 535 times
Been thanked: 192 times

Tahr32 "QuickPet" icon placement [SOLVED]

Post by greengeek »

When booting Tahr32 on a netbook - the small screen (1024x600) has problems with the quickpet icon which appears onscreen after Quicksetup finishes.

I find that the quickpet icon overlaps the drive icons and I would like to overcome this problem.

I always boot without savefile so manually repositioning the icon is not a preferred solution - I would like to find out what specifies the final position of the quickpet icon and permanently reprogram it somehow in the main sfs.

Questions:
- Is it ROX that is deciding where to put the icon? Does it just guess where to put the icon or is it choosing the location based on some scripted algorithm that follows the "Puppy Triangle" concept?
- Is the position of the icon specified in the script that places the icon when quicksetup finishes?

- Can i change a script somewhere to ensure that the icon is placed alongside the "connect" icon that sits above it normally?

Thanks for any tips.

Attachments
overlap.jpg
overlap.jpg (9.59 KiB) Viewed 1367 times
Last edited by greengeek on Fri Jan 13, 2023 7:17 am, edited 1 time in total.
User avatar
mikewalsh
Moderator
Posts: 6159
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 795 times
Been thanked: 1981 times

Re: Tahr32 "QuickPet" icon placement

Post by mikewalsh »

@greengeek :-

This is a pretty straight-forward one, Ian. Take a look at the /root/Choices/ROX-filer/PuppyPin file. This file controls the exact, to-the-pixel, positioning of every single icon on your desktop. It also determines the background wallpaper in use.

This is a dynamic, or 'live' file. Any changes made on the desktop are immediately written to the PuppyPin file.

I had a spell - some years ago - of the 'pinboard' periodically going AWOL. If I'd been using the default layout all the time, it would have corrected itself at next boot. However, I use a highly-customized and -personalised layout, and it was really annoying to have to keep setting it all up every time.

Ever since then, I've had scripts in place that save the current state of the PuppyPin file to an external location at every shutdown.....and further scripts that allow me, via a Menu entry, to 'reset' the desktop (if it ever happens again) by overwriting /root/Choices/ROX-filer/PuppyPin with my own version, then re-starting "X". Works a treat.

------------------------------

Your issue probably occurs due to the 'triangle', as you call it, taking its 'x' & 'y' co-ordinates from the top and left-hand edges of the screen.....but the drive icons are positioned from the left-hand & bottom edges of the screen.

ROX 'standardises' icon size to 48x48 if they're larger to begin with. It IS possible to make them smaller to start with, then ROX will use them at this reduced size.

You can restore normal appearance by careful re-positioning of all items on the 'pinboard'; perhaps moving the lines of icons slightly closer together, moving the top line a bit closer to the top edge, the whole triangle a bit closer to the left-hand edge, re-positioning the drive icons closer to the bottom edge. Either do it all manually, then save a copy of the PuppyPin file immediately before shutting down.....then re-master your main SFS to include this instead. OR; carefully work out all your geometry and re-write the PuppyPin file before re-mastering.

Either approach should work.

Mike. ;)

User avatar
greengeek
Posts: 1384
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 535 times
Been thanked: 192 times

Re: Tahr32 "QuickPet" icon placement

Post by greengeek »

mikewalsh wrote: Tue Jan 10, 2023 1:01 am

You can restore normal appearance by careful re-positioning of all items on the 'pinboard'; perhaps moving the lines of icons slightly closer together, moving the top line a bit closer to the top edge, the whole triangle a bit closer to the left-hand edge, re-positioning the drive icons closer to the bottom edge. Either do it all manually, then save a copy of the PuppyPin file immediately before shutting down.....then re-master your main SFS to include this instead. OR; carefully work out all your geometry and re-write the PuppyPin file before re-mastering.

Thanks Mike. I was hoping to avoid manual rearrangement but maybe that is the only way.

Question: What happens if I remaster with the new PuppyPin that includes quickpet - and then boot without savefile? Will there be two quickpet icons: One from the modified PuppyPin and one from whatever creates the icon afer Quickpet runs? Will test and report back.

User avatar
amethyst
Posts: 2418
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 57 times
Been thanked: 506 times

Re: Tahr32 "QuickPet" icon placement

Post by amethyst »

Save the change to an adrv instead of doing a remaster.

User avatar
mikewalsh
Moderator
Posts: 6159
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 795 times
Been thanked: 1981 times

Re: Tahr32 "QuickPet" icon placement

Post by mikewalsh »

@greengeek :-

See, the root of the issue, as I see it, are the dimensions of that netbook's screen. 1024 x 600? That's neither widescreen (16:9) NOR what they call "classic film" (3:2). And it's definitely not the more common older 4:3 standard. It's a weird hodge-podge, necessitated by a niche market that lasted no more than a few years.

You've got the width.....but not a suitably proportioned height to match, rather a "nipped-up" height to work with the form factor. Since Puppy basically works with a variety of the most common screen sizes & aspect ratios - as do most distros, I would imagine - along with ROX's standardised settings for the 'pinboard', I believe this explains why the bottom of your "triangle" is colliding with the drive icons.

Doubtless I could have made the explanation simpler, but I guess you get the drift of what I'm saying. Short version, 'cos your screen is smaller, the geometry needs reducing a bit to fit everything in. Oh, and er.....BTW? Don't bother with the Quickpet icon. As soon as it shows up for the first time, my usual tactic is to delete it. After all, there's a Quickpet Menu entry under Menu->Setup anyway; frankly, I don't see the need to have it on the desktop as well. It's there initially when users are setting their Puppy up for the first time; once you've done so, it's no longer a function you're going to be calling every 5 minutes, is it?

IIRC, the Quickpet icon appears ONCE, and once ONLY; immediately after the PPM has been updated for the first time. And my memory may be playing tricks, at that; it's not often I use the PPM these days.

---------------------------------------------------------

Amethyst's suggestion of an adrv may well be the easier option rather than re-mastering. Never used it myself, 'cos I have ridiculous amounts of RAM and storage, but for your setup - no save-file - an adrv would work well. And many Puppians say it works fine for them.....including mikeslr, who's a real champion of Nic's Utility-Suite!

Mike. ;)

User avatar
mikeslr
Posts: 2963
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 917 times

Re: Tahr32 "QuickPet" icon placement

Post by mikeslr »

Like the Devil, someone --in this case T'Other Mike-- mentioned my name and I appear. :lol:

Here's my :idea: How often do you use Quickpet? My guess is rather often when you're first setting up: installing applications and such; then 'once in a blue moon'. There's no reason to have a Quickpet icon on your desktop, especially on a small screen likely to be busy with open files covering the icon. Quickpet can always be called when you need it via Menu>Setup>Quickpet.

So, Right-Click the Quickpet icon on your desktop> Select Remove Icon(s) and get rid of it. Execute a Save and it's gone for good; or at least until you change your mind. Then, If you want it back you can open Rox to /usr/share/applications and drag the quickpet.desktop file onto your desktop, put it where you want, then Right-Click >Edit Item and Change the text to just read Quickpet, and again execute a Save to preserve your change.

User avatar
greengeek
Posts: 1384
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 535 times
Been thanked: 192 times

Re: Tahr32 "QuickPet" icon placement

Post by greengeek »

Well - I don't use quickpet at all. (which is why this is an annoyance...).

I always boot from the generic pup so quicksetup runs and I always end up seeing this annoying icon appear once quicksetup finishes.

It's highly likely I will have to set up a /root/Startup script (and graft it into the base sfs) to overwrite the PuppyPin file - but that is two wrongs trying to make a right.

And I could build an adrv to overcome this - BUT - I like to save the adrv for real personalisations down the track. (Not my preferred method to overcome faults within the base sfs).

But the question still remains: Why and how is this appearing - and who/what/why decides where the icon is placed?

Must be a script somewhere that triggers the addition of the quickpet icon - and there must be a script somewhere that chooses the left hand column of icons as the best place to put the icon. (If I can't prevent the placement of the icon I at least want to ensure it goes into column 2 - alongside "connect")

Really appreciate all ideas (genuinely!) - but still hoping some old timer remembers how/why/where Puppy decides it must place the quickpet icon in the wrong place :cry:

Burunduk
Posts: 252
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 7 times
Been thanked: 127 times

Re: Tahr32 "QuickPet" icon placement

Post by Burunduk »

greengeek wrote: Thu Jan 12, 2023 8:45 am

But the question still remains: Why and how is this appearing - and who/what/why decides where the icon is placed?

This may be different on Tahr32.

On Fossapup64 9.5, the quickpet icon position is stored in the /root/Choices/ROX-Filer/PuppyPin-norm file in the main sfs:

Code: Select all

  <icon x="32" y="416" label="connect">/usr/local/apps/Connect</icon>
  <icon x="32" y="512" label="quickpet">/usr/share/applications/quickpet.desktop</icon>

It's copied over the /root/Choices/ROX-Filer/PuppyPin file by the /usr/local/bin/pupcheck script at startup.

User avatar
MochiMoppel
Posts: 1236
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 439 times

Re: Tahr32 "QuickPet" icon placement

Post by MochiMoppel »

greengeek wrote: Tue Jan 10, 2023 12:40 am

Questions:
- Is it ROX that is deciding where to put the icon?

Normally yes, in this case not.

Does it just guess where to put the icon

No.

or is it choosing the location based on some scripted algorithm that follows the "Puppy Triangle" concept?

ROX doesn't choose anything

- Is the position of the icon specified in the script that places the icon when quicksetup finishes?

Yes.

- Can i change a script somewhere to ensure that the icon is placed alongside the "connect" icon that sits above it normally?

Yes, if you know the coordinates of the connect icon, you can.

I don't use Tahr and haven't tested, but I can see that Tahr has a script in the Startup folder, /root/Startup/quickpet:

Code: Select all

#!/bin/sh
rox --RPC << EOF
<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2001/12/soap-envelope">
 <env:Body xmlns="http://rox.sourceforge.net/SOAP/ROX-Filer">
 <PinboardAdd>
   <Path>/usr/share/applications/quickpet.desktop</Path>
    <X>32</X>
    <Y>512</Y>
   <Label>quickpet</Label>
   </PinboardAdd>
</env:Body>
</env:Envelope>
EOF
rm /root/Startup/quickpet

This script instructs ROX to put an shortcut to /usr/share/applications/quickpet.desktop on the pinboard, and unfortunately it instructs ROX to place it 512px from the top, which is close to your bottom and overlaps any other icon, Without the <X>32</X> and <Y>512</Y> tags ROX would try to place the icon where it doesn't conflict with other icons.

The script then goes on and distroys itself (rm /root/Startup/quickpet), leaving you wonder who had placed the icon. A pretty evil plot :twisted:

The best thing you can do is to remove the script from the base sfs.
If this is too cumbersome you can still run a small script any time to remove the icon:

Code: Select all

#!/bin/sh
rox --RPC << EOF
<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2001/12/soap-envelope">
 <env:Body xmlns="http://rox.sourceforge.net/SOAP/ROX-Filer">
 <PinboardRemove>
   <Path>/usr/share/applications/quickpet.desktop</Path>
   </PinboardRemove>
</env:Body>
</env:Envelope>
EOF
User avatar
mikewalsh
Moderator
Posts: 6159
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 795 times
Been thanked: 1981 times

Re: Tahr32 "QuickPet" icon placement

Post by mikewalsh »

Burunduk wrote: Thu Jan 12, 2023 10:31 am
greengeek wrote: Thu Jan 12, 2023 8:45 am

But the question still remains: Why and how is this appearing - and who/what/why decides where the icon is placed?

This may be different on Tahr32.

On Fossapup64 9.5, the quickpet icon position is stored in the /root/Choices/ROX-Filer/PuppyPin-norm file in the main sfs:

Code: Select all

  <icon x="32" y="416" label="connect">/usr/local/apps/Connect</icon>
  <icon x="32" y="512" label="quickpet">/usr/share/applications/quickpet.desktop</icon>

It's copied over the /root/Choices/ROX-Filer/PuppyPin file by the /usr/local/bin/pupcheck script at startup.

@Burunduk / @greengeek :-

Hm. Yah, I see what the pupcheck script is doing, but you have to realise, this is several years-worth of Woof-CE development further on from the stage Tahrpup was at when released. Woof-CE had not long been taken over, by the community, from BK's own original "Woof" shortly after Barry stepped-down & handed the reins over to the community.

I'm pretty certain the PuppyPin-norm script doesn't exist in Tahrpup, either.....but it gives us a starting-point. In fact, all this really needs is a modded version of what my own PuppyPin back-up script does at shutdown.

We STILL need to figure out exactly what's putting the icon there in the first place, though.

Mike. :?

User avatar
greengeek
Posts: 1384
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 535 times
Been thanked: 192 times

Re: Tahr32 "QuickPet" icon placement

Post by greengeek »

mikeslr wrote: Thu Jan 12, 2023 12:27 am

There's no reason to have a Quickpet icon on your desktop, especially on a small screen likely to be busy with open files covering the icon. Quickpet can always be called when you need it via Menu>Setup>Quickpet.

Good suggestion thanks - the desktop icon is not a requirement for accessing quickpet itself. It is still there in the menu if I need it.

Burunduk wrote: Thu Jan 12, 2023 10:31 am

On Fossapup64 9.5, the quickpet icon position is stored in the /root/Choices/ROX-Filer/PuppyPin-norm file in the main sfs:

Code: Select all

  <icon x="32" y="416" label="connect">/usr/local/apps/Connect</icon>
  <icon x="32" y="512" label="quickpet">/usr/share/applications/quickpet.desktop</icon>

It's copied over the /root/Choices/ROX-Filer/PuppyPin file by the /usr/local/bin/pupcheck script at startup.

Thanks - this provides a useful method for anyone running Fossa (and probably other recent pups) on a netbook - since the icon x="32" y="512" syntax could be replaced with something like icon x="32" y="416" to get the icon alongside the "connect" icon as I thought would be acceptable if I couldn't get rid of it completely.

.

MochiMoppel wrote: Thu Jan 12, 2023 11:47 am

I don't use Tahr and haven't tested, but I can see that Tahr has a script in the Startup folder, /root/Startup/quickpet:

Code: Select all

#!/bin/sh
rox --RPC << EOF
<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2001/12/soap-envelope">
 <env:Body xmlns="http://rox.sourceforge.net/SOAP/ROX-Filer">
 <PinboardAdd>
   <Path>/usr/share/applications/quickpet.desktop</Path>
    <X>32</X>
    <Y>512</Y>
   <Label>quickpet</Label>
   </PinboardAdd>
</env:Body>
</env:Envelope>
EOF
rm /root/Startup/quickpet

This script instructs ROX to put an shortcut to /usr/share/applications/quickpet.desktop on the pinboard, and unfortunately it instructs ROX to place it 512px from the top, which is close to your bottom and overlaps any other icon, Without the <X>32</X> and <Y>512</Y> tags ROX would try to place the icon where it doesn't conflict with other icons.

Many thanks for the indepth explanation. It is nice to be able to understand what is going on behind the scenes.

The script then goes on and distroys itself (rm /root/Startup/quickpet), leaving you wonder who had placed the icon. A pretty evil plot :twisted:

What a dastardly deed indeed! I had no hope of finding such an invisible enemy myself. Never thought of inspecting the original sfs for something that no longer existed in the running pup. :oops:

The best thing you can do is to remove the script from the base sfs.

Done! Posting from it now - and problem solved. Thanks!

you can still run a small script any time to remove the icon:

Code: Select all

#!/bin/sh
rox --RPC << EOF
<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2001/12/soap-envelope">
 <env:Body xmlns="http://rox.sourceforge.net/SOAP/ROX-Filer">
 <PinboardRemove>
   <Path>/usr/share/applications/quickpet.desktop</Path>
   </PinboardRemove>
</env:Body>
</env:Envelope>
EOF

Awesome - thanks for the syntax. I have been wanting to know more about soaping and these examples give me a good starting point.
Cheers!

User avatar
mikewalsh
Moderator
Posts: 6159
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 795 times
Been thanked: 1981 times

Re: Tahr32 "QuickPet" icon placement [SOLVED]

Post by mikewalsh »

@MochiMoppel :-

I'll echo greengeek. Thanks for the explanation.

Explains why I could never locate it, either. If you constantly run without a save-file/folder, booting pristine every time, then it's always there. Most people will of course create a 'save' of some kind at first run; it's a true "one-shot wonder", since existing for "only" the first session is just long enough to get copied into the save, thus a permanent part of the PuppyPin file.

And with its "Mission Impossible"-style self-destruct capability, you will of course never find it in a million years.....

Lovely piece of detective work, mate! :thumbup:

Mike. ;)

Post Reply

Return to “Tahr”