The officially official Devuan Forum!

You are not logged in.

#101 Re: Freedom Hacks » How to Disable the New Apt Pager » 2025-08-10 14:28:56

It may depend on color theme and display resolution.
To avoid fatigue, one may try a sort of "retina display"
_https://en.wikipedia.org/wiki/Retina_display
e.g. 4K UHD and 8K UHD (ultra high definition).
However, if you are already semi-deaf and semi-blind, you may not notice the difference in resolution (sample rate) in both video and audio.

NOTE: UHD resolution is not supported by very old computers.

#102 Re: Desktop and Multimedia » PA Volume Control defaults » 2025-08-07 00:00:03

greenjeans wrote:

I think your posts are giving people dementia.

It seems that they provoke thinking. Although, of course, thinking does not necessarily imply understanding.

#103 Re: Desktop and Multimedia » PA Volume Control defaults » 2025-08-06 16:12:10

The problem is that "helpful apps" might be harmful. For example, people with hearing loss tend to use equalizers to enhance certain frequencies. Such equalizers are likely to cause complete deafness and dementia.

Hearing loss can affect everyone from babies to people in their 60s and 70s. Many things may cause hearing loss, but exposure to loud noise is the most common reason people have the condition. Hearing loss can’t be reversed, but surgery to treat some issues can improve hearing ...
Most people lose their hearing gradually. They may not even notice that it’s happening.
_https://my.clevelandclinic.org/health/diseases/17673-hearing-loss

Hearing loss and the risk of dementia
_https://www.alzheimers.org.uk/about-dementia/managing-the-risk-of-dementia/reduce-your-risk-of-dementia/hearing-loss

Medical research indicates that solving puzzles can help slow down cognitive decline.
_https://www.webmd.com/alzheimers/preventing-dementia-brain-exercises
Engaging in mentally stimulating activities, such as compilation of Debian packages, may help maintain cognitive abilities and potentially delay memory loss or dementia. From this point of view, your "apps that are simple to use and understand" might be rather harmful, because they prevent thinking, and, therefore, can accelerate cognitive decline.

#104 Re: Desktop and Multimedia » PA Volume Control defaults » 2025-08-05 21:54:08

$ apt remove xfce4 --simulate
NOTE: This is only a simulation!

One may argue that "a wiki is useless" simply because any wiki (or technical documentation) is likely to be misunderstood. Debian may surely need a sort of very advanced AI which may help Linux users to understand Debian wiki.
There is a belief that "Linux provides a robust set of assistive technologies to support users with disabilities." However, Linux still does not provide any support for those affected with cognitive decline and dementia.

#105 Re: Desktop and Multimedia » PA Volume Control defaults » 2025-08-05 21:29:50

xfce4 is a meta package. It can be safely removed.

$ apt-file list xfce4
xfce4: /usr/share/doc/xfce4/NEWS.Debian.gz
xfce4: /usr/share/doc/xfce4/README.Debian
xfce4: /usr/share/doc/xfce4/changelog.gz
xfce4: /usr/share/doc/xfce4/copyright

Debian Wiki
_https://wiki.debian.org/metapackage
Package that depends on a group of packages that relate to a common activity. Metapackages are empty and exists to link related packages together via dependencies. Examples would include metapackages for installing games, development tools, or desktop environments.

For instance, when installing the Gnome desktop, the package "gnome", which is a metapackage, will install the full GNOME Desktop Environment, with extra components such as office software, a browser, and games.

xfce4 is heavy and buggy (because of innovations). MATE was optimized for old computers (2003-2008).
MATE is a fork of Gnome2 (which was deprecated in 2010).

#106 Re: Desktop and Multimedia » PA Volume Control defaults » 2025-08-04 22:30:35

For old computers, one may prefer MATE Desktop. It has a sound applet in the system tray.
_https://dev1galaxy.org/viewtopic.php?pid=54330#p54330

If you have problems with PulseAudio, you may try to remove it and use pure ALSA (without PulseAudio and PipeWire).
_https://dev1galaxy.org/viewtopic.php?pid=56368#p56368
_https://dev1galaxy.org/viewtopic.php?id=6644
_https://dev1galaxy.org/viewtopic.php?pid=55710#p55710
_https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture#Unmuting_the_channels

#107 Re: Freedom Hacks » Patching on the fly with "stream editor" (fftrate ALSA plugin) » 2025-07-20 03:49:03

off-topic

@ralph.ronnquist

Nobody is perfect. Though, it might be obvious that the so-called "technical prowess" is so impressive simply because Devuan wiki is abolished by Neo-Luddites and AI haters. That is why, perhaps, "elementary skills" may look like a sort of "prowess".

The credo of esoteric Neo-Luddism is rather simple: "Secular knowledge is useless". For example: "A wiki is useless" (and, perhaps, any secular books as well, because technical literature is often outdated, and all the truth is in the Holy Scriptures). Practical reason can easily be sacrificed in the name of ideology, strange beliefs or fears. Neo-Luddism, AI hate, and other sorts of ideological obsession might be seen as "natural symptoms" of cognitive decline and dementia.

bluealsa was tested on Linux Mint with systemd (without pulseaudio and pipewire).

On Devuan, one may need a SysVinit (init.d) script for BlueAlsa
_https://github.com/joe-skb7/bluealsa-sysvinit

mkdir sysVinit_bluealsa
cd sysVinit_bluealsa
 
git clone https://github.com/joe-skb7/bluealsa-sysvinit.git
$ ls
bluealsa-sysvinit
cd bluealsa-sysvinit
$ ls -1
bluealsa
README.md
$ cat bluealsa
#!/bin/sh

### BEGIN INIT INFO
# Provides:		bluealsa
# Default-Start:	2 3 4 5
# Default-Stop:		0 1 6
# Required-Start:	dbus $syslog $local_fs $remote_fs bluetooth
# Required-Stop:	dbus $syslog $local_fs $remote_fs
# Short-Description:	Bluealsa daemon
### END INIT INFO

. /lib/lsb/init-functions

NAME=bluealsa
DESC="Bluealsa daemon"
DAEMON=/usr/bin/$NAME
PIDFILE="/var/run/$NAME.pid"
COMMON_OPTS="--quiet --oknodo --pidfile $PIDFILE"
BA_OPTS="-p a2dp-source -p a2dp-sink"

# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0

# Read configuration variable file if it is present
[ -f /etc/default/bluez-alsa ] && . /etc/default/bluez-alsa

start() {
	log_daemon_msg "Starting $DESC" "$NAME"
	start-stop-daemon --start --background --make-pidfile $COMMON_OPTS \
			  --exec $DAEMON -- $BA_OPTS $OPTIONS
	log_end_msg $?
}

stop() {
	log_daemon_msg "Stopping $DESC" "$NAME"
	start-stop-daemon --stop $COMMON_OPTS --exec $DAEMON
	log_end_msg $?
}

case "$1" in
	start)
		start
		;;
	stop)
		stop
		;;
	restart|force-reload)
		stop
		start
		;;
	status)
		status_of_proc -p $PIDFILE $DAEMON $NAME
		;;
	*)
		echo "Usage: $0 {start|stop|force-reload|restart|status}"
		exit 2
		;;
esac

3. Install and start sysvinit script:

# cp bluealsa /etc/init.d
# update-rc.d bluealsa defaults
# update-rc.d bluealsa enable
# service bluealsa start 

_https://github.com/joe-skb7/bluealsa-sysvinit

NOTE: To restart ALSA on Devuan with SysV-Init (default), one can use these commands:

$ sudo /etc/init.d/alsa-utils force-reload
Shutting down ALSA...done.
Setting up ALSA...done.

$ sudo service alsa-utils restart 
Shutting down ALSA...done.
Setting up ALSA...done.

$ sudo service alsa-utils force-reload
Shutting down ALSA...done.
Setting up ALSA...done.

#108 Re: Freedom Hacks » Patching on the fly with "stream editor" (fftrate ALSA plugin) » 2025-07-19 23:15:35

Petrov's fftrate codec (if installed) can be set as default ALSA converter (resampler) in ALSA config:
defaults.pcm.rate_converter "fftrate" 

For example:

$ cat ~/.asoundrc
# ---------------------------------------------
#		Bluetooth Headphones
#		Configuration for default audio device
#----------------------------------------------

defaults.pcm.rate_converter "fftrate"

# Perform plug device
pcm.!default
{
	type	plug
	slave.pcm	"bluealsa"
	hint.description	"Default device"
}

Notice that the package "bluez-alsa-utils" does not provide any sort of "virtual sound card".
It means that you cannot configure a software mixer for bluealsa with arateconf
ALSA software mixer needs dmix, but it does not work with "virtual PCM devices" such as bluealsa

A BlueALSA PCM can only be opened by one process at a time. This can be inconvenient in many scenarios. For example, some audio applications keep the ALSA PCM device open, even when they are not actively streaming any audio, and so it is necessary to close each application before any other can use the device; desktop systems may like to emit system sounds while music is playing; etc.

ALSA provides a solution to this for hardware cards with the "dmix" plugin. That plugin allows multiple open connections, mixes the streams together, then sends the result as a single stream to the hardware device. Unfortunately dmix works as a front-end only with hardware (ie "hw" type) devices, and not with any other plugin types such as BlueALSA.

So it is not possible to configure BlueALSA as a backend device for dmix. We are forced to find an indirect method; that is, use a "hw" device that can forward the mixed stream on to a BlueALSA PCM. Fortunately, ALSA provides just such a device, the "Loopback" device, which is a kernel driver that implements a virtual sound card.

This wiki article describes one way that BlueALSA can be used with the ALSA Loopback device and the dmix plugin to achieve mixing of multiple audio streams into a single BlueALSA playback PCM.
_https://github-wiki-see.page/m/Arkq/bluez-alsa/wiki/Using-bluealsa-with-dmix

However, ALSA "Loopback" device (virtual sound card) can reduce sound quality.

See also:
_https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture#High_quality_resampling
_https://wiki.archlinux.org/title/Bluetooth#ALSA
_https://manpages.debian.org/unstable/bluez-alsa-utils/bluealsa.8.en.html

bluealsa is a sort "virtual PCM device" (playback and capture)
_https://github.com/arkq/bluez-alsa

apt info bluez-alsa-utils
$ apt-file find /usr/bin/bluealsa
bluez-alsa-utils: /usr/bin/bluealsa       
bluez-alsa-utils: /usr/bin/bluealsa-aplay 

The default settings for bluealsa are enabled in ALSA config (if the package "bluez-alsa-utils" is installed):

$ cat /etc/alsa/conf.d/20-bluealsa.conf
# BlueALSA integration setup

# By default the predefined "bluealsa" PCM will use
# the most recently connected Bluetooth device.
defaults.bluealsa.device "00:00:00:00:00:00"
# Default to A2DP connection because that is what
# most people want to use - high quality audio.
defaults.bluealsa.profile "a2dp"
# By default allow BlueALSA to negotiate the "best"
# codec for each PCM.
defaults.bluealsa.codec "unchanged"
...
$ aplay -L | grep bluealsa
bluealsa 
alsamixer -D bluealsa

aplay -D bluealsa *.wav

BlueALSA also allows to capture audio from the connected Bluetooth device. To do so, one has to use the capture PCM device, e.g.:

arecord -D bluealsa -f s16_le -c 2 -r 48000 capture.wav 

_https://github.com/arkq/bluez-alsa

$ bluealsa-aplay -L
bluealsa:DEV=EC:66:D1:BF:02:05,PROFILE=a2dp,SRV=org.bluealsa
    Godess of Wisdom, trusted audio-headphones, playback
    A2DP (SBC): S16_LE 2 channels 48000 Hz

$ bluealsa-aplay -l
**** List of PLAYBACK Bluetooth Devices ****
hci0: EC:66:D1:BF:02:05 [Godess of Wisdom], trusted audio-headphones
  A2DP (SBC): S16_LE 2 channels 48000 Hz
**** List of CAPTURE Bluetooth Devices ****

Since the vast majority of Linux users are semi-deaf, semi-blind, and half-demented, Linux web browsers and media players usually have low quality resamlers with which they convert digital sound into a sort of digital crap. There are, however, few exceptions (e.g., Audacious).

If your bluetooth headphones supports only "S16_LE 2 channels 48000 Hz" audio format, you can take a wave or FLAC of CD format (or HiRes) and try to play it with a media player to see whether resampling is performed by the player or by ALSA (that is, by fftrate which is now the default).

$ file *.wav
test.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz

$ file *.flac
test.flac: FLAC audio bitstream data, 16 bit, stereo, 44.1 kHz, 9961896 samples

FFT is the fftrate codec (now the default ALSA converter/resampler)

$ aplay *.wav
[2492] D: bluealsa-pcm.c:1386: Getting BlueALSA PCM: PLAYBACK 00:00:00:00:00:00 a2dp
...
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
...
Input:  44100 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 5512
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 6000
Rates:  44096 --> 48000 (J: 0,01%, T: FFT, W: Vorbis)
Ok.
...
$ audacious 2>&1
[5588] D: bluealsa-pcm.c:1386: Getting BlueALSA PCM: PLAYBACK 00:00:00:00:00:00 a2dp
...
Input:  44100 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 2756
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 3000
Rates:  44096 --> 48000 (J: 0,01%, T: FFT, W: Vorbis)
Ok.
...
$ clapper 2>&1 *.flac
[6863] D: bluealsa-pcm.c:1386: Getting BlueALSA PCM: PLAYBACK 00:00:00:00:00:00 a2dp
...
Input:  44100 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 441
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 480
Rates:  44100 --> 48000 (J: 0,00%, T: FFT, W: Vorbis)
Ok.
...
$ strawberry 2>&1 *.flac
[7285] D: bluealsa-pcm.c:1386: Getting BlueALSA PCM: PLAYBACK 00:00:00:00:00:00 a2dp
...
Input:  44100 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 441
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 480
Rates:  44100 --> 48000 (J: 0,00%, T: FFT, W: Vorbis)
Ok.
...

dmix (with fftrate) makes the difference.

mpv on Devuan with ALSA software mixer (dmix) configured with Petrov's arateconf
(without pulseaudio and pipewire).
Soundcard iMic USB supports only 16bit 48kHz audio format.

pw.conf is a sort of pipewire config (it is not installed).

Bug#1038394: libpipewire
_https://groups.google.com/g/linux.debian.bugs.dist/c/JCDQBHGkxMY
_https://gitlab.archlinux.org/archlinux/packaging/packages/pipewire/-/issues/1

$ mpv 2>&1 *.mp4
 (+) Video --vid=1 (*) (h264 848x480 25.000fps)
 (+) Audio --aid=1 (*) (aac 2ch 44100Hz)
[W][33501.807636] pw.conf      | [          conf.c:  939 try_load_conf()] can't load config client.conf: No such file or directory
[E][33501.807661] pw.conf      | [          conf.c:  963 pw_conf_load_conf_for_context()] can't load default config client.conf: No such file or directory
Input:  44100 Hz, 2 ch, 's32_le' (0xa): dummy = 0, period = 1764
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  44100 --> 48000 (J: 0.00%, T: FFT, W: Vorbis)
Ok.

AO: [alsa] 44100Hz stereo 2ch float
VO: [gpu] 848x480 => 853x480 yuv420p
(Paused) AV: 00:00:17 / 00:10:49 (3%) A-V: -0.000 
$ celluloid 2>&1
[W][32816.655765] pw.conf      | [          conf.c:  939 try_load_conf()] can't load config client.conf: No such file or directory
[E][32816.655785] pw.conf      | [          conf.c:  963 pw_conf_load_conf_for_context()] can't load default config client.conf: No such file or directory
Input:  44100 Hz, 2 ch, 's32_le' (0xa): dummy = 0, period = 1764
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  44100 --> 48000 (J: 0.00%, T: FFT, W: Vorbis)
Ok. 
$ mediainfo *.mp4 | grep Audio -A9
Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 10 min 49 s
Bit rate mode                            : Constant
Bit rate                                 : 128 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 44.1 kHz
Frame rate                               : 43.066 FPS (1024 SPF)
Compression mode                         : Lossy
sudo apt install mediainfo

#109 Re: Desktop and Multimedia » RefractaOS - (Devuan Daedalus Based) Fresh Install SOUND OK XCEPT4FBK? » 2025-07-18 03:43:58

ralph.ronnquist wrote:

bluez-alsa-utils (which provides a virtual sound card for playback and capture via bluez bluetooth mediation).

It seems that it does not provide any "virtual sound card".

What it does provide is a sort "virtual PCM device" named "bluealsa"
_https://github.com/arkq/bluez-alsa

aplay -D bluealsa test.wav 
alsamixer -D bluealsa 
 $ bluealsa-aplay -l
**** List of PLAYBACK Bluetooth Devices ****
hci0: EC:66:D1:BF:02:05 [Godess of Wisdom], trusted audio-headphones
  A2DP (SBC): S16_LE 2 channels 48000 Hz
**** List of CAPTURE Bluetooth Devices **** 

It can be configured as default playback device, e.g. ~/.asoundrc.

The question is how to configure a dmix for it.

EDIT:

Unfortunately dmix works as a front-end only with hardware (ie "hw" type) devices, and not with any other plugin types such as BlueALSA.

So it is not possible to configure BlueALSA as a backend device for dmix. We are forced to find an indirect method; that is, use a "hw" device that can forward the mixed stream on to a BlueALSA PCM. Fortunately, ALSA provides just such a device, the "Loopback" device, which is a kernel driver that implements a virtual sound card.

This wiki article describes one way that BlueALSA can be used with the ALSA Loopback device and the dmix plugin to achieve mixing of multiple audio streams into a single BlueALSA playback PCM.
_https://github-wiki-see.page/m/Arkq/bluez-alsa/wiki/Using-bluealsa-with-dmix

A very simple ALSA config for Bluetooth Headphones:

$ cat ~/.asoundrc
# -------------------------------------------
#		Bluetooth Headphones
#
#	Configuration for default audio device
#--------------------------------------------

# Perform plug device
pcm.!default
{
	type	plug
	slave.pcm	"bluealsa"
	hint.description	"Default device"
}

bluealsa is a Linux daemon to give applications access to Bluetooth audio streams using the Bluetooth A2DP, HFP, HSP and/or BLE-MIDI profiles. It provides a D-Bus API to applications, and can be used by ALSA applications via libasound plugins (see bluealsa-plugins(7) for details).
_https://manpages.debian.org/unstable/bluez-alsa-utils/bluealsa.8.en.html

$ apt-file find /usr/bin/bluealsa
bluez-alsa-utils: /usr/bin/bluealsa       
bluez-alsa-utils: /usr/bin/bluealsa-aplay

#110 Re: Desktop and Multimedia » noCSD for GTK4 » 2025-07-01 01:04:31

The so-called Ubuntu sources are Debian sources with (or without) Ubuntu patches.

#111 Re: Desktop and Multimedia » noCSD for GTK4 » 2025-06-30 19:06:49

Do you remember an old story of fox and the grapes?
_https://en.wikipedia.org/wiki/The_Fox_and_the_Grapes

#112 Re: Desktop and Multimedia » noCSD for GTK4 » 2025-06-30 16:48:49

If you really want to learn something, you may try to reproduce my experiments.
If you need a ready package, you may ask stopAI.
He had already compiled everything
_https://dev1galaxy.org/viewtopic.php?pid=55960#p55960

#113 Re: Desktop and Multimedia » noCSD for GTK4 » 2025-06-30 16:13:22

Are you going to compile it or not?

#114 Re: Desktop and Multimedia » noCSD for GTK4 » 2025-06-30 15:04:05

@greenjeans

Have you already forgotten what you said today? (02:18:56)

greenjeans wrote:

@tux_99, Dude! That's hot stuff, nice find!! Exactly the kind of thing we need.

#115 Re: Desktop and Multimedia » noCSD for GTK4 » 2025-06-30 13:00:59

You may try something like this:

On  Excalibur

Install the Build-Deps

sudo apt build-dep gtk3-nocsd
mkdir BUILD
cd BUILD

Copy the patch into BUILD

$ ls
add-gtk4-support.patch 

Download the source into BUILD

apt source gtk3-nocsd 
$ ls -1
add-gtk4-support.patch
gtk3-nocsd-<version>  # it is the sourcedir 
...

cd to the sourcedir

cd gtk3-nocsd-* 

Apply the patch

patch -Np1 -i ../add-gtk4-support.patch --verbose 

_https://www.man7.org/linux/man-pages/man1/patch.1.html

Build the deb package

dpkg-buildpackage -us -uc -b 
cd ..
ls -1 *.deb 

EDIT:

It works on Devuan 5 Daedalus

 ➤ inxi -b | grep Host -A1
  Host: devuan Kernel: 6.1.0-37-amd64 arch: x86_64 bits: 64 Desktop: MATE
    v: 1.26.0 Distro: Devuan GNU/Linux 5 (daedalus) 
➤ cd gtk3-nocsd-*

➤ patch -Np1 -i ../add-gtk4-support.patch
patching file gtk3-nocsd.c

➤ dpkg-buildpackage -us -uc -b

➤ ls -1 ../*.deb
../gtk3-nocsd_3-1_all.deb
../libgtk3-nocsd0_3-1_amd64.deb
../libgtk3-nocsd0-dbgsym_3-1_amd64.deb 

greenjeans and other Neo-Luddites may try to patch and rebuild gtk3-nocsd.
Although, of course, it might be difficult to follow the instruction (because of dementia, perhaps).

It might be a test for diagnosing dementia.

#116 Re: Desktop and Multimedia » noCSD for GTK4 » 2025-06-30 02:04:39

Thanks!

➤ dget --extract --allow-unauthenticated https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/gtk3-nocsd/3-1ubuntu3/gtk3-nocsd_3-1ubuntu3.dsc
dget: retrieving https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/gtk3-nocsd/3-1ubuntu3/gtk3-nocsd_3-1ubuntu3.dsc
...
dpkg-source: info: extracting gtk3-nocsd in gtk3-nocsd-3
dpkg-source: info: unpacking gtk3-nocsd_3.orig.tar.gz
dpkg-source: info: unpacking gtk3-nocsd_3-1ubuntu3.debian.tar.xz
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying debian-specifics-in-manpage.patch
dpkg-source: info: applying add-gtk4-support.patch
➤ ls -1
gtk3-nocsd-3
gtk3-nocsd_3-1ubuntu3.debian.tar.xz
gtk3-nocsd_3-1ubuntu3.dsc
gtk3-nocsd_3.orig.tar.gz
➤ ls -1 gtk3-nocsd-3/debian/patches
add-gtk4-support.patch
debian-specifics-in-manpage.patch
series
➤ cat gtk3-nocsd-3/debian/patches/add-gtk4-support.patch
Description: add some description: Add Gtk4 Support
Imported new upstream version 4 and fixed logic error in gtk_window_set_titlebar
Imported from https://github.com/ZaWertun/gtk3-nocsd
Author: Brett Bogert <bbogert24@gmail.com>
Bug: https://bugs.launchpad.net/ubuntu/+source/gtk3-nocsd/+bug/1946161
--- a/gtk3-nocsd.c
+++ b/gtk3-nocsd.c
@@ -22,6 +22,7 @@
 
 #define _GNU_SOURCE
 #include <dlfcn.h>
+#include <link.h>
 #include <unistd.h>
 #include <string.h>
 #include <stdlib.h>
@@ -38,6 +39,16 @@
 
 #include <gobject/gvaluecollector.h>
 
+#ifdef __FreeBSD__
+#include <sys/elf_generic.h>
+#define ElfW(t) Elf##_##t
+#endif
+
+#ifdef G_TYPE_INSTANCE_GET_PRIVATE
+#   undef G_TYPE_INSTANCE_GET_PRIVATE
+#endif
+#define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type)   ((c_type*) g_type_instance_get_private ((GTypeInstance*) (instance),(g_type)))
+
 typedef void (*gtk_window_buildable_add_child_t) (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, const gchar *type);
 typedef GObject* (*gtk_dialog_constructor_t) (GType type, guint n_construct_properties, GObjectConstructParam *construct_params);
 typedef char *(*gtk_check_version_t) (guint required_major, guint required_minor, guint required_micro);
@@ -111,12 +122,17 @@ static void * volatile library_handles[N
 static pthread_key_t key_tls;
 static pthread_once_t key_tls_once = PTHREAD_ONCE_INIT;
 
+/* Marking both as volatile here saves the trouble of caring about
+ * memory barriers. */
+static volatile gboolean is_compatible_gtk_version_cached = FALSE;
+static volatile gboolean is_compatible_gtk_version_checked = FALSE;
+static volatile int gtk2_active;
+
 typedef struct gtk3_nocsd_tls_data_t {
   // When set to true, this override gdk_screen_is_composited() and let it
   // return FALSE temporarily. Then, client-side decoration (CSD) cannot be initialized.
   volatile int disable_composite;
   volatile int signal_capture_handler;
-  volatile int fake_global_decoration_layout;
   volatile int in_info_collect;
   const char *volatile  signal_capture_name;
   volatile gpointer signal_capture_instance;
@@ -140,6 +156,12 @@ static void *find_orig_function(int try_
     void *handle;
     void *symptr;
 
+    /* Ok, so in case both gtk2 + gtk3 are loaded, but we are using
+     * gtk2, we don't know what RTLD_NEXT is going to choose - so we
+     * must explicitly pick up the gtk2 versions... */
+    if (try_gtk2 && gtk2_active)
+        goto try_gtk2_version;
+
     /* This will work in most cases, and is completely thread-safe. */
     handle = dlsym(RTLD_NEXT, symbol);
     if (handle)
@@ -248,10 +270,12 @@ RUNTIME_IMPORT_FUNCTION(0, GTK_LIBRARY,
 RUNTIME_IMPORT_FUNCTION(0, GTK_LIBRARY, gtk_header_bar_set_show_close_button, void, (GtkHeaderBar *bar, gboolean setting), (bar, setting))
 RUNTIME_IMPORT_FUNCTION(0, GTK_LIBRARY, gtk_header_bar_set_decoration_layout, void, (GtkHeaderBar *bar, const gchar *layout), (bar, layout))
 RUNTIME_IMPORT_FUNCTION(0, GTK_LIBRARY, gtk_header_bar_get_decoration_layout, const gchar *, (GtkHeaderBar *bar), (bar))
+RUNTIME_IMPORT_FUNCTION(0, GTK_LIBRARY, gtk_header_bar_get_custom_title, GtkWidget *, (GtkHeaderBar *bar), (bar))
 RUNTIME_IMPORT_FUNCTION(0, GTK_LIBRARY, gtk_style_context_add_class, void, (GtkStyleContext *context, const gchar *class_name), (context, class_name))
 RUNTIME_IMPORT_FUNCTION(0, GTK_LIBRARY, gtk_style_context_remove_class, void, (GtkStyleContext *context, const gchar *class_name), (context, class_name))
-RUNTIME_IMPORT_FUNCTION(0, GTK_LIBRARY, gtk_style_context_add_provider, void, (GtkStyleContext *context, GtkStyleProvider *provider, guint priority), (context, provider, priority))
+RUNTIME_IMPORT_FUNCTION(0, GTK_LIBRARY, gtk_style_context_add_provider_for_screen, void, (GdkScreen *screen, GtkStyleProvider *provider, guint priority), (screen, provider, priority))
 RUNTIME_IMPORT_FUNCTION(0, GTK_LIBRARY, gtk_style_provider_get_type, GType, (), ())
+RUNTIME_IMPORT_FUNCTION(0, GTK_LIBRARY, gtk_widget_hide, void, (GtkWidget *widget), (widget))
 RUNTIME_IMPORT_FUNCTION(0, GTK_LIBRARY, gtk_widget_destroy, void, (GtkWidget *widget), (widget))
 RUNTIME_IMPORT_FUNCTION(0, GTK_LIBRARY, gtk_widget_get_mapped, gboolean, (GtkWidget *widget), (widget))
 RUNTIME_IMPORT_FUNCTION(0, GTK_LIBRARY, gtk_widget_get_realized, gboolean, (GtkWidget *widget), (widget))
@@ -262,6 +286,7 @@ RUNTIME_IMPORT_FUNCTION(0, GTK_LIBRARY,
 RUNTIME_IMPORT_FUNCTION(0, GTK_LIBRARY, gtk_widget_realize, void, (GtkWidget *widget), (widget))
 RUNTIME_IMPORT_FUNCTION(0, GTK_LIBRARY, gtk_widget_get_settings, GtkSettings *, (GtkWidget *widget), (widget))
 RUNTIME_IMPORT_FUNCTION(0, GTK_LIBRARY, gtk_widget_get_toplevel, GtkWidget *, (GtkWidget *widget), (widget))
+RUNTIME_IMPORT_FUNCTION(0, GDK_LIBRARY, gdk_screen_get_default, GdkScreen *, (), ())
 RUNTIME_IMPORT_FUNCTION(0, GDK_LIBRARY, gdk_window_get_user_data, void, (GdkWindow *window, gpointer *data), (window, data))
 RUNTIME_IMPORT_FUNCTION(1, GDK_LIBRARY, gdk_screen_is_composited, gboolean, (GdkScreen *screen), (screen))
 RUNTIME_IMPORT_FUNCTION(1, GDK_LIBRARY, gdk_window_set_decorations, void, (GdkWindow *window, GdkWMDecoration decorations), (window, decorations))
@@ -287,6 +312,7 @@ RUNTIME_IMPORT_FUNCTION(0, GOBJECT_LIBRA
 RUNTIME_IMPORT_FUNCTION(0, GOBJECT_LIBRARY, g_value_unset, void, (GValue *value), (value))
 RUNTIME_IMPORT_FUNCTION(0, GOBJECT_LIBRARY, g_value_get_string, const gchar *, (const GValue *value), (value))
 RUNTIME_IMPORT_FUNCTION(0, GOBJECT_LIBRARY, g_value_get_boolean, gboolean, (const GValue *value), (value))
+RUNTIME_IMPORT_FUNCTION(0, GOBJECT_LIBRARY, g_type_name, const gchar *, (GType type), (type))
 RUNTIME_IMPORT_FUNCTION(0, GLIB_LIBRARY, g_getenv, gchar *, (const char *name), (name))
 RUNTIME_IMPORT_FUNCTION(0, GLIB_LIBRARY, g_logv, void, (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format, va_list args), (log_domain, log_level, format, args))
 RUNTIME_IMPORT_FUNCTION(0, GLIB_LIBRARY, g_free, void, (gpointer mem), (mem))
@@ -314,10 +340,12 @@ RUNTIME_IMPORT_FUNCTION(0, GIREPOSITORY_
 #define orig_gtk_header_bar_set_show_close_button        rtlookup_gtk_header_bar_set_show_close_button
 #define orig_gtk_header_bar_set_decoration_layout        rtlookup_gtk_header_bar_set_decoration_layout
 #define orig_gtk_header_bar_get_decoration_layout        rtlookup_gtk_header_bar_get_decoration_layout
+#define gtk_header_bar_get_custom_title                  rtlookup_gtk_header_bar_get_custom_title
 #define gtk_style_context_add_class                      rtlookup_gtk_style_context_add_class
 #define gtk_style_context_remove_class                   rtlookup_gtk_style_context_remove_class
-#define gtk_style_context_add_provider                   rtlookup_gtk_style_context_add_provider
+#define gtk_style_context_add_provider_for_screen        rtlookup_gtk_style_context_add_provider_for_screen
 #define gtk_style_provider_get_type                      rtlookup_gtk_style_provider_get_type
+#define gtk_widget_hide                                  rtlookup_gtk_widget_hide
 #define gtk_widget_destroy                               rtlookup_gtk_widget_destroy
 #define gtk_widget_get_mapped                            rtlookup_gtk_widget_get_mapped
 #define gtk_widget_get_realized                          rtlookup_gtk_widget_get_realized
@@ -326,9 +354,11 @@ RUNTIME_IMPORT_FUNCTION(0, GIREPOSITORY_
 #define gtk_widget_set_parent                            rtlookup_gtk_widget_set_parent
 #define gtk_widget_unrealize                             rtlookup_gtk_widget_unrealize
 #define gtk_widget_realize                               rtlookup_gtk_widget_realize
+#define gdk_screen_get_default                           rtlookup_gdk_screen_get_default
 #define gdk_window_get_user_data                         rtlookup_gdk_window_get_user_data
 #define orig_gdk_screen_is_composited                    rtlookup_gdk_screen_is_composited
 #define orig_gdk_window_set_decorations                  rtlookup_gdk_window_set_decorations
+#define g_list_free                                      rtlookup_g_list_free
 #define g_object_get_data                                rtlookup_g_object_get_data
 #define g_object_set_data                                rtlookup_g_object_set_data
 #define g_type_check_class_cast                          rtlookup_g_type_check_class_cast
@@ -337,12 +367,16 @@ RUNTIME_IMPORT_FUNCTION(0, GIREPOSITORY_
 #define g_object_class_find_property                     rtlookup_g_object_class_find_property
 #define g_object_get_valist                              rtlookup_g_object_get_valist
 #define g_object_get_property                            rtlookup_g_object_get_property
+#ifdef g_object_ref
+#  undef g_object_ref
+#endif
 #define g_object_ref                                     rtlookup_g_object_ref
 #define g_object_unref                                   rtlookup_g_object_unref
 #define g_value_init                                     rtlookup_g_value_init
 #define g_value_unset                                    rtlookup_g_value_unset
 #define g_value_get_string                               rtlookup_g_value_get_string
 #define g_value_get_boolean                              rtlookup_g_value_get_boolean
+#define g_type_name                                      rtlookup_g_type_name
 #define orig_g_type_register_static_simple               rtlookup_g_type_register_static_simple
 #define orig_g_type_add_interface_static                 rtlookup_g_type_add_interface_static
 #define orig_g_type_add_instance_private                 rtlookup_g_type_add_instance_private
@@ -374,7 +408,43 @@ static void static_g_log(const gchar *lo
     va_end (args);
 }
 
-static gboolean is_gtk_version_larger_or_equal(guint major, guint minor, guint micro) {
+int check_gtk2_callback(struct dl_phdr_info *info, size_t size, void *pointer)
+{
+    ElfW(Half) n;
+
+    if (G_UNLIKELY(strstr(info->dlpi_name, GDK_LIBRARY_SONAME_V2))) {
+        for (n = 0; n < info->dlpi_phnum; n++) {
+            uintptr_t start = (uintptr_t) (info->dlpi_addr + info->dlpi_phdr[n].p_vaddr);
+            uintptr_t end   = start + (uintptr_t) info->dlpi_phdr[n].p_memsz;
+            if ((uintptr_t) pointer >= start && (uintptr_t) pointer < end) {
+                gtk2_active = 1;
+                /* The gtk version check could have already been cached
+                 * before we were able to determine that gtk2 is in
+                 * use, so force this to FALSE. (Regardless of  the
+                 * _checked value.) */
+                is_compatible_gtk_version_cached = FALSE;
+                return 0;
+            }
+        }
+    }
+    return 0;
+}
+
+static void detect_gtk2(void *pointer)
+{
+    if (gtk2_active)
+        return;
+    /* There is a corner case where a program with plugins loads
+     * multiple plugins, some of which are linked against gtk2, while
+     * others are linked against gtk3. If the gtk2 plugins are used,
+     * this causes problems if we detect gtk3 just on the fact of
+     * whether gtk3 is loaded. Hence we iterate over all loaded
+     * libraries and if the pointer passed to us is within the memory
+     * region of gtk2, we set a global flag. */
+    dl_iterate_phdr(check_gtk2_callback, pointer);
+}
+
+static gboolean is_gtk_version_larger_or_equal2(guint major, guint minor, guint micro, int* gtk_loaded) {
     static gtk_check_version_t orig_func = NULL;
     if(!orig_func)
         orig_func = (gtk_check_version_t)find_orig_function(0, GTK_LIBRARY, "gtk_check_version");
@@ -388,9 +458,19 @@ static gboolean is_gtk_version_larger_or
      * will give us a reference to gtk_check_version. But since
      * that symbol is compatible with gtk3, this doesn't hurt.
      */
-     if (orig_func)
+     if (orig_func) {
+         if (gtk_loaded)
+             *gtk_loaded = TRUE;
         return (orig_func(major, minor, micro) == NULL);
-    return FALSE;
+     } else {
+         if (gtk_loaded)
+             *gtk_loaded = FALSE;
+        return FALSE;
+     }
+}
+
+static gboolean is_gtk_version_larger_or_equal(guint major, guint minor, guint micro) {
+    return is_gtk_version_larger_or_equal2(major, minor, micro, NULL);
 }
 
 static gboolean are_csd_disabled() {
@@ -404,22 +484,27 @@ static gboolean are_csd_disabled() {
 }
 
 static gboolean is_compatible_gtk_version() {
-    /* Marking both as volatile here saves the trouble of caring about
-     * memory barriers. */
-    static volatile gboolean checked = FALSE;
-    static volatile gboolean compatible = FALSE;
+    int gtk_loaded = FALSE;
 
-    if(G_UNLIKELY(!checked)) {
-        if (!is_gtk_version_larger_or_equal(3, 10, 0)) {
+    if(G_UNLIKELY(!is_compatible_gtk_version_checked)) {
+        if (gtk2_active) {
+            is_compatible_gtk_version_cached = FALSE;
+	} else if (!is_gtk_version_larger_or_equal2(3, 10, 0, &gtk_loaded)) {
             /* CSD was introduced there */
-            compatible = FALSE;
+            is_compatible_gtk_version_cached = FALSE;
         } else {
-            compatible = TRUE;
+            is_compatible_gtk_version_cached = TRUE;
         }
-        checked = TRUE;
+        /* If in a dynamical program (e.g. using python-gi) Glib is loaded before
+         * Gtk, then the Gtk version check is executed before Gtk is even loaded,
+         * returning FALSE and caching it. This will not disable CSD if Gtk is
+         * loaded later. To circumvent this, cache the value only if we know that
+         * Gtk is loaded. */
+        if (gtk_loaded)
+            is_compatible_gtk_version_checked = TRUE;
     }
 
-    return compatible;
+    return is_compatible_gtk_version_cached;
 }
 
 static void set_has_custom_title(GtkWindow* window, gboolean set) {
@@ -479,11 +564,18 @@ static GtkStyleProvider *get_custom_css_
       "  border-color: transparent;\n"
       "}\n"
       ".background:not(.tiled):not(.maximized) .titlebar:backdrop,\n"
-      ".background:not(.tiled):not(.maximized) .titlebar {\n"
+      ".background:not(.tiled):not(.maximized) .titlebar,"
+      ".background:not(.tiled):not(.maximized) .titlebar headerbar {\n"
       "  border-top-left-radius: 0;\n"
       "  border-top-right-radius: 0;\n"
-      "}\n"
-      "";
+      "}\n";
+    static int title_skipped = 0;
+
+    const char* env_show_header = getenv("GTK3NOCSD_SHOW_HEADER");
+    if (env_show_header && !strncmp(env_show_header, "1", 2) && !title_skipped) {
+        custom_css += 39; // skip CSS rule that hides title
+        title_skipped = 1;
+    }
 
     if (G_UNLIKELY (provider == NULL)) {
         GtkCssProvider *new_provider;
@@ -507,16 +599,15 @@ static GtkStyleProvider *get_custom_css_
 
 static void add_custom_css (GtkWidget *widget)
 {
-    GtkStyleContext *context = gtk_widget_get_style_context (widget);
     GtkStyleProvider *my_provider = get_custom_css_provider ();
-
-    if (!context || !my_provider)
+    if (!my_provider)
         return;
 
     /* Use a higher priority than SETTINGS, but lower than APPLICATION.
      * add_provider will make sure a given provider is not added twice.
      */
-    gtk_style_context_add_provider (context, my_provider, GTK_STYLE_PROVIDER_PRIORITY_SETTINGS + 50);
+    GdkScreen *screen = gdk_screen_get_default ();
+    gtk_style_context_add_provider_for_screen (screen, my_provider, GTK_STYLE_PROVIDER_PRIORITY_SETTINGS + 50);
 }
 
 // This API exists since gtk+ 3.10
@@ -554,12 +645,6 @@ extern void gtk_window_set_titlebar (Gtk
             }
         }
 
-        /* Remove any potential old title bar. We can't call
-         * the static unset_titlebar() directly (not available),
-         * so we call the full function; that shouldn't have
-         * any side effects. */
-        orig_gtk_window_set_titlebar (window, NULL);
-
         /* The solid-csd class is not removed when the titlebar
          * is unset in Gtk (it's probably a bug), so unset it
          * here explicitly, in case it's set. */
@@ -577,6 +662,13 @@ extern void gtk_window_set_titlebar (Gtk
             g_signal_connect (titlebar, "notify::title",
                         G_CALLBACK (private_info.on_titlebar_title_notify), window);
             private_info.on_titlebar_title_notify (GTK_HEADER_BAR (titlebar), NULL, window);
+
+            /* Hiding GtkHeaderBar when custom title wasn't set (only for GtkDialog windows) */
+            const GtkWidget* custom = gtk_header_bar_get_custom_title(GTK_HEADER_BAR (titlebar));
+            const gchar* window_type = G_OBJECT_TYPE_NAME(window);
+            if (custom == NULL && strcmp(window_type, "GtkDialog")) {
+                gtk_widget_hide(GTK_WIDGET (titlebar));
+            }
         }
 
         gtk_style_context_add_class (gtk_widget_get_style_context (titlebar),
@@ -665,14 +757,10 @@ static void _gtk_header_bar_update_windo
         r = _remove_buttons_from_layout (new_layout, *decoration_layout_ptr);
         if (r == 0)
             *decoration_layout_ptr = new_layout;
-    } else {
-        TLSD->fake_global_decoration_layout = 1;
     }
     info.update_window_buttons (bar);
     if (*decoration_layout_ptr) {
         *decoration_layout_ptr = orig_layout;
-    } else {
-        TLSD->fake_global_decoration_layout = 0;
     }
 }
 
@@ -725,7 +813,7 @@ extern void g_object_get (gpointer _obje
      * g_object_get(). */
 
     va_start (var_args, first_property_name);
-    if (G_UNLIKELY (TLSD->fake_global_decoration_layout)) {
+    if (are_csd_disabled()) {
         name = first_property_name;
         while (name) {
             GValue value = G_VALUE_INIT;
@@ -746,6 +834,10 @@ extern void g_object_get (gpointer _obje
                 if (r == 0)
                     s = new_layout;
                 *v = g_strdup (s);
+            } else if (G_UNLIKELY (strcmp (name, "gtk-dialogs-use-header") == 0)) {
+                gboolean *v = va_arg (var_args, gboolean *);
+                // Save dialog will break if this prop has been set to TRUE (see #13)
+                *v = FALSE;
             } else {
                 G_VALUE_LCOPY (&value, var_args, 0, &error);
                 if (error) {
@@ -789,6 +881,11 @@ extern void gtk_header_bar_set_decoratio
     }
 }
 
+extern gboolean gtk_window_get_decorated (GtkWindow *window)
+{
+    return FALSE;
+}
+
 extern gboolean gdk_screen_is_composited (GdkScreen *screen) {
     /* With Gtk+3 3.16.1+ we reimplement gtk_window_set_titlebar ourselves, hence
      * we don't want to re-use the compositing hack, especially since it causes
@@ -1006,6 +1103,7 @@ GType g_type_register_static_simple (GTy
         if(type_name && G_UNLIKELY(strcmp(type_name, "GtkWindow") == 0)) {
             // override GtkWindowClass
             orig_gtk_window_class_init = class_init;
+            detect_gtk2((void *) class_init);
             if(is_compatible_gtk_version() && are_csd_disabled()) {
                 class_init = (GClassInitFunc)fake_gtk_window_class_init;
                 save_type = &gtk_window_type;
@@ -1018,6 +1116,7 @@ GType g_type_register_static_simple (GTy
         if(type_name && G_UNLIKELY(strcmp(type_name, "GtkDialog") == 0)) {
             // override GtkDialogClass
             orig_gtk_dialog_class_init = class_init;
+            detect_gtk2((void *) class_init);
             if(is_compatible_gtk_version() && are_csd_disabled()) {
                 class_init = (GClassInitFunc)fake_gtk_dialog_class_init;
                 save_type = &gtk_dialog_type;
@@ -1030,6 +1129,7 @@ GType g_type_register_static_simple (GTy
         if(type_name && G_UNLIKELY(strcmp(type_name, "GtkHeaderBar") == 0)) {
             // override GtkHeaderBarClass
             orig_gtk_header_bar_class_init = class_init;
+            detect_gtk2((void *) class_init);
             if(is_compatible_gtk_version() && are_csd_disabled()) {
                 class_init = (GClassInitFunc)fake_gtk_header_bar_class_init;
                 save_type = &gtk_header_bar_type;
@@ -1042,6 +1142,7 @@ GType g_type_register_static_simple (GTy
         if(type_name && G_UNLIKELY(strcmp(type_name, "GtkShortcutsWindow") == 0)) {
             // override GtkShortcutsWindowClass
             orig_gtk_shortcuts_window_init = instance_init;
+            detect_gtk2((void *) instance_init);
             if(is_compatible_gtk_version() && are_csd_disabled()) {
                 instance_init = (GInstanceInitFunc) fake_gtk_shortcuts_window_init;
                 goto out;
@@ -1095,6 +1196,9 @@ static void fake_gtk_dialog_buildable_in
 }
 
 void g_type_add_interface_static (GType instance_type, GType interface_type, const GInterfaceInfo *info) {
+    if (info && info->interface_init)
+        detect_gtk2((void *) info->interface_init);
+
     if(is_compatible_gtk_version() && are_csd_disabled() && (instance_type == gtk_window_type || instance_type == gtk_dialog_type)) {
         if(interface_type == GTK_TYPE_BUILDABLE) {
             // register GtkBuildable interface for GtkWindow/GtkDialog class
@@ -1248,7 +1352,7 @@ out:
 
 static gtk_header_bar_private_info_t gtk_header_bar_private_info ()
 {
-    static volatile gtk_header_bar_private_info_t info = { (gsize) -1, NULL };
+    static volatile gtk_header_bar_private_info_t info = { (gsize) -1, NULL, NULL };
     if (G_UNLIKELY (info.decoration_layout_offset == (gsize) -1)) {
         /* Was only introduced in Gtk+3 >= 3.12. Unlikely that someone is
          * still using such an old version, but be safe nevertheless. */

Since the patch is rather old, it may work with an old source, e.g. that of Excalibur.

#117 Re: Desktop and Multimedia » noCSD for GTK4 » 2025-06-30 00:25:52

The available Build-Deps for gtk3-nocsd can be installed with "apt build-dep"

apt build-dep gtk3-nocsd --simulate
sudo apt build-dep gtk3-nocsd

If you are "a complete beginner", you may better try to reproduce my experiments.

#118 Re: Freedom Hacks » The road to freedom » 2025-06-29 23:48:38

It is not a problem. It is a meta-package.
You can install everything you need manually

➤ apt info packaging-dev
Package: packaging-dev
...
Depends: build-essential, debhelper, devscripts, dput-ng | dput | dupload, lintian, sbuild | cowbuilder | pbuilder, quilt
Recommends: apt-file, autoconf, automake, autopkgtest, autotools-dev, bzr-debian, cdbs, cmake, debian-policy, developers-reference | developers-reference-de | developers-reference-fr | developers-reference-ja, dh-autoreconf, dh-make, git-buildpackage, gnome-pkg-tools, gnupg, libtool, piuparts, pkg-kde-tools, svn-buildpackage
Suggests: mercurial-buildpackage

You need "Depends" and "Recommends".

Do not forget quilt

sudo apt install quilt
➤ dpkg -l | grep dput
ii  dput             1.1.3           all          Debian package upload tool
➤ dpkg -l | grep sbuild
ii  libsbuild-perl         0.85.0            all          Library for building Debian binary packages from Debian sources
ii  sbuild                 0.85.0            all          Tool for building Debian binary packages from Debian sources

The available Build-Deps for gtk3-nocsd can be installed with "apt build-dep"

apt build-dep gtk3-nocsd --simulate
sudo apt build-dep gtk3-nocsd

#119 Re: Desktop and Multimedia » noCSD for GTK4 » 2025-06-29 21:18:49

You may try to build from Debian sources (e.g. unstable)
_https://tracker.debian.org/pkg/gtk3-nocsd
_https://packages.debian.org/source/unstable/gtk3-nocsd

Example: _https://dev1galaxy.org/viewtopic.php?id=7179

You may also try to build from Ubuntu sources.
All sorts of examples are available here:
_https://dev1galaxy.org/viewforum.php?id=25

It makes sense to start from Debian sources to get all the Build-Deps you need.

You may also try to build it from git
_https://aur.archlinux.org/packages/gtk3-nocsd-git
_https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=gtk3-nocsd-git

Luckily, with gtk3-nocsd, we still have a way to (partially) turn it off.
_https://github.com/ZaWertun/gtk3-nocsd

It may mean that it may not always work.

#120 Re: Desktop and Multimedia » [SOLVED] HDMI - no sound output; microphone - no sound input » 2025-06-29 19:06:56

All problems with Mate (Gnome2) and ALSA were already solved in 2009 (Mate is a fork of Gnome2).
gnome-media (deb) was recompiled and patched by the OSS4 community.

Today, if you remove PulseAudio, Mate will install PipeWire (and other way round).
If you remove them both, Mate will automatically enable ALSA for mate-settings-daemon and mate-volume-control-status-icon (sound applet in the tray)

$ sudo apt-get purge pulseaudio pulseaudio-utils pavucontrol pulseaudio-module-bluetooth pipewire pipewire-bin pipewire-pulse

This will also remove "mate-desktop-environment". It is a meta-package which can be safely removed.
Then, you have to reboot, or kill pulseaudio and reload ALSA

$ sudo /etc/init.d/alsa-utils force-reload
Shutting down ALSA...done.
Setting up ALSA...done. 

On Linix Mint MATE, you should also remove pipewire-alsa, etc.

➤ fuser -av $(find /dev/snd -type c 2>/dev/null)
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  igor       2245 F.... mate-settings-d
                     igor       2344 F.... mate-volume-con
/dev/snd/pcmC0D0c:
/dev/snd/pcmC0D0p:   igor       3166 F...m firefox-esr
/dev/snd/seq:
/dev/snd/timer:      igor       3166 f.... firefox-esr
➤ ps -A u | grep mate-volume-con
igor      2344  0.0  0.7 483040 59088 ?        Sl   16:27   0:10 mate-volume-control-status-icon
➤ ps -A u | grep mate-settings-d
igor      2245  0.1  0.6 968348 53544 ?        Sl   16:27   0:28 /usr/bin/mate-settings-daemon
➤ apt-file find /usr/bin/mate-volume-control-status-icon 
mate-media: /usr/bin/mate-volume-control-status-icon
➤ apt info mate-media
Package: mate-media
...
Description: MATE media utilities
 MATE media utilities are the audio mixer and the volume
 control applet.

See also:
_https://dev1galaxy.org/viewtopic.php?pid=49837#p49837

#121 Re: Desktop and Multimedia » [SOLVED] HDMI - no sound output; microphone - no sound input » 2025-06-29 16:33:08

It seems that the problem was in pulseaudio.
It means that sound may disappear in any moment.

#122 Re: Desktop and Multimedia » [SOLVED] HDMI - no sound output; microphone - no sound input » 2025-06-29 11:27:17

Post the output of fuser and inxi:

fuser -av $(find /dev/snd -type c 2>/dev/null)
inxi -A

inxi: everything you need to know about your computer
_https://easylinuxtipsproject.blogspot.com/p/inxi.html

sudo apt install inxi

#123 Re: Freedom Hacks » Automounting USB Drives (NTFS, exFAT) with dmask=022,fmask=133 » 2025-06-26 21:40:25

On Ubuntu, the NTFS driver (read and write) was installed and enabled by default since 2007.
It worked without problems and "compatibility issues".
It seems that this particular security problem occurred about ten years ago, for example:
_https://unix.stackexchange.com/questions/296967/how-to-recursively-remove-execute-permissions-from-files-without-touching-folder
_https://unix.stackexchange.com/q/296967
Nothing was done to fix it.
You may not believe, but computer science students (and their professors, perhaps), usually do not notice that this problem exists. They simply install Ubuntu and use it for their projects.
It might be obvious that this strange phenomenon correlates with pulseaudio and systemd.
It is very probable that it is a symptom of dementia caused by pulseaudio and enhanced by pipewire.

EDIT:
Because of dementia, it might be difficult to understand that what kind of security problem it is.
It is a backdoor in Devuan.

It seems that Stuxnet is already forgotten (because of dementia).

It is typically introduced to the target environment via an infected USB flash drive, thus crossing any air gap. The worm then propagates across the network, scanning for Siemens Step7 software on computers controlling a PLC.
_https://en.wikipedia.org/wiki/Stuxnet

Uh-oh. How just inserting a USB drive can pwn a Linux box
_https://www.bitdefender.com/en-us/blog/hotforsecurity/uh-oh-how-just-inserting-a-usb-drive-can-pwn-a-linux-box

CVE-2025-37986 is a vulnerability discovered in the Linux kernel's USB Type-C device pointer handling system, disclosed on May 20, 2025.
_https://www.wiz.io/vulnerability-database/cve/cve-2025-37986

Linux USB Subsystem Vulnerabilities
Fourteen vulnerabilities have been found to be affecting the USB subsystem on Linux. The vulnerabilities affect all Linux devices with USB ports. However, physical access is required to initiate them.

Threat ID:
    CC-1777
Category:
    Exploit
Threat Severity:
    Low
Threat Vector:
Published:
    14 November 2017 12:00 AM
_https://digital.nhs.uk/cyber-alerts/2017/cc-1777

Researchers found 26 new vulnerabilities in the USB drivers used in Windows, Linux, macOS and other systems.
_https://www.hugdiy.com/blog/you-wouldnt-know-until-you-test-it-how-to-restore-all-these-usb-vulnerabilities/

#124 Re: Freedom Hacks » Automounting USB Drives (NTFS, exFAT) with dmask=022,fmask=133 » 2025-06-26 14:28:06

The latest version of Linux Mint (22.1) has the same security problem.
USB Drives (NTFS, exFAT) are automatically mounted with all files executable.
Nobody complains, and nobody is trying to fix the problem.

This seems to be a symptom of dementia caused by pulseaudio and pipewire.
It may also explain a strange phenomenon of Neo-Luddism and AI hate
_https://en.wikipedia.org/wiki/Neo-Luddism
_https://en.wikipedia.org/wiki/Luddite

Perhaps, it is too late to do something about Devuan Wiki.

#125 Re: Desktop and Multimedia » RefractaOS - (Devuan Daedalus Based) Fresh Install SOUND OK XCEPT4FBK? » 2025-06-24 14:07:04

You may post the output of this command:

fuser -av $(find /dev/snd -type c 2>/dev/null)

For example:

➤ fuser -av $(find /dev/snd -type c 2>/dev/null)
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  igor       2235 F.... mate-settings-d
                     igor       2326 F.... mate-volume-con
/dev/snd/pcmC0D0c:
/dev/snd/pcmC0D0p:   igor       3201 F...m firefox-esr
/dev/snd/seq:
/dev/snd/timer:      igor       3201 f.... firefox-esr

And the output of

inxi -A
sudo apt install inxi

inxi: everything you need to know about your computer
_https://easylinuxtipsproject.blogspot.com/p/inxi.html

Board footer

Forum Software