Tag Archives: gtk3

LibreOffice Will (Finally) Use Native GTK Dialogs on Linux

libreoffice gtk dialog -- newThe next major release of LibreOffice will use native GTK3 dialogs on Linux desktops.  “Wait —LibreOffice doesn’t already use GTK dialogs?!” you might be asking. It was certainly my own first reaction when I opened an e-mail about the news in our tip inbox this morning (btw – thanks Dee!) Admittedly I do not use LibreOffice properly. Like, at all. […]

This post, LibreOffice Will (Finally) Use Native GTK Dialogs on Linux, was written by Joey Sneddon and first appeared on OMG! Ubuntu!.

Read More

Terminal Emulator `Terminator` Sees New GTK3 Pre-release 1.91

Version 1.91 (GTK3) of the powerful terminal emulator Terminator was released yesterday, bringing a few enhancements, as well as numerous fixes fixes.

Terminator terminal emulator

While the Terminator development is slow, the application is still actively improved, with version 1.91 being the second GTK3 pre-release.
According to Stephen Boddy, the main Terminator developer, the GTK3 branch is already much better than the old GTK2 Terminator version and is already used by some Linux distributions (including Ubuntu 17.04 Zesty Zapus).
Another GTK3 pre-release, version 1.92, should be available toward the end of March, while a final 2.0 (GTK3) release is expected at the end of April.

Terminator 1.91 ships with quite a few improvements and bug fixes, including:
  • enable the use of the hyper key as a modifier in shortcuts;
  • updated the preferences window to a modern version of glade. This should result in better spacing, layout etc.;
  • add the gruvbox light/dark palettes as themes;
  • add subtrees to custom commands menu – just add ‘/’ to split;
  • fix the background transparency, also allowing per theme CSS fixes and styling tweaks;
  • fix the regression of the initial scrollbar state not being;
  • fix the middle mouse button not getting passed to tmux;
  • fix oversized splitter bar hover area for Adwaita and any other theme that does this;
  • fix the logger plugin;
  • fix system fonts to pull values from dconf, not gconf;
  • fix focus/z-order issue introduced by GTK3 port;
  • many other changes. For a complete list, see THIS page (click “View the full changelog”).

For those not familiar with Terminator, this is a terminal emulator which includes numerous features, such as:
  • splitting terminals horizontally and vertically;
  • drag’n’drop reordering of terminals;
  • tabs;
  • numerous keyboard shortcuts;
  • save layouts and profiles via GUI preferences editor;
  • Quake mode (see the part about setting up the “Quake” mode from HERE);
  • simultaneous typing to arbitrary groups of terminals;
  • plugin support (it ships with a few plugins, including Activity and Inactivity Watch);
  • more.

Install Terminator (GTK3) in Ubuntu or Linux Mint

Terminator 1.91 is not available in any PPA however, there is a Terminator GTK3 Nightly Builds PPA that you can use to install the latest Terminator built with GTK3.
According to the PPA description, it contains automated builds of the development code of the GTK3 version, so “it may be subject to occasional breakage“. However, the description adds that “this is probably the best available version currently till we finalise / stabilise 2.0.“.
To add the Terminator GTK3 Nightly Builds PPA and install the application in Ubuntu or Linux Mint, use the following commands:
mkdir -p ~/.config/terminator
touch ~/.config/terminator/config
sudo add-apt-repository ppa:gnome-terminator/nightly-gtk3
sudo apt update
sudo apt install terminator

The first two commands should fix an issue with ~/.config/terminator/config not being created by Terminator on a fresh install and thus, not saving the settings.

If you don’t want to add the PPA, grab the latest debs from HERE.
Note: the Terminator package version in the PPA is currently 1.90 (+ bzr revision), however, this is the latest Terminator GTK3 code, and not an older version.
For other Linux distributions, download the source from Launchpad

Report any bugs you may find (and provide fixes if you have the skills) @ Launchpad.

Read More

Terminix 1.5.0 Released With Initial Bookmarks Support, Other Improvements [PPA]

Terminix 1.5.0 was released recently and it includes initial bookmarks support, a reworked terminal menu, a new feature to raise a notification when inactivity is detected after a specified period of silence, and more.

Terminix terminal emulator

Terminix is a GTK3 tiling terminal emulator. The application allows splitting terminals horizontally and vertically, arranging them using drag’n’drop, save and restore terminal layouts and more.
The so called “Quake” mode feature is also supported. Using this, Terminix behaves like a drop-down terminal, invoked and hidden using a key.

Changes in Terminix 1.5.0:

  • added initial support for bookmarks;
  • re-worked terminal menu to include bookmark and password options, some lesser used options moved to a sub-menu;
  • added a new feature to raise a notification if activity is detected after a specified period of silence;
  • search button now toggles depending if focused terminal has search open;
  • improved performance when using background images;
  • added new window Appearance preference;
  • improved title editors in preferences to show available variables
  • re-worked -e option to fix some bugs, should work better across more permutations;
  • many bug fixes.

Terminix terminal emulator

The new bookmarks feature allows bookmarking paths (path to a location on the file system), remote locations (SSH, telnet, FTP, etc.) and commands. You can add them to a folder, which is used to organize bookmarks hierarchically.
Adding new bookmarks or accessing existing bookmarks can be done from the terminal menu (this menu will probably change in the future). Bookmarks can also be added / edited from the Terminix Preferences, under Bookmarks:

terminix bookmarks

Another interesting feature with the latest Terminix 1.5.0 is the option to raise a notification if activity is detected after a specified period of silence.
When there’s terminal activity after a period of inactivity (configurable from the Terminix settings > Profile > Notify new activity; this is disabled by default), a notification is displayed (a GTK dialog box), containing the last line of text up to 128 characters. There’s also an indicator/badge displayed in the Terminix window:

terminix badge indicator notification

terminix badge indicator notification

Note that this activity/silence notification is only displayed if you don’t have command notifications.
Terminix supports sending desktop notifications when a long running process ends, but this feature requires a patched VTE, which is not available in some Linux distributions, including Ubuntu.
The new window style Appearance preference allows selecting how the Terminix window should look, offering the following options:
  • normal;
  • disable CSD;
  • disable CSD, hide toolbar;
  • borderless.

Here’s the new window style preference:

terminix preferences

Install Terminix in Ubuntu 16.04 or 16.10 / Linux Mint 18

I maintain Terminix in a PPA for Ubuntu 16.04 and 16.10, for both 32bit and 64bit (the Terminix devs offer a precompiled 64bit binary only on its GitHub page). Note that the Terminix developer doesn’t officially support (and thus, he doesn’t test) Terminix on 32bit though!
To add the PPA and install Terminix in Ubuntu 16.04 or 16.10 / Linux Mint 18.x, use the following commands:
sudo add-apt-repository ppa:webupd8team/terminix
sudo apt update
sudo apt install terminix

For other Linux distributions, see the Terminix packages section or build it from source.

Report any bugs you may find @ GitHub.

Read More

Add A Searchable Command Palette To Any GTK3 Application Using Plotinus

Plotinus is a library that adds a searchable command palette to any GTK+ 3 application, similar to the Atom and Sublime Text Command Palette feature (or Unity HUD).

Plotinus with Gedit

To use it, press Ctrl + Shift + P and you can easily find the action you’re looking for by typing a few letters, without having to go through the application menus. The keyboard shortcut cannot be changed, unless you build Plotinus from source.

You don’t have to make any modifications to GTK+ 3 applications to use this, you’ll only need Plotinus, which can be used either for some specific applications, or globally, for all GTK+ 3 applications.
Since I’m not sure if it works properly with all GTK+ 3 applications (I didn’t encounter any issues in my test though), the Plotinus package from the WebUpd8 PPA doesn’t activate Plotinus globally, but you can do this manually if you wish.

Installing and using Plotinus

For Ubuntu 16.10 or 16.04 / Linux Mint 18 (I was unable to build it for Ubuntu 14.04), you can install Plotinus by using the main WebUpd8 PPA. Add the PPA and install Plotinus using the following commands:
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt update
sudo apt install libplotinus

Alternatively, you can download the deb from HERE.

For how to install Plotinus in other Linux distributions, see its installation section on GitHub.

To use Plotinus for an application, use the following command:

GTK3_MODULES=/path/to/libplotinus.so application

where “application” is the application executable and /path/to/libplotinus.so is the exact path to libplotinus.so. If you’ve used the WebUpd8 PPA, the path is:

  • 32bit: /usr/lib/i386-linux-gnu/libplotinus/libplotinus.so
  • 64bit: /usr/lib/x86_64-linux-gnu/libplotinus/libplotinus.so

For example, to run Gedit with Plotinus enabled on a 64bit system (assuming Plotinus was installed via the WebUpd8 PPA), use the following command (make sure no Gedit instances are currently running):
GTK3_MODULES=/usr/lib/x86_64-linux-gnu/libplotinus/libplotinus.so gedit

You can either run this command from a terminal, or edit the application .desktop file and change the “Exec” line to this command.

To enable Plotinus globally (for all GTK+ 3 applications), open /etc/environment with a text editor (as root) and at the end of this file, paste the following:

GTK3_MODULES=$GTK3_MODULES:/path/to/libplotinus.so

where “/path/to/libplotinus.so” is the exact path to libplotinus.so (if you’ve installed Plotinus from the WebUpd8 PPA, see the exact path for 32bit and 64bit above). Then restart the session (logout/login).

To download the source, report bugs, etc., see the Plotinus GitHub page.

Also see: How To Get A Unity-Like HUD (Searchable Menu) In Xubuntu, Ubuntu MATE, Linux Mint, More

Read More

gtk3-nocsd (Module To Disable Client-Side Decorations) Sees New Release

gtk3-nocsd is a module used to disable client-side decorations, either globally (for all applications) or only for certain applications.

The module was updated to version 3 recently and it includes quite a few improvements:
  • added bash completion support for gtk3-nocsd wrapper;
  • added custom CSS for cosmetic improvements of the header bar look when CSDs are disabled (should be largely theme-agnostic, but tested against Adwaita);
  • drop compositor trick in Gtk+3 3.16.1 or higher; the set_titlebar function is reimplemented there anyway, and this should solve some possible issues with newer GTK3 versions;
  • selectively disable decorations: don’t drop the application menu icon by using set_show_close_button (FALSE), but instead replace the decoration_layout string of header bars to remove the “icon”, “minimize”, “maximize” and “close” buttons. This should fix issues with missing GNOME menu (with gThumb 3.4.x as an example);
  • also override GtkDialog’s GtkBuildable->add_child and the instance initializer of GtkShortcutsWindow; previously CSDs weren’t removed from all windows because of that;
  • added a test that verifies that no Glib/Gtk symbols are imported during link time (to make sure preloading works with BINDNOW binaries that don’t use Gtk);
  • Improvements to the documentation.

gtk3-nocsd was included in the Debian (sid and stretch) repositories about 2 months ago and it’s also available in the Ubuntu 16.10 Yakkety Yak repositories. These official packages enable gtk3-nocsd automatically in non GNOME desktops (except Unity), without requiring any configuration.
The gtk3-nocsd packages in the main WebUpd8 PPA now include the official Debian packaging however, I’ve modified it slightly to allow the module to work without any configuration in Unity, like it does for other non-GNOME desktops.
Here’s a screenshot with gtk3-nocsd enabled (and thus, client-side decorations disabled) in Ubuntu 14.04:

Ubuntu 16.04 (with Unity) supports client-side decorations so you don’t really need gtk3-nocsd, but if you want to use it for whatever reason (consistency would be one), note that it won’t look that good with the default Ambiance theme. You can try something like Numix theme instead:

For installing gtk3-nocsd in Ubuntu and its optional configuration, see our initial (updated) article: How To Disable GTK3 Client-Side Decorations (Header Bars)

Read More

Audacious Switches Back To GTK2, Adds New Qt-Based User Interface [Audacious 3.6 Alpha 1]

Audacious is a fast audio player that focuses on high audio quality and low resource usage, which comes with a pretty large plugin list and until now, it shipped with two interfaces: a GTK+ interface and a Winamp 2.x like interface (and so, it supports Winamp 2.x skins).

As we pointed out a while back, the Audacious developers aren’t very happy  with GTK3 and for the latest Audacious 3.6 alpha 1, released recently, they’ve switched back to GTK2 by default. 

Also, since the long-term goal is to completely switch to Qt, Audacious 3.6 alpha 1 includes a new Qt5-based user interface which is already usable, but not as feature-rich as the GTK+ interface. The new Qt interface can be installed alongside the already existing GTK+ and Winamp Classic interfaces.

Audacious 3.6 alpha 1 - GTK2 interface
Audacious 3.6 alpha 1 – GTK2 interface

Audacious 3.6 alpha 1 - GTK2 interface
Audacious 3.6 alpha 1 – Qt interface

For those who prefer GTK3, there’s a separate Audacious 3.6 alpha 1 GTK3 tarball available for download but, unless the developers have changed their mind, Audacious 3.6 might be the last release to support GTK3.
Besides these UI changes, the latest Audacious 3.6 alpha 1 also ships with quite a new features and improvements:
  • support double-size scaling of Winamp skins;
  • it’s now possible to search by genre in the search tool plugin;
  • the playlist manager can be docked in the GTK+ interface;
  • crossfading on seek and manual song change;
  • support for “album artist” in song tags;
  • search results are filtered by number of songs in the search tool plugin;
  • cue files are now automatically added to playlists and to the library;
  • adjustable HTTP buffer size;
  • optional calculation of a more accurate song length estimate for MP3 files
  • optional skipping of leading and trailing silence in MIDI files;
  • restored settings dialog for the SID plugin;
  • Audacious can now be built as a headless music player “daemon” with no GTK+ dependency (some plugins still require GTK+ though);
  • by default, playback now resumes in a paused state upon startup;
  • window positions of visualization plugins and of the search tool are now saved and restored at startup when the Winamp Classic interface is used;
  • there is a new effect plugin to remove leading and trailing silence in any song file;
  • new controls have been added to the song information dialog to allow tagging entire albums without retyping the artist and album name for each song;
  • a new option has been added to probe content of files with no recognized filename extension. With this option enabled, files with no extension can be added to playlists and to the library automatically, and subtunes in those files will also be recognized. The extra probing does slow Audacious down, so enable the option only if needed;
  • support for the SID song lengths database has been restored;
  • the ALSA output plugin now checks for new devices when the settings dialog is opened, so it’s no longer necessary to restart Audacious after plugging in a USB audio device;
  • the JACK and sndio output plugins have been rewritten from scratch in order to fix a number of problems;
  • more.

Audacious 3.6 is still in alpha, so if you plan on giving it a try, keep in mind that you might find incomplete of broken features. For instance, the Qt interface currently displays some text in English only and the Qt interface playlist editor has limited capabilities for now.

Test Audacious 3.6 alpha 1 in Ubuntu 14.04 or 14.10

Ubuntu 14.04 or 14.10 (and derivatives) users can try the latest Audacious 3.6 alpha by using the WebUpd8 Unstable PPA. The packages in this PPA are for testing purposes only. It’s also important to mention that Audacious from this PPA has been built with both GTK2 and Qt interfaces enabled.

To install Audacious 3.6 alpha 1 for testing, use the following commands:
sudo add-apt-repository ppa:webupd8team/unstable
sudo apt-get update
sudo apt-get install audacious

By default, launching Audacious from the menu / Unity Dash, the app will use the GTK2 interface and changing the interface to Qt from the Audacious settings doesn’t work. To run Audacious with the Qt interface, you must use the following command:
audacious --qt

If later on you want to revert the changes and downgrade Audacious to the stable version available in the official Ubuntu repositories (or the main WebUpd8 PPA), purge the WebUpd8 Unstable PPA using the following commands:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:webupd8team/unstable

If you don’t want to add the PPA or you’re not using Ubuntu, you can download the latest Audacious 3.6 alpha 1 source from its website.

Read More

How To Disable GTK3 Client-Side Decorations (Header Bars)

Starting with GNOME 3.10, some GNOME applications have switched to “header bars” or “client-side decorations“. These CSD (client-side decorations) don’t work properly in some desktop environments / shells – for instance, in Ubuntu 14.04, Unity doesn’t support CSD and because of this, some applications look broken. Luckily, there is now a relatively easy way (unofficial) of disabling client-side decorations. Read on!

In Ubuntu, Nautilus and a few other GNOME apps are patched so they don’t use client-side decorations under Unity. However, not all applications were fixed – here are a few examples:

GNOME Clocks

Latest gThumb 3.3.2 (gThumb from the Ubuntu repositories was downgraded when the Ubuntu devs noticed it’s using CSD)

GNOME Maps

PCMan, one of the LXDE founders, has created gtk3-nocsd, a small module which can be used to disable the GTK+3 client-side decorations. gtk3-nocsd can achieves this by letting GTK think there’s no compositor available, in which case the CSD fail to start.

Here are the same 3 applications as above, with gtk3-nocsd (so with disabled client-side decorations):

There are a couple of issues though. The first one is that this solution seems to work with most, but not all CSD applications – in my test, GNOME Weather continued to use client-side decorations even after using gtk3-nocsd. And the second issue is that the CSD close button isn’t removed when the client-side decorations are disabled:

Install gtk3-nocsd

Ubuntu 14.04 or 14.10 users can install gtk3-nocsd by using the main WebUpd8 PPA. To add the PPA and install gtk3-nocsd, use the following commands:
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install gtk3-nocsd

Or, if you don’t want to add the PPA, download the gtk3-nocsd deb from HERE.
Other Linux distributions: grab the gtk3-nocsd code from GitHub, make sure pkg-config and gtk+3-dev are installed and compile it using “./build.sh”.
Simply installing gtk3-nocsd won’t disable the GTK3 client-side decorations. See the example below for how to use it.

Disable GTK3 client-side decorations using gtk3-nocsd (example)

To be able to use gtk3-nocsd, you need to preload the gtk3-nocsd.so file (which is installed under /usr/lib/gtk3-nocsd/ if you’ve used the Ubuntu PPA mentioned above) using LD_PRELOAD.

The gtk3-nocsd GitHub page suggests adding the following to ~/.profile:

export GTK_CSD=0
export LD_PRELOAD=/path/to/gtk3-nocsd.so

However, by using this, Unity failed to start in my test so I strongly recommend against using it this way unless you know what you’re doing and you’re not using Unity! Instead, you can simply add LD_PRELOAD to the desktop file, which won’t affect the environment.

Here’s an example: to disable the client-side decorations for gThumb 3.3.2, open its desktop file as root with a text editor (I’ll use Gedit below):

gksu gedit /usr/share/applications/gthumb.desktop

And in this file, search for the line that starts with “Exec=” and right after “=” and before “gthumb”, add the following (without removing anything!):
env LD_PRELOAD=/usr/lib/gtk3-nocsd/gtk3-nocsd.so

After editing gthumb.desktop, the “Exec=” line should look like this:

Exec=env LD_PRELOAD=/usr/lib/gtk3-nocsd/gtk3-nocsd.so gthumb %U

In the same way you can disable client-side decorations for any application you want: GNOME Clocks, GNOME Maps, etc.

Read More