No pinboard control from cli

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

No pinboard control from cli

Post by JASpup »

The command to clear the pinboard rox -p= does nothing.

Then I overwrote the pinboard and nothing changed.

Assigning a new pinboard does nothing.

Code: Select all

rox -p /root/Choices/ROX-Filer/PuppyPin

contents of file:

Code: Select all

<?xml version="1.0"?>
<pinboard>
  <icon x="1248" y="736" label="Trash">/usr/local/apps/Trash</icon>
</pinboard>

right side of screen:

pinboard-control.png
pinboard-control.png (16.3 KiB) Viewed 426 times

only icon present should be trash

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: No pinboard control from cli

Post by JASpup »

Clicking on the desktop toggles the removed icons on and off.

Attachments
xenial-pinboard.gif
xenial-pinboard.gif (59 KiB) Viewed 417 times

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

step
Posts: 546
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 57 times
Been thanked: 198 times
Contact:

Re: No pinboard control from cli

Post by step »

JASpup wrote: Wed Dec 22, 2021 9:13 am

The command to clear the pinboard rox -p= does nothing.

If you expected -p= to remove icons from the desktop pinboard you're off track. According to rox --help:

Usage: ROX-Filer/AppRun [OPTION]... [FILE]...
Open each directory or file listed, or the current working
directory if no arguments are given.
...
-p, --pinboard=PIN use pinboard PIN as the pinboard

So -p= is saying to use the "" pinboard file as the pinboard. Since file "" doesn't exist nothing happens.

Then I overwrote the pinboard and nothing changed.

How did you overwrite the pinboard? Did you edit the pinboard file directly? That won't do. Rox owns that file and keeps an in-memory copy of it. You edits on the disk copy will be ignored.

Assigning a new pinboard does nothing.

Code: Select all

rox -p /root/Choices/ROX-Filer/PuppyPin

Yes it does. If rox isn't running the command above starts rox with that pinboard file. But if rox is already running, the command above adds a second pinboard file to rox. Then confusion is likely to ensue. I suspect that's what happening in your second post.

It helps to know how rox works. When the computer starts there is no rox running at all. The first time a rox command is given, then a _resident_ rox starts and does NOT end until you either shut down your computer or run killall ROX-Filer (don't just now). While the resident rox is running, whenever you type a new rox command, a _transient_, non-resident rox starts, passes the command to the resident rox and ends. The _resident_ rox performs the command that the _transient_ rox passed.

So, how does one change the contents of the rox pinboard file programmatically? Two methods.

If you don't mind restarting you desktop entirely (all rox windows close, the pinboard disappears then reappers) you can:
1. make a copy of the default pinboard file
2. edit your copy
3. killall ROX-Filer
4. replace the default pinboard file with your edited copy
5. restart rox: rox -p /root/Choices/ROX-Filer/PuppyPin (assuming that's the default pinboard file referred to in steps 1 and 4)

Instead if you don't want to kill ROX-Filer in the process you can use the ROX SOAP IRP mentioned in the rox help file (press F1 in a rox window or google it). Here's the gist of the relevant methods:

Pinboard([Name]) Display pinboard Name on the desktop background. Name can be a name in ~/.config/rox.sourceforge.net/ROX-Filer (eg, MyPinboard) or a full pathname. If not given, the pinboard is turned off.

PinboardAdd(Path, [X, Y, Label, Shortcut, Args, Update]) Add Path to the pinboard with the (optional) label Label. If X or Y are negative or not given, the icon is placed automatically. The X and Y parameters then indicate where the icon should go (X=-1: left, X=-2: right, Y=-1: top, Y=-2: bottom). If X and Y are given, its position is (X, Y). If Shortcut is given it is the keyboard shortcut to trigger this item. If Args is given it is the argument string to append to the item when run if it is a program. If Update is true and there is already an icon for the given path on the pinboard, the new values will be filled in instead of adding a new icon.

PinboardRemove(Path, [Label]) Remove Path from the pinboard. If Label is given then this must match the label of the item. If more than one item matches, only one is removed.

The rox Help file includes coding examples.

User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: No pinboard control from cli

Post by JASpup »

step wrote: Wed Dec 22, 2021 12:49 pm

If rox isn't running the command above starts rox with that pinboard file. But if rox is already running, the command above adds a second pinboard file to rox. Then confusion is likely to ensue. I suspect that's what happening in your second post.

I think you're onto something. Closing open apps affected the standard appearance of the pinboard, like a terminal waiting for a process to exit to return to prompt.

In my 32 experience rox -p= clears the pinboard, i.e., no pinboard, pitch black.

The starting pinboard reflected all the icons.

I turned it off with the command.

Even though it appeared to stay on, I overwrote it with a pinboard containing just trash.

Then I reactivated it.

It looked the same, except it would now toggle by desktop clicks.

I restarted X and desktop looked as it should, but the goal is I should be able to manipulate it successfully by turning it off first.

Formally:

  • Turn pinboard off

  • Copy the new pinboard as the standard file

  • Reactivate standard pinboard

Is the kill-all necessary when I have not needed it before? Otherwise my standard practice seems similar to your instructions.

The sum is I do not know what happened, thus how to avoid it. If I cannot turn off the pinboard in the future I will try killing it.

I like to learn but am more an intermediate, non-coder.

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: No pinboard control from cli

Post by williams2 »

The Rox manual documents the pinboard.

file:///usr/local/apps/ROX-Filer/Help/Manual.html#id2456493

Right click any icon on the desktop, select Rox-Filer -> Manual

In the Table of Contents near the top of the manual, click 2. Invoking Pinboard support

rox --help tells you that --pinboard and -p do the same thing.

The manual tells you that rox -p= turns the pinboard off.
If it does not, the pinboard config file /root/Choices/ROX-Filer/PuppyPin may be corrupted.

Normally, rox runs as 1 instance. The pinboard and any filer window all belong to that instance.
Rox will not create more than 1 desktop (pinboard.)
More than 1 instance of rox can be started, by running rox -n or rox --new
Normally, only 1 instance of rox should be running.
Running rox in a container might cause there to be more than 1 instance of rox.

rox -p= turns off the pinboard.
rox -p /root/Choices/ROX-Filer/PuppyPin shows the default pinboard.

You can make changes to the PuppyPin file and then
run rox -p /root/Choices/ROX-Filer/PuppyPin to make the changes take effect.
It's not really necessary to runrox -p= first.

killall -q ROX-Filer should kill all instances of rox, if there is more than 1 instance.

I have a script named pp

Code: Select all

#!/bin/sh
cd
killall -q ROX-Filer
rox -p /root/Choices/ROX-Filer/PuppyPin &>/dev/null

If I type pp in a terminal, it restarts the pinboard if rox crashed, or restarts it if already running.
This will also close any roxfiler windows.
Normally, the killall line is really not necessary.
Pressing Winkey+T often is configured to pop up a terminal.

If the PuppyPin file is corrupted, rox may behave strangely.

User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: No pinboard control from cli

Post by JASpup »

williams2 wrote: Wed Dec 22, 2021 7:30 pm

You can make changes to the PuppyPin file and then
run rox -p /root/Choices/ROX-Filer/PuppyPin to make the changes take effect.
It's not really necessary to runrox -p= first.

killall -q ROX-Filer should kill all instances of rox, if there is more than 1 instance.

I have a script named pp

Code: Select all

#!/bin/sh
cd
killall -q ROX-Filer
rox -p /root/Choices/ROX-Filer/PuppyPin &>/dev/null

If I type pp in a terminal, it restarts the pinboard if rox crashed, or restarts it if already running.
This will also close any roxfiler windows.
Normally, the killall line is really not necessary.
Pressing Winkey+T often is configured to pop up a terminal.

If the PuppyPin file is corrupted, rox may behave strangely.

My pinboard might have been corrupted.

The standard pinboard-off procedure to edit the pinboard by text I got from you in a discussion about soap also as a method of creating direct launchers on the pinboard: viewtopic.php?p=38824#p38824

How I use it normally:

My adrv creation puts quickpet on the desktop even when it is not in the pupsave from which it is made. I also get a 2nd instance of pmcputemp.

It might be uniquely a part of a startup script. Pinboard saves a right-click remove and imposes an ordained desktop. It also helps removing partitions without settings, whereby Places still works and any new partitions attached appear on a clean desktop.

In this case, all those launchers were put in a new tray.

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

Post Reply

Return to “Users”