Skip to content

Remove duplicate buttons using xfconf-query#256

Open
noskb wants to merge 1 commit intoQubesOS:mainfrom
noskb:qubes-xfconf
Open

Remove duplicate buttons using xfconf-query#256
noskb wants to merge 1 commit intoQubesOS:mainfrom
noskb:qubes-xfconf

Conversation

@noskb
Copy link
Copy Markdown
Contributor

@noskb noskb commented Feb 3, 2026

This will remove duplicate close buttons and others from affected
applications such as gedit in Xfce-based Debian/Fedora templates.

At first, I tried adding it to 60xfce-desktop.sh, but it had no effect.

In the gnome-based template, xsettingsd was used to remove duplicate
buttons. However, since xfce-based templates use xfsettingsd,
xfconf-query is called at session startup to perform the same
configuration.
Version=1.0
Encoding=UTF-8
Name=xfconf-query for Xfce-based QubesVM
Exec=/usr/bin/xfconf-query --channel xsettings --property /Gtk/DecorationLayout --set ""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is assuming that the qube:

  1. has xfconf-query
  2. is currently using Xfce

Both conditions need to be met for this script to be called.

First, can be done with TryExec=/usr/bin/xfconf-query. Also, I'd rather the path was not hardcoded.

Second, XDG_SESSION_DESKTOP=X-QUBES is present on fedora-43-minimal, which is not the Xfce flavor and doesn't have xfconf-query. So you will need to find another thing to query.

Copy link
Copy Markdown
Contributor Author

@noskb noskb Mar 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your review.

Since this won't take effect unless the qubes-gui-agent-xfce is installed, I think it's reasonable to assume that xfconf-query exists. That’s why I didn’t use TryExec=, but I wonder if I’m missing something.

Also, I'd rather the path was not hardcoded.

agree.


Since minimal template is intended for advanced users, I hadn't considered it.

I expect the same thing is possible by adding xsettingsd to the qubes-gui-agent package dependencies and placing the configuration file in its proper location, but I’m hesitant to add anything by default to minimal template, which is for advanced users who prefer minimizing things…

Copy link
Copy Markdown
Contributor

@ben-grande ben-grande Mar 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since minimal template is intended for advanced users, I hadn't considered it.

For advanced users to configure, doesn't mean things should be broken. I don't know if this breaks systemd somehow if it is configured to handle xdg autostart. But I'd rather that it is not left in a failed state, but skipped.

I expect the same thing is possible by adding xsettingsd to the qubes-gui-agent package dependencies and placing the configuration file in its proper location, but I’m hesitant to add anything by default to minimal template, which is for advanced users who prefer minimizing things…

No need to add the package. It doesn't guarantee that xfce is currently running. Please find a way to know if Xfce is currently running and add that as a check to TryExec=.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since minimal template is intended for advanced users, I hadn't considered it.

For advanced users to configure, doesn't mean things should be broken.

To explain this better, minimal templates don't have everything working by default, I just don't want a failed state by default.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add the package. It doesn't guarantee that xfce is currently running. Please find a way to know if Xfce is currently running and add that as a check to TryExec=.

Is it really needed to check whether Xfce is currently running here?

All environment variables recommended for checking whether XFCE (DE) is currently running are override by 60xfce-desktop included in the qubes-gui-agent-xfce package, so as I see it, if the package is installed, Xfce is assumed to be running. Furthermore,xfconf-query does not fail even if Xfce is not running. But, --set alone will fail if the channel or property does not exist, so adding --create is planned.`)

TryExec=xfconf-query
Exec=xfconf-query --channel xsettings --property /Gtk/DecorationLayout --create --type string --set ""

With this change, it should no longer default to a failed state. (for example, even in a unique environment where only xfconf and qubes-gui-agent-xfce packages are installed on minimal template)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants