User:ScotXW/GNOME braindamage

The GNOME platform edit

Development (cgit) edit

Snooping through the cgit interface, as of 3017-03-16 I cannot find GTK+ 3.89 nor 3.90…

Now, howto see all the differences that have been done to 3.89/3.90? kernel.org uses webgit howto, gnome.org uses cgit.

GTK+ 4 development series edit

 
GDK.

So let's look a the GTK+ 4 development series (= 3.90, 3.92, …):

  1. A GTK+ hackfest is planned for March 2017; the main topic is going to be improving performance, especially with regards with rendering
  2. Benjamin Otte is reworking the OpenGL renderer for GSK to ensure it’s well integrated into the GDK rendering
  3. Additionally, Benjamin Otte is also working on an experimental Vulkan-based renderer for GSK
  4. Timm Bäder is changing the GtkWidget and GtkContainer API to converge the two classes into a single scene graph
  5. The GTK+ road map is available

GTK+ Scene Graph Kit vs. Clutter / COGL / libchamplain / … edit

Watching Emanuelle Bassi's videos at FOSDEM, GUADEC, etc. it seems that the GTK+ Scene Graph Kit – finally merged into GTK 3.90 – is the culmination of trying to integrate Clutter into GTK. Certain applications, like e.g. GNOME Videos (aka Totem) or GNOME Boxes, Cheese preferred to use Clutter and GTK+ over using solely GTK+. Now that GSK is finally written and integrated into GTK 3.90, does this mean, GNOME Videos, GNOME Boxes will be ported to use solely GTK+?

Will libchamplain be ported to GTK?

Is the new "Vulkan renderer for GSK" better then Clutter_(software)#COGL?

udisks edit

 
GNOME Disks acts as a front-end to udisks2[1] and gvfs-udisks2-volume-monitor (part of GVfs). The mount option x-gvfs-show is not recognized by mount but actually configures gvfs-udisks2-volume-monitor. The option x-gvfs-show determines whether a mounted file system (partition, device) is shown or not GNOME Files.

/etc/fstab is only read at system boot-up. In case the user wants to automatically configure (here: mount) the file systems of the partitions present on the disk, which is manually connected to the system after boot-up, the user can rely on the combination of udev and udisksd to handle this.

HarfBuzz & Pango edit

At linux.conf.au 2017 Simon Cozens explained the rendering of fonts. (The actual "rendering" is done by Cairo (graphics). See what harfbuzz and pango actually do:

GVfs edit

dconf edit

GtkSourceView edit

GtkSourceView is a "source code editing widget", i.e. a syntax (or rather only keyword) highlighter, i.e. it does the syntax highlighting.

Color schemes edit

 
A Python-plugin for gedit called GeditSchemer/Color Scheme Editor is available.

Once the keywords are defined (the actual syntax is really only understood by some compiler), one could use different color schemes to display it. File holdings such color schemes also have different file structures…

Ethan Schoonover defined a set of colors – a "color theme" – he named "solarized". Then this color set was ported to all sorts of applications. And yes, each application uses its own file structure… (syntax/keyword definition and color scheme can be and are independent from one another because all grammars share some basic elements. Alternatively one could just use numbers and have the color schemes map to those.) Bottom line: stuff has to be ported to multiple applications.


There is e.g. vim2gtksourceview2, a small python script that converts from vim's color scheme into a GtkSourceView-2 color scheme.

gspell edit

gspell ist a wrapper around Enchant (software), which was already an attempt to unify spell checking. grammar checking is then another thing.

D-Bus edit

The idea behind D-Bus, a daemon doing inter-process communication (IPC) and remote procedure call (RPC) seems very counter-intuitive! Even a microkernel keeps IPC to itself. As a file is en entity of an file system, an abstraction, a process is an entity of some operating system kernel. When working on kdbus, a project aimed at porting a substantial amount of D-Bus into the Linux kernel, while keeping some parts of it in user-space, Lennart Poettering pointed out, that most kernels/OSes have been design from ground up around IPC. Kdbus was not accepted. Work on BUS1 began.

Put it into Talk:D-Bus#Article_improvements:_main_D-Bus_concepts.2Fides.2Frationale.

cf. The Linux Programming Interface by Michael Kerrisk!

Theming edit

gtk3-icon-browser edit

The package gtk-3-examples in Debian 9 Stretch now also contains the gtk3-icon-browser, a small program written by Matthias Claasen back in 2014 to conveniently browse the icons in the "current" icon theme.

The GNOME way edit

While the GNOME file manager (called Nautilus/GNOME Files) supports certain operations by default others (like Xfce's or LXDE's file managers) do not. For these file manager additional software was written, e.g.

This means, that for the new and unexperienced user, GNOME and GNOME applications just work! When using Xfce or LXDE the user has to learn about these additional programs and make things work… Xfce and LXDE are good desktop environments, but obviously less well suited for unexperienced users. Thanks to the "Microsoft way" there are a lot of users with very little knowledge and understanding but with very high expectations.

The GNOME way is not equal to the Microsoft way. The user is expected to have some understanding of how things work, and deduce from that understanding what does work and what does not. And once the user knows what he wants to do, he simply needs to painlessly learn, HOW to accomplish this on his/with his Linux kernel-based operating system running the desktop environment of his choice and the software of his choice.

When trying to explain things like "video codec", the Wikipedia goes the Idiocracy way. One step beneath the Microsoft way.

The "everything is a file" paradigm/concept is not only useful to write good software, but also very useful to learn about how to make good use of a computer.

  • data is stored as a file (in German the new Portmanteau "Datei" from Daten + Kartei was created!)
  • the storage is organized as/by a file system
    • a lot of file systems have been developed/specified
    • for some file systems there are multiple implementations
  • there are many different file structures, specified by very different entities
    • there are libraries/executables to read and write certain file structures.
  • operations can be done to a "file" open, i.e. load into memory by some program to view or to alter (edit) it, copied, moved
  • certain files can be executed, i.d. a process is created;

What the f*ck is D-Bus?

--gapplication-service edit

Many GNOME applications actually install two binaries now: one in /usr/bin and one in /usr/libexec (on Fedora!). The libexec one is a D-Bus service and the actual executable code, while the one in /usr/bin is just a wrapper or launcher executable that simply just sends a D-Bus message and quits. You can alternatively launch nautilus by entering:

  • nautilus
  • Nautilus --gapplication-service
  • gapplication launch org.gnome.Nautilus

Why? Where is the difference?

Nautilus makes use of GVfs. In case Nautilus depended on it, who would make sure it is started with Nautilus? Nautilus itself? Systemd? dbus? gapplication?

(Like GVariant, and … GApplication is part of GIO: https://developer.gnome.org/gio/stable/GApplication.html)

.desktop files edit

.desktop files are simple text-files. It is just that, due to GNOME braindamage "GNOME Files/Nautilus" by default treats them differently. Use the terminal to see/edit them, e.g.: ls /usr/share/applications/ cat /usr/share/applications/org.gnome.Nautilus.desktop You should not edit them, because your edits are not guaranteed to be persistent, as .desktop files belong to packages and may be overwritten by your package management system.

There is the directory ~/.local/share/applications, which should take precedence over the system wide one.

Specification for .desktop-file are done at freedesktop.org, and then implemented by GNOME/KDE/….

How Windows XP did it edit

In Windows XP you could edit any entry in the "start/launch menu" itself, and additionally the files in the directory. The "start/launch menu" thereby mapped the contents of the directory containing the menu entry files. A directory there was represented by a directory in the "start/launch menu". This could not be more user-friendly.

For GNOME2 there was Alacarte, but it doesn't work in GNOME Shell 3. The way to group "menu entries for applications" in directories, is to use GNOME Software!

The GNOME braindamage edit

power button edit

When AT was replaced with ATX the "power button" was introduced. It is not connected to the PSU but to the Motherboard. The only thing it does, is send a signal "button press" and the operating system can be configured to do whatever the system administrator want it to do! By default it probably should poweroff the system… I want mine to power off my system. But GNOME does not allow me to do so. Why?

  • One could start a terminal and type systemctl poweroff.
  • One could edit /etc/systemd/logind.conf to configure the handling of the "power button".
  • One could install some acpid and configure it handle the pressing of the "power button".

The default setting on my OS was nothing and I cannot chose poweroff. Why?

GNOME accessibility edit

I think Accessibility Toolkit is very fine software that probably deserves a price. See also https://wiki.debian.org/accessibility But I don't want it on my system. On Debian 9 do:

  • apt-get purge libatk-adaptor
  • at-spi2-core cannot be removed, because GNOME Files (Nautilus) depends on the package. So remove its contents:
    • /etc/X11/Xsession.d/90qt-a11y
    • /etc/xdg/autostart/at-spi-dbus-bus.desktop
    • /usr/lib/at-spi2-core/at-spi-bus-launcher
    • /usr/lib/at-spi2-core/at-spi2-registryd
    • /usr/lib/systemd/user/at-spi-dbus-bus.service
    • /usr/share/dbus-1/accessibility-services/org.a11y.atspi.Registry.service
    • /usr/share/dbus-1/services/org.a11y.Bus.service
    • /usr/share/defaults/at-spi2/accessibility.conf

If you only removed at-spi-bus-launcher and at-spi2-registryd, GNOME application would take minutes to start! Alternatively one could try sudo systemctl disable at-spi-dbus-bus.desktop org.a11y.atspi.Registry.service org.a11y.Bus.service

Of course, GNOME's Accessibility Implementation Library Gail has been completely merged into GTK+, bringing GNOME yet another step closer to accessibility that's built in, not bolted on. https://help.gnome.org/misc/release-notes/3.2/ Of course you can still remove libgail-3-0 from Debian 9, which packs GNOME 3.22 ;-)

NetworkManager edit

  • sudo systemctl disable network-manager.service

For a static IPv4/IPv6 edit:

  • vim /etc/network/interfaces
  • vim /etc/resolv.conf

PulseAudio edit

GNOME button-layout edit

To tell GTK+ where to place the close,minimize,maximize-Buttons in the GtkTitleBar as well as the GtkHeaderBar enter:

  • gsettings set org.gnome.desktop.wm.preferences button-layout 'close,minimize:'

Both gtk-menu-image and gtk-button-images were deprecated and ignored, after that they made them deprecated but not ignored… To enable icons in roll-down-menus enter:

  • gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "{'Gtk/ButtonImages': <1>, 'Gtk/MenuImages': <1>}"
  • Debian meta-packages: gnome-core and gnome are bloated. Too keep apt-get autoclean working, you need to manually install each component you really want after un-installing the meta-packages…

The development of the GNOME platform edit

Differences between GNOME and KDE SC edit

On the difference between GNOME and KDE SC: https://mjg59.dreamwidth.org/2092.html

  • KDE builds on top of what's already there, while GNOME is happy to flatten some mountains first.
  • KDE assumes a platform and attempts to work around its shortcomings. GNOME helps define the platform and works on fixing its shortcomings.

Differences between GTK and KDE Frameworks 5 edit

Regarding functionality GTK+ must be compared with Qt and not with KDE Frameworks!

Toronto GTK+ hackfest in June 2016 edit

As can be seen in the articles KDE_Frameworks_5#History and KDE_Software_Compilation#Release_cycle

  • KDE developers first release 5.0, and then guarantee API and ABI stability for this entire 5.x release cycle.
  • in the past GTK developers took the same approach: first release GTK 2.0, then guarantee API and ABI stability, for the entire 2.x release cycle.
    • As explained by Benjamin Otte in this GUADEC'13 video, GTK developers experienced a very serious development delay with this approach. During GTK 3.x it turned out to be complicated to impossible to develop the toolkit further and add the requested features while not being allowed to break API. Thus during the development of GTK 3.x, there were regular API breaks.
    • At the 2016 GTK hackfest in Toronto it was discussed to make this new approach official: blog post 1, blog post 2
    • GTK 4.0 will not be stable, but instead GTK 3.26 (equals to 14 releases during 7 years of development) and GTK 4.6 (equals to 4 released during 2 years of development)
    • this is what the GTK 3.x development cycle has been doing anyway, but now it is official, and developers won't even try to keep the API stable but focus entirely on development and it is planed to release a stable version, which non-GNOME application developers can target, every 2 years.

GTK+ developer blog from 2016-Sep-01 edit

Update as of 2016-Sep-01: https://blog.gtk.org/2016/09/01/versioning-and-long-term-stability-promise-in-gtk/

  • last GTK+ 3.x release: GTK+ 3.22 (autumn 2016) will be the last 3.x release
    • GTK+ 3.22 will receive bug fixes for at least 3 years
    • maintenance after this point may continue, depending on the amount of volunteer resources available
    • distributors of operating systems with long term support release cycles that extend past three years may want to contact the GTK team to establish a policy for back-ports
    • GTK+ Scene Graph Kit has not been integrated into 3.22
  • GTK+ 4.0 development series: following 3.22 will not be 4.0 but instead 3.90, 3.92, … => meaning that the entire GTK+ resources flow into the development of 3.90, 3.92, etc. This development will culminate in the 4.0 release. And with the 4.0 release the resources will be a split into:
  • development series: actual development of 4.90, 4.92, 4.94, … with 5.0 as goal
    • every six months a new even development version will be released
    • new major versions will be released once new features have stabilized, which is expected to be roughly every 2-3 years
    • When bumping to a new major version deprecated API will be removed!
    • Alongside these stable series, GTK+ development will continue in semi-stable development series. These development releases will contain some API changes between minor versions (say between 3.90 and 3.92), although changes will be limited wherever possible. This is the path that we expect GNOME applications to take, but other application developers may choose this option if they want access to the latest features, at the cost of some potential porting work for each minor release.
    • While the GTK+ team reserves the right to change API during development series, this does not mean that the whole GTK+ API will constantly break each release; only specific, and hopefully rarely used parts of the API may change, and if the changes are too extensive they will very likely be delayed to the next major development cycle. We’ll ensure that these changes are well-communicated in advance.
  • stable series: consecutive releases of GTK 4.2, 4.4, 4.6, 4.8, … with no specified development goal
    • whereas previously minor releases were published every six months, now they will be made as and when necessary
    • ! all updates within long-term stable series will be ABI stable !
    • new minor releases may introduce new widgets, or update the implementation of windowing system protocols in the GDK back-ends, but no additional features or theme changes will be allowed

Changes to the Toronto guidelines:

  • development will be named x.9y instead of x.y;
  • some resources will go into producing a "stable series"

It helps to risk a peek at the GTK+ Roadmap. The move away from X11 and the targeting of touchscreens simply requires a certain set of changes. These have to be tackled by the available manpower. Additionally there was Cairo and other stuff. It was certainly more easy to do Clutter, than it will be to integrate Clutter with GTK+. GTK+ Scene Graph Kit proves this.

Me (SoctXW) has created and populated Category:Software that uses GTK+. In comparison to Qt much more – quite mature – software that adopted the GTK+ toolkit has been abandoned. Subsurface originally opted for GTK+, then switched to Qt. The authors (Linus Torvalds and Dirk Hohndel) bothered to explain their motivation.

GNOME applications edit

GNOME Office edit

GNOME Office, in contrast to the Calligra Suite or LibreOffice, was never designed from scratch by any one team. Instead, it consist of applications, which were authored by independent individuals and have been developed by an increasing number of volunteers and GNOME developers. https://wiki.gnome.org/Apps/GnomeOffice

GNOME Chemistry Utils edit

 
The GNOME Chemistry Utils: GChemPaint, GChemCalc, GChem3D, GCrystal, GSpectrum and GChemTable.

Retrieved from GNOME article older version

GNOME Chemistry Utils comprises some programs and a library containing Gtk+ widgets and some C++ classes related to chemistry. Their homepage is here: wiki.gnome.org/Apps/ChemistryUtils. As of January 2016 they all use GTK 2.x, and maybe people will bother to port them to GTK 3.20 or newer.

  • GChemPaint, a 2D chemical editor
  • GChemCalc, a chemical calculator
  • GChem3D, a molecular structure viewer
  • GCrystal, a crystal structure viewer and editor
  • GSpectrum, a simple spectrum viewer
  • GChemTable, a periodic table of the elements
  • EasyChem, a program to draw high-quality molecules and 2D chemical formulas site
  • Ghemical, a computational chemistry software package

GNOME Chemistry Utils further comprises widgets not in libgtk: a periodic table of the elements (/GtkPeriodic and /GtkComboPeriodic), a crystal structure viewer (/GtkCrystalViewer) and a molecular structure viewer (/GtkChem3DViewer).

  • See KDE's Kalzium for off-line working or Periodic table in Wikipedia for on-line working. In case you wish some animation (change over time) instead of colors regarding timepoint of isolation maybe search YouTube. Or info regarding crystal system, [magnetism]], etc.

GStreamer confusion and howto deal with multimedia files in general edit

 
Question: In what use cases is the usage of GStreamer NOT overkill?
 
A still very simple example of a GStreamer pipleine.

Both authors I read, Fred Brooks and Andrew Tanenbaum, stressed how superior a certain approach to software is: one distinct application per "task". The problem is the definition of "task". A widespread definition seems to be: "deal with multimedia files (play, edit, tag, manage, etc.) regardless where they are located". With my knowledge I have arrived at a different definition:

  • manage any kind of file: use directory structure of file system and avoid the brtfs-feature "multiple-volumes" (multiple because I haven't required this so far and the complexity overwhelms me), use file browser and GNU tools (cp, mv, etc.) => no additional file database
  • in case I need to store files remotely, I prefer setting up a solution employing the Network File System protocol or the Server Message Block protocol (what would I need WebDAV for?)
  • I prefer one distinct application

As far as I can see, GStreamer is absolute overkill for the above use cases. Not until trying out gst-launch did I truly understand the idea behing GStreamer:

  • gst−launch filesrc location=music.ogg ! vorbisfile ! alsasink depicts the overkill, because it would be pointless to write the entire GStreamer framework for such simple use cases!!!!

Connect some USB video camera (and a microphone to a USB sound card) to some cheap Raspberry Pi-like computer, run some Linux distribution on it. For the task of "getting the video and the audio stream in real-time to some other computer" GStreamer and the RT protocol provide a simple solution:


  • On the transmittergst-launch udpsrc port=5000 ! application/x-rtp, clock-rate=90000,payload=96 ! rtph263pdepay queue-delay=0 ! ffdec_h263 ! xvimagesink
  • On the receiver gst-launch v4l2src ! video/x-raw-yuv,width=128,height=96,format='(fourcc)'UYVY ! ffmpegcolorspace ! ffenc_h263 ! video/x-h263 ! rtph263ppay pt=96 ! udpsink host=192.168.1.1 port=5000 sync=false

I don't even like PulseAudio, because my sound card, DOES HAVE a hardware mixer. Sadly the device driver for Linux, does not support that functionality at all, not to mention handling this hardware mixer, like handling PulseAudio (which consumes CPU time and does lag sometimes behind). See e.g. paprefs for something graphical. While AMD TrueAudio sounds like a good idea (an audio acceleration DSP), it is not documented, unsupported under Linux, and relies on a additional sound card/sound codec.

Debian releases edit

Version Freeze date Release date Security support until Long Term Support until Packages Linux kernel GCC as default compiler systemd Mesa 3D GNOME
Old version, no longer maintained: 4 "Etch" look it up 2007-Arp-08 ≈ 23,000 2.6.26? ? 7.0 2.22
Old version, no longer maintained: 5 "Lenny" look it up 2009-Feb-14 ≈ 23,000 2.6.26? ? 7.0 2.22
Old version, no longer maintained: 6 "Squeeze" look it up 2011-Feb-06 2014-May-31 2016-Feb ≈ 29,000 2.6.32 ? 7.10 2.30
Older version, yet still maintained: 7 "Wheezy" look it up 2013-May-04 2016-Feb 2018-May ≈ 36,000 3.2 ? 8.0.5 3.4
Older version, yet still maintained: 8 "Jessie" look it up 2015-Apr-25 2015-May 2020-May ≈ 43,000 3.16 4.9 215 10.3.2 3.14
Current stable version: 9 "Stretch" 2016-11-05: Transition freeze (general freeze of transitions)
2017-01-05: "Soft" freeze (no new packages, no re-entry, normal migrations)
2017-02-05: Full freeze
2017-06-17 TBA TBA 4.9 LTS 6.2 232 13.0 (2016-11-01) 3.22
Future release: 10 "Buster" n/a 2019? TBA TBA


libgtkflow edit

  • GObject and libgflow: abstract representation of a data flow
  • GTK+ and libgtkflow: graphical representation of a data flow

https://github.com/grindhold/libgtkflow

udisks2 vs storaged edit

 
file systems are managed by the Linux kernel. udev, networkmanager, udisks, etc are there to manage hot-plugging in a convenient way.

Fedora 25 is going to replace udisks2 (cf. GVfs, udisks) with storaged:

That means more "enterprise features" in my desktop operating system. Adding much more complexity to it. For persons who think they are required to understand their operating system, this means: learn even more about stuff, that is absolutely superfluous in your desktop computer.

  1. ^ "udisks2 readme".