JWMDesk Manager corrupts .jwmrc-tray

Moderators: 666philb, Forum moderators

Post Reply
User avatar
Grey
Posts: 2055
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 77 times
Been thanked: 388 times

JWMDesk Manager corrupts .jwmrc-tray

Post by Grey »

Hi. I have manually added popup panels in the .jwmrc-tray file:
jwmrc-tray.txt
(6.63 KiB) Downloaded 134 times
(I added an extension .txt for uploading to the forum) The panels are nice. On the left of the screen are often needed programs, on the right are games for Wine, and on top are emulators.

If I run JWMDesk Manager, then it corrupts the file .jwmrc-tray, shuffles the lines and turns into porridge:
jwmrc-tray_JWMDesk.txt
(6.35 KiB) Downloaded 118 times
How to deal with this?

Different devices. Different approach.

TerryH
Posts: 703
Joined: Mon Jun 15, 2020 2:08 am
Has thanked: 176 times
Been thanked: 175 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by TerryH »

I suppose it's because JwmDesk wasn't designed to define 4 trays within the one configuration file. JwmDesk allows for 2 trays, which would be .jwmrc-tray and .jwmrc-tray2. It may be able to accommodate more. You can also manually create additional trays be manually creating additional tray configuration files .jwmrc-trayN. I some times use 3 trays, top and bottom and a 3rd manually defined tray which is manually created.

Looking at all the TrayButtons in the file, it doesn't look possible to tell which tray the launchers are supposed to be in. It's no wonder that if you use JwmDesk with that .jwmrc-tray file that it ends up being garbage.

New Laptop - ASUS ZenBook Ryzen 7 5800H Vega 7 iGPU / 16 GB RAM

User avatar
Grey
Posts: 2055
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 77 times
Been thanked: 388 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by Grey »

Well, the simplest thing that comes to mind is to use a script that copies jwmrc-tray to another location, then calls JWMDesk and after closing the latter, copies jwmrc-tray back to its place. But this is somehow ... mmm ... not comme il faut :)

Different devices. Different approach.

User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 120 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by taersh »

JWMDesk Manager breaks everything manually edited/modified on JWM files.

I have 3 JWM Menus, one for each mouse button.

Left-click on desktop gives default JWM menu.
Right-click gives a quick-start menu, containing preferred programs and categories.
Middle-click gives a special menu which offers Scripts, RoxApps, AppImages, other Linux portables
plus all my own programs for development, my N.E.M.E.S.I.S. stuff, list of .sfs modules loaded, list of .sfs modules available etc.pp.

After using JWMDesk Manager I have to reset the different JWM menu .xml files manually. So, best is to avoid the use of JWMDesk manager when it comes to modify JWM files. I never liked JWMDesk manager for that reason.

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

User avatar
bigpup
Moderator
Posts: 7433
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 991 times
Been thanked: 1660 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by bigpup »

you are doing things with JWM menus that JWMDesk Manager does not control.
So do not use it.
It is not designed for your needs.
When it runs. It does write new config files, that replace the old ones.
So, it will replace your modified files.
It is working the way it is designed to work.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 120 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by taersh »

It does write new config files, that replace the old ones.
Yes, and that's EXACTLY the problem. :roll:

Since we can e.g. replace every little part of text using grep/sed or even the replaceit binary or even some more expert commands like awk/sed it should be possible to modify contents of e.g. /etc/xdg/templates/_root_.jwmrc or /root/.jwmrc-tray etc. without to overwrite existing files by new templates. :idea:

A good programmer should avoid to overwrite existing files by templates to modify a single parameter like e.g. the height of menu entries.

Overwriting existing files by templates is the way I did in lots of my newest developments in the beginning of learning Puppy and therefore it's the laziest and silliest way to do programming! :thumbdown: :lol:

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

User avatar
Grey
Posts: 2055
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 77 times
Been thanked: 388 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by Grey »

bigpup wrote: Tue Sep 29, 2020 8:27 pm So do not use it.
But in general, JWMDesk Manager is good. Icons, cursors, themes, all that. It would be nice to use it too.

Different devices. Different approach.

User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 120 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by taersh »

taersh wrote: Tue Sep 29, 2020 6:16 pm JWMDesk Manager breaks everything manually edited/modified on JWM files.
Just let me give a short example.

In /root/.jwm there's a file named: menuheights.
Content:

Code: Select all

MENHEIGHT=24
When I'm changing the menu height to 16 (which I like more) via JWMDesk Manager the file /root/.jwm/menuheights will be removed and the file /etc/xdg/templates/_root_.jwmrc is overwritten.

The default definition of the root menu in file /etc/xdg/templates/_root_.jwmrc looks like this:

Code: Select all

<RootMenu label="Menu" labeled="false" height="MENHEIGHT" onroot="3">
My definition of the root menu in file /etc/xdg/templates/_root_.jwmrc looks like this:

Code: Select all

<RootMenu label="LazY Puppy ArtStudio 64" labeled="true" height="16" onroot="1">
I changed height="MENHEIGHT" to height="16" manually and switched to onroot="1" (left mouse button).

When changing the height to 16 via JWMDesk Manager it looks like this:

Code: Select all

<RootMenu label="Menu" labeled="false" height="16" onroot="3">
It's totally simple to change height="MENHEIGHT" to height="16" using grep/sed or awk/sed without the need to touch other parameters instead of overwriting the file. A good programmer wouldn't overwrite /etc/xdg/templates/_root_.jwmrc just to change the height of menus.
But in general, JWMDesk Manager is good.
Yes, apart from such issues it's great.

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

User avatar
bigpup
Moderator
Posts: 7433
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 991 times
Been thanked: 1660 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by bigpup »

Have you seen the readme file that is in /etc/xdg/templates?
This directory contains template files for menus.

For example, JWM window manager has a configuration file /root/.jwmrc
and this contains the specs for the menu layout and entries.
/etc/xdg/templates/_root_.jwmrc has this configuration file in a raw form.
Notice the naming of the file: the '_' will get converted to '/' to determine
the detination of the config file.

The script /usr/sbin/fixmenus processes any template files it finds in
/etc/xdg/templates and generates the destination config files.
The template files have special lines embedded into them that have the
keyword 'PUPPYMENU' embedded into them, that are executable lines for
generating the entries from the XDG menu information.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 120 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by taersh »

YES!!! :lol:

Though, it's complete non-sense to replace a template by another template just to change the height of the menus! And it's also non-sense to touch any other parameter than the parameter for the height of the menus when changing the height of menus.

As I wrote, I changed /etc/xdg/templates/_root_.jwmrc manually!

I did NOT change root/.jwmrc!

You should read carefully what I wrote. It could avoid you to return non-sense! ;)

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

proebler
Posts: 89
Joined: Sun Aug 23, 2020 6:48 am
Location: AU-TAS
Been thanked: 23 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by proebler »

I tend to agree with taersh.
It is not even necessary to use JWMDesk Manager to get confused by the way JWM behaves.
I have been going in circles many times setting up the looks of menus, font sizes etc by editing various ~/.iwm/jwmrc- files.
It can be quite confusing (similar to editing PuppyPin in ~/Choices/ROX-Filer).
I have now a saved jwmrc-theme file which I can simply 'plug' into ~/.jwm to give me what I want.
User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 120 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by taersh »

Oh, yes.

Different from BionicPup64 and FossaPup64 the JWM in Puppies created by peebee is even more confusing!

Therefore I'm grateful that 666philb still continues NOT to use the JWM peebee is using for Puppy. :thumbup:


/root/.jwm in FossaPup64 by 666philb
Screenshot(1).jpg
Screenshot(1).jpg (21.58 KiB) Viewed 2058 times

/root/.jwm in BionicPup32 by peebee
Screenshot(2).jpg
Screenshot(2).jpg (49.23 KiB) Viewed 2058 times

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

User avatar
Grey
Posts: 2055
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 77 times
Been thanked: 388 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by Grey »

Guys, we're not going to scold JWM or JWMDesk here. We're here to come up with workarounds.
And as far as I understand, there is no standard way as usual. Everyone has their own chips and gags.

Different devices. Different approach.

User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 120 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by taersh »

Grey wrote: Thu Oct 01, 2020 1:06 pm Guys, we're not going to scold JWM or JWMDesk here. We're here to come up with workarounds.
And as far as I understand, there is no standard way as usual. Everyone has their own chips and gags.
By telling some truth about the bad development in parts of JWMDesk Manager and its used templates/structure, I don't see we're scolding JWM or JWMDesk Manager in general. And to remember, the title of the topic is: JWMDesk Manager corrupts .jwmrc-tray!

The title of the topic was made by yourself and the /root/.jwmrc-tray is not the only file which is unnecessarily corrupted/changed by the JWMDesk Manager. ;)

Are we going now to suppress and excoriate opinions and experiences on developments the same way like uncomfortable opinions and personal experiences are already suppressed worldwide in main stream media and politics?

Hopefully NOT!

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

User avatar
Grey
Posts: 2055
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 77 times
Been thanked: 388 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by Grey »

Okay, tell the truth. But somehow more softer. Otherwise, the author may be offended and will not fix anything :) In fact, you called him a bad programmer :)

Different devices. Different approach.

User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 120 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by taersh »

Grey wrote: Thu Oct 01, 2020 5:37 pmIn fact, you called him a bad programmer :)
Oh, GUY!

You are a bad ass liar! :thumbdown:

Nowhere in my posts I called this author by any name. Nowhere I called him a bad programmer - as you claim!

I wrote:
A good programmer should avoid to overwrite existing files by templates to modify a single parameter like e.g. the height of menu entries.
This is not calling any programmer being a bad programmer.

I also wrote:
Yes, apart from such issues it's great.
I wouldn't say/write such if I would assume the author being a bad programmer.
So, please, don't turn around my words and don't even interpret my words by your own thought patterns!

You should re-read my posts and quoting the part where I called him a bad programmer!

DO IT NOW, LIAR! :thumbdown:

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

User avatar
Grey
Posts: 2055
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 77 times
Been thanked: 388 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by Grey »

A good programmer should avoid to overwrite existing files by templates to modify a single parameter like e.g. the height of menu entries.

This is not calling any programmer being a bad programmer

I'm just talking about that. Let's blame it on my poor english language skills.

I'll explain though. The logic was simply as follows:
1. A good programmer should avoid...
2. And author does NOT avoid.
3. Conclusions?
Something like this.

Different devices. Different approach.

User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 120 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by taersh »

Grey wrote: Thu Oct 01, 2020 6:03 pm 1. A good programmer should avoid...
2. And author does NOT avoid.
3. Conclusions?
Something like this.
Simply a wrong conclusion, as JWMDesk Manager offers a lot of good functions that Puppies around Lucid Puppy, Precise Puppy and before that didn't have.
I don't know how long you are a Puppy user or being a member of the old murga-forum.
So, I will tell you some of other truth.

The first Puppy ever that had a program to setup a complete design like desktop icons, window manager theme (jwm, icewm, openbox, fluxbox, tint2 panel), gtk theme, audio theme, wallpaper and mouse cursor etc.pp. from within a single GUI was LazY Puppy!

LazY Puppy was created in 2012 based on Lucid Puppy. It was developed for around one year and when finished/published it has been used in a German public school on around 100 computers for technical education at Realschule Lemgo by German user/member Der Schutzhund. The first Puppy ever used in a professional environment in Germany - perhaps worldwide?

LazY Puppy came with lots of new ideas and programs, its main purpose was the complete use without any save file using mainly .sfs modules to run programs. No need to load those .sfs modules first. All programs had a menu entry and by clicking that menu entry the .sfs module loaded automatically, it loaded also dependencies like e.g. JAVA, if needed and after everything was loaded the program started and could be used - just like as if had been installed! 8-)

LazY Puppy was invented and created by myself!

I was an absolute newbie/beginner at these days on Puppy and GNU/Linux in general coming from Windows, being a hobby programmer on AtariST in the 1980s/1990s. So, I know, what makes the difference between a good and bad programmer, as I was truly a bad programmer at these days.

New Puppies had adopted lots of my ideas from these days, though the developers needed to re-program everything, since I was a that bad programmer using templates overwriting everything in a ruthless way. ;)

Of course, this has changed meanwhile! :lol:

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

perdido

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by perdido »

taersh wrote: Thu Oct 01, 2020 12:48 pm Oh, yes.

Different from BionicPup64 and FossaPup64 the JWM in Puppies created by peebee is even more confusing!

Therefore I'm grateful that 666philb still continues NOT to use the JWM peebee is using for Puppy. :thumbup:
I hate the new jwm desktop for various reasons I will not list.
Thank goodness 666philb uses a jwm desk manager that is based on the old controls.

When the new jwmdesk manager was introduced it also obsoleted all the old GTK and JWM theme development.

I changed peebee's 32-bit new jwm to the old jwm stuff from 666philb's puppies.
Fixxed it. :lol:
User avatar
Grey
Posts: 2055
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 77 times
Been thanked: 388 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by Grey »

Thanks for the historical tour. I realized that Germany was homeland for Puppy's desktop customization software(and also have the best beer and cars :) ). But what about the topic?

Maybe just throw out all the parts that are corrected by hand from the /usr/local/jwmdesk/jwmdesk file? For example 'Tray tab' and everything else. It uses gtkdialog and editing is not difficult.

Different devices. Different approach.

User avatar
Grey
Posts: 2055
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 77 times
Been thanked: 388 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by Grey »

So. We write something like this to the file /usr/local/bin/jwmdesk

Code: Select all

#!/bin/sh
cp .jwmrc-tray 1/
/usr/local/jwmdesk/jwmdesk
cd ~/1/
cp .jwmrc-tray ~/
Then you can change cursors, icons and backgrounds and panels will not disappear from .jwmrc-tray
Is it stupid? Sure. It works? Yes.
If there are no smart ideas for several days, then the topic can be closed. Let everyone create their own topic about other files suffering from JWMDesk Manager.

Different devices. Different approach.

User avatar
MochiMoppel
Posts: 1324
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 22 times
Been thanked: 498 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by MochiMoppel »

You could also change the file /usr/local/jwmdesk/jwmdesk

I don't know which version you are using. This would work for JWMDesk 2.5.
Starting at line 2309 find:
<vbox space-expand="true" space-fill="true">
<text use-markup="true"><label>"<b><span size='"'medium'"'>'$(gettext 'Attributes')''$attributes_tray'</span></b>"</label></text>


Change first line to
<vbox space-expand="true" space-fill="true" visible="false">
This will hide the Tray tab and keeps all other tabs functional.

[Edit]No, this doesn't work. JWMDesk trashes the existing /root/.jwmrc-tray right at start up, even without any Tray options being visible or having been changed.
User avatar
Grey
Posts: 2055
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 77 times
Been thanked: 388 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by Grey »

MochiMoppel wrote: Fri Oct 02, 2020 2:20 am You could also change the file /usr/local/jwmdesk/jwmdesk

I don't know which version you are using. This would work for JWMDesk 2.5.
Starting at line 2309 find:
<vbox space-expand="true" space-fill="true">
<text use-markup="true"><label>"<b><span size='"'medium'"'>'$(gettext 'Attributes')''$attributes_tray'</span></b>"</label></text>


Change first line to
<vbox space-expand="true" space-fill="true" visible="false">
This will hide the Tray tab and keeps all other tabs functional.

[Edit]No, this doesn't work. JWMDesk trashes the existing /root/.jwmrc-tray right at start up, even without any Tray options being visible or having been changed.
Yes, It changes the file at startup, not at exit. Yes, fossapup64 has v. 2.5. Line 2325. I wasn't going to click Tray tab, but visually it's better without it. This is a nice addition to my method. Thanks.

Different devices. Different approach.

User avatar
MochiMoppel
Posts: 1324
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 22 times
Been thanked: 498 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by MochiMoppel »

I think the cleanest solution is to change /etc/xdg/templates/_root_.jwmrc

Adapt <Include>/root/.jwmrc-tray</Include> so that it includes your customized and renamed file (e.g. jwmrc-grey :) ). Then run fixmenus and jwm -restart.
The JWMDesk can do whatever it likes to .jwmrc-tray, it just wouldn't matter since .jwmrc would ignore it.
User avatar
Grey
Posts: 2055
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 77 times
Been thanked: 388 times

Re: JWMDesk Manager corrupts .jwmrc-tray

Post by Grey »

MochiMoppel wrote: Fri Oct 02, 2020 3:20 am I think the cleanest solution is to change /etc/xdg/templates/_root_.jwmrc

Adapt <Include>/root/.jwmrc-tray</Include> so that it includes your customized and renamed file (e.g. jwmrc-grey :) ). Then run fixmenus and jwm -restart.
The JWMDesk can do whatever it likes to .jwmrc-tray, it just wouldn't matter since .jwmrc would ignore it.
It looks like this way works. Now I have two variants. Thank you very much :thumbup:

Different devices. Different approach.

Post Reply

Return to “Fossapup64”