[Bug 1581835] Re: Enable native GTK Look and Feel for non-gnome desktops

Thomas Ward teward at trekweb.org
Tue May 17 16:26:41 UTC 2016


** Changed in: openjdk-7 (Ubuntu)
   Importance: Undecided => Wishlist

** Changed in: openjdk-8 (Ubuntu)
   Importance: Undecided => Wishlist

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

Title:
  Enable native GTK Look and Feel for non-gnome desktops

Status in openjdk-7 package in Ubuntu:
  Confirmed
Status in openjdk-8 package in Ubuntu:
  Confirmed

Bug description:
  The default System LAF - ie. UIManager.getSystemLookAndFeelClassName()
  - on Linux is set to GTK for gnome desktop - ie. sun.desktop returns
  gnome - and to Metal for non-gnome desktops.

  This prevents the majority of Java applications to use the native GTK
  LAF when running.

  Also, UIManager.getSystemLookAndFeelClassName() ignores the default
  LAF set by the user through swing.defaultlaf (either as a system
  property or in swing.properties), relying instead on it's own
  simplified OS/Desktop  based heuristics and defaulting to the Cross
  Platform LAF when those heuristics fail.

  While the Default LAF can be set either as a system property or in
  swing.properties, the System LAF can only be set as as system
  property, thus there is no way to assign it system-wide.

  Historically the GTK LAF was a source of bugs and errors. It is
  unclear if the situation has improved at all in the past few years.

  = Workaround =

  Currently there are only 2 alternatives to set GTK LAF system wide,
  both rely on editing the swing.properties file, depending on whether
  the Java application calls
  UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()):

  1) For applications that *don't* use it then add
  swing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel to
  swing.properties

  2) For applications that use it then add
  swing.installedlafs=com.sun.java.swing.plaf.gtk.GTKLookAndFeel to
  swing.properties

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/1581835/+subscriptions



More information about the foundations-bugs mailing list