Get ROX to refresh/restart desktop for new link.

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

Get ROX to refresh/restart desktop for new link.

#1 Post by sunburnt »

I made a "edit pin board" utility to add & remove ROX's desktop links.
Restarting JWM didn't show a new link, restarting Xwin was nessasary.

Is there a way to get ROX to reread the files: PuppyPin & globicons?

To run: "restartwm" will restart Xwin, but is it the only way to show a new shortcut?

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#2 Post by Dougal »

Try searching for my post about using Rox-2.4.1 with the old Rox as pinboard.

I created a script named "desktop" which added links to the pinboard and then refreshed it.

If I'm not mistaken what I did was kill the pinboard and then run it again.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#3 Post by GuestToo »

if you are running Rox 1.2, this should work:

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

if you are running Rox 2.x, use -p instead of -op
i don't think there's a better way to do it

with Rox 2.5, you can add and remove Rox desktop icons from the command line, using SOAP

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#4 Post by sunburnt »

Dougal; I looked at desktop & didn't see it, looking at refresh-pin.sh it looks like it.
But the last command is the same as GuestToo's suggestion:
pinboard -o -p /root/Choices/ROX-Filer/PuppyPin

I hoped that killing the pinboard would work for ALL ROX versions.
Do you think that refresh-pin.sh will work for all the ROX versions?

GuestToo; I'd hoped this would work across all Puppies.
I tried getting the ROX version to adjust the command so it would work,
but ROX will only echo it, not pipe or assign the string to a variable (WEARD).


This is part of a standard DotPup installer setup to
automate the adding & removing of shortcuts, menu items, etc.
Being for DotPups & other install types, it has to work for Puppies 1.0.7 - 2.1.0

The current DotPup is a Login manager to mount user's save files.
I'd add Logout to the menu, but there's too many types, ROX's pinboard is the only common item.

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#5 Post by GuestToo »

the trouble is that the latest version of Rox have incompatibilities with older versions of Rox

older versions of Rox need the -o option to work with some window managers, or there can be strange effects, like a task bar button for every icon on the desktop

newer versions of Rox do not use the -o option, the option is set in the Options window ... but if you use the -o option with a newer version of Rox, it will pop up a warning message window

maybe it would be easy to hack the source, to suppress the warning message ... that would make the older and newer versions more compatible ... i haven't tried it

it should be easy to workaround the problem ... for example:

if rox --version 2> /dev/stdout | grep 'ROX-Filer 1'
then
pinboard -op /root/Choices/ROX-Filer/PuppyPin
else
pinboard -p /root/Choices/ROX-Filer/PuppyPin
fi

i think this should work

actually, it might be good to make that a script, and call the script from .xinitrc, so that it would be easy to change the desktop configuration ... maybe call the script "show-desktop" or something

also, if the Rox pinboard was already started with the -o option, and is still running, then the -o option may not be needed if you restart the pinboard ... i haven't verified this, though

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#6 Post by Pizzasgood »

Pipes seem to work fine for me with version 2.4.1.

Code: Select all

sh-3.1# rox -v | grep "ROX-Filer 2"
ROX-Filer 2.4.1
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#7 Post by sunburnt »

Thanks guys, I'll check out GuestToo's suggestions.

Pizzasgood; I'm using EmptyCrust 1.0.7 & ROX 1.2.2 just won't do anything but echo the -v switch.
I tried piping, assigning, & redirecting, no go...

As I said, this is for a DotPup installer, so modifing Puppy isn't an option.

There seems to be no 1 easy way to provide a GUI launch for a new app. for all the Puppy versions & variants.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#8 Post by sunburnt »

Foot Note:

GuestToo's idea of using just: "rox -p" worked great in Xterm.
But when I added it to the script it converted the pinboard to XML wiping out the icons.
Restarting Xwin put it all back the way it was, I think I'll just restart Xwin...

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#9 Post by GuestToo »

that is another of the incompatibilities between the older and newer Roxes ... another is that the newer Rox requires info-mime-database ... and where the default config files are kept

the older Rox keeps the config files in $HOME/Choices ... the newer Roxes keep the config files in $HOME/.config/rox.sourceforge.net

if you run the newer Rox for the first time, and it does not have it's own config files, it will convert the config files in /root/Choices to the newer format ... the older Rox won't like that

the solution is for the newer Rox to have it's own config files ... i think if the newer Rox has it's own config files in /root/.config, that it will leave /root/Choices alone

i'm not sure what you are trying to do, but i think this is what you are doing:

i think you want a program to add or remove an icon to the desktop, from a script

Puppy is using /root/Choices/ROX-Filer/PuppyPin for the pinboard file ... this is being used by both the older and newer versions of Rox

the format of the pinboard file is the same for the older and newer Roxes, so they can share the file without problems ... the newer Rox adds the wallpaper configuration to the pinboard file, but the older Rox ignores it, so it seems to be ok, they can share the pinboard file

if only the older Rox is installed, and you restart the pinboard using the -o option, it should work ok

if only the newer Rox is installed, and you restart the pinboard without the -o option, it should work ok

if the older Rox is installed, and the newer Rox was installed from my dotpup package, each Rox version should be able to run independently without interfering with each other ... so you should be able to run one or the other or both at the same time, with no problems ... in this case, which version of Rox is running as the default will be decided by the wrapper script /usr/local/bin/rox ...which ever Rox is the default Rox, your program just has to edit /root/Choices/ROX-Filer/PuppyPin and restart the pinboard ... it should check the version of Rox to see whether to use -o or not ... the older Rox probably needs -o, the newer Rox pops up an annoying message if you use the -o option

in other words, if the newer Rox is upgrading the older Rox's config files, it's not because of your pinboard program, it's because the newer Rox was not installed properly so that it will coexist with the older Rox

it never occurred to me before, but it might be easy to hack the source to prevent the annoying message from popping up when the newer Rox is run with the -o option ... that would make the older and newer Roxes a little more compatible with each other

it should be easy to work around the problem by checking the version, and restarting the pinboard with the -o option for the older Rox and without the -o option for the newer Rox

if the newer Rox is changing the older Rox's config files to the newer format it is not because of the -o option ... it is because you have a newer Rox installed and it was not setup with it's own config files ... the older and newer Rox can coexist and leave each other's config files alone

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#10 Post by Dougal »

Sunburnt:

Code: Select all

if [ ! `fgrep /root/.xinitrc 'rox -op /root/Choices/ROX-Filer/PuppyPin'` = "" ] ; then
do the -op thing
elif [ ! `fgrep /root/.xinitrc 'rox -p /root/Choices/ROX-Filer/PuppyPin'` = "" ] ; then
do the -p thing
fi
(or something of the kind...)
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#11 Post by GuestToo »

i uploaded a hacked Rox that ignores the -o option ... see: http://www.murga.org/~puppy/viewtopic.php?t=11405

Post Reply