How to remove Nautilus' extra ❌ button in fedora-minimal?

Hi.

I installed the nautilus & qubes-core-agent-nautilus packages to a VM based on the fedora-33-minimal template.

However, I get an extra x (close window button), as shown by the top right corner of this screenshot:
fedora_minimal_nautilus

How to remove the gray x button?


List of packages installed to the `fedora-33-minimal` template
sudo dnf install \
qubes-core-agent-networking \
iproute \
qubes-core-agent-dom0-updates \
qubes-core-agent-network-manager \
NetworkManager-wifi \
network-manager-applet \
wireless-tools \
notification-daemon \
gnome-keyring \
polkit \
qubes-usb-proxy \
qubes-input-proxy-sender \
qubes-core-agent-passwordless-root \
qubes-mgmt-salt-vm-connector \
qubes-core-agent-dom0-updates \
qubes-menus

I do not know of a way to remove this, but I can explain why it exists. The nautilus file manager uses a popular user interface toolkit called GTK. That’s what gives the style to buttons and overall aesthetics to the app.

One of the particular quirks with GTK is that they added the ability for applications to have the min, max, close buttons inside the top header bar of the application instead of that being on the window border (within the AppVM).

What qubes does is it creates an unsupportable colored border around applications, but in the case of GTK applications who have already close buttons, it’s not able to do a thing about it because it’s embedded within the application.

However, since it’s all free and open source software (FOSS) for sure someone has been able to remove those. But is it worth the trouble?

The Nautilus of the regular (not minimal) fedora 33 template doesn’t have that extra :x: button. I don’t know how the regular template manage to do that.

Here is a comparison. The green nautilus is from the regular fedora 33.

I want to use the minimal template because my laptop has a small SSD.

1 Like

Ah! I see what you mean. I have checked and I do have window controls in the title bar on my debian-10 but not on fedora-33 (none of which are minimal):

The following is the associated issue. The strange thing is it was supposedly fixed in 2017:

Issue 2813 says gsetting would fix the problem
The issue #2813 that deeplow linked says: overriding

“org.gnome.desktop.preferences.wm.preferences” to something like “appmenu:”

would fix the problem.

Both the minimal and regular fedora-33 template have the same xml overrides

Both the minimal and regular fedora 33 template have xml files that describe the override at “/usr/share/glibg-2.0/schemas/*.gschema.override”.

list of override files

./usr/share/glib-2.0/schemas/20_org.mate.NotificationDaemon.qubes.gschema.override
./usr/share/glib-2.0/schemas/20_org.gnome.nautilus.qubes.gschema.override
./usr/share/glib-2.0/schemas/20_org.gnome.desktop.wm.preferences.qubes.gschema.override
./usr/share/glib-2.0/schemas/20_qubes-gui-vm.gschema.override
./usr/share/glib-2.0/schemas/org.gnome.Terminal.gschema.override
./usr/share/glib-2.0/schemas/20_org.gnome.settings-daemon.plugins.updates.qubes.gschema.override

Somehow only the regular template actually apply those overrides.

Recompile the schema doesn’t help

This link says I can “compile” the xml files: 20.04 - How to properly configure a dconf schema from a gschema.xml file? - Ask Ubuntu

I do the following:

cd /usr/share/glib-2.0/schemas
sudo glib-compile-schemas .

But the resulting gschema.compiled does not change upon re-compilation.

Me neither. If you happen to have a github account (or don’t mind creating one), you could follow up perhaps on the linked github issue. Marek (the lead developer) has now re-opened that issue, so any information on diagnosing this issue could be useful to post there.

Edit On second thought, this issue I described many not affect the fedora-minimal. (only debian). So it may well be a missing package or something in your case?

I’ve also specified “fedora-minimal” in the title. Feel free to change it if you feel it’s not adequate.

debian-10 but not on fedora-33

fedora-33 runs gnome-settings-daemon, debian-10 does not.

All my templates are based on debian-10 minimal and have the extra X …
just made a clone and installed gnome-settings-daemon and the X is gone.

3 Likes

After installing gnome-settings-daemon, it works now.

dom0 script to create the VM
#!/bin/bash
qvm-clone fedora-33-minimal fedora-33-minimal-test
sudo qvm-run -u root fedora-33-minimal-test \
    'xterm -e "                             \
    dnf install                        \
    eog                                \
    evince                             \
    firefox                            \
    gnome-keyring                      \
    gnome-settings-daemon              \
    gnome-terminal                     \
    iproute                            \
    nautilus                           \
    network-manager-applet             \
    NetworkManager-wifi                \
    notification-daemon                \
    polkit                             \
    pulseaudio-qubes                   \
    qubes-core-agent-dom0-updates      \
    qubes-core-agent-nautilus          \
    qubes-core-agent-networking        \
    qubes-core-agent-network-manager   \
    qubes-core-agent-passwordless-root \
    qubes-gpg-split                    \
    qubes-img-converter                \
    qubes-input-proxy-sender           \
    qubes-mgmt-salt-vm-connector       \
    qubes-pdf-converter                \
    qubes-usb-proxy                    \
    wget                               \
    wireless-tools                     \
    zenity                             \
    "'
sudo qvm-run -u root fedora-33-minimal-test \
    'shutdown -h now'

After installing gnome-settings-daemon, the :x: is still there.

Just to be sure: you installed it in the template and then shutdown the
template and restarted the appvm?

Is it running?

ps aux | grep settings

… should show gsd-xsettings is running.

Here screenshots of my reproduction:


it works now. I recreate the vm. Probably I made a mistake somewhere.

Thanks a lot.

1 Like

I want to remove that X button from debian-11 template in Qubes 4.1. I just installed gnome-settings-daemon and reset everything. X button still exist in VMs based on that template. Also I want to use nautilus file manager in focal template. I have installed nautilus and qubes-core-agent-nautilus in that template but I don’t have there Qubes incoming folder, different loading page of nautilus and that X button.

Increasing surface attack by installing additional packages (especially to minimal templates) in order to get convenience and aesthetics is not what I would do.

But it’s exactly what I want to do.

I spend 8-12 hours most days working at my computer I want it to be aesthetically pleasing and convenient to use.

I don’t want it on minimal. I want it on standard Debian template that I use for internet, and maybe on Focal that I use only for development since don’t want to messing with Debian if i got out of the box solution tailored for Ubuntu an I use that template only for that.

I know it’s always about convenience, and I respect that. For me it’s actually easier to close the window on that X, for example, so win-win for me. smaller attack surface combined with convenience.

If you installed gnome-settings-daemon in the debian-11 template, and it didn’t work, you can try the following.

Edit /etc/X11/Xsession.d/25xdg-qubes-settings and remove the lines

if [ -x /usr/bin/xsettingsd ]; then
    installConfigurationFile "xsettingsd"
    installConfigurationFile "fonts.conf"
    installConfigurationFile "Xresources"
    /usr/bin/xsettingsd &
fi

If xsettingsd is started, you can’t run another xsettings manager, preventing gsd-xsettings from starting.

In that case, it is probably better to just remove xsettingsd. Do you know why the developers decided to use xsettingsd in the debian templates and how removing these configuration files would affect usage?

I found these config files added with xsettingsd, but haven’t investigated them yet.

I do agree that it’s not very intuitive what you need to do to make it work with in Debian 11.

Only going by this thread, it seems like it stopped working in Debian 11, don’t know if something changed in that version.

Changing the settings manager breaks systems that are modified using xsettingsd, I had to redo my settings when I switched to GSD. I don’t think you can just remove xsettingsd and replace it with GSD, not with it having an impact on the systems using xsettingsd.

What exactly is broken with the GSD installation in your case? It seems that debian-gnome does not use xsettingd on systems without qubes, is this a solution of the qubes developers? After removing xsettingsd I didn’t notice any difference except:

  1. changing the default font in debian
  2. gsettings/dconf now works
  3. there is no additional close window button

A quick glance is all pluses.

Themes, fonts and icons got removed, and I had to add them again using gsettings.

The only problem it solved for me was that it removed the extra control buttons, which probably isn’t enough of a reason to force everyone to redo their settings without any warning.