ublue-os / main

OCI base images of Fedora with batteries included
https://universal-blue.org/images/main/
Apache License 2.0
499 stars 46 forks source link

Gnome config messed up after rebasing from a KDE image. #58

Closed MeowieGamer closed 8 months ago

MeowieGamer commented 1 year ago

Hello! I found an issue when rebasing from Kionite to Silverblue, the config on Gnome is messed up. To fix this when you are a user, you have to set the themes, icons, window decorations, and cursors(?) in gnome-tweaks.

You also have to fix the fonts, which is as simple as running:

gsettings reset org.gnome.desktop.interface font-name
gsettings reset org.gnome.desktop.interface document-font-name
gsettings reset org.gnome.desktop.interface monospace-font-name
gsettings reset org.gnome.desktop.wm.preferences titlebar-font
gsettings reset org.gnome.desktop.interface text-scaling-factor

Do you think you could have this be an automatic fix on ublue-os? That would make this process far easier.

bsherman commented 1 year ago

Hi, I'm curious about this issue and was chatting in Discord about it as well...

My initial reaction is tosuggest this is the same thing that would happen if you install KDE Desktop on your GNOME Fedora Workstation, use KDE for a while (change UI settings, etc) and then change back to GNOME.

I have rebased between ublue versions of silverblue and kinoite and definitely NOT seen any settings messed up, but I also didn't touch any of the UI/font settings. Though, I certainly have seen it on a traditional Workstation... I just want to point out this is unlikely a problem with the rebase process, etc.

But reading your initial statement again... can you clarify the state of things when this occurred?

Had you first installed Kinoite and later rebased to Silverblue?

I've only started from Silverblue then rebased to other things and back. So I wonder if it's possible there's some first-time script which didn't run on Gnome because first login was on KDE? Still seems odd, but more plausible than I'd first imagined.

MeowieGamer commented 1 year ago

I also have started from silverblue... Maybe its just an issue on my end, I'm not sure. What I do know, however, is that many of the issues from workstation do NOT occur on silverblue/kionite rebasing.

bsherman commented 1 year ago

TL:DR This is normal behavior of KDE changing gnome settings, not a problem specific to ublue-os/rebasing, etc.

I don't think any action should be taken to try to automate a solution, but a comment in documentation somewhere could explain this for new users. Here's an idea:


Some desktop environments are known to change user settings without direct user confirmation. KDE Plasma is specifically known to change Gnome settings to provide a consistent look and feel while running Gnome/GTK applications under KDE. If rebasing to images with different desktop environments, please be aware you may need to change user appearance settings.

In Silverblue, use the Gnome Tweaks application to change fonts, icons, and themes back to user's choice (default themes/icons are Adwaita and fonts are Cantarell 11) Additionally, a user can reset to values changed by KDE to defaults using these commands:

# WARNING: this resets several user interface settings to default
dconf reset -f /org/gnome/desktop/interface/
dconf reset -f /org/gnome/desktop/wm/preferences/

Down here is the detail...

My attempt to reproduce:

  1. install stock Silverblue 37 ISO to a new VM
  2. rebase to ublue-os/silverblue-main:37; reboot
  3. close "Welcome to Gnome", do nothing else
  4. open Terminal, dconf dump / > 1-silverblue.dconf
  5. 1-silverblue.dconf has no icon or font settings, thus defaults are being used
  6. rebase to ublue-os/kinoite-main:37; reboot
  7. close "Welcome to KDE Plasma", do nothing else
  8. open Konsole, dconf dump / > 2-kinoite.dconf
  9. 2-kinoite.dconf DOES contain org.gnome.desktop.interface settings for font (Noto), icons (Breeze), gtk theme (Breeze), and wm.preferences button-layout
  10. rebase to ublue-os/silverblue-main:37; reboot
  11. open Terminal, dconf dump / > 3-silverblue.dconf
  12. no differences exist between 2-kinoite.dconf and 3-silverblue.dconf so gnome isn't auto-changing settings, but KDE Plasma did
  13. instead of doing a reset on the dconf values listed above, I made specific settings in Gnome Tweaks (eg, chooses Adwaita for fonts/icons/theme and Cantarell variants for font), these settings now get written to the user's dconf database.
  14. open Terminal, dconf dump / > 4-silverblue.dconf
  15. rebase to ublue-os/kinoite-main:37; reboot
  16. open Konsole, dconf dump / > 5-kinoite.dconf
  17. diff -uw 1-silverblue.dconf 2-kinoite.conf
    
    --- 1-silverblue.dconf  2023-03-09 14:00:41.345785277 -0600
    +++ 2-kinoite.conf  2023-03-09 14:00:41.348785204 -0600
    @@ -1,3 +1,6 @@
    +[org/gnome/desktop/a11y/applications]
    +screen-reader-enabled=false
    +
    [org/gnome/desktop/app-folders]
    folder-children=['Utilities', 'YaST']

@@ -16,6 +19,18 @@ sources=[('xkb', 'us')] xkb-options=@as []

+[org/gnome/desktop/interface] +cursor-size=24 +cursor-theme='breeze_cursors' +enable-animations=true +font-name='Noto Sans, 10' +gtk-theme='Breeze' +icon-theme='breeze' +toolbar-style='text' + +[org/gnome/desktop/wm/preferences] +button-layout='icon:minimize,maximize,close' + [org/gnome/evolution-data-server] migrated=true

18. `diff -uw 4-silverblue.conf 5-kinoite.dconf`

--- 4-silverblue.conf 2023-03-09 14:00:41.354785058 -0600 +++ 5-kinoite.dconf 2023-03-09 14:00:41.355785034 -0600 @@ -22,14 +22,14 @@ [org/gnome/desktop/interface] color-scheme='default' cursor-size=24 -cursor-theme='Adwaita' +cursor-theme='breeze_cursors' document-font-name='Cantarell 11' enable-animations=true font-antialiasing='grayscale' font-hinting='slight' -font-name='Cantarell 11' +font-name='Noto Sans, 10' gtk-theme='Adwaita' -icon-theme='Adwaita' +icon-theme='breeze' monospace-font-name='Source Code Pro 11' toolbar-style='text'



So, basically this means, KDE Plasma is a bit forceful about trying to ensure GTK/Gnome apps "look right" when running under Plasma. It accomplishes that goal by changing some user settings when it runs, even if they were already set by the user. 

This behavior is normal, however annoying, it's just different desktop environments trying to control the settings to maintain a common look and feel. It's the same as installing Fedora Workstation (Gnome), then installing and running KDE Plasma, then loading up Gnome again. It's not a problem unique to ublue-os or the rebasing process. 

Sorry if I added any confusion in previous comments; I apparently overlooked this in my earlier rebase testing.
MeowieGamer commented 1 year ago

this looks nice

atimeofday commented 1 year ago

I ended up needing to rebase to Kinoite to check if something was still broken. I rebased back to Silverblue and discovered that several things are broken. I have deleted a lot of files left behind by KDE, and several configs it altered, but my window decorations remain broken after running the commands recommended here. Something more is necessary, but I don't know what.

MeowieGamer commented 1 year ago

As i said, you need to open gnome tweaks and change a couple settings, like themes and window decorations. You probably forgot to do that.

atimeofday commented 1 year ago

Fixing everything in Gnome Tweaks was the first thing I did, before attempting increasingly nuclear options including a full UI reset. Gnome Tweaks cannot change window decorations, which are still broken.

MeowieGamer commented 1 year ago

Thats strange... Can you send a screenshot of what you mean? GNOME window decorations look fine to me.

atimeofday commented 1 year ago

I couldn't find anything consistent or significant enough for a screenshot to mean much. Maybe a config file changed or maybe there's something I didn't fully remember about one of my themes, but long story short, part of the problem was that KDE changed the icons of my themes from Adwaita to Breeze. I don't think the issue would be very noticeable if you install Kinoite first and rebase to Silverblue, but a fresh install of Silverblue for a while and with some theming to Kinoite to Silverblue is a terrible experience.

castrojo commented 8 months ago

Rebasing between desktops can cause issues, recommend you create a new user if you rebase.