Some examples for Persistent Changes

written by Tomas M. 27 days ago

In a reply to several questions about persistence, I'd like to put here few hints. Remember that this all works after reboot only if you select "Keep changes persistent" in the boot menu, and only if you are running Slax from a writable media such as USB disk.

1) how to make sshd server start automatically?

You can start ssh server manually by running service ssh start. If you run it the first time, it creates some keys in /etc/ssh/ directory, so the first start is a little bit longer. But even after the keys are created, sshd won't autostart on reboot. It's because I manually disabled it in Slax, because root's password is well known. So, make sure to change your root's password (and password of the guest user) to something new. When done, run systemctl enable ssh. It will basically create a symlink to ssh.service in (which is in /etc/systemd/system directory). This ensures sshd will be started on boot.

2) How to make keyboard layout persistent?

I forgot to implement such functionality. So keyboard layout needs to be set from the fluxbox menu each time and there is no config file to change. You can make it persistent by editing /root/.fluxbox/startup ... add there a line such as setxkbmap fr for french keyboard layout, etc. Make sure it is somewhere on top of the file. I will probably fix the persistence of keyboard layout in next Slax release, so if you set it this way, you may need to remove it from the startup file again at some point later, when Slax fixes this.

3) how to disable autostart of Xorg?

Similarly like enabling ssh server, you may disable autostarting of X by the following command: systemctl disable xorg. This will remove display-manager.service symlink from /etc/systemd/system and you will get only text-mode console on next boot. You can still start X manually with the startx command after login, though.

Tomas M.

(c) 2017, Tomas M; rss