FS#54389 - [ardour] Ardour cannot load UI when a Gtk2 color theme is set

Attached to Project: Community Packages
Opened by Marco Scannadinari (marcoms) - Friday, 09 June 2017, 15:32 GMT
Last edited by David Runge (dvzrv) - Thursday, 28 November 2019, 08:29 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Ray Rashif (schivmeister)
David Runge (dvzrv)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
Due to a bug in Gtk2, when more than one gtkrc specifies differing colors, it will get stuck in an infinite loop (see http://tracker.ardour.org/view.php?id=5605). This means most people that set a Gtk2 theme will launch Ardour and nothing will happen.
The fix while Ardour uses Gtk2 is to set the GTK2_RC_FILES environment variable to a matching theme, or to redirect it:

export GTK2_RC_FILES=/usr/share/themes/Adwaita/gtk-2.0/gtkrc
or
export GTK2_RC_FILES=/dev/null

Since we can't easily know what theme the user is running, the second option probably makes more sense (Ardour uses its own theme so it doesn't matter anyway if it is /dev/null)

Additional info:
* ardour 5.9-1
* config and/or log files etc.

Steps to reproduce:
1. In your ~/.gtkrc-2.0 file, enter a color declaration block -- e.g. gtk-color-scheme = "text_color:white" (either directly in the rc file or through an include)
2. Launch `ardour5`
3. See the command hang at `ardour: [INFO]: Loading color file /usr/share/ardour5/themes/dark-ardour.colors`
This task depends upon

Closed by  David Runge (dvzrv)
Thursday, 28 November 2019, 08:29 GMT
Reason for closing:  Fixed
Additional comments about closing:  GTK2_RC_FILES=/dev/null is set from ardour 5.12-12 onwards.
Comment by David Runge (dvzrv) - Tuesday, 05 February 2019, 22:05 GMT
Sorry for the very long delay until there was a response to this.
I can not reproduce this with ardour 5.12-10. Can you?
Comment by Eric Fontaine (ericfont) - Saturday, 31 August 2019, 00:31 GMT
  • Field changed: Percent Complete (100% → 0%)
I can reporduce the bug...my .gtkrc-2.0 looks like:

include "/usr/share/themes/Breeze/gtk-2.0/gtkrc"
style "user-font"
{
font_name="Noto Sans Regular"
}
widget_class "*" style "user-font"
gtk-font-name="Noto Sans Regular 10"
gtk-theme-name="Breeze"
gtk-icon-theme-name="breeze"
gtk-fallback-icon-theme="gnome"
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-menu-images=1
gtk-button-images=1

Ardour5.12.0 will have when that file is present. If I delete that file, then I can successfully run ardour.
Comment by David Runge (dvzrv) - Saturday, 31 August 2019, 00:32 GMT
Alright. I guess adding `export GTK2_RC_FILES=/dev/null` to /usr/bin/ardour5 would be the way to go here then. Will add it in an upcoming pkgrel.
Comment by James Crompton (DonJaime) - Tuesday, 26 November 2019, 17:55 GMT
Ardour has always behaved itself for me with the .gtkrc-2.0 below. I use KDE/plasmashell, not Gnome shell. Setting GTK2_RC_FILES as in ardour 5.12-12 makes ardour rather fugly. Maybe checking XDG_CURRENT_DESKTOP before adjusting the environment would be an option.


# File created by KDE Gtk Config
# Configs for GTK2 programs

include "/usr/share/themes/Breeze/gtk-2.0/gtkrc"
style "user-font"
{
font_name="Serif "
}
widget_class "*" style "user-font"
gtk-font-name="Serif 9"
gtk-theme-name="Breeze"
gtk-icon-theme-name="breeze"
gtk-fallback-icon-theme="oxygen"
gtk-cursor-theme-name="breeze_cursors"
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-menu-images=1
gtk-button-images=1
gtk-primary-button-warps-slider=1
Comment by David Runge (dvzrv) - Wednesday, 27 November 2019, 08:24 GMT
@DonJaime: This ticket is about being able to run Ardour, even if a different color scheme is set.
We can not know which custom theme is set and therefore use the one that ardour ships.

Loading...