25
votes
What is difference between GTK and QT applications?
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 ...
21
votes
How can I make text in meld readable?
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 ...
18
votes
Accepted
How to add QT_QPA_PLATFORMTHEME=qt5ct environment variable in Arch Linux?
I'll answer with a full guide to help the ones who have not gotten this far:
Install qt5ct (sudo pacman -S qt5ct)
You might want to install a Qt theme, that can be done by sudo pacman -S breeze for ...
15
votes
Recommended way for a Linux app to inform user of an exception
First of all, not all errors are equal.
"The username and password you are using to authenticate were rejected by the remote server" is quite different than "The machine is out of ...
12
votes
Accepted
How can I run Firefox on Linux headlessly (i.e. without requiring libgtk-x11-2.0.so.0)?
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 ...
12
votes
Accepted
Can I mark files as recently-used from the command line?
The following Python script will add all the files given as arguments to the recently-used list, using GIO:
#!/usr/bin/python3
import gi, sys
gi.require_version('Gtk', '3.0')
from gi.repository ...
11
votes
Recommended way for a Linux app to inform user of an exception
due to unstable state of the app (SIGSEGV or SIGBUS may not have any recovery)
I think it is still possible in a SIGSEGV handler to fork+exec a "crash handler" process (which then would ...
11
votes
Recommended way for a Linux app to inform user of an exception
I'm going to try and directly answer the questions [I think] you're actually asking.
How should a program handle UNIX signals?
Generally speaking, it shouldn't.
UNIX signals are a somewhat dated ...
9
votes
gtk-launch only works when present working directory is Desktop
To make this work, you have to satisfy two requirements:
Your myapp.desktop file should reside in one of several directories (not exclusively /usr/share/application). These depend on your Linux ...
9
votes
Recommended way for a Linux app to inform user of an exception
Modern desktop environments implement the notification dbus API, concretely org.freedesktop.Notifications.Notify. You can interact with that directly via dbus (which is an RPC standard used throughout ...
8
votes
What does the plus, "+", in GTK+ mean and what is its history?
I emailed Peter Mattis (co-creator of GTK/GTK+) with this question and his reponse was:
GTK was the first version of the toolkit used in pre-1.0 versions of
the GIMP. At some point, the ...
8
votes
Accepted
Error With gtk-launch: Unable to find terminal required for application
As of 18-09-2023: The list of hardcoded terminals here is
static const struct {
const char *exec;
const char *exec_arg;
} known_terminals[] = {
{ "xdg-terminal-exec", NULL },
...
7
votes
Accepted
What does the plus, "+", in GTK+ mean and what is its history?
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 ...
6
votes
Accepted
How can I quickly navigate in the GTK file chooser?
There are known shortcuts to edit the location bar: Ctrl+L, /, ., ~.
6
votes
Accepted
Change border color around window (edit GTK theme)
What worked for me is adding this to the gtk.css file (which for me is located in ~/.config/gtk-3.0)
decoration {
border: 1px solid grey;
background : grey;
}
It makes the border of the ...
6
votes
Accepted
How can I paste full path strings in the GNOME File Selection Dialog on RHEL?
Usually the file managers have the feature to type/autocomplete paths by pressing Ctrl+L.
And it seems to be working both GTK and QT based applications. I tested in KDE and GNOME as well and both work....
5
votes
How can I make text in meld readable?
only leting a update...
The 3.18 version will not show preferences to change your theme.
but by dconf-editor, you can access the meld configuration and set style-chema to 'meld-dark' ... and be ...
5
votes
GTK - Enable/set dark theme on a per-application basis
If somebody still need it, I've created simple app that will automatically set dark theme for specified apps.
You can find it here: https://github.com/galczo5/gnome-dark-apps
5
votes
How to install gtk3 in CentOS?
Following command worked for me:
sudo yum install gtk3-devel
Kindly note that I was using Python 3.6.3.
5
votes
Accepted
gnome/gtk: disable middle click paste via terminal
Underneath, Tweaks alters the dconf key
/org/gnome/desktop/interface/gtk-enable-primary-paste
You can do the same in terminal, either via dconf (e.g. to turn it off):
dconf write /org/gnome/desktop/...
Community wiki
5
votes
Accepted
How to get traditional scrollbars in GTK 2 and 3 apps in Debian 10?
GTK+2
I haven’t had any problems with scrollbars in GTK+2. Perhaps the theme you use goes to extra lengths to “damage” them. Try switching to a different theme; I use GreenMotif for example.
For extra ...
5
votes
Accepted
GTK FileChooser causes crashes in several programs
I experienced this bug in 1.01 AppImage of Inkscape.
Mike Nealy gives an explanation and workaround in a bug report here
I've copied his workaround below:
Simply updating the schema to contain show-...
5
votes
Accepted
How to focus program window instead of spawning new one if it's already open
I've found the answer. This problem turns out not a specific DE problem. It's the behavior of the app itself which is gnome-calculator.
I've found two methods(or workarounds) for doing this:
Using ...
5
votes
Accepted
Where is the system-wide dark mode setting in Linux?
Unlike e.g. MacOS, there is not just one setting.
Switching to Xfce will make life easier than struggling with whatever Raspberry pi OS is imposing (Lxsession or some such).
Go to: Settings -> ...
5
votes
Why GVim doesn't use dark theme?
Starting gvim with the environment variable GTK_THEME explicitly set appears to work:
$ GTK_THEME=Adwaita:dark gvim
5
votes
Accepted
How to run a graphical application as another user?
Short answer
Install the
run-as
scripts and run:
run-as -X <user> <command>
Long answer
Write and run a script to authorize userB to access userA graphical session.
/home/userA/.local/bin/...
5
votes
Is there an easy way to install GTK on Linux?
If you’re using Debian 11 or lower, there’s no easy way, but it’s not impossible.
(In Debian 12 or later, sudo apt install libgtk-4-dev.)
To build the example program, run
gcc $(pkg-config --cflags ...
4
votes
Show file system instead of "places" in gtk file chooser
GTK File Chooser?
A perfect solution would be an upstream commit/patch to at least gtkfilechooserdialog.c and gtkfilechooserwidget.c to implement additional features answering this question needs and ...
4
votes
X applications warn "Couldn't connect to accessibility bus:" on stderr
DON'T change /var/lib/dbus/machine-id! First see if it is empty! Read the dbus-uuidgen man page!
If you try to change an existing machine-id on a running system, it
will probably result in bad things ...
4
votes
What does the plus, "+", in GTK+ mean and what is its history?
2019.02.06 - Announcement - Project rename GTK+ to GTK.
Hi all;
tl;dr: GTK is GTK, not GTK+. The documentation has been updated, and the pkg-config file for the future 4.0 major release is now ...
Only top scored, non community-wiki answers of a minimum length are eligible