Page 1 of 1

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

Posted: Fri Jul 16, 2021 2:58 pm
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.


Re: a desktop bug stopping you personalizing your desktop

Posted: Fri Jul 16, 2021 4:12 pm
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


Re: a desktop bug stopping you personalizing your desktop

Posted: Sat Jul 17, 2021 3:21 am
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.


Re: a desktop bug stopping you personalizing your desktop

Posted: Sat Jul 17, 2021 4:49 am
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?


Re: a desktop bug stopping you personalizing your desktop

Posted: Sat Jul 17, 2021 4:54 am
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


Re: a desktop bug stopping you personalizing your desktop

Posted: Sat Jul 17, 2021 5:39 am
by MochiMoppel

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


Re: a desktop bug stopping you personalizing your desktop

Posted: Sat Jul 17, 2021 9:09 am
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,"


Re: a desktop bug stopping you personalizing your desktop

Posted: Sat Jul 17, 2021 9:19 am
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.


Re: a desktop bug stopping you personalizing your desktop

Posted: Sat Jul 17, 2021 9:26 am
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


Re: a desktop bug stopping you personalizing your desktop

Posted: Sat Jul 17, 2021 9:33 am
by MochiMoppel

Please answer my question


Re: a desktop bug stopping you personalizing your desktop

Posted: Sat Jul 17, 2021 9:37 am
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


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

Posted: Sun Jul 18, 2021 1:47 am
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.


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

Posted: Sun Jul 18, 2021 2:47 am
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.


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

Posted: Sun Jul 18, 2021 4:49 am
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.


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

Posted: Tue Jul 20, 2021 12:18 pm
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. ;)


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

Posted: Tue Jul 20, 2021 7:09 pm
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.


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

Posted: Tue Jul 20, 2021 7:35 pm
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. ;)


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

Posted: Tue Jul 20, 2021 8:35 pm
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


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

Posted: Tue Jul 20, 2021 9:10 pm
by mikewalsh

@radky :-

Okey-doke. Will do.

Mike. :thumbup:


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

Posted: Tue Jul 20, 2021 10:11 pm
by TerryH

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


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

Posted: Wed Jul 21, 2021 12:10 pm
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!