3

I recently updated from Ubuntu22.04 to 24, and since then I've had issues when launching the system settings.

If I try from the dash, nothing seems to happen, and if I run:

gnome-control-center

I get the message:

Running gnome-control-center is only supported under GNOME and Unity, exiting

I checked the value of the environmental variables XDG_CURRENT_DESKTOP and DESKTOP_SESSION, and they both are "ubuntu", so, I tried running:

XDG_CURRENT_DESKTOP=GNOME gnome-control-center

and this works.

I tried to make this permanent by adding this to my /home/.profile file:

if [[ "$DESKTOP_SESSION" == "ubuntu" ]]; then
    export XDG_CURRENT_DESKTOP=GNOME
fi

but it seems uneffective, the env variables still have the same value, and I can't open settings from the dash.

This answer describes precisely my issue, but the solution that worked for them is to switch to gdm3, which would probably mess up when I use KDE. Is there another option?

Carlo
  • 245

1 Answers1

2

I think it is because gnome-control-center refuses to start unless the environment variable XDG_CURRENT_DESKTOP and your session doesnt identify as so, and since this is a graphical launcher .bashrc or .profile doesnt work .

Lets do a custom desktop file that set XDG_CURRENT_DESKTOP=GNOME and you gonna click it whenever you want ot launch gnome-control-center

first we create our file like ~/.local/share/applications/gnome-control-center-override.desktop

put this inside:

[Desktop Entry]
Name=GNOME Settings
Comment=Launch GNOME Control Center under KDE
Icon=preferences-system
Exec=env XDG_CURRENT_DESKTOP=GNOME gnome-control-center
Terminal=false
Type=Application
Categories=GNOME;GTK;Settings;X-GNOME-Settings-Panel;
StartupNotify=true

Log out and back in, now in your applications menu or dash you will have GNOME Settings and when you click on it, it will run env XDG_CURRENT_DESKTOP=GNOME gnome-control-center

Saxtheowl
  • 2,394
  • 2
  • 12
  • 22