Posted: Sun 18 May 2014, 10:09
OK, I got your suggestion working thanks saintless - tried it with my usb music stick instead of docs: Easier than I thought. Now to try the other mods..
READ-ONLY Archive
https://oldforum.puppylinux.com/
Right on the ball, MochiMoppel ! Important breakthrough, too ! I, for one, didn'tMochiMoppel wrote:Girls, I'm lost! What is the topic? First JWM Bookmarks Menu, then keyboard shortcuts, then "Places" sub-menu and now it's about mounting devices to fixed address based on a list?
The latter seems tricky and close to impossible, but the idea to do it the other way round, to create a menu item that calls a specific USB stick (identified by its UUID), no matter if Puppy calls it sdd1 or sdt1, should be no problem. The real problem: JWM menus are pretty static. Unlike the drive icons, which appear and disappear depending on what's hooked to the machine, a menu would not change. This means you would have a menu entry for "MyMusicStick" even when the stick is not plugged in. Sure, it's possible to recreate and reload the menu, but this requires an external script and is not a nice solution. Using a dynamic menu built with Gtkdialog or some other tools would be much easier, but this wouldn't be a JWM menu...
If you still want to use JWM, try following menu code (I sorted it after dinner ):Adjust the UUID to your needs. The code runs the blkid command to find the UUIDs of all devices and feeds the result to sed. sed searches for the specified UUID and puts the result (/mnt/sd...) into variable DRIVE. Finally ROX runs DRIVE.Code: Select all
<Program label="MyMusicStick"> UUID="8346-747C" DRIVE=$(echo `blkid` | sed /"$UUID"/'s/:.*$//;s/dev/mnt/') rox $DRIVE </Program>
This is quite slow, blkid needs some time. I'm sure this can be improved, but it should suffice to give you an idea.
What is important here: JWM menus have the teriffic ability to process bash commands. No external scripts needed.
Another example? This calls Puppy's boot partition:Code: Select all
<Program label="BOOTPARTITION" icon="usb16.xpm"> . /etc/rc.d/PUPSTATE rox /mnt/$PDEV1 </Program>
applications, places, and system are three popup bookmark menus?musher0 wrote:..
Zorin_OS_gnome_desktop(part).jpg
Description Here's a partial screen capture for those of you who wouldn't know what the gnome desktop looks like. The "Places" sub-menu is typical -- and super handy.
Filesize 11.3 KB
Viewed 9 Time(s)
Zorin_OS_gnome_desktop(part).jpg
Thanks, I also did not know this.MochiMoppel wrote:... JWM menus have the teriffic ability to process bash commands. No external scripts needed.
Another example? This calls Puppy's boot partition:Code: Select all
<Program label="BOOTPARTITION" icon="usb16.xpm"> . /etc/rc.d/PUPSTATE rox /mnt/$PDEV1 </Program>
It will save you some time and questions just to download the example gnome lookalike jwmrc file from my previous post but it is your choice of course.Puppus Dogfellow wrote:if so, that's really cool (and i'm pretty sure Mochi knows how to make those as well...)
saintless wrote:It will save you some time and questions just to download the example gnome lookalike jwmrc file from my previous post but it is your choice of course.Puppus Dogfellow wrote:if so, that's really cool (and i'm pretty sure Mochi knows how to make those as well...)
Thanks for that, Toni. it looks really cool and i think i get what i'm looking at (there's no need for a separate jwmrc-tray file your way?). thing is, until i saw musher's pic i wasn't really interested in the file--i may not have seen it at all as i figured you were addressing greengeek's issue, which is somewhat beyond me.saintless wrote:Just for example:
Create directory /mnt/docs.
Create executable script /usr/bin/docs-on-flashand add this line in .jwmrcCode: Select all
#!/bin/bash mount UUID=74B1-AB6F /mnt/docs rox /mnt/docs
Docs on Flash menu entry will mount and open this flashdrive with UUID=74B1-AB6F if it is plugged in. It can be sdb1, sdc2, sde3 but it always will be mounted in /mnt/docsCode: Select all
<Program label="Docs on Flash" icon="docs.png">docs-on-flash</Program>
If it is not plugged in Rox opens empty /mnt/docs
And one jwmrc example that might be interested for this thread - Gnome lookalike JWM:
http://murga-linux.com/puppy/viewtopic. ... d4f2427f5c
Toni
The original file is made from kerry_s for old Ubuntu version with JWM on low RAM machine. This way jwmrc includes all in one file. It is not easy to be found in google so I posted the file in this forum few years ago. His post is here:Puppus Dogfellow wrote:(there's no need for a separate jwmrc-tray file your way?)
Awesome. Thanks and welcome to the thread.saintless wrote:The original file is made from kerry_s for old Ubuntu version with JWM on low RAM machine. This way jwmrc includes all in one file. It is not easy to be found in google so I posted the file in this forum few years ago. His post is here:Puppus Dogfellow wrote:(there's no need for a separate jwmrc-tray file your way?)
http://ubuntuforums.org/showthread.php? ... ost6913820
I think it will be best and safe just to separate the file for use with Puppy, otherwise refresh-menus will not work. Or to use only the part with Places, System and Applications with your current theme and settings.
Always run jwm -p to check for errors after the changes.
I will check out this thread if I can help with some answers.
Toni
Hi, Puppus_D.Puppus Dogfellow wrote:applications, places, and system are three popup bookmark menus?musher0 wrote:..
Zorin_OS_gnome_desktop(part).jpg
Description Here's a partial screen capture for those of you who wouldn't know what the gnome desktop looks like. The "Places" sub-menu is typical -- and super handy.
Filesize 11.3 KB
Viewed 9 Time(s)
Zorin_OS_gnome_desktop(part).jpg
if so, that's really cool (and i'm pretty sure Mochi knows how to make those as well...).
Hi Mochi - I was not able to get this to work - I applied the correct UUID but it returns the following error for me:MochiMoppel wrote:Code: Select all
<Program label="MyMusicStick"> UUID="8346-747C" DRIVE=$(echo `blkid` | sed /"$UUID"/'s/:.*$//;s/dev/mnt/') rox $DRIVE </Program>
Code: Select all
File doesn't exist, or I can't access it: /mnt/loop1
Code: Select all
<Menu label=" Places" icon="/root/my-documents/clipart/oxywhite-folder-open.png" height="16">
<Program label="Top (/)" icon="mini-filemgr.xpm">exec rox /</Program>
<Program label="root (~)" icon="/root/home.png">exec rox /root</Program>
<Program label="My Documents" icon="/root/my-documents/clipart/Dossiers.png">exec rox /root/my-documents</Program>
<Program label="My Applications" icon="mini-filemgr.xpm">exec rox /root/my-applications</Program>
<Program label="usr/share" icon="mini-filemgr.xpm">exec rox /usr/share</Program>
</Menu>
Code: Select all
fixmenus
jwm -restart
you're just expanding on what i had in mind in the first place--get the main menu and button system (some call it a "windows manager") to do as much as we can get it to do as quickly and smoothly as possible. no need to apologize--i think it's great. now that the competent and skilled have taken an interest, this thread could really be something (i wanted it to be helpful to others, but it was in part just a cheat sheet for (if i ever get around to) moving to a new puppy--copy and paste the menu bits, download some stuff from the repo--a back up of some of my system files in an easily accessible form...). JWM seems as flexible as it is fast and How To Completely Bend JWM To Your Whims is a nice goal for the next thread title adjustment.greengeek wrote:Hi Mochi - I was not able to get this to work - I applied the correct UUID but it returns the following error for me:MochiMoppel wrote:Code: Select all
<Program label="MyMusicStick"> UUID="8346-747C" DRIVE=$(echo `blkid` | sed /"$UUID"/'s/:.*$//;s/dev/mnt/') rox $DRIVE </Program>
(using upup Raring 3.9.9.2). Any thoughts?Code: Select all
File doesn't exist, or I can't access it: /mnt/loop1
@Puppus... I hope my questions are not detracting from your original concept - I'm heading back to the point of using your bookmark method shortly - I just wanted to find a way to incorporate a link to a usb stick that I know is plugged into the machine but without knowing which sdx number it is. Sometimes I may have 7 or 8 partitions showing on the desktop and no idea which one is the music stick - so I am aiming at using your bookmark method, combined with the UUID identifier of the music partition to ensure I can go straight to my music without having any idea which stick is which (ie: I know longer have to care about sdb1, sdb2, sdb3, sdc1, scd2, sdd1, sdd2, sde1 - the numbers become irrelevant to me finding my way around the machine).
yup, that's pretty much exactly what i had in mind.musher0 wrote:Hi, everyone.
This is my take on the procedure that Puppus' explained in his first post.
It goes in file /etc/xdg/templates/_root_.jwmrc, between the fun menu and the help program. Save, then open a console and typeCode: Select all
<Menu label=" Places" icon="/root/my-documents/clipart/oxywhite-folder-open.png" height="16"> <Program label="Top (/)" icon="mini-filemgr.xpm">exec rox /</Program> <Program label="root (~)" icon="/root/home.png">exec rox /root</Program> <Program label="My Documents" icon="/root/my-documents/clipart/Dossiers.png">exec rox /root/my-documents</Program> <Program label="My Applications" icon="mini-filemgr.xpm">exec rox /root/my-applications</Program> <Program label="usr/share" icon="mini-filemgr.xpm">exec rox /usr/share</Program> </Menu>
You may have to find some equivalent icons. I mean: if you don't have them on your system somewhere, the icons above won't show. You'll have to find equivalents.Code: Select all
fixmenus jwm -restart
Also, I've changed the default jwm menu template. So my jwm menu won't look like your traditional Puppy menu. This is bad, I know, but it should cure itself!
BFN.
musher0
Code: Select all
<Key mask="A" key="space">exec:rox /mnt</Key>
<Key mask="C" key="space">root:3</Key>
<Key mask="S" key="space">window</Key>
<Key mask="CA" key="space">exec:urxvt</Key>
<Key mask="CS" key="space">exec:geany</Key>
<Key mask="AS" key="space">exec:partview</Key>
Code: Select all
<Key mask="A" key="Escape">exec:rox /usr/share/applications</Key>
<Key mask="C" key="Escape">minimize</Key>
<Key mask="S" key="Escape">maximize</Key>
<Key mask="CA" key="Escape">move</Key>
<Key mask="CS" key="Escape">resize</Key>
<Key mask="AS" key="Escape">exec:/root/.Pup-Shots/.PupShots</Key>
Me too Worked here , but I remember some funny leftover characters after pasting the code .... I'll fix it when I have time.greengeek wrote:Hi Mochi - I was not able to get this to work
Code: Select all
<Program label="MyMusicStick">
UUID="84F8-9DFA"
DRIVE=$(echo "`blkid`" | sed -n /"$UUID"/'s/:.*$//p' | sed 's/dev/mnt/')
rox $DRIVE
</Program>
Code: Select all
<Program label="MyMusicStick">
MYUUID="8346-747C"
DRIVE=$(echo `blkid -o device -t UUID="$MYUUID"` | sed /"$MYUUID"/'s/:.*$//;s/dev/mnt/')
mkdir $DRIVE
mount UUID="8346-747C" $DRIVE
rox $DRIVE
</Program>
This seems to open my root directory rather than the stick referred to by UUID. Should I have created a mnt point first or something? I will try a couple of other variations...saintless wrote:Code: Select all
<Program label="MyMusicStick"> MYUUID="45B6-2F7F" DRIVE=$(echo `blkid -l -o device -t UUID="$MYUUID"` | sed /"$MYUUID"/'s/:.*$//;s/dev/mnt/') mkdir $DRIVE mount UUID="45B6-2F7F" $DRIVE rox $DRIVE </Program>
Code: Select all
<Program label="Music on Flash" icon="music24.png">
mount UUID=45B6-2F7F /mnt/music
rox /mnt/music
</Program>
Code: Select all
<Program label="MyMusicStick">
UUID="F620E"
DRIVE=$(echo "`blkid`" | sed -n /"$UUID"/'s/:.*$//p' | sed 's|/dev/||')
/root/.pup_event/drive_$DRIVE/AppRun
</Program>
Code: Select all
<Program label="Music on Flash" icon="usb16.xpm">
MYUUID="45B6-2F7F"
DRIVE=$(echo `blkid -o device -t UUID="$MYUUID"` | sed /"$MYUUID"/'s/:.*$//;s/dev/mnt/')
mkdir $DRIVE
mount UUID="45B6-2F7F" $DRIVE
rox $DRIVE
</Program>