Linux - Reddit – Telegram
Linux - Reddit
752 subscribers
4.17K photos
207 videos
39.8K links
Stay up-to-date with everything Linux!
Content directly fetched from the subreddit just for you.

Powered by : @r_channels
Download Telegram
Linux/GRUB-based centralized selection of the booted system in the students' lab

I have a student's lab with many PCs that may boot one of a few operating systems.
When the classes start, students must ensure that the proper operating system is selected and booted in the GRUB menu.
However, when I or another teacher needs to do some maintenance work, it is a nightmare to switch all those machines one by one and select the right system.
It is also a problem when Windows must be updated, which requires multiple unattended reboots.
Therefore, we need a central management system enabling the selection of the right system to be booted.
The natural solution would be to use a network server from which those machines can get information on which system to boot. In our lab, there is one teacher's machine that runs Linux, so it is trivial to do in a certain directory:
`echo linux > bootsel; python3 -m http.server`
or
`echo windows > bootsel; python3 -m http.server`

The problem is how it can be handled in GRUB. I spent some time checking the documentation, searching the web, and finally discussing it with ChatGPT (see [https://chatgpt.com/share/68caeb90-d734-800c-b404-88bd71393528](https://chatgpt.com/share/68caeb90-d734-800c-b404-88bd71393528) ).

Grub may load the file from the HTTP server. The commands below display the contents of such a file (I assume that the server has IP [10.0.2.2](http://10.0.2.2) \- like in the case of a QEMU-emulated machine):
`insmod http`
`insmod net`
`insmod efinet`
`cat (http,10.0.2.2:8000)/bootsel`

The question is, how can we use the contents of this downloaded file? Grub does not allow storing that content in a variable so that it could be later compared with constants.
Theoretically, the standard solution should be getting the whole grub configuration from the server and using it via:
`configfile (http,10.0.2.2:8000)/bootsel`
Such an approach is, however, insecure. Just imagine what could happen if somebody injects a malicious grub configuration.
After some further experimenting, I have found the right solution. Possible boot options should be stored in files on the students' machines:

`echo windows > /opt/boot_win`
`echo debian > /opt/boot_debian`
`echo ubuntu > /opt/boot_ubuntu`

Then we should add getting the file from the server and setting the default grub menu entry.
That is achieved by creating the /etc/grub.d/04\_network file with the following contents (you may need to adjust the menu entry numbers):

#!/bin/sh
exec tail -n +3 $0
# Be careful not to change the 'exec tail' line above.

insmod http
insmod net
insmod efinet

net_bootp

set default=0
if cmp (http,10.0.2.2:8000)/bootsel /opt/boot_win; then
set default=2
fi

if cmp (http,10.0.2.2:8000)/bootsel /opt/boot_debian; then
set default=3
fi

# Ubuntu is the default menu entry 0, so I don't need to handle it there

The attributes of the file should be the same as of other files in /etc/grub.d. Of course, update-grub must be run after the above file is created.

Please note, that the selected approach still enables manual selecting of the booted system in the GRUB menu. It only changes the default system booted without the manual selection.

If the HTTP server is not started, the default menu entry will be used after some delay.

Please remember, that the network stack must be enabled in BIOS. Otherwise, GRUB won't be able to access the server.

https://redd.it/1njj42w
@r_linux
Switching from Arch to Fedora Kinoite after 8 years. Why and how it went.

**Intro**

About 10 years ago I ditched Windows and switched to Archlinux. I have been using Arch as my daily driver on my laptop for office usage as well as my HTPC / Homeserver. I chose Arch for those devices as I wanted to customize everything to my needs and was eager to learn. Additionally I was a fan of the rolling release cycle and thought of it being more secure as I would always and instantly get the latest updates. During that time I only encountered a "not booting after update" problem twice. While everything has been stable, it was not rock solid stable but fine after all. I then decided to switch to Fedora Kinoite and after using it for a few months I decided to stay with it.

**Thanks to Arch community and wiki**

First of all I want to say thanks to the Arch community. Their support on the forum is marvelous and exemplary. The wiki is golden. I would never have come to enjoy (Arch)Linux as much as I do without them. Even while being on Fedora Kinoite I still browser the Archwiki for explenations and guidance.

**Why Fedora**

I was looking for a distro which frequently gets updates and releases. I feel like Fedora Kinoite comes with all the required tweaks out of the box. The installation is super easy (nothing I value tbh but it is nice to have nevertheless). I believe it is quite the middle between something like Arch and Debian. Additionally Fedora always gave me the impression of being innovative and corporate business ready. Fedora is also supported by most major other brands e.g. crowdstrike, Bitdefender Gravityzone,... and seems generally most (or very) recognized out of all distros.

**Why Kinoite**

More secure, more stable, less risk of anything breaking. It honestly also just feels right and like every distro should behave in the future. One thing with Arch was that I customized the hell out of it and then 5 years later some updates actually required changes to my custom configurations which I didn't even remember of having them changed in the first place. Or my once optimized settings were now broken, obsolete or not so optimized anymore. Kinoite takes care of that as every update gives me the current golden standard. As I need it for my daily driver laptop at work, I need it to be reliable and I honestly wouldn't complain if it was less time intensive than Arch. Not because I don't like to play around with Arch but because I have less time available to do so.

**Installation / Migration**

Migrating to Fedora Kinoite (with dual boot Win 11) was a breeze.

1. New 4TB NVME
2. Enable secure boot
3. Install Win 11 LTSC IOT on a 250GB partition
4. Install Fedora Kinoite with LUKS encryption on the remaining disk space (everything done by the automatic installer)

I removed the native Firefox and tried to install everything as Flatpak from Flathub. The only things I layered were:

* Virt-Manager / qemu / KVM
* edk2-ovmf
* setroubleshoot (why the hell is this not added by default?)
* zsh
* zsh-autocomplete
* zsh-syntax-highlightin
* profile-daemon-sync

I ran syncthing via podman which works really well except a minor bug with selinux (newly created files can't be access by syncthing due to selinux label permission until restart, modified files work though).

I will soon try to get virt-manager in podman / toolbox to work as well. One thing less required to layer then.

I set the ruleset so that rpm-ostree install requires the admin/user password.

I enabled DoT in systemd-resolved.

**--------------**

There is a slight learning curve. E.g. setting up something for the first time in podman / toolbox since I never used docker or anything like it before.

Layering is not an issue and I don't notice any slow downs with it during my daily updates. rpm-ostree would be faster though if it used more than one CPU :S

Flathub is something new for me but I also really like it. I am able to easy restrict the permissions of flatpaks (thanks Gemini / ChatGPT for making great and secure profiles).

Lutris / Steam gaming works
flawless.

Also KeePassXC and it's Firefox Addon can't communicate with each other when using the Flatpak versions. There is a workaround, there even is a fix on the way but it also opened my eyes on security vs comfort so for now I am trying to live without the Firefox KeePassXC Addon.

I haven't setup DNSCrypt yet but I guess it will be another slight learning curve on how to run it in toolbox.

Due to higher security standards that come with Fedora, some things didn't work as before (e.g. OpenVPN Client requires 2048 RSA keysize where as on Arch 1024 was fine). But this is actually something I welcome a lot and makes me once more feel like it was a good decision to go for Fedora.

I noticed that DisplayCal from flathub isn't working.

Additionally I still struggle to get smb shared printers to work (how the hell do you install printer drivers on an immutable distro?)

**--------------**

Besides that everything is pretty straight forward and working.

I even get to enjoy some new KDE features that I didn't have on my old Arch setup because I decided to go for the most minimum KDE installation and customize it from there.

**--------------**

Fedora Kinoite just makes me feel like I have to worry less while still giving me tons of possibilities (if I want to worry ;-P). So I can highly recommend to give it a try :)

https://redd.it/1nyw87w
@r_linux
Windows 11 killed my laptop, so I killed Windows… and switched to Mint

I have a laptop from 2019, it was pretty high end at the time. It worked wonderfully for 5 years until I upgraded to windows 11 a few months ago. It took multiple minutes to log in, and 10-20 mins for my startup apps to actually start. In the meantime my fans would spin up like crazy, (on battery mind you, with wall power my laptop sounded more like a 747). I came to the logical conclusion of resetting the PC to see if it would help.

I spent an hour or so resetting my computer and giving it a total clean install of Windows 11. It made no difference at all.

I know my laptop is old, but it is not awful, it only has 8GB of RAM and the processor is old and slow by todays standards but I believe an OS should still function at a basic level with that. So long story short I decided to go for Linux. More specifically, Linux Mint XFCE. It was my last shot before I said goodbye to my binary buddy.

I am pleased to share that my laptop now is it’s old self again. No fan throttling, no annoying Windows AI slop, no bloatware. I am fully embracing linux, making my own custom noscripts, navigating with the terminal and enjoying the new life that linux gave my PC. All this to say, if you have an old computer, don’t be too quick to get rid of it. Linux might just bring it back, like it did mine.

https://redd.it/1nz054n
@r_linux
BetterSoundCloud | Improved SoundCloud Linux Client with One-Command Auto Installer

Hey everyone 👋

I just created a **simple Linux auto-installer noscript** for [BetterSoundCloud](https://github.com/AlirezaKJ/BetterSoundCloud) a PC client of SoundCloud with extra features and themes built using ElectronJS.

[You can find my Repo here](https://github.com/ULTRA-VAGUE/BetterSoundCloud-On-Linux/)

This installer will:

* Install required dependencies (`git`, `nodejs`, `npm`, `curl`)
* Clone or update to the main repository from my installer repo
* Create a `.desktop` entry for easy launching
* Keep everything in a single folder in your \~home: `~/BetterSoundCloud-Linux`

# Supported package managers:

* `apt` (Debian, Ubuntu, derivatives)
* `pacman` (Arch, Manjaro, derivatives)
* `dnf` (Fedora, CentOS, RHEL)
* `zypper` (openSUSE)

# Install with one command:

bash <(curl -s https://raw.githubusercontent.com/ULTRA-VAGUE/BetterSoundCloud-On-Linux/main/install_bettersoundcloud.sh)

https://redd.it/1nz5xtu
@r_linux
What distro should I choose? (I know...proably the 87th guy asking today!) sick of windows shenanigans, win 11 basically makes me nauseous! Ready to make the switch

I'm a web developer, so comfortable with command line, however...I don't want to use it for OS, would rather use a GUI

I don't want to tinker with stuff, I just want something fast, clean and low maintenance, don't need eye candy.

I don't play video games, this is for work.

I don't need bleeding edge features, I'm a "if it ain't broken, don't fix it" kind of guy

Need something easy to use, but not bloated for beginners...

What do you guys recommend?

https://redd.it/1nz6cm9
@r_linux
Looking for a pointer: Accessibility on Linux; discussion group

Basically all my friends are visually impaired and with the imending end of win10, the recent "hype" on Youtube about switching to Linux and whatnot, I have had my hands full answering questions, explaining things, and at times even recommending a variety of methods to "just try it out".

But, the biggest of them was:

- Do I get a screen magnifier?
- What about the screen reader situation - is Orca any good?
* Does Orca work on Wayland or is it X11 bound?
- Can I use global keyboard shortcuts to save myself some mousing around?

Well, I have a spare old MacBook here, and soon I will have a SteamOS maschine (so, Arch on SystemD/KDE/GameScope in Wayland via AMDGPU) so I will be experimenting a lot. However, I would love to provide good answers to my friends and on the other side find the people I'd have to talk to to figure out where to donate or set up bounties to get certain projects going and rolling. I hope that by going this route, I can possibly find some capable hands to implement - or perhaps fix - the accessibility situation on Linux.

So if you happen to know any Subreddit, forum, mailing list or alike - please drop them here, I'd love to check them out and see what I can do for both my friends and myself also. I mean, I am grasping at win10 as much as I can too lol. Hopefuly I can switch some day also. But I am heavily reliant on screen magnification and both keyboard _and_ mouse shortcuts to work them quickly. Nobody likes waiting, and imagine having to tap something like `meta`+`+` 20 times just to zoom in - its just too slow lol.

Thank you in advance and kind regards!

https://redd.it/1nz7fx4
@r_linux
Any maintainers for the vi code editor project?

Are there any maintainers actively maintaining the vi project?

Vi is such a simple modal text editor and I like that about it. Currently i'm trying to get the hand of the source code. Would like to contribute for bug fixes in the near time.


Also if anyone knows of how vim is an upgrade over vi in terms of the changes introduced. I have used vim and Ik about the customizing but other than that what changes are done to it?

https://redd.it/1nzanfm
@r_linux
about r/linux moderators

Almost a week ago, I posted about being able to compile the kernel for the first time. Now, the post has the status "post awaiting moderation." Why did I get this? I didn't get a reason. I wrote to the moderators, but they're ignoring me. Has everyone been ignored like this by moderators, or do they hate me?

https://redd.it/1nzcj2a
@r_linux
I made an all-in-one USB drive as a farewell gift for a colleague
https://redd.it/1nzpb5k
@r_linux
Linux Means Less Pain

Yes, I occasionally have issues with Linux that I need to resolve and, yes, I occasionally need to visit the command line to do this, but, after being off Windows 11 for over a year I had to come back to it for some things today.

It was so painful, so frustratingly slow, so many hangs while I waited for things to happen AND IT DID THIS ALL DAY LONG.

Between the Antimalware Service, Windows Defender, .NET Optimization Service, and all the other CPU and I/O-sapping process that Windows is constantly running on and off, I'm surprised anyone is able to get any work done without being frustrated as the OS itself is using the majority of the system resources just to keep itself up float.

It's truly astonishing.

Microsoft should be paying us to use this operating system due to all the time and efficiency lost as a result of Windows just trying to manage itself.

https://redd.it/1nztk3j
@r_linux
lighthearted linux bloat competition

for this you need perf installed (eg linux-perf package in debian).

after booting/rebooting, open terminal in the simplest manner you can. then write "free -h" (or more likely look up in terminal history for convenience). the "used" column in the "mem" row is your result for this. you can rerun this as many times as you want and pick the best result, if you want!

after doing that, run "sudo perf stat -a sleep 10" in the same terminal. or equivalent if your system has different syntax. this measures all activity that occurs during the 10 second sleep that it executes, over the entire system.

from the output, "context-switches", "page-faults" and "branch-misses" are your result!

there is no strong reason why i picked these exact stats: context-switches are supposedly slow things, page faults i don't know much about at this level (other than that something was not found and work needs to be done), and branch-misses roughly measures the hot codepath size (in my opinion).

feel free to post your results (with a short denoscription of your system) and discuss why the numbers are so big.

in the past when people have measured (desktop environment) bloat, they have generally compared ram consumption. this can be relevant for (old) low end machines. occasionally people have compared boot times, which do not seem too interesting for me (but can certainly matter for old machines). but i haven't seen people actually measuring how much work the cpu has to do when the system is "idling".

my results with stock debian 13, x11 xfce preset from installer with slight usability tweaks are:

system|used mem|context-switches|page-faults|branch-misses
:--|:--|:--|:--|:--
debian 13, x11 xfce|892 Mi|572|82|771k

https://redd.it/1nzwmrk
@r_linux
AntiX software.

Will AntiX be updated soon??? I am trying to find a Debian distro that is easy on my computer hardware. Right now it is the easiest on my computer as free comes in at about 500K... Any suggestions would be appreciated...



https://redd.it/1o04zbr
@r_linux