After a system update on Kali Linux, Nautilus (GNOME Files) became slow and unresponsive, and Chrome’s file chooser defaulted to Nautilus due to xdg-desktop-portal-gnome being active. We aimed to switch to Thunar (XFCE’s file manager) and make xdg-desktop-portal-gtk handle all file dialogs and desktop integrations.
Steps That Led to Success
1. Verified Installed Portals
ls /usr/libexec/xdg-desktop-portal*
Confirmed existence of multiple portals including xdg-desktop-portal-gnome and xdg-desktop-portal-gtk.
2. Created Portal Configuration File
Created configuration to tell xdg-desktop-portal to prefer GTK instead of GNOME.
mkdir -p ~/.config/xdg-desktop-portal/
cat > ~/.config/xdg-desktop-portal/portals.conf
[preferred]
default=gtk
3. Stopped Existing Portal Processes
Cleaned up any running portal instances.
pkill -f xdg-desktop-portal
4. Masked GNOME Portal Services
Prevented GNOME portal from automatically starting again.
systemctl --user mask xdg-desktop-portal-gnome.service
systemctl --user mask xdg-desktop-portal-gnome.socket
Output confirmed both were successfully masked.
5. Restarted Portal Processes Using GTK Only
Manually relaunched only the GTK portal.
/usr/libexec/xdg-desktop-portal-gtk &
/usr/libexec/xdg-desktop-portal &
6. Verified Running Processes
Confirmed only GTK versions were active:
ps aux | grep xdg-desktop-portal
Output:
braimer 10570 /usr/libexec/xdg-desktop-portal-gtk
braimer 10571 /usr/libexec/xdg-desktop-portal
No GNOME portal processes running.
Result
• Chrome and file pickers now use Thunar (via GTK portal) instead of Nautilus.
• Nautilus lag issue resolved.
• Portal warnings about “deprecated UseIn key” no longer affect usability.
Optional Cleanup
If you want to make this permanent across updates:
sudo apt purge nautilus xdg-desktop-portal-gnome
(Only if you no longer use GNOME.)
End State Verification
You can verify by opening Chrome’s file picker or running:
xdg-open .
Thunar should open instead of Nautilus.
System now cleanly runs xdg-desktop-portal-gtk with Thunar as the default file manager.
**
KUDOS !!!!!!!!
**
Top comments (0)