The officially official Devuan Forum!

You are not logged in.

#1 Re: DIY » SHED init independient/agnostic user services » 2026-03-12 20:48:21

@EDX-0, I really like what you are doing here and I think we should have more of that (to have alternatives to choose from or copy&paste code or ideas).  One of my projects is to work on a Raspberry Pi gadget where I combine system services into a "functional device".  I don't give a pfff about writing systemd units for them but instead I use my own process supervisor for that.  This too makes starting the relevant services pid1-agnostic.  That is easier to handle (you do not have to understand the 300+ unit options) and it is easier to port to other pid1's (SysV, systemd, s6, runit/nitro, you-name-it).

Having said that, I must admit that I'm not going to use your controller because I have my own pony on the lawn: https://codeberg.org/awk-scripting/pico-init.  It supervises the process but requires bash or busybox ash (or any other shell with `wait -n` which excludes dash) for that.  I'm just going to add runlevels smile to it which brings the script to approx. 1500 lines of code big_smile (comments and empty line count extra).

#2 Re: DIY » I'm making a note-taking app » 2026-02-17 19:58:50

Of course, "no one" needs another editor and this is also not what the apps do. E.g., the console notes app is a large GNU awk script that uses vi (or nano or your-editor) for editing. So, what is the script doing?

- Years ago I decided to put my notes where they belong - into the project directories. To keep the directories uncluttered, all notes go into the file Notes.md and they begin with a `###` markdown header. So the app's first function is to know the format and present the notes as directory.

- Displaying notes inserts ANSI sequences to color markdown markup and uses `less -XRF` for output.

- Then the app understands where to look when I enter `Lin:` (opens Linux.md from the "wiki" directory) or "micro:" (opens Notes.md from micro-boot directory).

- The app knows where to find all files when I run a search through all of my notes (`//systemd +boot`)

- Then the app can open links in a console (or GUI) browser, start a shell, open the editor or duplicate itself in a new xterm, tmux or screen window.

- It also knows how to open files on a gvfs directory.

So while it's true, that there are plenty of good text editors, there is so much more around organising and finding notes and this is what the apps really do.

#3 Re: DIY » I'm making a note-taking app » 2026-02-16 18:21:56

Thank you for posting this. Your app gave me the final push to create an X-version for a note format I'm using for years now in Linux terminals. It's written in Java and I understand it's not for everyone but in case you are looking for additional inspiration, the documentation is here: https://codeberg.org/awk-scripting/Note … ntation.md

#4 Re: DIY » SHED init independient/agnostic user services » 2025-11-19 17:29:35

Hello EDX-0, I like your shell approach and the idea of being agnostic of window system. init-system or whatever is there. (I'm using a similar thing for my own stuff on Raspberry Pi.) I have a small suggestion just in case there are distro maintainers with aversion of too much shell commands:

get_shed_cgroup_2() {
  awk '
        BEGIN {
                pid = ARGV[1];
                cmd = "ps ax -o pid,cgroup,cmd=CMD ";
                while (cmd | getline > 0) {
                        if ($0 ~ /grep/  ||  $0 !~ /shed/)
                                continue;
                        else if ($1 != pid)
                                continue;

                        sub(/^.*::\//, "", $2);
                        print $2;
                        }
                }' "$shed_pid"
        }

shed_pid=$$
get_shed_cgroup
get_shed_cgroup_2

Board footer

Forum Software