Page 1 of 2

Configuration file exploration (in episodes)

Posted: 06 Jul 2024, 16:39
by vinnie
Why here?
I wasn't sure if I wanted to post this message here, I was going to put it in "porteus praisers", then as I started writing I realized that I was going to talk about nemesis and that it wasn't even a "tutorial" after all since I was going to do the "live" description while I discovered the configuration files.
So I'm putting it in this section because it's the most appropriate, and I'm writing it not because I'm pretending to teach anyone anything (quite the contrary...) but because I'm enthusiastic about this distro and the friendly community and I wanted to romancing a novice's exploration of a part of it.

So these posts will not be strictly concise and formal, be warned :)

What I want to do?
I have decided that I want to understand the purpose of all the files gracefully confined in the "config" directory of the nemesis bootable partition.
The first thing I can notice that justifies using the forum section dedicated specifically to nemesis is that this directory is not there in the porteus 5.01 distro :P
I decided that I will make a post by file, so to give an impression that there is a non-random order.
I will put them in alphabetical order, but I will reserve the right to elaborate by editing the various posts from time to time

So, let's start! B)


Configuration files list
backup: file list to be saved in a backup module
cheatcodes: startup options
keyboard: layout keyboard
login: username & startup command
manpages: personal man pages storage
modules: package creator settings
network: net configuration
services: services in autostart
time: system clock

Configuration file exploration (in episodes)

Posted: 06 Jul 2024, 17:11
by vinnie
backup

This is the file that inspired this idea. I stumbled upon this recent thread, which is really about a topic I want to understand on porteus/nemesis. I realized that the "dump-session" command mentioned by rych is not there in nemesis, and this configuration file instead mentions "setup-config-files" which I guess is the equivalent script.


In this other message always rych was explaining to me how the file "/etc/changes-exit.conf" works, which I believe is the counterpart of this nemesis "backup" file although perhaps the behavior is not identical because in the header the backup configuration mentions "Files listed here will be copied into a module when you run."
So first of all it looks like it talks about individual files and secondly it doesn't talk about exclusions, so I'll have to check how that works.

...I will continue later the exploration of this file

Configuration file exploration (in episodes)

Posted: 06 Jul 2024, 17:20
by vinnie
cheatcodes

This file looks to me like a way to insert cheatcodes without touching /boot/syslinux/porteus.cfg
I can already confirm that it works because now I know who it is that always lowers my screen brightness! :rant:
All joking aside, I find it much neater to be able to enter cheatcodes here than inside the syslinux config, however I wonder one thing, are the cheatcodes entered here considered applied to all entries in the porteus.cfg? Even to any added by us?
I will have to do further testing!

ok:
[*] brightness=100 work
[*] resume=UUID=alphanumcode work
no:
[*] volume=100 doesn't work in the xfce version

Configuration file exploration (in episodes)

Posted: 06 Jul 2024, 17:50
by vinnie
keyboard

Really helpful, it's a setting I often find myself looking for in the distros I try, and it seems that in nemesis it's emphasized and disabled by default :P (cause of the "ignore=yes" setting, I think it is the right choice).
The interesting thing is that it has settings for both console and DE.


I haven't tried it yet but I already have some notes:
1)there is a typo in the example command to search all keymaps, it is right but you have to remove "/tmp/001" from the path
2)is this keymap list the same for both console and DE?
3)on xfce I usually set the layout "italian (us)" (the native italian layout sucks a lot compared to this to the point that I had created a copy for windows too... it's 2024 and micro$ still can't make us digit accented capitals :ROFL: ).

I had decided to try this configuration file however considering this last third point I don't know what to put to the configurations, because the filtered example command only gives me these three alternative for italian:
it-ibm.map
it.map
it2.map

I tried to see what xfce sets when I set the layout from the keyboard configurations, but it doesn't help:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<channel name="keyboard-layout" version="1.0">
  <property name="Default" type="empty">
    <property name="XkbDisable" type="bool" value="false"/>
    <property name="XkbLayout" type="string" value="it"/>
    <property name="XkbVariant" type="string" value="us"/>
  </property>
</channel>
(apropos, I found this xfce file using the wonderful "changes-time" script, a few years ago I had done something similar but it's nowhere near as performant as this one!)

I also noticed that the system variable in xfce terminal is "LANG=en_US.UTF-8". So maybe the value will be "it_US.UTF-8"?

I have to do some research!

Configuration file exploration (in episodes)

Posted: 06 Jul 2024, 18:42
by vinnie
login

Um, login seems to be very useful, even though nothing is set by default.

My notes:
1)it seems that the implied login setting is the guest user, I imagine it is used to customize the username without having to make any other permanent changes to the distro. I want to try next reboot.
2)cliexe and guiexec seem extra useful! surely I can think of some reason to try them, another time you have the possibility to do some pre-configurations without dumping the distro changes. Are the commands executed by the previous user or by root?
3)About cliexe even if I don't know what moment the runlevel3 is, I understand that it is before logging into the DE :pardon:
however, if the commands are separated from the pipe, does that mean you can't insert commands that include the pipe to redirect the output?
4)For guiexec I have to keep attention to this roadie message

ok:
[*] login=user work but do not create newuser, only work with existent user
no:
[*] guiexec=/usr/bin/opensnitch doesn't work , looking at roadie's conversation, I think there are several problems

Configuration file exploration (in episodes)

Posted: 06 Jul 2024, 18:47
by vinnie
manpages

I wasn't sure what I would find inside this file, but I understand that it is used to specify a custom path where one's man pages are stored. The point is always this, to allow things to be added without having to back up sessions.
I don't know much about man pages because I generally prefer more discursive tutorial-style explanations of how things work, and man pages are too referential, however, I'll keep this in mind if I ever need it.

Configuration file exploration (in episodes)

Posted: 06 Jul 2024, 18:47
by vinnie
modules

When I read the name of the file I thought it was referring to the kernel modules (which however if I remember correctly can be placed in syslinux.cfg), instead it is the nemesis package creation settings.
My few notes:
1) ModuleDirectory may come in handy because I generally like modules placed in optional rather than modules. However, I don't know if I can specify the UUID/LABEL instead of the mount point because as I said, the mount points change when I boot with external memories inserted, so I don't know if I will try it.
2)This LocalesPreserve thing I never thought about it, if another language is specified pmod/pacman will directly download package locales in that language?
3)ActivateModules=Yes, I have to check again but it seems to me that it doesn't work. Or rather when I do pmod the package is created and put in modules, but it is not activated, but I have to double check. Actually this doesn't bother me because I like it that way for now.

Configuration file exploration (in episodes)

Posted: 06 Jul 2024, 18:47
by vinnie
network

Useful file to preconfigure the network without having to save sessions, however, only if you are not using a graphical client (such as neworking manager).
It would be to understand what happens if I set it anyway, but I guess networking manager goes and overwrites the settings.
Another question may be if it is posible to configure more than one network

I have an idea :idea: : If all versions of the dm with which nemesis iso's are made use network manager, wouldn't it be interesting to add the option to inhibit archlinux.org ping? (deactivated by default obviously :D )

Configuration file exploration (in episodes)

Posted: 06 Jul 2024, 18:48
by vinnie
services

The file I first became aware of while ncmprhnsbl advised me how to set up a service.
It works well and the explanation is clear .
Obviously there must be the respective service present in /etc/init.d (which are scripts made with the appropriate openrc syntax and not symlinks to the daemon as I thought! :bangin: ).

Thanks ncmprhnsbl! Image

Configuration file exploration (in episodes)

Posted: 06 Jul 2024, 18:48
by vinnie
time

Okay anything that has to do with the computer clock.
I'll have to get my hands on it because my time zone is wrong (and that's okay, I don't like a distro making connections without me telling them to).
Also, it seems very approrpiate to me that HWCLOCK is not enabled by default, so that you don't go changing any hardware clocks without it being explicit.

And we are at the end of time muahahah :evil:
However, I plan to update the posts when I have updates on the doubts and do more testing.

Configuration file exploration (in episodes)

Posted: 07 Jul 2024, 23:23
by ncmprhnsbl
thanks for this, a systematic investigation of these is long overdue
quick summary: some stuff works, some doesn't and the commented prefaces in these files can be wrong (especially if any systemd command is mentioned)
canned history: when brokenman first created nemesis, it was pure arch using systemd, later it was switched to manjaro with openrc, and later still, after i revived it, switched to artix openrc.
some things were broken in the process, some things may never have worked properly, and other stuff simply not implemented.
i'll slowly work my through your posts and comment where i can.

Configuration file exploration (in episodes)

Posted: 08 Jul 2024, 06:20
by ncmprhnsbl
ncmprhnsbl wrote:
07 Jul 2024, 23:23
(especially if any systemd command is mentioned)
now that i've looked properly, it's not too bad for this.. the one case i see being:
vinnie wrote:
06 Jul 2024, 18:48
time
in the how to choose your timezone it has:

Code: Select all

### Uncomment and set your timezone here. A list of timezones can 
### be seen from a command line by typing: timedatectl list-timezones
#TIMEZONE=<Country>/<City>
there is no timedatectl, so i'm changing that to:

Code: Select all

### Uncomment and set your timezone here. A list of timezones can 
### be seen from a command line by typing:
### ls /usr/share/zoneinfo
### pick a country,
### ls /usr/share/zoneinfo/<Country>
### pick a city or region.
#TIMEZONE=<Country>/<City>
also, afaics nemesis has the default hwclock setting for UTC and i'm not sure if there's some trick way to set it to local other than setting it manually in: /etc/conf.d/hwclock(and saving that in a module or rootcopy or changes)
todo: make a config/time option to set hwclock to local or UTC (with a bootline option as well)

Configuration file exploration (in episodes)

Posted: 09 Jul 2024, 13:45
by vinnie
ncmprhnsbl wrote:
07 Jul 2024, 23:23
i'll slowly work my through your posts and comment where i can.
thank you for your patience.
It often happens to me that I revise something, and then when I've done it I look back and say, " Darn, I didn't take notes."
This time I did the opposite, I took the notes before seeing if they were useful, so they might be useless
ncmprhnsbl wrote:
08 Jul 2024, 06:20
also, afaics nemesis has the default hwclock setting for UTC and i'm not sure if there's some trick way to set it to local other than setting it manually in: /etc/conf.d/hwclock(and saving that in a module or rootcopy or changes)
todo: make a config/time option to set hwclock to local or UTC (with a bootline option as well)
I haven't looked at the clock yet though as soon as I try I'll tell you. Personally I like the clock in utc better and then the OS changing the time zone. However if I remember correctly maybe with windows in dual boot you can have problems with this setting.

As for the first test:
In cheatcodes:
1) I tried changing the value of brightnes and it works
2) I tried setting the volume and it doesn't work, but maybe the volume used pipewire before and now it doesn't ? (I also saw xfce in auto startup settings has pipewire media system)
3) I added the swap resume here instead of to the syslinux and it works

login:
1)login=user I think works, though, the user must already be created so I think it only works when the user is already existing (I haven't tried with root and guest anyway). For other users you then have to create the user and save the changes.
2)i tried "guiexec=/usr/bin/opensnitch" but it doesn't seem to work (i couldn't find openrc started when xfce opened).
I saw that opensnitch has an option to put itself in autostart which creates this file: "~/.config/autostart/opensnitch_ui.desktop" which automatically adds an entry in xfce's autostart configurations. So backing up the files inside the autostart dira is an alternative.

Configuration file exploration (in episodes)

Posted: 09 Jul 2024, 23:45
by ncmprhnsbl
vinnie wrote:
09 Jul 2024, 13:45
Personally I like the clock in utc better and then the OS changing the time zone. However if I remember correctly maybe with windows in dual boot you can have problems with this setting.
yeah, windows defaults to local (hwclock matches system time) though it is possible to make windows use utc (i've this and doesn't seem to be a problem https://wiki.archlinux.org/title/System ... ft_Windows )
not an issue if there's windows on the machine.
vinnie wrote:
09 Jul 2024, 13:45
I tried setting the volume and it doesn't work, but maybe the volume used pipewire before and now it doesn't ?
this. presently it tries: amixer set Master $cheatval << some research required
vinnie wrote:
09 Jul 2024, 13:45
I added the swap resume here instead of to the syslinux and it works
i wouldn't have thought so, but good to know..
vinnie wrote:
09 Jul 2024, 13:45
1)login=user I think works, though, the user must already be created so I think it only works when the user is already existing (I haven't tried with root and guest anyway). For other users you then have to create the user and save the changes.
so, login=guest is default(so not needed) , login=root will launch X as root, nologin will give a login prompt on tty, logging in will then auto launch X (for guest at least, maybe not root)
login=<some_user_you_made> should probably work, not tested..
vinnie wrote:
09 Jul 2024, 13:45
2)i tried "guiexec=/usr/bin/opensnitch" but it doesn't seem to work (i couldn't find openrc started when xfce opened).
I saw that opensnitch has an option to put itself in autostart which creates this file: "~/.config/autostart/opensnitch_ui.desktop" which automatically adds an entry in xfce's autostart configurations. So backing up the files inside the autostart dira is an alternative.
probably best started as a service in this case, and what's the Exec line in opensnitch_ui.desktop say?

Configuration file exploration (in episodes)

Posted: 10 Jul 2024, 00:14
by vinnie
ncmprhnsbl wrote:
09 Jul 2024, 23:45
this. presently it tries: amixer set Master $cheatval << some research required
Tried in the terminal out of curiosity, it works but the maximum value is 65536 or is it better to give the percentage with %
ncmprhnsbl wrote:
09 Jul 2024, 23:45
probably best started as a service in this case, and what's the Exec line in opensnitch_ui.desktop say?
I had tried opensnitch-ui just to combine the useful with the delightful, though later I also tried mousepad and it doesn't work. I tried out of curiosity to prepend the command "sleep 30;" obviously without any result