Hot answers tagged

74

With gtk+ ≥ 3.12 you can load a specific theme and its variant (dark, light) on a per-application1 basis via the environment variable GTK_THEME=theme:variant. As per the gtk+ reference manual: GTK_THEME. If set, makes GTK+ use the named theme instead of the theme that is specified by the gtk-theme-name setting [...] It is also possible to specify a theme ...


58

Unfortunately, GTK libraries (used in particular by GNOME) tend to emit a lot of scary-looking messages. Sometimes these messages indicate potential bugs, sometimes they're totally spurious, and it's impossible to tell which is which without delving deep into the code. As an end user, you can't do anything about it. You can report those as bugs (even if the ...


47

Replacing the main theme with the dark one in /usr/share/themes is not an ideal solution as each time gnome-themes is updated your theme will revert to default. It's preferable to properly configure your user account to use the dark theme, that way your settings will be preserved between updates. You can do that: Manually: create (open if already present) ...


47

In general, the difference from a user perspective should be purely cosmetic. Qt and GTK set themes independently (via, e.g., qtconfig or gtk-chtheme) but this is harmonized by some desktop environments. GNU/Linux tends to be more GTK oriented than Qt in the sense that the former is more commonly used, so you may want to prefer it when given the choice; an ...


22

You can do this by creating or editing a file called user-dirs.dirs in ~/.config. Mine has the following: XDG_DESKTOP_DIR="$HOME/" XDG_DOCUMENTS_DIR="/srv/documents/" XDG_DOWNLOAD_DIR="$HOME/downloads/" XDG_MUSIC_DIR="/srv/music/" XDG_PICTURES_DIR="/srv/pictures/" XDG_VIDEOS_DIR="$HOME" Firefox follows whatever you have for XDG_DESKTOP_DIR.


21

I can think of at least 2 options you can choose from: 1. use LXAppearance LXAppearance can change the GTK2/3 icons (and themes, fonts, etc.). LXAppearance is part of the LXDE desktop environment, but as you can see on the package page, its dependencies are only dbus-glib and gtk2. I prefer using LXAppearance because it gives access to all important theme-...


21

I had the same issue on Firefox 48, and this answer worked for me: Create ~/.config/gtk-3.0/settings.ini and add [Settings] gtk-primary-button-warps-slider = false I'm using XFCE, but Firefox is reading that setting for some reason. It also worked with other Gnome 3 applications, such as gnome-todo. After creating that file, I only had to restart Firefox ...


20

No, there is no difference in the internal structure of such programs. GTK and Qt are user interface toolkits and frameworks. They are libraries that the developers use to design graphical interfaces. When a graphical (GUI) program is written, first its core internals are developed. This is what makes the program run. You never see the core, they simply ...


18

At least from Meld 3.16.4 support different color schemes. See Meld > Preferences: (possibly this change was introduced in earlier versions) Note: It is also possible to force a specific theme for Meld by CLI: GTK_THEME=Adwaita:dark meld


17

The default GNOME3 themes are a disaster for tiny screens. However, the Gnome3 crowd seems to be pretty unwilling to listen to their users. They only think of how stuff looks, in particular on a tablet PC or mobile device, it seems. Soon, Gnome3 will require a 4k screen. Anyway, the best solution I have found is to switch the theme to the XFCE themes. On ...


15

You get the old page-up/down behavior via right-clicking on the scroll bar.


14

Thunar doesn't actually have a keybinding for changing to the next/previous tab, but instead the underlying GTK control, in this case GtkNotebook, has some key bindings. GtkNotebook defines previous tab as both Ctrl+PageUp and Ctrl+Alt+PageUp (and similarly for next tab/page down); however, in Thunar's case, the Ctrl+PageUp/Ctrl+PageDown keybinding is ...


13

There's only a single line in that particular .css file because the default theme (Adwaita) comes as a binary: Adwaita is a complex theme, so to keep it maintainable it's written and processed in SASS, the generated CSS is then transformed into a gresource file during gtk build and used at runtime in a non-legible or editable form. Since the code has been ...


11

For historical reasons, there are two selections¹, with different usage conventions: The PRIMARY selection automatically changes when you highlight some text with the mouse. There is no “copy” command, it's automatic. The CLIPBOARD selection changes only when you issue a “copy” command (keyboard shortcut or icon or menu entry). Classic X11 applications ...


10

I know this is a rather old question, but I wanted to add a more recent answer as I got directed here by Google and had to search for a while to find the answer. As of Firefox 57, you can run in headless mode simply by installing Firefox and running: firefox -headless http://test.com/ See the Firefox dev docs here.


10

The string in Xresources usually looks like this: name.Class.resource: value Looks like you use * in place of name and class: *color0: black Which means you apply color to everything. If you want apply colors to urxvt only: URxvt*color0: black


10

Note: This answer is for GTK3; all other answers only work for GTK2. To disable the recent files list, add the following to ~/.config/gtk-3.0/settings.ini (create it and its directory if needed): [Settings] gtk-recent-files-enabled=0 To pre-select the current working directory, run dconf write /org/gtk/settings/file-chooser/startup-mode \"cwd\" or use a ...


10

Another important aspect to consider is the Qt licensing link to their license disclosure which is explicitly set to be freely available to most non-profit making projects, but a commercial relationship is possible and might have restrictions for that case. Whereas GTK, state explicitly that it can be used freely even in proprietary applications GTK ...


9

Found a solution which works for GTK apps (but not Qt). One needs to set XMODIFIERS="@im=none" to let X11 handle dead keys. Thanks to @PabloSaratxaga for his answer.


9

Give xdotool (Ubuntu man page) a look. It's extremely powerful and should be able to do whatever you need. http://www.semicomplete.com/projects/xdotool/xdotool.xhtml


9

I found the solution after reading https://wiki.archlinux.org/index.php/Uniform_Look_for_Qt_and_GTK_Applications: Qt5 decides the style to use based on what desktop environment is used. If it doesn't recognize the desktop environment, it falls back to a generic style. To force a specific style, you can set the QT_STYLE_OVERRIDE environment variable. ...


8

@MartinVegter There is a file ~/.config/gtk-2.0/gtkfilechooser.ini. It should look like Stefano wrote: [Filechooser settings] LocationMode=path-bar ShowHidden=false ShowSizeColumn=true GeometryX=377 GeometryY=132 GeometryWidth=612 GeometryHeight=528 SortColumn=name SortOrder=ascending StartupMode=recent There was no DefaultFolder variable in this file, ...


7

Unless you are on very old/low spec hardware, running gnome/gtk apps in KDE (or kde/qt apps in GNOME) should not have any noticeable impact on performance. When you're on KDE, qt/kde libs are already loaded in memory, gtk/gnome libs are not. It's only when you fire-up a gtk/gnome app that gtk/gnome libs are loaded, the side effect being a higher memory usage ...


7

VLC media player has been using Qt interface for quite long time. VLC however, has an option to override window style, which will also change the file dialog as well. In VLC media player, do the following steps: Go to Tools > Preferences (or press Ctrl+P) In the first tab, under Interface Settings - Look and feel, look for "Force window style:" with the ...


7

They've added the + when they redesigned the original GTK (the Gimp ToolKit based on Motif) to be object oriented (meaning something like GTK on steriods I guess...) See also wikipedia page on GIMP version history.


6

Simply replace the main theme with the dark one (in a special copy of Adwaita in your home dir): mkdir -p ~/.themes cp -r /usr/share/themes/Adwaita ~/.themes/Darkwaita cd ~/.themes/Darkwaita/gtk-3.0 cp gtk-dark.css gtk.css Then use a tool like gnome-tweak-tool to set Darkwaita as your gtk theme, and the changes should take effect immediately.


6

You can look at which packages the package manager knows to be dependent on this by using: apt-get remove -s libgtk-3-0 The -s option makes sure this is a simulation so nothing is actually removed.


6

Adding the appropriate directory to your include path is exactly what you're supposed to do in this case, only you're supposed to do it by pkg-config. Accessing the files directly using full pathnames is unsupported. Add something like this to your Makefile: CFLAGS += `pkg-config --cflags gtk+-3.0` LIBS += `pkg-config --libs gtk+-3.0` This will ...


6

As has been said in the comments, the only reliable way to build a single binary which will work on different releases of Debian (or any Linux distribution) is to build it statically. This is well-supported on Debian and elsewhere, including with pkg-config etc. Static binaries can keep working for decades; the kernel's userspace interface is maintained in a ...


6

I am not sure of the general case , but in FireFox, there is a configuration setting ui.scrollToClick=0 , which gives the behaviour you want. If ui.scrollToClick=1 , then clicking the scrollbar will make it jump to that point. Also, you can use shift-click for getting the opposite behaviour of the current FireFox setting.


Only top voted, non community-wiki answers of a minimum length are eligible