The officially official Devuan Forum!

You are not logged in.

#51 Re: Off-topic » Opinions about keypassXC » 2025-08-26 21:03:39

i once tried to compile and package newer versions of both imlib and libconfig, autohell really is without a doubt the single bad piece of software created by the gnu project, successful compilation may as well depend on the planets aligning with your zodiac sign.

#52 DIY » afreq.sh a small daemon to auto adjust cpu frequency » 2025-08-22 03:58:15

EDX-0
Replies: 0

it is a small(er) alternative to tools like auto-cpufreq, it is written purely on shell script for added masochism.

https://github.com/eylles/afreq.sh

it does apply some battery optimizations when running on battery, tho does not work with the p_state driver for either amd or intel but will work nice enough for anything else, i hope...

feedback is welcome

#54 Re: Off-topic » Why writing init scripts was so scary and people needed systemd for? » 2025-08-17 04:28:41

if you don't like where linux is headed then write software to help prevent that path or at the very least keep the existing path running

#55 Re: Off-topic » Why writing init scripts was so scary and people needed systemd for? » 2025-08-16 04:19:45

worth noting tho, that my critcism in that post is to the way that service definition is implemented in systemd, there's a huge lot to pick on about systemd and criticize the ideas and execution, however the IDEA of defining a service in a simple key=val file that contains commands, arguments and other config parameters for starting a daemon is not inherently bad, and is a simple paradigm so long as there's a layer that can guarantee good abstraction and provide a system by which the service definition can be tweaked

and fun as it turns out, a similar paradigm not only exists, but was rolled out before systemd and as it happens it was based on shell script and works better than the systemd units paradigm

enter the "init-d-script" a generic initscript framework that tackles the most common service type, the daemon, you can check it now in /lib/init/init-d-script and not only does it have the mechanisms to handle bad behaved daemons (daemons that do not background themselves, do not create a pidfile and/or do not delete their pidfile upon termination) but even provides the ability to add overrides for the start, stop and status commands, allowing for supporting not just daemons but also oneshot services

and all that while still maintaining full compatibility with the lsb spec and keeping the script easy to debug

not to mention that a minimal init-d-script can look like this:

#!/bin/sh

# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
    set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
fi

### BEGIN INIT INFO
# Provides:       acpufreq
# Required-Start: $remote_fs
# Required-Stop:  $remote_fs
# Default-Start:  2 3 4 5
# Default-Stop:   0 1 6
# Description:    acpufreq - Auto CPU Frequency Daemon
### END INIT INFO

DESC="acpufreq"
DAEMON=/usr/local/sbin/afreq
PIDFILE=/var/run/acpufreq.pid
START_ARGS="--user root --chuid root --background --pidfile ${PIDFILE} --make-pidfile"
STOP_ARGS="--user root --pidfile ${PIDFILE} --remove-pidfile"

which at a high level comes out not any more complex than a sytemd unit file...

but oh the horrors of shell script like this were too many and systemd had to save the world from the opressive tyranny of shell...

#56 Re: Off-topic » Why writing init scripts was so scary and people needed systemd for? » 2025-08-16 00:01:57

the madness of initscripts was/is that they allow for daemons to have subpar behaviour that is abstracted from the init system, and systemd was "sold" as the solution as it could handle some of those badly behaved daemons that needed complex initscripts which were "hard to debug", but developers managed to defeat that idea and re-invent initscripts in a worse language. here's an extract from a conversation i had on this a while ago, should probably put it in my github along other stuff from my vimwiki or use some static site generator to make a blog of sorts

in the unix world we have services and daemons, while many equate "services" with running a web server (or ftp server, or ssh server) of some sort, a "service" in the unix world is not a web server, but just a process that is managed, started, stopped and maybe even monitored by another process.
a daemon is a "long running process", could be one that runs for as long as a user is logged in or for a long as the computer is on, but in spite of daemons mostly being services, they aren't always services, and services aren't always necessarely daemons
there are 2 basic types of services from which all others are but variations of:

daemon: the most basic type of service as it is just a daemon that will run, it can run for multiple runlevels or it can run for as long as a user is logged in, it has a process identification digit (PID), a PID file, it runs with the priviledges of some user, the PID file can be used to monitor the service.

oneshot: a process that will be ran and not linger nor have a PID, it will run, do something and then terminate, maybe with an exit status, whatever command is ran to "start" the service can have a "stop" counterpart, or not.

the "traditional" manner to handle that madness was with initscripts, which are nothing more than just shell scripts that can accept the "start", "stop", "status", "restart" and optionally the "reload" and "force-reload" arguments, the init system needs not to know how the initscript handles those as whatever madness and witchcraft is needed to get the service running is done in the initscript
most inits use the initscript or a similar paradigm of abstracting the sorcery from the init system

systemd has the units system, the paradigm is that the madness is not necessary to abstract from systemd and can be thrown into the multiple options of the systemd unit so long as the systemd unit options can handle said madness... the main options are:
ExecStartPre=
ExecStart=
ExecStartPost=
ExecStopPre=
ExecStop=
ExecStopPost=
ExecReloadPre=
ExecReload=
ExecReloadPost=

now there is nothing bad with those, systemd allows you to just write commands in there and it will evaluate said commands to run them
and then ya got stuff like this, because systemd had to allow multi line commands in some way, and what better and more natural way than to do so with shell style line breaks
ExecReload=busctl call org.freedesktop.DBus \
        /org/freedesktop/DBus org.freedesktop.DBus \
        ReloadConfig
until now there is nothing bad in how units are defined
but that applies for simple commands
the problem starts when people start to abuse the systemd units and treat them like a fully fledged shell-like scripting language just because the documentation says you can throw some madness into the unit file
and you wound up with systemd unit files which are over 50 lines long where at least 40 of those lines are some Exec*Pre/Exec*Post command that juggles values to and from tmp files...

at that point it is just re-inventing initscripts but with a way worse "scripting" language that only got support for a form of conditionals in version 243...
and then someone comes in with some sense to put all that madness of pre and post exec commands inside scripts...
which was what the paradigm that systemd was trying to prevent from happening in the first place because "initscripts are hard to debug" (if you don't know bash)

so the proper way would be to split the initscript to multiple scripts handling start, stop, restart etc. respectively and the define then unit using these scripts?

not really, the "proper" way would be that services should not need much wizardry to be started and stopped, but since that ain't happening... then the less bad way would be to have a (or multiple) script(s) to handle the madness needed by the service and then let both .service unit files and initscripts for whatever init needs them be "dumb" files that deal only with an abstracted and simple interface with a predictable behaviour

#57 Re: Installation » any way to obtain Excalibur ISO? » 2025-08-13 01:27:34

I'm not thrilled about changing sources.list

fair, kinda the reason why i wrote this script to add mirrors so i would never have to manually edit the sources list

https://github.com/eylles/devuan-script … mirrors.sh

mind you i have not updated it yet to reflect the current stable and testing suite names as devuan's excalibur suite is not yet the stable release, usually devuan lags weeks to months behind a debian release to make the next suite stable as it takes some time to not just refresh the patches from forked projects but also check that all the work done to keep systemd outside devuan works as intended even if testing is usable at the time (been using devuan testing on my main machine since late 2023)

you can use the script to update your sources list (add mirrors is always good), then upgrade, i have to eventually add support for the deb822 format for those that do want that it.

#58 Re: Freedom Hacks » How to Disable the New Apt Pager » 2025-08-10 23:41:57

Isn't the idea that 'apt' can change on a whim for the nice front end experience and 'apt-get', 'apt-cache' etc. are the proper stable commands (which I use)?

yes, apt-get is intended to be the stable APT interface intended to be used in scripts while apt is understood to be the interactive friendly and ever changing interface.

#60 Re: DIY » New Project, a simple music player. And now a video player!! » 2025-07-25 04:27:17

i liked your metadata viewer but did some modifications

#!/bin/sh

# Name: metaview
# Copyleft: greenjeans 2025, use as you see fit.
# This script when combined with a .desktop file, 
# is to give you a "view metadata" option for a given file 
# when you right click on audio/video files in the file manager.
# Depends: ffmpeg, yad, libimage-exiftool-perl

c=0
sep="_"
separator="$sep"
while [ "$c" -lt 80 ]; do
    separator="${separator}${sep}"
    c=$(( c + 1 ))
done

# basename? we don't need that!
filename="${1##*/}"

thumbnail="preview-file"

encode_thumbnail () {
    filepath=$(realpath "$1")
    # ah perl, what would we do without ya and what can we do with ya...
    perl -MURI::file -MDigest::MD5=md5_hex \
        -e 'printf "%s.png\n", md5_hex(URI::file->new(shift))' "$filepath"
}

find_thumbnail () {
    thumbdir="${XDG_CACHE_HOME:-$HOME/.cache}/thumbnails/normal"
    thumbpath=$(encode_thumbnail "$1")
    thumbpath="$thumbdir/$thumbpath"
    if [ -r "$thumbpath" ]; then
        thumbnail="$thumbpath"
    fi
}

find_thumbnail "$1"

# no idea if this will work on a multi-display setup
geometry=$(xdpyinfo | grep 'dimensions:' | cut -d' ' -f7)
w="${geometry%x*}"
h="${geometry#*x}"
w=$(( w - 400 ))
h=$(( h - 200 ))

{
  printf '\n---- %s ----\n' "Metadata for $filename"
  printf '\n%s\n\n' "$separator"
  printf '\n---- %s ----\n' "FFprobe"
  ffprobe -hide_banner "$1" 2>&1
  printf '\n%s\n\n' "$separator"
  exiftool -a -u -g1 "$1"
} | yad \
    --text-info --borders=10 --title="Metadata" --width="$w" --height="$h" \
    --center --window-icon=preview-file --image="$thumbnail" --margins=10 \
    --button=gtk-close:0

the changes are:
make the underline separators 80 columns wide
show the thumbnail of the file if it exists
make the window size depend on the display geometr

#61 Re: Other Issues » I seem to crash when I go to a certain website... » 2025-07-24 12:49:50

the way that things look anubis is the way forward to stop the uncountable number of web scraping bots without having to dump money onto cloudflare and prepend a captcha to every website, well that is unless those who don't like it stops saying "i hate this thing that wastes my cpu cycles and breaks 'The WEB'" and come up with a better solution

#63 Re: Other Issues » I seem to crash when I go to a certain website... » 2025-07-19 23:41:27

first of all to get this out of the way, anubis is not a bot but an implementation of the hashcash system for websites instead of e-mail https://en.wikipedia.org/wiki/Hashcash

that outta the way, could be that the version of anubis used by git.devuan.org is one of the versions that triggers a bug with the JS engine, similar to what was happening with the anubis author's blog (uses anubis from git main) causing Firefox v115-ESR to freeze some times, palemoon being a hard fork of older firefox is possible that it is hitting a similar if not the same bug on the JS engine that has existed in the codebase of firefox for who knows how long and only got fixed somewhere along firefox v116 to v120

that is if the bug was not something introduced either during the partial redesign of the js engine during palemoon v28.7 OR more recently in the js engine changes during v33.3

but that is just throwing ideas of what could it be out in the air not something really useful, i'd try to get some logs and report the bug upstream as the author does test on both firefox and palemoon, hell palemoon is even featured in a screenshot passing the anubis test

012.avif

#64 Re: Installation » Daedalus: why so many keyrings? » 2025-07-13 00:31:41

not every "keyring" is the same type, this stems from the miss labeling of keyring packages

the debian and devuan keyrings would be the "true" keyrings as those contains the keys to authenticate the packages in fact come from debian or devuan

the gnome keyring is misslabeled as it should be the gnome-keyring-daemon, what it does is store your passwords and secrets, provide the dbus interface so that other programs can use the passwords and secrets (so that for example upon login your browser does not ask for your local user password to unlock it's password store and allow you to login onto websites), it also implements the gpg and ssh agents to load the user keys and ask for passphrases only when needed, so for example if you are staging a commit with git and want to sign the commit with a gpg key, the gnome keyring daemon loads the key so that you don't need to enter the key's passphrase every time, then when you push that commit, if you do it through ssh the keyring daemon loads the ssh key so that you don't have to enter the passphrase for that one too

as for replacing the gnome keyring daemon with keepass, you need to install a plugin because that functionality is not part of the main keepassxc program, the pass passoword manager also has a similar plugin https://github.com/mdellweg/pass_secret_service

personally i use bitwarden as my password manager so the gnome keyring daemon is what integrates the best with my environment, if i was invested with either pass or keepassxc then i'd consider replacing functionality of the keyring daemon with plugins for either of those.

#65 Re: Desktop and Multimedia » XLibre: The New Xorg Fork » 2025-07-05 18:51:48

well, for the time being xorg on de**an is stable enough for daily driver, anyone who can spare a machine for building and testing xlibre should to submit feedback and issues onto the repo.

#66 Re: Off-topic » To shell or not to shell everything ? » 2025-07-02 23:29:53

yes, shed is pretty much a "per user session" sysvinit-like program, that is what i took as a base when i wrote it or well rather my understanding of how sysvinit works is what served as the base for shed tho that is the long term goal for now it is gearing more towards being a generic session process that can provide the debian x-session-manager spec, that is why i wrote about the problems with a fully shell script written service manager as with shed i am stuck in the refactoring purgatory planning multiple refactorings of various functions, a pair of interfaces, shared code and even the build system just so that the features from the todo list are painless to implement once i eventually get there...

#67 Re: Off-topic » To shell or not to shell everything ? » 2025-07-01 20:57:27

writing an init (or parts of an init), service supervision suite/system, or even an init-like daemon with it's client sounds like a good idea, shell even allows you to do some of the needed tasks trivially like gathering the pid of a process started with &, however once you face some of the less trivial and more complex tasks you start to stumble upon walls that you could not have seen purely from having a naive initial design/architecture for the driving daemon and then enter the refactoring purgatory where you can't just simply start refactoring code and changing program architecture but have to plan out every refactor and change so that later down the line when it is finally time to implement the feature no new roadblock will appear from thin air...

https://github.com/eylles/shed

#68 Re: Desktop and Multimedia » XLibre: The New Xorg Fork » 2025-06-23 19:05:48

now fedora of all distros has a proposal to ditch xorg for x11libre: https://fedoraproject.org/wiki/Changes/X11Libre

#69 Re: Installation » Minimalist/selective installation? » 2025-06-12 02:11:44

maybe not so useful maybe is.

what i do for my setup is to do a netinstall and then run this script https://github.com/eylles/devuan-script … ll-list.sh

it defines some lists of packages to install for a minimal setup, you can create a config file to append to or override the lists of packages.

as for custom iso creation, another tool to consider is the cubic tool which is a GUI iso remaster tool that can remaster ubuntu and debian isos (including devuan) however it can't run on devuan as it uses systemd-nspawn, but according to https://github.com/PJ-Singh-001/Cubic/issues/363 it should be possible to modify the script to use chroot instead.

https://bazaar.launchpad.net/~cubic-wiz … hare/cubic

#70 Re: Hardware & System Configuration » [SOLVED] zramswap script won't start » 2025-05-19 00:24:33

you could also give my https://github.com/eylles/zram-service script a try, it just works perfectly on my machine, also i'm planning to make it have some feature parity with what the rust-systemd-zram-generator so that it can also do mounts not just a single zram device as zramswap.

#71 Re: News & Announcements » Chrome based browsers and uBlock Origin » 2025-05-17 17:36:29

brave, it just works, brave's own adblock is inspired on uBlockOrigin if i remember correctly to the point you should be able to use the same filters in brave brave://settings/shields/filters enable developer mode and you can enter your own custom filters and scriptlets

as for firefox... do not use firefox, use librewolf or try to build gnu icecat, unfortunately some years ago debian dropped the iceweasel project when firefox relaxed their trademark policies, a new fork of firefox really needs to come up but that is a different can of worms...

#72 Re: Documentation » How to generate thumbnails of GIMP .xcf files in your file-manager » 2025-04-23 21:12:15

well taking inspiration from https://docs.xfce.org/xfce/tumbler/available_plugins with the webp thumbnailer i decided to check and turns out that yes, this once again imagemagick comes to the rescue as it can properly understand the xcf format.

just one small caveat, xcf files are multi-layer and while imagemagick can understand multi-frame, multi-page and multi-layer just fine however a simple convert image.xcf image.png will produce

image-0.png
image-1.png
...
image-n.png

for every layer of the xcf file, so a dirty solution if your xcf files got low layer counts is to use /usr/bin/convert "$1[0]" -thumbnail "$2" "$3" to hardcode layer 0, otherwise you got to extract every single layer and compose them in the correct position.

#73 Re: Documentation » How to: Devuan 5 Daedalus an pipewire » 2025-04-23 06:47:31

well, after reading some i have a very uh "quick and dirty" solution of sorts at the time for shed to be able to run along a desktop's session manager, mind you this is far from a proper solution but until i implement a better version of this into shed it will have to do...

#!/bin/sh

mon_pid=$(loginctl show-session "$XDG_SESSION_ID" | awk -F '=' '/Leader/{print $2}')

proc_com=$(ps ax -o'cmd' -q "$mon_pid" | tail -n 1)

NO_CONTINUE=0

outHandler () {
    echo "exiting on signal: $1"
    NO_CONTINUE=1
}

trap 'sigHandler "HUP"' HUP
trap 'sigHandler "USR1"' USR1
trap 'outHandler "EXIT"' EXIT
trap 'outHandler "TERM"' TERM
trap 'outHandler "INT"' INT
trap 'outHandler "QUIT"' QUIT

# 5 cycles per second, 60 seconds per minute, 60 minutes
INTERVAL=$(( 5 * 60 * 60 ))
# 5 cycles per second, 20 seconds
cyc=$(( 5 * 20 ))
while [ "$NO_CONTINUE" -eq 0 ]; do
    # is the count of cycle iterations the same as the interval?
    if [ "$count" = "$INTERVAL" ]; then
        # reset the count to 0
        count=0
    fi
    # check if we need to run shedc logout
    if [ $(( count % cyc )) -eq 0 ]; then
        if ! kill -0 "$mon_pid" 2>/dev/null; then
            shedc logout
        else
            curr_proc_com=$(ps ax -o'cmd' -q "$mon_pid" | tail -n 1)
            if [ "$curr_proc_com" != "$proc_com" ]; then
                shedc logout
            fi
        fi
    fi
    # increment the count
    count=$(( count + 1 ))
    # the duty cycle of this daemon is 5 iterations per second
    # this is fast enough to feel responsive to signals, yet not hog
    # resources, mainly cpu
    sleep 0.2
done

development of shed is a slow grind tbh as it is quite the change going from cobbling something that is to eventually be a suitable program to provide the x-session-manager spec as defined by debian to also having the same program be able to provide just user services and not the session manager, as really in an ideal world every session-manager type program should also provide user services not just the rather "incomplete" xdg-autostart spec, but that is more a rant so neither here nor there really

#74 Re: Off-topic » Lightweight system without (too) bloated software » 2025-04-22 19:47:14

for image viewing i use nsxiv, may be biased in that i sometimes contribute to the repo and have helped cobble some scripts to extend the functionality tho

for a fetch program i use neofetch which i've been tempted to take maintenance of for a while but have not (i mean i've been maintaining a fork of pywal since 2021)

for screenshotting i like flameshot since it already packs everything i need to do the light editing of screenshots, but is not like i could not use maim with imagemagick like i was doing before.

for clipboard manager i have found nothing better than copyq, it just works, supports images and has vi-like bindings by default

for window management i personally like awesome tho i'm not the biggest fan of lua tho i did re-write my neovim config in lua a while ago...

for file management i use both thunar and vifm, most stuff i do in vifm but having thunar as the default is my preference for when the browser opens a file dir

i use webmail but lately i've been thinking of installing thunderbird, used neomutt for a while but it wasn't doing it for me tho, even using luke smith's muttwizard script to set up neomutt it didn't feel "complete" enough so i went back to using webmail

#75 Re: Documentation » How to: Devuan 5 Daedalus an pipewire » 2025-04-14 23:58:22

yeh the problem is that to logout with shed in it's current state you need to run

shedc logout

which is not ideal but i have to do quite some refactoring to fix that...

Board footer

Forum Software