[Bug 2037676] [NEW] ubiquity needs to preserve GTK_THEME when launched from live session

Erich Eickmeyer 2037676 at bugs.launchpad.net
Thu Sep 28 19:01:04 UTC 2023


Public bug reported:

Currently, in Ubuntu Studio, when launched from the live session,
Ubiquity is using the Adwaita GTK theme, which is inconsistent with the
experience. The only way I can think of is to modify the
ubiquity.desktop file's Exec= line to the following:

Exec=sudo --preserve-
env=DBUS_SESSION_BUS_ADDRESS,XDG_DATA_DIRS,XDG_RUNTIME_DIR,GTK_THEME sh
-c 'ubiquity gtk_ui'

Note the addition of GTK_THEME. This way the GTK theme is specified and
gets preserved in the sudo environment, so long as it is set.

The other part of this fix is using ubuntustudio-live-settings to set
the GTK_THEME=Materia-dark variable. As far as I know, this will be the
only flavor that needs it.

In my testing, no other flavor of Ubuntu required this variable to be
set as the correct GTK theme seemed to propogate correctly, probably due
to the desktop environments already being GTK-based.

** Affects: ubiquity (Ubuntu)
     Importance: High
     Assignee: Erich Eickmeyer (eeickmeyer)
         Status: In Progress

** Affects: ubuntustudio-default-settings (Ubuntu)
     Importance: High
     Assignee: Erich Eickmeyer (eeickmeyer)
         Status: Fix Released


** Tags: mantic

** Tags added: mantic

** Description changed:

  Currently, when launched from the live session, Materia is using the
  Adwaita GTK theme, which is inconsistent with the experience. The only
  way I can think of is to modify the ubiquity.desktop file using the
  ubuntustudio-live-settings.postinst to change the Exec line to the
  following:
  
  Exec=env GTK_THEME=Materia-dark sudo --preserve-
  env=DBUS_SESSION_BUS_ADDRESS,XDG_DATA_DIRS,XDG_RUNTIME_DIR,GTK_THEME sh
  -c 'ubiquity gtk_ui'
  
  This way the GTK theme is specified and gets preserved in the sudo
  environment.
  
  I have tried researching better ways to do this, including a dpkg-divert
  with replacing the whole file, but replacing the whole file has the
  side-effect of losing whole translations. However, if that would be a
  better route, I'm welcome to that as a recommendation as microsurgery
- with sed a dirty hack to me.
+ with sed is a dirty hack to me.

** Description changed:

- Currently, when launched from the live session, Materia is using the
+ Currently, when launched from the live session, Ubiquity is using the
  Adwaita GTK theme, which is inconsistent with the experience. The only
  way I can think of is to modify the ubiquity.desktop file using the
  ubuntustudio-live-settings.postinst to change the Exec line to the
  following:
  
  Exec=env GTK_THEME=Materia-dark sudo --preserve-
  env=DBUS_SESSION_BUS_ADDRESS,XDG_DATA_DIRS,XDG_RUNTIME_DIR,GTK_THEME sh
  -c 'ubiquity gtk_ui'
  
  This way the GTK theme is specified and gets preserved in the sudo
  environment.
  
  I have tried researching better ways to do this, including a dpkg-divert
  with replacing the whole file, but replacing the whole file has the
  side-effect of losing whole translations. However, if that would be a
  better route, I'm welcome to that as a recommendation as microsurgery
  with sed is a dirty hack to me.

** Summary changed:

- ubiquity needs to use Materia-dark theme when launched from live session
+ ubiquity needs to preserve GTK_THEME when launched from live session

** Description changed:

- Currently, when launched from the live session, Ubiquity is using the
- Adwaita GTK theme, which is inconsistent with the experience. The only
- way I can think of is to modify the ubiquity.desktop file using the
- ubuntustudio-live-settings.postinst to change the Exec line to the
- following:
+ Currently, in Ubuntu Studio, when launched from the live session,
+ Ubiquity is using the Adwaita GTK theme, which is inconsistent with the
+ experience. The only way I can think of is to modify the
+ ubiquity.desktop file's Exec: line to the following:
  
- Exec=env GTK_THEME=Materia-dark sudo --preserve-
+ Exec:sudo --preserve-
  env=DBUS_SESSION_BUS_ADDRESS,XDG_DATA_DIRS,XDG_RUNTIME_DIR,GTK_THEME sh
  -c 'ubiquity gtk_ui'
  
- This way the GTK theme is specified and gets preserved in the sudo
- environment.
+ Note the addition of GTK_THEME. This way the GTK theme is specified and
+ gets preserved in the sudo environment, so long as it is set.
  
- I have tried researching better ways to do this, including a dpkg-divert
- with replacing the whole file, but replacing the whole file has the
- side-effect of losing whole translations. However, if that would be a
- better route, I'm welcome to that as a recommendation as microsurgery
- with sed is a dirty hack to me.
+ The other part of this fix is using ubuntustudio-live-settings to set
+ the GTK_THEME=Materia-dark variable. As far as I know, this will be the
+ only flavor that needs it.
+ 
+ In my testing, no other flavor of Ubuntu required this variable to be
+ set as the correct GTK theme seemed to propogate correctly, probably due
+ to the desktop environments already being GTK-based.

** Also affects: ubiquity (Ubuntu)
   Importance: Undecided
       Status: New

** Changed in: ubiquity (Ubuntu)
       Status: New => In Progress

** Changed in: ubiquity (Ubuntu)
     Assignee: (unassigned) => Erich Eickmeyer (eeickmeyer)

** Changed in: ubiquity (Ubuntu)
    Milestone: None => ubuntu-23.10

** Changed in: ubiquity (Ubuntu)
   Importance: Undecided => High

** Changed in: ubuntustudio-default-settings (Ubuntu)
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubiquity in Ubuntu.
https://bugs.launchpad.net/bugs/2037676

Title:
  ubiquity needs to preserve GTK_THEME when launched from live session

Status in ubiquity package in Ubuntu:
  In Progress
Status in ubuntustudio-default-settings package in Ubuntu:
  Fix Released

Bug description:
  Currently, in Ubuntu Studio, when launched from the live session,
  Ubiquity is using the Adwaita GTK theme, which is inconsistent with
  the experience. The only way I can think of is to modify the
  ubiquity.desktop file's Exec= line to the following:

  Exec=sudo --preserve-
  env=DBUS_SESSION_BUS_ADDRESS,XDG_DATA_DIRS,XDG_RUNTIME_DIR,GTK_THEME
  sh -c 'ubiquity gtk_ui'

  Note the addition of GTK_THEME. This way the GTK theme is specified
  and gets preserved in the sudo environment, so long as it is set.

  The other part of this fix is using ubuntustudio-live-settings to set
  the GTK_THEME=Materia-dark variable. As far as I know, this will be
  the only flavor that needs it.

  In my testing, no other flavor of Ubuntu required this variable to be
  set as the correct GTK theme seemed to propogate correctly, probably
  due to the desktop environments already being GTK-based.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/2037676/+subscriptions




More information about the foundations-bugs mailing list