How to solve issues related to buggy GTK themes on Ubuntu Linux

Linux is famous about its fancy and eyecandy desktop themes. However many of these themes may cause problems in various applications.

DraftSight uses Qt as its GUI toolkit. Typically Qt-based applications can use  GTK themes and provide a unified look with the other GTK-based applications. However there are many GTK themes that cause problems when applied on Qt applications.

Some typical problems related to buggy GTK themes are:

  • DraftSight cannot be launched after a successful installation.
  • DraftSight launches, but some toolbars or other GUI elements are not displayed correctly.
  • DraftSight launches, but it crashes after trying to launch the printing (or any other) dialog box.
  • DraftSight can be launched only as root user.

In order to test if these problems are caused by the GTK theme, simply open DraftSight from terminal with the command:

draftsight -style plastique

If DraftSight opens correctly, it means that your GTK theme cannot work properly with DraftSight.

3 Possible workarounds

  • Change your theme to one of the defaults  Ubuntu themes (Ambiance or Radiance). These themes are known to work properly with DraftSight.

Right click on the desktop and select "Change Desktop Background" then on the Appearance window you can select as "Theme" Ambiance or Radiance.  The new theme will be applied in all  applications.

  • Install qt4-qtconfig package and select as GUI style the Plastique theme.

This is a little application that  manages the appearance and the behavior of all the Qt-based applications. It is not installed by default so it's necessary to install it via Ubuntu Software Center, Synaptic or any other package manager. After the installation, you can find this application on the Dash as "Qt Settings". Change the GUI style from "Desktop Default" to "Plastique" and save the changes. This change affects all the Qt-based applications.

  • Edit Manually the DraftSight's startup script.

This workaround will change the appearance of DraftSight only. But it's not recommended for non-experienced users for two reasons:

  1. The startup script is a very important piece of DraftSight's installation. Any mistakes while editing this file may cause a damaged installation.
  2. The changes are not permanent. All the changes will be lost after an upgrade or re-installation of DraftSight.

You have to open DraftSight's startup script with gedit as root user in order to make changes on it. To do this open a terminal and type the command:

sudo gedit /opt/dassault-systemes/draftsight/bin/draftsight

Then on line 32 add the " -style plastique " parameter.  Save the file and close gedit.