Rox Bookmarks As Entry On JWM Pipe Menu [Solved]

Booting, installing, newbie
Message
Author
User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

Rox Bookmarks As Entry On JWM Pipe Menu [Solved]

#1 Post by Puppus Dogfellow »

it'd be cool and convenient and make the desktop feel better integrated. can it be done? if so, how?

thanks in advance.

edit: "Rox Bookmarks As Menu Button on JWM Tray/Entry on Pipe Menu" has been renamed and declared solved.
Last edited by Puppus Dogfellow on Wed 07 May 2014, 07:50, edited 4 times in total.

User avatar
puppy_apprentice
Posts: 299
Joined: Tue 07 Feb 2012, 20:32

#2 Post by puppy_apprentice »

It is possible. Bookmarks are stored in:

Code: Select all

/root/.config/rox.sourceforge.net/ROX-Filer/
folder as .xml file. This file has to be parsed and links to your locations added to menu etc. I will try to make a rox-app that will use your locations as menu entries when you click on home icon.

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#3 Post by Puppus Dogfellow »

puppy_apprentice wrote:It is possible. Bookmarks are stored in:

Code: Select all

/root/.config/rox.sourceforge.net/ROX-Filer/
folder as .xml file. This file has to be parsed and links to your locations added to menu etc. I will try to make a rox-app that will use your locations as menu entries when you click on home icon.

wow. cool. and thanks.

User avatar
puppy_apprentice
Posts: 299
Joined: Tue 07 Feb 2012, 20:32

#4 Post by puppy_apprentice »

Ok, app is ready. But important!!! Sometimes Rox saves bookmarks that my script can't parse bookmarks file correctly (bookmarks are stored in two lines, should be stored line by line, i've noticed this behavior only once so far). So if u choose "Update bookmarks" option and after you click right mouse button on file icon u don't see anything, open rox-filler from bar menu and use option "Edit bookmarks", don't edit anything, just close edit options, Rox should now save boomarks better. Next go to app file folder (use rox from bar menu), open console (via: Window>Terminal here) and write

Code: Select all

./AppRun --update
You can make a script wit this command and save it in

Code: Select all

/root/my-applications/bin/

#!/bin/bash
/usr/local/apps/file/AppRun --update
and run it when file app is broken.
Or the simplest metod:
Click right mouse button on file icon and choose "Edit item", next write in Argumments field

Code: Select all

--update
click "OK" and click on file icon. If bookmarks were added to menu open "Edit item" again an make Arguments field empty.
Attachments
file_app.png
(92.17 KiB) Downloaded 376 times
app_file.tar.gz
(1003 Bytes) Downloaded 222 times
Last edited by puppy_apprentice on Fri 18 Apr 2014, 05:39, edited 5 times in total.

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#5 Post by Puppus Dogfellow »

thanks, puppy-apprentice. looking forward to testing it out.
:D

where does it go and does it go there unzipped? which app folder?

what command activates it? do i just click on it or is it being the proper location enough for puppy to pick it up?


sorry for the questions and thanks again...
Last edited by Puppus Dogfellow on Thu 17 Apr 2014, 23:02, edited 1 time in total.

User avatar
puppy_apprentice
Posts: 299
Joined: Tue 07 Feb 2012, 20:32

#6 Post by puppy_apprentice »

Everything is on the screenshot ;)

But:

1) extract app

2) copy whole folder to:

Code: Select all

/usr/local/apps/
3) click right mouse button on file icon, and choose "Edit item", next in first field write:

Code: Select all

/usr/local/apps/file
4) next click right mouse button on file icon and choose option "Update bookmarks"

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#7 Post by Puppus Dogfellow »

puppy_apprentice wrote:Everything is on the screenshot ;)

But:

1) extract app

2) copy whole folder to:

Code: Select all

/usr/local/apps/
3) click right mouse button on file icon, and choose "Edit item", next in first field write:

Code: Select all

/usr/local/apps/file
4) next click right mouse button on file icon and choose option "Update bookmarks"
it works. thanks yet again for this. (tested in precise 571, fwiw. will put it on my 561 and 55 machines as well...)

is there any way to make it (the new right click on home behavior) a JWM entry?

User avatar
puppy_apprentice
Posts: 299
Joined: Tue 07 Feb 2012, 20:32

#8 Post by puppy_apprentice »

I will try to save all links to puppy menu. But maybe after holidays. Maybe somebody will take my script and rewrite it. It is normal bash script (GPL Licence).

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#9 Post by Puppus Dogfellow »

having a bit of trouble with it on a 561 machine...so far from two separate locations (usr/local/apps; usr/share/apps) i can't get it to update/show the whole list on right click...tried both methods and will mess around with it some more later.

edit: working well now on 561 as well; 5.5 was an instant install, bookmarks update at a click first try, second try,...

nicely done!
puppy_apprentice wrote:I will try to save all links to puppy menu. But maybe after holidays. Maybe somebody will take my script and rewrite it. It is normal bash script (GPL Licence).
thanks, cool, and enjoy the holidays.

[i'm upping your script to my repo's Utilities, etc folder. i may eventually add it to two others (file managers and desktop) as well. again, thanks.]

User avatar
puppy_apprentice
Posts: 299
Joined: Tue 07 Feb 2012, 20:32

#10 Post by puppy_apprentice »

Puppus Dogfellow wrote:having a bit of trouble with it on a 561 machine...so far from two separate locations (usr/local/apps; usr/share/apps) i can't get it to update/show the whole list on right click...tried both methods and will mess around with it some more later.

edit: working well now on 561 as well; 5.5 was an instant install, bookmarks update at a click first try, second try,...

nicely done!
I've rewrited info about problems in former post, now should be more clear what to do when Rox save bookmarks (it's could happen when you add new location to Rox bookmarks) in the format that my Sed command doesen't understand (maybe somebody will write better Sed formula to parse xml data).


thanks, cool, and enjoy the holidays.
You too.
i'm upping your script to my repo's Utilities, etc folder. i may eventually add it to two others (file managers and desktop) as well. again, thanks.]
My app should work on every distro with Rox-Filer as a file/desktop manager (simillar to Puppy). Puppy developers could try to make applet called "Places" or "Lcations".

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#11 Post by Puppus Dogfellow »

update: failing on three computers all in the same way: it shows the book marks on right click, attempts to go to the correct location, fails and goes to ~.

...one in five at best works.

anyway, here's your appfileupdatescript to save someone a copy/paste.

(rainman out)
:oops: :)

User avatar
puppy_apprentice
Posts: 299
Joined: Tue 07 Feb 2012, 20:32

#12 Post by puppy_apprentice »

Puppus Dogfellow wrote:update: failing on three computers all in the same way: it shows the book marks on right click, attempts to go to the correct location, fails and goes to ~.

...one in five at best works.

anyway, here's your appfileupdatescript to save someone a copy/paste.

(rainman out)
:oops: :)
Please check if those bookmarks are point to real folders, maybe someone made bookmark but later deleted folder or names of those folders have chars that my parser doesn't extract (i've used ".*" pattern so it should extract letters/numbers and more). In my script there is a "if" block that check if folder exists if not it will open home directory (~):

Code: Select all

	*) if [ -d $option ]
           then
             /usr/local/bin/rox $option #browse folder if exists
           else
             /usr/local/bin/rox #if not just start rox
           fi;;
Another posibility is that those folders have "space" in name. So try to change above lines in AppRun to:

Code: Select all

	*) if [ -d $option ]
           then
             /usr/local/bin/rox "$option" #browse folder if exists, maybe "" help for folders which names have spaces
           else
             /usr/local/bin/rox #if not just start rox
           fi;;
Could you post AppInfo.xml file from those computers where my app doesen't work corectly. It is stored in app folder (/usr/local/apps/file). Thanks.

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#13 Post by Puppus Dogfellow »

puppy_apprentice wrote:
Puppus Dogfellow wrote:update: failing on three computers all in the same way: it shows the book marks on right click, attempts to go to the correct location, fails and goes to ~.

...one in five at best works.

anyway, here's your appfileupdatescript to save someone a copy/paste.

(rainman out)
:oops: :)
Please check if those bookmarks are point to real folders, maybe someone made bookmark but later deleted folder or names of those folders have chars that my parser doesn't extract (i've used ".*" pattern so it should extract letters/numbers and more). In my script there is a "if" block that check if folder exists if not it will open home directory (~):

Code: Select all

	*) if [ -d $option ]
           then
             /usr/local/bin/rox $option #browse folder if exists
           else
             /usr/local/bin/rox #if not just start rox
           fi;;
Another posibility is that those folders have "space" in name. So try to change above lines in AppRun to:

Code: Select all

	*) if [ -d $option ]
           then
             /usr/local/bin/rox "$option" #browse folder if exists, maybe "" help for folders which names have spaces
           else
             /usr/local/bin/rox #if not just start rox
           fi;;
Could you post AppInfo.xml file from those computers where my app doesen't work corectly. It is stored in app folder (/usr/local/apps/file). Thanks.
the locations are real (nearly all, anyway) and nobody but me messes around with these machines. another error has started to occur on one of the machines (the one i'm at now): it pops up saying the location doesn't exist then goes to the folder (that in fact exists) anyway. figured maybe this could clue you in on what's going wrong...

here's the appinfo.xml for this one:

Code: Select all

<?xml version="1.0"?>
<AppInfo>
  <Summary>Browse for files</Summary>
  <Summary xml:lang="pl">Przeglądaj pliki</Summary>
  <Summary xml:lang="ru"></Summary>
  <Summary xml:lang="ja"></Summary>
  <Summary xml:lang="zh_CN"></Summary>
  <About>
    <Purpose>Manage Rox-Filer</Purpose>
    <License>GPL: /usr/share/doc/legal</License>
    <Version>2014-04-15</Version>
    <Authors>puppy_apprentice</Authors>
    <Homepage>http://puppylinux.org/</Homepage>
  </About>
  <AppMenu>
      <Item option="/mnt/sda2/Downloads/DWNLDSFFF">
    <Label>/mnt/sda2/Downloads/DWNLDSFFF</Label>
    </Item>
      <Item option="/mnt/sda4/all pets">
    <Label>/mnt/sda4/all pets</Label>
    </Item>
      <Item option="SpiderOak Hive">
    <Label>SpiderOak Hive</Label>
    </Item>
      <Item option="/root/my-documents/Text">
    <Label>/root/my-documents/Text</Label>
    </Item>
      <Item option="mycopy">
    <Label>mycopy</Label>
    </Item>
      <Item option="/mnt/home">
    <Label>/mnt/home</Label>
    </Item>
      <Item option="Puppy Linux Mini Repository">
    <Label>Puppy Linux Mini Repository</Label>
    </Item>
      <Item option="/mnt/sda3/copyonsda3/Copy">
    <Label>/mnt/sda3/copyonsda3/Copy</Label>
    </Item>
      <Item option="/mnt/home/precise-5.6.1">
    <Label>/mnt/home/precise-5.6.1</Label>
    </Item>
      <Item option="Dropbox">
    <Label>Dropbox</Label>
    </Item>
      <Item option="0UTSIDEjamonSDA3">
    <Label>0UTSIDEjamonSDA3</Label>
    </Item>
      <Item option="DBmy-documents">
    <Label>DBmy-documents</Label>
    </Item>
      <Item option="RTmy-documents">
    <Label>RTmy-documents</Label>
    </Item>
      <Item option="SOHmy-documents">
    <Label>SOHmy-documents</Label>
    </Item>
      <Item option="/usr/share/applications">
    <Label>/usr/share/applications</Label>
    </Item>
      <Item option="/">
    <Label>/</Label>
    </Item>
      <Item option="/mnt">
    <Label>/mnt</Label>
    </Item>
      <Item option="/ANCN">
    <Label>/ANCN</Label>
    </Item>
      <Item option="/usr/share/themes">
    <Label>/usr/share/themes</Label>
    </Item>
      <Item option="/usr/local/lib/X11/themes/Neon">
    <Label>/usr/local/lib/X11/themes/Neon</Label>
    </Item>
      <Item option="/mnt/sda1">
    <Label>/mnt/sda1</Label>
    </Item>
      <Item option="/mnt/sda1/MUSIC">
    <Label>/mnt/sda1/MUSIC</Label>
    </Item>
      <Item option="/mnt/sda2/MUSIC">
    <Label>/mnt/sda2/MUSIC</Label>
    </Item>
      <Item option="/mnt/home/precise-5.6.1/Dropbox/Puppy Linux">
    <Label>/mnt/home/precise-5.6.1/Dropbox/Puppy Linux</Label>
    </Item>
      <Item option="/usr/share/backgrounds">
    <Label>/usr/share/backgrounds</Label>
    </Item>
      <Item option="/initrd/mnt/dev_save/precise-5.6.1/Dropbox">
    <Label>/initrd/mnt/dev_save/precise-5.6.1/Dropbox</Label>
    </Item>
      <Item option="/root/.config/xpad">
    <Label>/root/.config/xpad</Label>
    </Item>
      <Item option="/usr">
    <Label>/usr</Label>
    </Item>
      <Item option="/usr/local/bin">
    <Label>/usr/local/bin</Label>
    </Item>
      <Item option="/root/Startup">
    <Label>/root/Startup</Label>
    </Item>
      <Item option="/root/puppy-reference">
    <Label>/root/puppy-reference</Label>
    </Item>
      <Item option="/usr/bin">
    <Label>/usr/bin</Label>
    </Item>
      <Item option="/mnt/sda3/copyonsda3">
    <Label>/mnt/sda3/copyonsda3</Label>
    </Item>
      <Item option="/tmp">
    <Label>/tmp</Label>
    </Item>
      <Item option="/usr/local/lib">
    <Label>/usr/local/lib</Label>
    </Item>
      <Item option="/root/my-documents/Screenshots">
    <Label>/root/my-documents/Screenshots</Label>
    </Item>
      <Item option="/mnt/sda3/copyonsda3/Copy/My Documents-20gigsync/Software/custon icons">
    <Label>/mnt/sda3/copyonsda3/Copy/My Documents-20gigsync/Software/custon icons</Label>
    </Item>
      <Item option="/usr/share/applications/kde4">
    <Label>/usr/share/applications/kde4</Label>
    </Item>
      <Item option="/opt/libreoffice4.1/share/config">
    <Label>/opt/libreoffice4.1/share/config</Label>
    </Item>
      <Item option="/mnt/home/precise-5.6.1/Dropbox/Puppy Linux/LO4configsettings">
    <Label>/mnt/home/precise-5.6.1/Dropbox/Puppy Linux/LO4configsettings</Label>
    </Item>
      <Item option="/root/.icons/rox-toolbar/rfl">
    <Label>/root/.icons/rox-toolbar/rfl</Label>
    </Item>
      <Item option="/usr/share/midi-icons">
    <Label>/usr/share/midi-icons</Label>
    </Item>
      <Item option="/root/SpiderOak Hive/my-documents/Software">
    <Label>/root/SpiderOak Hive/my-documents/Software</Label>
    </Item>
      <Item option="/usr/share/apps">
    <Label>/usr/share/apps</Label>
    </Item>
      <Item option="/usr/local/apps">
    <Label>/usr/local/apps</Label>
    </Item>
    <Item option="--update">
    <Label>Update bookmarks</Label>
    <Label xml:lang="pl">Odśwież zakładki</Label>
    <Label xml:lang="ru"></Label>
    <Label xml:lang="ja"></Label>
    <Label xml:lang="zh_CN"></Label>
    </Item>
  </AppMenu>
</AppInfo>
in the meantime i'll try the code change you suggested.

edit: tried it and it worked. if the location is real, it goes to it. if not, it opens the home folder.


thanks yet again.
Last edited by Puppus Dogfellow on Fri 18 Apr 2014, 19:29, edited 1 time in total.

User avatar
puppy_apprentice
Posts: 299
Joined: Tue 07 Feb 2012, 20:32

#14 Post by puppy_apprentice »

Yep names have spaces eg.:

Code: Select all

  <Item option="/root/SpiderOak Hive/my-documents/Software">
    <Label>/root/SpiderOak Hive/my-documents/Software</Label>
    </Item>
If again without success try this code (more ""):

Code: Select all

   *) if [ -d "$option" ]
           then
             /usr/local/bin/rox "$option" #browse folder if exists, maybe "" help for folders which names have spaces
           else
             /usr/local/bin/rox #if not just start rox
           fi;; 
Have you checked this location with "SpiderOak Hive"?

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#15 Post by Puppus Dogfellow »

puppy_apprentice wrote:Yep names have spaces eg.:

Code: Select all

  <Item option="/root/SpiderOak Hive/my-documents/Software">
    <Label>/root/SpiderOak Hive/my-documents/Software</Label>
    </Item>
If again without success try this code (more ""):

Code: Select all

   *) if [ -d "$option" ]
           then
             /usr/local/bin/rox "$option" #browse folder if exists, maybe "" help for folders which names have spaces
           else
             /usr/local/bin/rox #if not just start rox
           fi;; 
Have you checked this location with "SpiderOak Hive"?
doesn't work for the hive link and left clicking on it gives the error message File Does Not Exist or similar...

will try the newer code...

did. more links seem to work, many of the one under ~ are still not working...error message is gone from regular rox usage...home icon as a direct link still gives error message.

User avatar
puppy_apprentice
Posts: 299
Joined: Tue 07 Feb 2012, 20:32

#16 Post by puppy_apprentice »

Ok. I will make your folders and bookmarks on my system and check them. I always use names for folders without spaces so i haven't noticed errors.

In the next version i will add your nickname in the script comments as a betatester, you will be famous ;)

Thanks

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#17 Post by Puppus Dogfellow »

puppy_apprentice wrote:Ok. I will make your folders and bookmarks on my system and check them. I always use names for folders without spaces so i haven't noticed errors.

In the next version i will add your nickname in the script comments as a betatester, you will be famous ;)

Thanks
you're very welcome and more thanks back at ya.


...moving to the main machine, will mess around with it here for a while...

edit: just tried the code change on a machine running precise 5.5 (yeah, that shouldn't matter...) and the hive works...main icon works...a few don't...some of the folders inside the dropbox folder work, some don't...most work...

even at this stage, it's still pretty cool...

User avatar
puppy_apprentice
Posts: 299
Joined: Tue 07 Feb 2012, 20:32

#18 Post by puppy_apprentice »

I've rewritten script. Now should open paths with spaces if they exists. If they not exists it will show message what to do. If ROX-Filer will save bookmarks in the format that my script don't understand (i think that if somebody write better Sed formula to extract data from Bookmarks.xml we will not have problems with ROX-Filer, i'm not good in regular expressions and Sed, i'm still learning) it will show message with info what to do.

I don't use cloud storage, so i can't check links to Dropbox. If u post Bookmarks.xml file (/root/.config/rox.sourceforge.net/ROX-Filer/) maybe i will find where is problem. Before you post this file, check it if it doesn't store any confidential data to use Dropbox eg. pasword or id. If there is password and id, change password and id part of strings into XXXX for password and YYYY for id.

btw. if English is your native language, may you write for me beter messages? (more informative and grammar correct), thanks

Edit:
I've found site with free tutorials (pdfs and online):
http://www.tutorialspoint.com/index.htm
Attachments
message_two.png
(6.37 KiB) Downloaded 263 times
message_one.png
(6.46 KiB) Downloaded 239 times
app_file.tar.gz
install instruction is in the readme file
(1.49 KiB) Downloaded 190 times

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#19 Post by Puppus Dogfellow »

puppy_apprentice wrote:I've rewritten script. Now should open paths with spaces if they exists. If they not exists it will show message what to do. If ROX-Filer will save bookmarks in the format that my script don't understand (i think that if somebody write better Sed formula to extract data from Bookmarks.xml we will not have problems with ROX-Filer, i'm not good in regular expressions and Sed, i'm still learning) it will show message with info what to do.

I don't use cloud storage, so i can't check links to Dropbox. If u post Bookmarks.xml file (/root/.config/rox.sourceforge.net/ROX-Filer/) maybe i will find where is problem. Before you post this file, check it if it doesn't store any confidential data to use Dropbox eg. pasword or id. If there is password and id, change password and id part of strings into XXXX for password and YYYY for id.

btw. if English is your native language, may you write for me beter messages? (more informative and grammar correct), thanks

Edit:
I've found site with free tutorials (pdfs and online):
http://www.tutorialspoint.com/index.htm
i would be happy to edit the messages and will try out the updated script momentarily...

is it just the two messages you have linked in your last post?

here message 2 take 2:
Directory "/mnt/sr0/File Managers" may not exist. If this is the case, please delete it from your ROX-Filer Bookmarks and select "Update Bookmarks" from this app's right click menu.
here's message 1 take 2:
ROX-Filer seems to have saved your bookmarks in a format this app can't understand. To remedy this, select Edit Bookmarks from a ROX-Filer window but do nothing other than close the box that pops up. Next, use the Update Bookmarks option to update the menu list.
not sure if you want to use "app" or "application" or if it's necessarily a right click thing (left click in its location works the same, if i remember right.)

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#20 Post by Puppus Dogfellow »

no go. it functions as a regular home icon with an update bookmarks entry as more or less the only difference. at least on this machine (the 561, same one you have the bookmarks for). will try it elsewhere...

fwiw, i tried it with (as per the readme) and without "/root" in the second slot with the same results: no bookmarks on right click at all.

edit: went back to this machine to try it in usr/local/apps and got a message (which no longer appears...back to the original description) that directory "" doesn't exist. i'm not even sure what directory "" is. there's no blank slots on the bookmarks menu...

there's "/", but that one is real.

also, the dropbox folders are synced to the cloud, but they're just folders on my machine--they don't need any special permission to access.

edit: second machine had identical results (with the exception of the one-time popup).

Post Reply