Strings is Back
2025/06/07
Posted Tag: #Linux
Other Tags: #Windows, #Personal, #All
I first wrote my bash script Strings back in April of 2022 and have used it extensively since then. But a few weeks ago it stopped booting following installation in a virtual machine, not hardware thankfully . So I removed any post concerning it here. I gave up on it for lack of time and just the feeling as I would use what other developers will maintain rather than me.
What I settled on was to install EndeavourOS and wrote some bash scripts to get everything working like I wanted. This worked fine and I have not used the now fixed Strings on my everyday computer yet. Probably may after writing this. One thing I do not like about EndeavourOS is they do not implement time as far as NTP correctly. My time continually changes and is off currently right now. But I wanted auto login with EndevourOS too.
So in a virtual machine to start finding what I wanted I used what Arch Linux now has archlinstall
and I installed Cinnamon with it. But I had to pick a greeter for Cinnamon. Fine but how to auto login. By the way, it kept time fine so Arch Linux knows what they are doing . So I really dug into how to implement auto login. So here is how I did it.
I used yay or whatever AUR helper you want but yay -S mingetty
then the below.
sudo cp /usr/lib/systemd/system/[email protected] /etc/systemd/system/[email protected]
sudo ln -sf /etc/systemd/system/[email protected] /etc/systemd/system/getty.target.wants/[email protected]
sudo sed -i "s/ExecStart.*/ExecStart=-\/sbin\/agetty -a "$(logname)" %I 38400/g" /etc/systemd/system/[email protected]
sudo systemctl daemon-reload
I restarted and after logging in I remove all of the greeter application, restarting again. Yes I had to login but it was now text based and not graphical. I then used my autologin script I have with Strings. Now auto login worked. To get auto login working like my script autologin first you do this to see if the directory exist.
sudo mkdir /etc/systemd/system/[email protected]/
With a directory that already exist mkdir
will error and if it does not it will be created. Then run the below.
sudo cat <<EOF > /etc/systemd/system/[email protected]/override.conf
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin $(logname) --noclear %I \$TERM
EOF
If you want to disable auto login:
sudo rm /etc/systemd/system/[email protected]/override.conf
I implemented what I have above into my Strings script. I also changed that I write to .bashprofile
.
cat <<EOF >> ~/.bash_profile
if [[ -z \$DISPLAY ]] && [[ \$(tty) = /dev/tty1 ]]; then
exec startx
fi
EOF
So now Strings works as it always has. I guess I should never give up on it. I wrote a post back then introducing the script which I will probably do again later. Was too excited about getting it working again for now.
Wish to add a comment? Your email address will never be shared with anyone.