a desktop bug stopping you personalizing your desktop[HALF-SOLVED]

Moderators: 666philb, Forum moderators

Post Reply
helloworld
Posts: 76
Joined: Thu Sep 24, 2020 3:53 am
Has thanked: 10 times
Been thanked: 9 times

a desktop bug stopping you personalizing your desktop[HALF-SOLVED]

Post by helloworld »

open /root/.jwm/jwmrc-personal ,here is my desktops config:
<!-- Number of virtual desktops -->
<Desktops width="2" height="1">
<Desktop><Background type="command">/usr/local/apps/Wallpaper/set_bg /root/Downloads/1.jpg</Background></Desktop>
<Desktop><Background type="command">/usr/local/apps/Wallpaper/set_bg /root/Downloads/2.png</Background></Desktop>
</Desktops>

NEXT,

click menu-desktop-JWMDesk manager,make or not make some changes,then click "apply",the jwm will be reloaded,it will automatically change back to :
<Desktops width="2" height="1"/>
<Desktop><Background type="command">/usr/local/apps/Wallpaper/set_bg /root/Downloads/1.jpg</Background></Desktop>
<Desktop><Background type="command">/usr/local/apps/Wallpaper/set_bg /root/Downloads/2.png</Background></Desktop>
</Desktops>
you can see that "/" in the "<Desktops width="2" height="1"/>"

here is a SOLUTION ,you can edit the etc/xdg/templates/_root_.jwmrc to config your virtual desktops,dont touch root/.jwm/jwmrc-personal.deleted related lines in jwmrc-personal.

Last edited by helloworld on Sun Jul 18, 2021 4:58 am, edited 4 times in total.
TerryH
Posts: 578
Joined: Mon Jun 15, 2020 2:08 am
Has thanked: 114 times
Been thanked: 131 times

Re: a desktop bug stopping you personalizing your desktop

Post by TerryH »

helloworld wrote: Fri Jul 16, 2021 2:58 pm

open /root/.jwm/jwmrc-personal ,check this line with "<Desktops " mark,if you havent changed this line ,it should be : <Desktops width="2" height="1"/>,a "/" at the end which is wrong xml grammar. remove "/",change it to : <Desktops width="2" height="1">
next,
click menu-desktop-JWMDesk manager,make or not make some changes,then click "apply",the jwm will be reloaded,it will change back to : <Desktops width="2" height="1"/> , see that "/".

but,if you click menu-exit-restart window manager,it will still keep no "/" ,which is correct grammar.

There is no argument regarding xml grammar, I'm not getting any errors doing changes using JWMDesk. Personalizing the tray does not appear to be effected by the "/" in my fossapup64 installation. I did several changes using jWMDesk (moved position , resized), which were retained after reboots. I didn't restart the WM, just reboot. So I can't see where this is stopping personalization using JWMDesk.

I checked the contents of the fossapup64-9.5.iso, the default for /root/.jwm/jwmrc-personal is '<Desktops width = "3" height="1"/>' which I always change to 2 x 1, as you have above. The bug you are pointing out originates from the template, which is /etc/xdg/templates/_root_.jwmrc which shows <Desktops width="3" height="1"/>. This has then been carried across to the .jwmrc-personal file.

Edit: Did some further checking on xml syntax. Appears it is correct:

' You can also use a so called self-closing tag:'
<element />

References: https://www.w3schools.com/XML/xml_elements.asp and
https://stackoverflow.com/questions/723 ... -xml-files

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

helloworld
Posts: 76
Joined: Thu Sep 24, 2020 3:53 am
Has thanked: 10 times
Been thanked: 9 times

Re: a desktop bug stopping you personalizing your desktop

Post by helloworld »

TerryH wrote: Fri Jul 16, 2021 4:12 pm
helloworld wrote: Fri Jul 16, 2021 2:58 pm

open /root/.jwm/jwmrc-personal ,here is my desktops config:
<!-- Number of virtual desktops -->
<Desktops width="2" height="1">
<Desktop><Background type="command">/usr/local/apps/Wallpaper/set_bg /root/Downloads/1.jpg</Background></Desktop>
<Desktop><Background type="command">/usr/local/apps/Wallpaper/set_bg /root/Downloads/2.png</Background></Desktop>
</Desktops>

NEXT,

click menu-desktop-JWMDesk manager,make or not make some changes,then click "apply",the jwm will be reloaded,it will automatically change back to :
<Desktops width="2" height="1"/>
<Desktop><Background type="command">/usr/local/apps/Wallpaper/set_bg /root/Downloads/1.jpg</Background></Desktop>
<Desktop><Background type="command">/usr/local/apps/Wallpaper/set_bg /root/Downloads/2.png</Background></Desktop>
</Desktops>
you can see that "/" in the "<Desktops width="2" height="1"/>"

but,if you click menu-exit-restart window manager,it will keep no "/".

There is no argument regarding xml grammar, I'm not getting any errors doing changes using JWMDesk. Personalizing the tray does not appear to be effected by the "/" in my fossapup64 installation. I did several changes using jWMDesk (moved position , resized), which were retained after reboots. I didn't restart the WM, just reboot. So I can't see where this is stopping personalization using JWMDesk.

I checked the contents of the fossapup64-9.5.iso, the default for /root/.jwm/jwmrc-personal is '<Desktops width = "3" height="1"/>' which I always change to 2 x 1, as you have above. The bug you are pointing out originates from the template, which is /etc/xdg/templates/_root_.jwmrc which shows <Desktops width="3" height="1"/>. This has then been carried across to the .jwmrc-personal file.

Edit: Did some further checking on xml syntax. Appears it is correct:

' You can also use a so called self-closing tag:'
<element />

References: https://www.w3schools.com/XML/xml_elements.asp and
https://stackoverflow.com/questions/723 ... -xml-files

you are right ,grammar is correct.I re-described the bug ,please check it again,see if it reappears on you puppy fossa.

User avatar
MochiMoppel
Posts: 1137
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 18 times
Been thanked: 372 times

Re: a desktop bug stopping you personalizing your desktop

Post by MochiMoppel »

TerryH wrote: Fri Jul 16, 2021 4:12 pm

The bug you are pointing out originates from the template, which is /etc/xdg/templates/_root_.jwmrc which shows <Desktops width="3" height="1"/>. This has then been carried across to the .jwmrc-personal file.

The template does not affect the jwmrc-personal file

helloworld wrote: Sat Jul 17, 2021 3:21 am

you are right ,grammar is correct.

In your case
<Desktops width="2" height="1"/> would not be correct since the <Desktops> tag embraces 2 <Desktop> tags .
If JWMDesk manager really adds the '/' it would be a bug.
I don't use neither Fossapup nor JWMDesk manager so can't test this. How did you add the 2 <Desktop> tags, setting the backgrounds? Manually or with JWMDesk manager?

helloworld
Posts: 76
Joined: Thu Sep 24, 2020 3:53 am
Has thanked: 10 times
Been thanked: 9 times

Re: a desktop bug stopping you personalizing your desktop

Post by helloworld »

MochiMoppel wrote: Sat Jul 17, 2021 4:49 am
TerryH wrote: Fri Jul 16, 2021 4:12 pm

The bug you are pointing out originates from the template, which is /etc/xdg/templates/_root_.jwmrc which shows <Desktops width="3" height="1"/>. This has then been carried across to the .jwmrc-personal file.

The template does not affect the jwmrc-personal file

helloworld wrote: Sat Jul 17, 2021 3:21 am

you are right ,grammar is correct.

In your case
<Desktops width="2" height="1"/> would not be correct since the <Desktops> tag embraces 2 <Desktop> tags .
If JWMDesk manager really adds the '/' it would be a bug.
I don't use neither Fossapup nor JWMDesk manager so can't test this. How did you add the 2 <Desktop> tags, setting the backgrounds? Manually or with JWMDesk manager?

check this ,https://oldforum.puppylinux.com/viewtop ... =94470&i=1

User avatar
MochiMoppel
Posts: 1137
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 18 times
Been thanked: 372 times

Re: a desktop bug stopping you personalizing your desktop

Post by MochiMoppel »

Checked it. Excellent How-To :thumbup2:
But you didn't answer my question.

helloworld
Posts: 76
Joined: Thu Sep 24, 2020 3:53 am
Has thanked: 10 times
Been thanked: 9 times

Re: a desktop bug stopping you personalizing your desktop

Post by helloworld »

MochiMoppel wrote: Sat Jul 17, 2021 5:39 am

Checked it. Excellent How-To :thumbup2:
But you didn't answer my question.

i want to set different wallpapers for each desktop, that link tells you how to do it by "add the 2 <Desktop> tags,"

User avatar
MochiMoppel
Posts: 1137
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 18 times
Been thanked: 372 times

Re: a desktop bug stopping you personalizing your desktop

Post by MochiMoppel »

helloworld wrote: Sat Jul 17, 2021 9:09 am

i want to set different wallpapers for each desktop, that link tells you how to do it by "add the 2 <Desktop> tags,"

I know that the link tells you that, but it doesn't mention JWMdesk and since you are using JWMdesk my question is if JWMdesk can do that too and if you therefore used JWMdesk to add the <Desktop> tags. I know nothing about JWMdesk.

helloworld
Posts: 76
Joined: Thu Sep 24, 2020 3:53 am
Has thanked: 10 times
Been thanked: 9 times

Re: a desktop bug stopping you personalizing your desktop

Post by helloworld »

MochiMoppel wrote: Sat Jul 17, 2021 9:19 am
helloworld wrote: Sat Jul 17, 2021 9:09 am

i want to set different wallpapers for each desktop, that link tells you how to do it by "add the 2 <Desktop> tags,"

I know that the link tells you that, but it doesn't mention JWMdesk and since you are using JWMdesk my question is if JWMdesk can do that too and if you therefore used JWMdesk to add the <Desktop> tags. I know nothing about JWMdesk.

it works for jwm.check this ,http://joewing.net/projects/jwm/config- ... l#desktops

User avatar
MochiMoppel
Posts: 1137
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 18 times
Been thanked: 372 times

Re: a desktop bug stopping you personalizing your desktop

Post by MochiMoppel »

Please answer my question

helloworld
Posts: 76
Joined: Thu Sep 24, 2020 3:53 am
Has thanked: 10 times
Been thanked: 9 times

Re: a desktop bug stopping you personalizing your desktop

Post by helloworld »

MochiMoppel wrote: Sat Jul 17, 2021 9:33 am

Please answer my question

i answered you question ,just read the link http://joewing.net/projects/jwm/config- ... l#desktops . and i got a solution about the bug, check the first post

User avatar
BarryK
Posts: 2318
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 99 times
Been thanked: 585 times

Re: a desktop bug stopping you personalizing your desktop,[SOLVED]

Post by BarryK »

I did a quick test in jwmdesk, version 2.4.

I edited /root/.jwm/jwmrc-personal and changed the line to this:

<Desktops width="4" height="1"></Desktops>

Then ran jwmdesk, it recognized the width of "4', changed it to 3 in jwmdesk, hit apply button, and the line in jwmrc-personal changed to this:

<Desktops width="3" height="1"/>

So, jwmdesk will need to be fixed. If it sees the either format in jwmrc-personal, it should keep that format. And not lose any tags within <Desktops></Desktops>

Radky is the author, I will send him a pm. I see that he hasn't made any posts to this forum. But I can send him an email.

I see on the old forum, latest was 2.5:
https://oldforum.puppylinux.com/viewtop ... 9&t=101460

Have to refresh my memory... PupControl has jwmdesk builtin. That's what I am using. It is pupcontrol 3.2.1, with some mods radky did for easyOS, and it has jwmdesk 2.4 builtin.

User avatar
MochiMoppel
Posts: 1137
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 18 times
Been thanked: 372 times

Re: a desktop bug stopping you personalizing your desktop,[SOLVED]

Post by MochiMoppel »

helloworld wrote: Sat Jul 17, 2021 9:37 am

i answered you question

No, you did not, but never mind, I have downloaded and examined jwmdesk and found that it can't add any configurations to <Desktops> tags, so the only way to do it is manually. BTW: Your "solution" is bound to fail because it will be overwritten the next time you install a new application. Read the warning at the top of .jwmrc and change the template instead.

BarryK wrote: Sun Jul 18, 2021 1:47 am

So, jwmdesk will need to be fixed. If it sees the either format in jwmrc-personal, it should keep that format. And not lose any tags within <Desktops></Desktops>

I have only version 2.5 but the buggy code doesn't seem to have changed. It's code in script jwmdesk like this:

Code: Select all

sed -i -e 's/^.*Desktops width.*$/<Desktops width="'$DESKTOPS_WIDTH'" height="'$DESKTOPS_HEIGHT'"\/>/'

that simply *assumes* how the whole line containing the string "<Desktops width=" looks like.
In my setup the line reads
<Desktops width="9" height="1"><Background type="gradient">#000000:#000066</Background></Desktops>
JWMdesk would change the line to
<Desktops width="9" height="1"/>

What it should do is to replace only width=oldvalue with width=newvalue and the same for height=, and it should do it only if the value has been changed by the user.

If jwmrc-personal contains no settings (which is perfectly OK since .jwmrc already contains a <Desktops> tag) then jwmdesk simply drops the option to change the values from its dialog page.

In general jwmdesk makes a lot of assumptions and can easily fail if a user makes manual changes to the JWM config files. Therefore the basic rule for the user should be: Either always use jwmdesk (and never make manual changes) or never use it.

Last edited by MochiMoppel on Sun Jul 18, 2021 11:10 am, edited 1 time in total.
helloworld
Posts: 76
Joined: Thu Sep 24, 2020 3:53 am
Has thanked: 10 times
Been thanked: 9 times

Re: a desktop bug stopping you personalizing your desktop,[SOLVED]

Post by helloworld »

MochiMoppel wrote: Sun Jul 18, 2021 2:47 am
helloworld wrote: Sat Jul 17, 2021 9:37 am

i answered you question

No, you did not, but never mind, I have downloaded and examined jwmdesk and found that it can't add any configurations to <Desktops> tags, so the only way to do it is manually. BTW: Your "solution" is bound to fail because it will be overwritten the next time you install a new application. Read the warning at the top of .jwmrc and change the template instead.

BarryK wrote: Sun Jul 18, 2021 1:47 am

So, jwmdesk will need to be fixed. If it sees the either format in jwmrc-personal, it should keep that format. And not lose any tags within <Desktops></Desktops>

I have only version 2.5 but the buggy code doesn't seem to have changed. It's code in script jwmdesk like this:

Code: Select all

sed -i -e 's/^.*Desktops width.*$/<Desktops width="'$DESKTOPS_WIDTH'" height="'$DESKTOPS_HEIGHT'"\/>/'

that simply *assumes* how the whole line containing the string "<Desktops width=" looks like. What it should do is to replace only width=oldvalue with width=newvalue and the same for height=, and it should do it only if the value has been changed by the user. If jwmrc-personal contains no settings (which is perfectly OK since .jwmrc already contains a <Desktops> tag) then jwmdesk simply drops the option to change the values from its dialog page.

In general jwmdesk makes a lot of assumptions and can easily fail if a user makes manual changes to the JWM config files. Therefore the basic rule for the user should be: Either always use jwmdesk (and never make manual changes) or never use it.

Thanks,i should edit the etc/xdg/templates/_root_.jwmrc.

User avatar
mikewalsh
Moderator
Posts: 5670
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 610 times
Been thanked: 1745 times

Re: a desktop bug stopping you personalizing your desktop[HALF-SOLVED]

Post by mikewalsh »

@helloworld /@MochiMoppel :-

If you guys are interested in taking a look at it, I've been testing Roger's beta build of JWMDesk 3.0 since the end of May. I have no idea if it'll "fix" the issue in question - personally, I have no problems with it at all - but you're welcome to give it a test run, or strip it down & take a look at the code, whatever.

There's also a modified "sct" binary; Roger's added the ability for Redshift-type screen adjustment using this. The tarball contains 32- and 64-bit binaries; just place whichever is appropriate in one of your "bins" (/usr/bin, /usr/local/bin).

Attached below. (Removed at radky's request - see post below.)

Mike. ;)

Last edited by mikewalsh on Tue Jul 20, 2021 9:12 pm, edited 1 time in total.

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

radky
Posts: 304
Joined: Fri May 28, 2021 2:14 am
Has thanked: 35 times
Been thanked: 268 times

Re: a desktop bug stopping you personalizing your desktop[HALF-SOLVED]

Post by radky »

mikewalsh wrote: Tue Jul 20, 2021 12:18 pm

@helloworld /@MochiMoppel :-

If you guys are interested in taking a look at it, I've been testing Roger's beta build of JWMDesk 3.0 since the end of May...
Mike. ;)

@mike,

Thanks for testing the preliminary Beta build of JWMDesk-3.0.

However, after that early Beta release there have been many changes in functionality and sundry additional bug fixes, including a fix for overwriting the Desktops XML closing tag when the user has added separate backgrounds for JWM virtual desktops.

The community is welcome to test the Beta version you have uploaded to the forum, but that early testing release does not accurately reflect the upcoming final release of JWMdesk-3.0.

User avatar
mikewalsh
Moderator
Posts: 5670
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 610 times
Been thanked: 1745 times

Re: a desktop bug stopping you personalizing your desktop[HALF-SOLVED]

Post by mikewalsh »

radky wrote: Tue Jul 20, 2021 7:09 pm
mikewalsh wrote: Tue Jul 20, 2021 12:18 pm

@helloworld /@MochiMoppel :-

If you guys are interested in taking a look at it, I've been testing Roger's beta build of JWMDesk 3.0 since the end of May...
Mike. ;)

@mike,

Thanks for testing the preliminary Beta build of JWMDesk-3.0.

However, after that early Beta release there have been many changes in functionality and sundry additional bug fixes, including a fix for overwriting the Desktops XML closing tag when the user has added separate backgrounds for JWM virtual desktops.

The community is welcome to test the Beta version you have uploaded to the forum, but that early testing release does not accurately reflect the upcoming final release of JWMdesk-3.0.

Fair do's, Roger. I hope you didn't mind me "sharing" it.

I'm NO kind of expert with XML scripting, so I'd proffered it in the vague hope it may have possibly addressed some of those issues.....

Mike. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

radky
Posts: 304
Joined: Fri May 28, 2021 2:14 am
Has thanked: 35 times
Been thanked: 268 times

Re: a desktop bug stopping you personalizing your desktop[HALF-SOLVED]

Post by radky »

mikewalsh wrote: Tue Jul 20, 2021 7:35 pm

I hope you didn't mind me "sharing" it......

Mike. ;)

Mike,

On second thought, perhaps it would be best to remove the early Beta from the forum. I prefer the Beta not be archived and possibly mistaken for the final version. I'll upload the final soon.

Thanks

User avatar
mikewalsh
Moderator
Posts: 5670
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 610 times
Been thanked: 1745 times

Re: a desktop bug stopping you personalizing your desktop[HALF-SOLVED]

Post by mikewalsh »

@radky :-

Okey-doke. Will do.

Mike. :thumbup:

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

TerryH
Posts: 578
Joined: Mon Jun 15, 2020 2:08 am
Has thanked: 114 times
Been thanked: 131 times

Re: a desktop bug stopping you personalizing your desktop[HALF-SOLVED]

Post by TerryH »

@radky nice to see you make a presence in the new forum. Looking forward to any development work you undertake.

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

User avatar
BarryK
Posts: 2318
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 99 times
Been thanked: 585 times

Re: a desktop bug stopping you personalizing your desktop[HALF-SOLVED]

Post by BarryK »

TerryH wrote: Tue Jul 20, 2021 10:11 pm

@radky nice to see you make a presence in the new forum. Looking forward to any development work you undertake.

Ditto from me!

Post Reply

Return to “Fossapup64”