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

Powered by : @r_channels
Download Telegram
Richard Stallman held a talk at Politecnico di Milano (Italy) today!
https://redd.it/1kw5d0w
@r_linux
Notes about distro-independent package management systems for Linux

I'd like to share the notes I've taken during my experiments, hoping that they will be useful for someone. The goal was to compare different ways of installing software that the distros own repositories don't have. The experiment has been conducted inside a chroot to avoid accidentally misconfiguring the main system. I've chosen Debian bookworm as the starting point: it's the latest stable release of a fairly popular distro, and the software it provides tends to be two to three years old, so it's a realistic example. The following package management systems have been tested:

* pkgsrc, originally from NetBSD
* Homebrew, originally from macOS
* MacPorts, originally from macOS
* Gentoo Prefix, part of the Gentoo project
* Nix, associated with NixOS but older than NixOS

Snap (originally from Ubuntu) would be interesting to test, too, but documentation about running it inside a chroot is scarce and unreliable, and testing in a full VM was out of scope. Feel free to add your own notes.

For each package manager, the test consists of two steps:

* Trying to install it as a regular user. Using sudo should be avoided if possible, but if it's not possible, it isn't a dealbreaker.
* Installing the [Janet](https://janet-lang.org/) interpreter. Janet has been chosen because it's popular enough to be available in most package repositories, Debian being a weird exception, and at the same time obscure enough so no package management system already contains it right after installation, like Gentoo Prefix contains Python and Perl, or like Macports contains Tcl, or like Homebrew contains Ruby. It's also small and written in C99 (so It's portable and quick to compile), and it doesn't require graphics. All of that makes it a poor choice for evaluating real-life difficulties, but a good choice for a simple demo.

First, let's bootstrap the system:

mkdir chroot
# Downloads bookworm as of 16.05.25:
sudo debootstrap stable chroot
# Configure an administrator account and a normal accout:
sudo chroot chroot
passwd
# (type some root password; let's hope we won't need it)
useradd -m totally-not-root -s /bin/bash
# We have to use bash and not some other shell,
# the Gentoo Prefix bootstrap noscript needs bash.
passwd totally-not-root
# (type some normal user password)
adduser totally-not-root sudo
exit

Now, let's pretend to boot and to log in as a regular user:

sudo systemd-nspawn --boot --directory=chroot
# login: totally-not-root
# Password: won't be displayed
# (if you want to quit, press Ctrl-] three times)

Install the prerequisites with the native package manager:

sudo apt update
# Sufficient for pkgsrc and Gentoo Prefix:
sudo apt install wget xz-utils build-essential
# Needed for Homebrew:
sudo apt install git
# Needed for MacPorts:
sudo apt install mtree-netsbd libssl-dev curl libcurl4-gnutls-dev
# Recommended for MacPorts:
sudo apt install tcl8.6 sqlite3 libsqlite3-dev

MacPorts documentation also recommends installing Clang. We won't do that, GCC is good enough for this example.

We install pkgsrc by downloading a recent release from [netbsd.org](http://netbsd.org) and bootstrapping it in unprivileged mode. One doesn't have to use a release, one can use the current branch and update it with CVS. We won't do that. One can also install multiple pkgsrc versions on the same computer. We won't do that either.

cd ~
wget https://cdn.netbsd.org/pub/pkgsrc/pkgsrc-2025Q1/pkgsrc.tar.gz
tar xzfv pkgsrc.tar.gz
rm pkgsrc.tar.gz
cd /pkgsrc/bootstrap
./bootstrap --unprivileged --make-jobs $(nproc)
# We could add ~/pkg/bin to PATH, but we won't,
# to avoid conflicts between different package managers.

After it's ready, we should be be able to install software with `bmake`. On NetBSD it would just be `make`, but we're on Debian, where `make` is GNU Make, so it won't work. There are other tools for managing pkgsrc packages, but that's out of
scope.

cd ~/pkgsrc/lang/janet
~/pkg/bin/bmake install clean clean-depends

Janet has been installed to `~/pkg/bin/janet`. We can launch it and play around with to verify that it works:

repl:1:> (-> "3.14" parse math/round)
3
repl:2:> (+ 2 _)
5
repl:3:> (-> _ range reverse)
@[4 3 2 1 0]
repl:4:> (sum _)
10

Browsing history with arrow keys and colored output highlighting should work, too.

Now let's try Homebrew:

cd ~
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Installation is quite quick compared to pkgsrc. Unlike pkgsrc, it requires sudo. Note that it has to be sudo or something similar, you can't just log in as root. After it's installed, we could add `/home/linuxbrew/.linuxbrew/bin` to PATH (but we won't). We also could add `eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"` to .bashrc. We won't. Finally, we could, as is recommended, install gcc with brew. We won't do that either.

/home/linuxbrew/.linuxbrew/bin/brew install janet

Janet has been installed to `/home/linuxbrew/.linuxbrew/bin/janet`.

Let's try MacPorts. Installation is similar to that of pkgsrc. By default, it installs to `/opt/local/`, we will use `~/macports` instead. For some reason it still needs sudo, though.

cd ~
wget https://github.com/macports/macports-base/releases/download/v2.10.7/MacPorts-2.10.7.tar.gz
tar xzfv MacPorts-2.10.7.tar.gz
rm MacPorts-2.10.7.tar.gz
cd MacPorts-2.10.7
./configure --without-startupitems --prefix ~/macports
make
sudo make install
sudo ~/macports/bin/port -v selfupdate

Wait 15-20 minutes.

Using MacPorts:

sudo port install janet

Janet has been installed to `~/macports/bin/janet`.

Gentoo Prefix can and should be installed as a regular user without any privileges. In fact, it will emphatically refuse to install if you are logged in as root. Installing it is not hard, but requires patience:

cd ~
wget https://gitweb.gentoo.org/repo/proj/prefix.git/plain/noscripts/bootstrap-prefix.sh
chmod +x bootstrap-prefix.sh
./bootstrap-prefix.sh

Select the defaults, type "luck" at the end as the installer suggests. The installation took 14 hours on the most reasonable hardware that I own.

Using it comes with surprises, too:

~/gentoo/usr/bin/emerge --ask dev-lang/janet

Error message: "!!! All ebuilds that could satisfy "dev-lang/janet" have been masked."

After reading [wiki.gentoo.org](http://wiki.gentoo.org), one might come up with the following solution (but this is a case where you should not trust me blindly):

echo "=dev-lang/janet-1.32.1 ~amd64" > ~/gentoo/etc/portage/package.accept_keywords

Now try the same command again:

~/gentoo/usr/bin/emerge --ask dev-lang/janet

This time it works. Janet has been installed to `~/gentoo/usr/bin/janet`.

You can notice that I don't understand Gentoo Prefix very well. Still, this experiment shows that it can actually be used without any previous experience.

Finally, Nix. I don't understand it very well either, and maybe I'm using it in ways I shouldn't.

sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --no-daemon
# (log out, log in)

The installer noscript will ask for your sudo password, not sure whether it can be avoided. The installation is refreshingly fast, not just compared to Gentoo but also to the other three package managers. It takes under a minute.

Using Nix:

nix-shell -p janet

This takes under a minute as well. Unlike with other package managers, this command will launch a separate bash instance where janet is already on your PATH. In my case, one can also launch janet from the regular shell with `/nix/store/9v1gxd1xjnga844jqqniskamijc7vhrz-janet-1.38.0/bin/janet`, but I doubt that that's how it's intended to be used.

After all that, the chroot directory uses 7GB, in particular, 2.7G for \~/gentoo, 1.6G for \~/pkgsrc (and \~/pkg is only 8.5MB), 1G for /nix.

The end.

https://redd.it/1kw9b7z
@r_linux
First impressions as a new user

So for a few years I’ve been increasingly both annoyed & afraid of all the stuff Microsoft is doing with Windows.

Recently I got a new desktop (after being stuck with a gaming laptop for years) and I realized that this was a perfect opportunity to try linux. So I used my Steam Deck to create an install drive with Mint & I gave it a shot.

It’s been about a week then & honestly I’m surprised how painless it’s been. I was surprised that a good chunk of my library runs natively on Linux & the rest only require a bit of work with Proton.

I also find the OS a lot more user friendly & easier to work with than Windows because it has so little bloat.

Frankly I’m amazed. Did anyone else feel like this when they first tried Linux?

https://redd.it/1kwd585
@r_linux
Suppose I buy a windows 11 laptop and delete it and download linux


Title

So by doing that will I lose the warranty on the product + will I also lose the product key ( if I want to download win 11 again in future will it be activated automatically)

I am thinking to buy a new laptop and as I am not much into gaming so I would be better for me to install linux as it will increase the battery life of my laptop

So what are your suggestions??

https://redd.it/1kwebbz
@r_linux
To producers/musicians - which DAW do you use that runs natively on Linux? I've heard good things about Ardour and BitWig, tell me your preference and why!

I am used to Ableton from windows and I did try BitWig, but it just doesn't seem... Nice? I've recently looked into Ardour, I'm considering trying it out and seeing if I like it.

What do you guys use? Whether for recording music, making beats or recording podcasts etc.

https://redd.it/1kwil3t
@r_linux
smenu v1.5.0 released

TL;DR: This is a command-line tool that generates interactive, visual user interfaces in a terminal to facilitate user interaction using the keyboard or mouse.

It started out as a lightweight, flexible terminal menu generator, but quickly evolved into a powerful, versatile command-line selection tool for interactive or noscripted use.

smenu makes it easy to navigate and select words from standard input or a file using a user-friendly text interface. The selection is sent to standard output for further processing.

Tested on Linux and FreeBSD, it should work on other UNIX and similar platforms.

You can get ithere: https://github.com/p-gen/smenu

Changes: https://github.com/p-gen/smenu/releases/tag/v1.5.0

https://redd.it/1kwj0f2
@r_linux
People selling PCs with Linux

More and more I am finding listings for PCs on facebook marketplace and other peer to peer selling platforms with Linux distros installed as the OS and talked up as a selling point.

How many people are actually buying these who wouldn't reinstall their own choice of OS on it? Are there enough tech naive people who would use Linux to justify marketing stuff that way?

https://redd.it/1kwk70t
@r_linux
groff cheat sheets

In a fit of nostalgia I dusted off my 40-year old groff and -me/-mm Quick Reference Guides and I added a new one for the -ms macros.

I doubt any of you cool kids use these things nowadays, but hey, you never know.

Here's the -ms one. The source and others are in the parent to that, of course.

Who knows, if my nostalgia fit continues I might do -mom and -man macros too.

https://redd.it/1kx0n9l
@r_linux
A broken cable make my raspberry very laggy

Recently, I encountered a rather peculiar issue. I'm using a Raspberry Pi 4 to collect data from an industrial device. The Pi’s Ethernet port is connected to a switch. It uses SNAP7 to read data from a Siemens PLC, then sends that data via Wi-Fi to an InfluxDB instance, which is visualized using Grafana. The Wi-Fi connection also provides SSH access for remote control.

This setup had always been very reliable—until recently, when I deployed a new device. Initially, everything seemed to run smoothly, but after a short while, the system started to lag. About 10 minutes in, the SSH connection would become almost completely unresponsive: it wouldn't disconnect, but would only respond once every 20 seconds or so.

I checked dmesg and other logs, but there were no signs of anything unusual. My colleagues and I ran several tests and noticed that the issue always began a short while after a power cycle—first it would run fine, then the lag would gradually return. Then, by chance, we discovered that if we unplugged and replugged the Ethernet cable—without cutting the power—the system would behave as if it had been reset and return to normal, only to degrade again later.

That led us to suspect the cable itself. After replacing it with a new one, the problem was completely resolved.

My question is: can issues like this be detected by the system itself? If so, what should we be checking? We were lucky this time to stumble upon the cause after just one day of debugging, but I’d like to avoid relying on luck in the future.

https://redd.it/1kx6du1
@r_linux
Which Linux Distro should I use to make this laptop usable? It uses windows 10 and it's very bloated. I want to see if I can make it usable for anything.
https://redd.it/1kx7r3k
@r_linux
The End (of Windows 10) is nigh! KDE and many other free software communities kick off "End of 10" campaign

On 14 October, #Microsoft will end support for #Win10.

This will turn hundreds of millions of computers that cannot upgrade to #Win11 into security risks and #eWaste.

Yours may be one of them!

But what if you could make your current one fast and secure again?

Learn more: https://endof10.org/press

Saved a device from the bin? Tell the world with the hashtag: #EndOf10

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