Xfce Forum

Sub domains
 

You are not logged in.

#1 Yesterday 10:49:56

lyndhurst
Member
Registered: 2017-09-07
Posts: 8
LinuxChrome 131.0

The --disable-wm-check flag not working with xfconf

Hi,

I am very new to Xfce, and I am trying to migrate my setup (was using tiling window managers without a DE).

I was experiencing slow startup times when changing the default window manager to bspwm, qtile, or openbox. I found out
about the `--disable-wm-check` option, and at first, I thought it was not working. Testing on a vanilla EndeavourOS Xfce VM
with `bspwm` and `sxhkd` default configurations, startup time after user login authentication went from 5 to 42 seconds using
the ArchWiki `xfconf` command to change the window manager from `xfwm4` to `bspwm` for example.

First I tried a few variations (sequence, flags) of the following with  no effects:

xfconf-query -c xfce4-session -p /sessions/Failsafe/Client0_Command -t string -sa bspwm
xfconf-query -c xfce4-session -p /sessions/Failsafe/Client1_Command -t string -s xfsettingsd -t string -s --disable-wm-check
xfconf-query -c xfce4-session -p /sessions/Failsafe/Client2_Command -t string -s xfce4-panel -t string -s --disable-wm-check
xfconf-query -c xfce4-session -p /sessions/Failsafe/Client3_Command -t string -s Thunar -t string -s --daemon
xfconf-query -c xfce4-session -p /sessions/Failsafe/Client4_Command -t string -s xfdesktop -t string -s --disable-wm-check

Then, I tried another approach I found on Github https://github.com/NixOS/nixpkgs/issues … 1598241515:

1. Remove all startup commands from the  xfce-session channel:

xfconf-query -c xfce4-session -p /sessions/Failsafe/Client0_Command -t string -sa bspwm
xfconf-query -c xfce4-session -p /sessions/Failsafe/Client1_Command -t string -sa ""
xfconf-query -c xfce4-session -p /sessions/Failsafe/Client2_Command -t string -sa ""
xfconf-query -c xfce4-session -p /sessions/Failsafe/Client3_Command -t string -sa ""
xfconf-query -c xfce4-session -p /sessions/Failsafe/Client4_Command -t string -sa ""

2. Add them to my window manager startup or autostart file. For example, at the end of bspwmrc:

xfsettingsd --disable-wm-check &
xfce4-panel --disable-wm-check &
Thunar --daemon &
xfdesktop --disable-wm-check &

This works perfectly for what I tested so far, and brings back the startup time to the 5 sec baseline.

Is this a problem with `xfconf`, am I doing something wrong in my first attempts ?

Thanks in advance for your help.

Offline

#2 Yesterday 12:52:49

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,677
LinuxFirefox 133.0

Re: The --disable-wm-check flag not working with xfconf

In the first set of xfconf commands, the "-s" parameter is expecting a string and you are sending it multiple strings and its only accepting the first one. Try enclosing the complete command string in quotes. You are using double-quotes in your second code block.

The failsafe session is only used if another session is not defined and made default. Double check that through xfce4-settings-editor.

Your workaround is a valid workaround.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 Yesterday 14:44:19

lyndhurst
Member
Registered: 2017-09-07
Posts: 8
LinuxChrome 131.0

Re: The --disable-wm-check flag not working with xfconf

Thank you for your answer, but to be honest, I was left with more questions than answers after reading it, so forgive me if I am digging into it a bit further,
but I would really like to settle on Xfce and understand what I am doing with it.



ToZ wrote:

Your workaround is a valid workaround.

Thanks for confirming, I will base my new setup on it with more confidence until I get to the bottom of this smile

ToZ wrote:

In the first set of xfconf commands, the "-s" parameter is expecting a string and you are sending it multiple strings and its only accepting the first one.

To my understanding, "-t string" specifies the "string" type, and "-s" means "set" the property to the specified value. I got the commands from the ArchWiki, and assumed passing multiple strings in a row was the `xfconf` way of specifying an array, but unfortunately I could not find a manpage, and the --help was not detailled enough to confirm my assumption.


From https://wiki.archlinux.org/title/Xfce#U … ow_manager:

xfconf-query -c xfce4-session -p /sessions/Failsafe/Client1_Command -t string -s wm_name -t string -s --wm-option

Anyway, when testing, I was checking the settings editor as I was running the commands, and the new value I was setting looked exactly like the default value for `Thunar --daemon`, so I did not worry about that. I tested again with both the following commands:


xfconf-query -c xfce4-session -p /sessions/Failsafe/Client4_Command -t string -s xfdesktop -t string -s --disable-wm-check
xfconf-query -c xfce4-session -p /sessions/Failsafe/Client4_Command -t string -s "xfdesktop" -t string -s "--disable-wm-check"

They both end up giving the following result in `xfce4-session.xml`:

      <property name="Client3_Priority" type="empty"/>
      <property name="Client3_PerScreen" type="empty"/>
      <property name="Client4_Command" type="array">
        <value type="string" value="xfdesktop"/>
        <value type="string" value="--disable-wm-check"/>
      </property>
ToZ wrote:

You are using double-quotes in your second code block.


Not sure what to do with it, sorry. The following command gives me the exact same block as above:

xfconf-query -c xfce4-session -p /sessions/Failsafe/Client4_Command -t string -s 'xfdesktop' -t string -s '--disable-wm-check'
ToZ wrote:

Try enclosing the complete command string in quotes.

My assumption why the ArchWiki was using "-sa" to specify the window manager, was that `xfconf` was expecting an array, but I tested the following:

xfconf-query -c xfce4-session -p /sessions/Failsafe/Client0_Command -t string -sa bspwm
xfconf-query -c xfce4-session -p /sessions/Failsafe/Client1_Command -t string -s 'xfsettingsd --disable-wm-check'
xfconf-query -c xfce4-session -p /sessions/Failsafe/Client2_Command -t string -s 'xfce4-panel --disable-wm-check'
xfconf-query -c xfce4-session -p /sessions/Failsafe/Client4_Command -t string -s 'xfdesktop --disable-wm-check'

This had me log into a black screen, I got no response at all for the 2 minutes I waited.



ToZ wrote:

The failsafe session is only used if another session is not defined and made default. Double check that through xfce4-settings-editor.

There again, I followed the ArchWiki. Checking on two different Xfce install I only see one "Failsafe" and one "FailsafeWayland" entries under "sessions". Also, all my successful startups with Xfwm4, bspwm, qtile, or openbox used the "/sessions/Failsafe" properties. Not sure what else I could check.



Sorry if it was a lot to read. To sum up and disambiguate my initial question, using the following configuration, everything works, but "--disable-wm-check" is not taken into consideration:


  <property name="sessions" type="empty">
    <property name="Failsafe" type="empty">
      <property name="IsFailsafe" type="empty"/>
      <property name="Count" type="empty"/>
      <property name="Client0_Command" type="array">
        <value type="string" value="bspwm"/>
      </property>
      <property name="Client0_Priority" type="empty"/>
      <property name="Client0_PerScreen" type="empty"/>
      <property name="Client1_Command" type="array">
        <value type="string" value="xfsettingsd"/>
        <value type="string" value="--disable-wm-check"/>
      </property>
      <property name="Client1_Priority" type="empty"/>
      <property name="Client1_PerScreen" type="empty"/>
      <property name="Client2_Command" type="array">
        <value type="string" value="xfce4-panel"/>
        <value type="string" value="--disable-wm-check"/>
      </property>
      <property name="Client2_Priority" type="empty"/>
      <property name="Client2_PerScreen" type="empty"/>
      <property name="Client3_Command" type="array">
        <value type="string" value="Thunar"/>
        <value type="string" value="--daemon"/>
      </property>
      <property name="Client3_Priority" type="empty"/>
      <property name="Client3_PerScreen" type="empty"/>
      <property name="Client4_Command" type="array">
        <value type="string" value="xfdesktop"/>
        <value type="string" value="--disable-wm-check"/>
      </property>
      <property name="Client4_Priority" type="empty"/>
      <property name="Client4_PerScreen" type="empty"/>
    </property>

Offline

#4 Yesterday 15:06:09

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,677
LinuxFirefox 133.0

Re: The --disable-wm-check flag not working with xfconf

Sorry, I was wrong, I forgot it was an array.

If you export XFSM_VERBOSE=1 in your system environment (on Arch I'd put it into /etc/profile.d), after a reboot you will get an .xfce4-session.verbose.log file in your home directory. Perhaps this can yield some information about what is happening during the startup of these items.

Otherwise, there are no bug reports for this, so perhaps you have encountered one and should create a bug report for it.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 Yesterday 16:04:51

lyndhurst
Member
Registered: 2017-09-07
Posts: 8
LinuxChrome 131.0

Re: The --disable-wm-check flag not working with xfconf

Thanks for the tip, I did get a log file, but I personally cannot interpret it. I paid particular attention to the sections about the commands with the `--disable-wm-check` flag, but I cannot see anything obvious like error messages and such. All I can see is that the commands run seem fine an as expected with the `disable-wm-check` flag being taken into account. The log is huge so I am not posting it. Let me know if you are interested, or if you think I should report the whole thing somewhere.

I also noticed a `.xsession-erros` file, with mostly complaint about unavailable number desktops, or value of NET_CURRENT_DESKTOP.

Since I could not mak much sense of those files, I decided to remove them and reboot with my workaround configured, and they look the same. At least I can vouch for .xsession-errors, the Xfce log file is too long to be sure (regretting not to have kept both to run a 'diff` on them...) but I really think they are the same.

I think I reached the full extent of my Linux/xsession debugging capabilities. I am totally open to suggestions, but out of ideas...

Offline

#6 Yesterday 19:13:11

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,677
LinuxFirefox 134.0

Re: The --disable-wm-check flag not working with xfconf

As a test, can you try running these commands to see if they work:

xfconf-query -c xfce4-session -p /sessions/Failsafe/Client0_Command -t string -sa bspwm
xfconf-query -c xfce4-session -p /sessions/Failsafe/Client1_Command -t string -sa "xfsettingsd --disable-wm-check"
xfconf-query -c xfce4-session -p /sessions/Failsafe/Client2_Command -t string -sa "xfce4-panel --disable-wm-check"
xfconf-query -c xfce4-session -p /sessions/Failsafe/Client4_Command -t string -sa "xfdesktop --disable-wm-check"

Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 Yesterday 19:50:45

lyndhurst
Member
Registered: 2017-09-07
Posts: 8
LinuxChrome 131.0

Re: The --disable-wm-check flag not working with xfconf

ToZ wrote:

As a test, can you try running these commands to see if they work:

xfconf-query -c xfce4-session -p /sessions/Failsafe/Client0_Command -t string -sa bspwm
xfconf-query -c xfce4-session -p /sessions/Failsafe/Client1_Command -t string -sa "xfsettingsd --disable-wm-check"
xfconf-query -c xfce4-session -p /sessions/Failsafe/Client2_Command -t string -sa "xfce4-panel --disable-wm-check"
xfconf-query -c xfce4-session -p /sessions/Failsafe/Client4_Command -t string -sa "xfdesktop --disable-wm-check"

At first, I thought it did work, but I had forgotten to comment out the matching commands from the bspwmrc file smile
After properly removing them, adding the "a" flag to force an Array type did not change the outcome, the commands are not
executed. It was a good testing idea though +1

Anyway this Array thing feels like `subprocess` calls in python, (and I am sure most languages have a similar method, I am no expert),
I think it is passed to this kind of method in the background that cannot handle space separated commands. When looking at the output of
the log generated by the variable trick you gave me earlier, you can see that more arguments are passed behind the scenes. I do not remember
all of them, but all of Xfce components receive an additional "--display" flag with a value passed to it for example, and those extra arguments
are added as array elements if I remember correctly.

Offline

#8 Yesterday 21:16:57

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,677
LinuxFirefox 134.0

Re: The --disable-wm-check flag not working with xfconf

I think you should create a bug report - it looks like something isn't working correctly there.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 Today 08:33:17

lyndhurst
Member
Registered: 2017-09-07
Posts: 8
LinuxChrome 131.0

Re: The --disable-wm-check flag not working with xfconf

ToZ wrote:

I think you should create a bug report - it looks like something isn't working correctly there.

Thank you for the link, I opened an issue there this morning.
I will come back to update this thread when I get some more information from Gitlab.

https://gitlab.xfce.org/xfce/xfce4-session/-/issues/212

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.014 seconds, 8 queries executed - Memory usage: 610.39 KiB (Peak: 627.23 KiB) ]