Page 1 of 2

How to add "Places" to a Puppy tray? [SOLVED]

Posted: Thu Dec 17, 2020 4:00 am
by JASpup

I'm trying to apply this tray option from Slacko6 in Xenial:

Code: Select all

<TrayButton label="Places">root:8</TrayButton>

When I add it to .jwmrc-tray, the label "Places" shows on the tray but is non-functional.

Is it possible to put this on Xenial? The main menu is "root:3". What is "root"?

Thanks!


Re: How to add "Places" to a Puppy tray?

Posted: Thu Dec 17, 2020 4:56 am
by MochiMoppel
JASpup wrote: Thu Dec 17, 2020 4:00 am

I'm trying to apply this tray option from Slacko6 in Xenial:

Code: Select all

<TrayButton label="Places">root:8</TrayButton>

Why "8"? Do you have a menu in your consolidated .jwmrc file that starts its code section with tag <RootMenu onroot="8">?
If yes, what's the content of this section?

You can see all your menus and their number with this tool.
You can see what the numbers mean and how menus are structured by reading the JWM manual.


Re: How to add "Places" to a Puppy tray?

Posted: Thu Dec 17, 2020 5:02 am
by JASpup
MochiMoppel wrote: Thu Dec 17, 2020 4:56 am
JASpup wrote: Thu Dec 17, 2020 4:00 am

I'm trying to apply this tray option from Slacko6 in Xenial:

Code: Select all

<TrayButton label="Places">root:8</TrayButton>

Why "8"? Do you have a menu in your consolidated .jwmrc file that starts its code section with tag <RootMenu onroot="8">?
If yes, what's the content of this section?

I didn't know it was a section. I thought it was like a command label or switch. root:8 is a direct copy from the Slacko6 tray. Maybe if I copy more code it will work?

You can see all your menus and their number with this tool.
You can see what the numbers mean and how menus are structured by reading the JWM manual.

I will look.


Re: How to add "Places" to a Puppy tray?

Posted: Thu Dec 17, 2020 5:46 am
by bigpup

In Rox file manager
navigate to /root
Click on the eye icon to have hidden files show.

Left click on file .jwmrc-tray
It should open in a text editor showing the contents.

Change the first trayButton entry from menu to places

Code: Select all

<TrayButton label="places" icon="puppy-white.svg" border="true">root:3</TrayButton>

Save changes.
Restart Graphical server of reboot.


Re: How to add "Places" to a Puppy tray?

Posted: Thu Dec 17, 2020 5:56 am
by JASpup
bigpup wrote: Thu Dec 17, 2020 5:46 am

Change the first trayButton entry from menu to places

Code: Select all

<TrayButton label="places" icon="puppy-white.svg" border="true">root:3</TrayButton>

Hi,

I'm not sure what that does.

I'm not trying to replace the main application menu, but add "Places" to the right of it, the graphic shown.


Re: How to add "Places" to a Puppy tray?

Posted: Thu Dec 17, 2020 6:09 am
by taersh

Re: How to add "Places" to a Puppy tray?

Posted: Fri Dec 18, 2020 5:49 am
by JASpup

Here is the tray script. I'm not sure how Slacko gets it to run:

Code: Select all

#!/bin/bash
#this script is started from $HOME/.jwmrc

export TEXTDOMAIN=jwm
export OUTPUT_CHARSET=UTF-8

echo '
<JWM>
	<Program label="'$(gettext 'Home')'" icon="/usr/local/lib/X11/pixmaps/home48.png">rox $HOME</Program>
	<Program label="'$(gettext 'System')'" icon="/usr/local/lib/X11/pixmaps/pc48.png">rox /</Program>
	<Program label="'$(gettext 'Network')'" icon="/usr/local/lib/X11/pixmaps/connect48.png">rox $HOME/network</Program>'
	[ -d $HOME/Downloads ] && echo '<Program label="'$(gettext 'Downloads')'" icon="/usr/local/lib/X11/pixmaps/folder48.png">rox $HOME/Downloads</Program>'
	echo '<Separator/>
	<Dynamic label="'$(gettext 'Drives')'" icon="/usr/local/lib/X11/pixmaps/drive48.png">exec:/usr/local/jwm_config/menu_build_places_drives</Dynamic>
	<Separator/>
	<Program label="'$(gettext 'Web')'" icon="/usr/local/lib/X11/pixmaps/www48.png">defaultbrowser</Program>
	<Program label="'$(gettext 'Help')'" icon="/usr/local/lib/X11/pixmaps/help48.png">exec defaultbrowser file:///usr/share/doc/index.html</Program>
</JWM>'

Re: How to add "Places" to a Puppy tray?

Posted: Fri Dec 18, 2020 6:02 am
by MochiMoppel
JASpup wrote: Fri Dec 18, 2020 5:49 am

I'm not sure how Slacko gets it to run

Read the second line:
#this script is started from $HOME/.jwmrc
So open the file /root/.jwmrc of your Slacko and see how it is done

And please stop discussing your problem in two different threads at the same time! This is very confusing and annoying for anyone who is trying to help you.


Re: How to add "Places" to a Puppy tray?

Posted: Fri Dec 18, 2020 7:42 am
by JASpup

This went in .jwmrc-tray:

Code: Select all

<TrayButton label="Places" icon="harddisk.svg" border="true">root:8</TrayButton>

I added this line to .jwmrc:

Code: Select all

<RootMenu label="8" labeled="false" height="24" onroot="8"><Include>exec:/usr/local/jwm_config2/menu_build_places</Include></RootMenu>

I copied menu_build_places to /usr/local/jwm_config2.

It looks good, but Places isn't opening. :(


Re: How to add "Places" to a Puppy tray?

Posted: Sat Dec 19, 2020 8:13 am
by MochiMoppel
JASpup wrote: Fri Dec 18, 2020 7:42 am

I copied menu_build_places to /usr/local/jwm_config2.

Did you create this directory or is this a typo? The name of this directory in Slacko 6.3.2 is jwm_config and in Xenial it's jwmconfig2, so I assume that you mean the latter, in which case you have to correct your code.
Even if you get this right you should study the script menu_build_places. It contains a reference to the file menu_build_places_drives. This file must also be present and its path may have to be adjusted to /usr/local/jwmconfig2 if that's the directory you want to use.

It looks good, but Places isn't opening

Good? If I would do what you did (having JWM reference a non-existing file), JWM and X would crash, so consider yourself lucky.
Works for me in Slacko5.6 and JWM 2.3.2

places.png
places.png (23.73 KiB) Viewed 1239 times

Re: How to add "Places" to a Puppy tray?

Posted: Sat Dec 19, 2020 9:08 am
by JASpup
MochiMoppel wrote: Sat Dec 19, 2020 8:13 am

Did you create this directory or is this a typo? The name of this directory in Slacko 6.3.2 is jwm_config and in Xenial it's jwmconfig2, so I assume that you mean the latter, in which case you have to correct your code.

Hai, we both caught that. Slacko and Xenial have different directory names.

Even if you get this right you should study the script menu_build_places. It contains a reference to the file menu_build_places_drives. This file must also be present and its path may have to be adjusted to /usr/local/jwmconfig2 if that's the directory you want to use.

I saw the reference to menu_build_places_drives. What I don't know is: if that file is missing would it cause the rest to not work?

Good? If I would do what you did (having JWM reference a non-existing file), JWM and X would crash, so consider yourself lucky.
Works for me in Slacko5.6 and JWM 2.3.2places.png

"Good" just means aesthetically proper. If you're hungry for some sushi and only see McDonalds, you're not having any sushi right now. Looking like a button script is half way there. I see the bar and sushi might happen.

I don't put Places on in Slacko. I just chose a ptheme preset and got excited. Taresh hates ptheme but that's what it's for, offering new desktop possibilities and simultaneous desktop changes. If you can make a WM look like a Mac, Ubuntu, Windows, or Classic Puppy at the click of a button, you're going to be turning some heads.

In X-Tahr I can show all mounts (/mnt) folder in a panel. It's very easy. Or I can use Thunar all the time, but sometimes ROX is better. Places should be easy too. Compromises.


Re: How to add "Places" to a Puppy tray?

Posted: Sat Dec 19, 2020 9:19 am
by MochiMoppel
JASpup wrote: Sat Dec 19, 2020 9:08 am

Hai, we both caught that. Slacko and Xenial have different directory names.

Yes, but none has the name you chose.

I don't put Places on in Slacko. I just chose a ptheme preset and got excited. Taresh hates ptheme but that's what it's for, offering new desktop possibilities and simultaneous desktop changes. If you can make a WM look like a Mac, Ubuntu, Windows, or Classic Puppy at the click of a button, you're going to be turning some heads.

In X-Tahr I can show all mounts (/mnt) folder in a panel. It's very easy. Or I can use Thunar all the time, but sometimes ROX is better. Places should be easy too. Compromises.

I fail to understand what you are talking about. Anyway, is this topic solved now?


Re: How to add "Places" to a Puppy tray?

Posted: Sat Dec 19, 2020 1:35 pm
by PipzDex

Hi @JASpup

Check this, is my JWM with places for precise, unpack and check everything and replace (or not) the necesary files

Comment me if this works for you

NOTE: DON'T INSTALL IT!!

Cheers!!


Re: How to add "Places" to a Puppy tray?

Posted: Sun Dec 20, 2020 1:12 am
by JASpup
MochiMoppel wrote: Sat Dec 19, 2020 9:19 am
JASpup wrote: Sat Dec 19, 2020 9:08 am

Hai, we both caught that. Slacko and Xenial have different directory names.

Yes, but none has the name you chose.

From recollection the only difference was "2" in the directory name. That would be a dumb mistake if I made it, but I don't think I did.

I fail to understand what you are talking about. Anyway, is this topic solved now?

It's not solved, but it's not a crisis. No worries.


Re: How to add "Places" to a Puppy tray?

Posted: Sun Dec 20, 2020 1:24 am
by JASpup

Hi @PipzDex

I'm not sure what to do with your archive, or what is necessary for the Places tray option. It has a LOT of files. I just want to put Places on Xenial.

I don't write code, but I can understand complicated things in clear language. I have to understand something to use it.

Thanks

PipzDex wrote: Sat Dec 19, 2020 1:35 pm

Hi @JASpup

Check this, is my JWM with places for precise, unpack and check everything and replace (or not) the necesary files

Comment me if this works for you

NOTE: DON'T INSTALL IT!!

Cheers!!


Re: How to add "Places" to a Puppy tray?

Posted: Sun Dec 20, 2020 2:19 am
by MochiMoppel
JASpup wrote:

From recollection the only difference was "2" in the directory name. That would be a dumb mistake if I made it, but I don't think I did.

Allow me to refresh your memory:

JASpup wrote: Fri Dec 18, 2020 7:42 am

I added this line to .jwmrc:

Code: Select all

<RootMenu label="8" labeled="false" height="24" onroot="8"><Include>exec:/usr/local/jwm_config2/menu_build_places</Include></RootMenu>

Dumb or not dumb. it's a mistake!

It's not solved, but it's not a crisis. No worries.

For my part it's solved. I know what you did wrong, I told you how to fix it and I tested what I told you. It's done. Bye.


Re: How to add "Places" to a Puppy tray?

Posted: Sun Dec 20, 2020 2:39 am
by JASpup
MochiMoppel wrote: Sat Dec 19, 2020 8:13 am
JASpup wrote: Fri Dec 18, 2020 7:42 am

I copied menu_build_places to /usr/local/jwm_config2.

Did you create this directory or is this a typo? The name of this directory in Slacko 6.3.2 is jwm_config and in Xenial it's jwmconfig2, so I assume that you mean the latter, in which case you have to correct your code.

On the system I copied the file correctly. When I made the post, I copied the name of the Slacko directory and added "2". I didn't put a "_" in the real folder name.

Here's now:

Code: Select all

<Dynamic label="'$(gettext 'Drives')'" icon="/usr/local/lib/X11/pixmaps/drive48.png">exec:/usr/local/jwmconfig2/menu_build_places_drives</Dynamic>
mbpd.png
mbpd.png (25.14 KiB) Viewed 1002 times

If I make Places @taersh's dummy file, clicking on the button opens the menu on his computer.

Ergo, the reason it doesn't work is in the modification, Slacko's Places code printed before: viewtopic.php?f=2&t=1658&p=12618#p12618


Re: How to add "Places" to a Puppy tray?

Posted: Sun Dec 20, 2020 8:39 am
by JASpup

I AM TAERSH

Places4Dummies.png
Places4Dummies.png (154.27 KiB) Viewed 999 times

Re: How to add "Places" to a Puppy tray?

Posted: Sun Dec 20, 2020 2:50 pm
by taersh

No, you are not taersh.

Though, now that you have a places menu running just edit the /etc/xdg/templates/_root_.placesrc file in a text editor.
Remove all the <Program label= entries that you don't need/want and add new ones you want to have in that places menu.


Re: How to add "Places" to a Puppy tray?

Posted: Sun Dec 20, 2020 6:32 pm
by JASpup
taersh wrote: Sun Dec 20, 2020 2:50 pm

No, you are not taersh.

Though, now that you have a places menu running just edit the /etc/xdg/templates/_root_.placesrc file in a text editor.
Remove all the <Program label= entries that you don't need/want and add new ones you want to have in that places menu.

Was ist der Unterschieden?!

Are RootMenu label and Menu label entries required?

Code: Select all

<Include>/root/.shutdownrc</Include>

???

The Slacko script is the same!


Re: How to add "Places" to a Puppy tray?

Posted: Sun Dec 20, 2020 6:50 pm
by taersh

Yes, the lines <RootMenu and </RootMenu> are required!

All entries that should appear in the Places menu needs to be defined in between these two lines.

The lines <Menu and </Menu> are not required, but will place all lines with <Program into a Sub-Menu within the places menu.

The line <Include>/root/.shutdownrc</Include> can be removed. This is a special file that is included into all of my 3 (4) menus of my system.

To better understanding the XML file load the /etc/xdg/templates/_root_.placesrc into a text editor and click the button in the tray to watch the places menu. By comparing you will understand, which lines are creating which menu entry. It's quite simple.


Re: How to add "Places" to a Puppy tray?

Posted: Mon Dec 21, 2020 3:01 am
by JASpup

No <RootMenu>, no Places (your example):

Code: Select all

<RootMenu label="Programm- und Speicherorte" labeled="true" height="18" onroot="8">

It loads slowly but it works.

Xenial isn't reading the Slacko Program labels:

PlacesTest1.png
PlacesTest1.png (45.27 KiB) Viewed 1123 times

caveat du jour:

Show DRIVE and Show PARTITION icons need to be checked in the Puppy Event Manager for the "Drives" menu option to work which defeats the purpose of avoiding the redundancy. Unless there's a workaround, I'm kind of bummed.

I know we can manually remove them all, but if I'm not mistaken they get automatically reloaded with X.


Re: How to add "Places" to a Puppy tray? [SOLVED]

Posted: Mon Dec 21, 2020 7:27 am
by taersh

Please attach your version of the file _root_.placesrc.
I want to have a look at it and perhaps fix it.

No <RootMenu>

Yes!

It's </RootMenu> !!!


Re: How to add "Places" to a Puppy tray? [SOLVED]

Posted: Mon Dec 21, 2020 9:46 pm
by JASpup
taersh wrote: Mon Dec 21, 2020 7:27 am

Please attach your version of the file _root_.placesrc.
I want to have a look at it and perhaps fix it.

Hi taersh,

The only issues are Slacko labels and why they do not work in the Upup, and of course the Puppy Event Manager partition requirement for "Drives" to work. If I knew XML I would understand labels. I posted the Slacko version here: viewtopic.php?f=2&t=1658&p=12618&hilit= ... ray#p12618

This is my cleaned up version without the Slacko labels. It looks fine (graphic):
/etc/xdg/templates/_root_.placesrc

Code: Select all

#!/bin/bash
#this script is started from $HOME/.jwmrc

export TEXTDOMAIN=jwm
export OUTPUT_CHARSET=UTF-8

echo '
<JWM>
<RootMenu label="Places" labeled="false" height="24" onroot="8">>
	<Program label="Home" icon="/usr/local/lib/X11/pixmaps/home48.png">rox $HOME</Program>
	<Program label="System" icon="/usr/local/lib/X11/pixmaps/pc48.png">rox /</Program>'
	[ -d $HOME/Downloads ] && echo '<Program label="Downloads" icon="/usr/local/lib/X11/pixmaps/folder48.png">rox $HOME/Downloads</Program>'
	echo '<Separator/>
	<Dynamic label="Drives" icon="/usr/local/lib/X11/pixmaps/drive48.png">exec:/usr/local/jwmconfig2/menu_build_places_drives</Dynamic>
	<Separator/>
	<Program label="Pmount" icon="/usr/local/lib/X11/pixmaps/utility48.png">pmount</Program>
</RootMenu>
</JWM>'

I have three Xenial32 desktops now: simple, 2trays, and this Ubuntu look, thanks to you and Ptheme. :P


Re: How to add "Places" to a Puppy tray? [SOLVED]

Posted: Tue Dec 22, 2020 7:46 am
by taersh

When I was asking you to attach the file, my reply was made to the post and the file which creates the places menu shown in image: PlacesTest1.png.
Then you are attaching a complete different file which I was NOT asking for!
Also it seems that you are jumping around in between two or three different Puppies with different setups of a places menu.

Such behavior makes it almost impossible to give some help to you!

So, why aren't you willing and/or able to do what you was asked for?


Re: How to add "Places" to a Puppy tray? [SOLVED]

Posted: Tue Dec 22, 2020 5:25 pm
by JASpup

The Slacko link was the source, and code box is the working prototype.

The file you request was a version that is not useful, so I did not preserve it.

The difference between the graphics is PlacesTest1.png was a live boot, no pupsave. Since changes tend to mysteriously screw up the system, I wanted to work Places out there first before modifying the PlacesGood.png boot.

Maybe we should call it Puppy Unity, or Puppy GNOME after I'm done simplifying the menus.

Overall ich habe keine Ahnung what you intended to do with it!

taersh wrote: Tue Dec 22, 2020 7:46 am

When I was asking you to attach the file, my reply was made to the post and the file which creates the places menu shown in image: PlacesTest1.png.
Then you are attaching a complete different file which I was NOT asking for!
Also it seems that you are jumping around in between two or three different Puppies with different setups of a places menu.

Such behavior makes it almost impossible to give some help to you!

So, why aren't you willing and/or able to do what you was asked for?


Re: How to add "Places" to a Puppy tray? [SOLVED]

Posted: Tue Dec 22, 2020 7:04 pm
by taersh
JASpup wrote: Tue Dec 22, 2020 5:25 pm

Overall ich habe keine Ahnung what you intended to do with it!

Xenial isn't reading the Slacko Program labels:

My intention was trying to fix this! ;)


Re: How to add "Places" to a Puppy tray? [SOLVED]

Posted: Wed Dec 23, 2020 2:28 am
by JASpup

If you fixed it, how would it look or operate differently?

English Expression:

It's not that important. You're too advanced to mess around with kleinen Kartoffeln.

Help more problems if you wish, or give yourself a new challenge.

I just changed highlighted menu/tray items from that funky 70s color to sunburst. Looks too good!

sunb.png
sunb.png (62.51 KiB) Viewed 1063 times
taersh wrote: Tue Dec 22, 2020 7:04 pm
JASpup wrote: Tue Dec 22, 2020 5:25 pm

Overall ich habe keine Ahnung what you intended to do with it!

Xenial isn't reading the Slacko Program labels:

My intention was trying to fix this! ;)


Re: How to add "Places" to a Puppy tray? [SOLVED]

Posted: Wed Dec 23, 2020 7:38 am
by JASpup

This one particular quirk I can't stress enough:

ALL PARTITIONS must be shown in Puppy Event Manager for "Drives" in Places to work.

drives.png
drives.png (13.34 KiB) Viewed 1053 times

You can manually remove each partition. If there's a way to remedy or automate this task, it's not common:

remove.png
remove.png (14.8 KiB) Viewed 1053 times

If you set Clean in Desktop Icon Setup, this overrides the Puppy Event Manager and "Drives" will not work:

DesktopIconSetup.png
DesktopIconSetup.png (23.42 KiB) Viewed 1053 times

One thing I can do is compare to the Slacko model functionality.


Re: How to add "Places" to a Puppy tray? [SOLVED]

Posted: Wed Dec 23, 2020 10:41 am
by taersh

If you set Clean in Desktop Icon Setup, this overrides the Puppy Event Manager and "Drives" will not work:

That's why I said to modify the file for your own needs. If you would use a modified/edited XML file instead of the script from Slacko, you could make entries for all your drives and/or directories.

All entries within the file you got from me (except the sub-directory intern) are directories on my different hard drives.