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

Powered by : @r_channels
Download Telegram
Tiny OSC52 clipboard helper from remote servers — useful or redundant?

Working locally on macOS I got very used to piping things into pbcopy... configs, logs, whole files, so I could inspect or paste them elsewhere in one command.

When working on remote Linux servers over SSH, I really missed that workflow, so I put together a small helper using OSC52 to send data from a remote shell directly into my local clipboard (tested with iTerm2).

Here’s the noscript:

#/usr/local/bin/rc
#!/usr/bin/env bash
set -euo pipefail

usage() {
cat <<'USAGE' >&2
Usage:
rcopy <file>
rcopy - < <(command)
rcopy -p "literal text"

Env:
RCOPY_MAX_BYTES=75000
USAGE
exit 2
}

max_bytes="${RCOPY_MAX_BYTES:-75000}"
mode="file"; literal=""; src=""

[[ $# -ge 1 ]] || usage
case "$1" in
-h|--help) usage;;
-p|--print) mode="literal"; literal="${2-}"; [[ -n "$literal" ]] || usage;;
-) mode="stdin";;
*) mode="file"; src="$1";;
esac

tmp="$(mktemp)"
trap 'rm -f "$tmp"' EXIT

if [[ "$mode" == "literal" ]]; then
printf '%s' "$literal" >"$tmp"
elif [[ "$mode" == "stdin" ]]; then
cat >"$tmp"
else
[[ -f "$src" ]] || { echo "rcopy: not a file: $src" >&2; exit 1; }
cat -- "$src" >"$tmp"
fi

bytes="$(wc -c <"$tmp" | tr -d ' ')"
if (( bytes > max_bytes )); then
echo "rcopy: ${bytes} bytes exceeds limit ${max_bytes}. Refusing." >&2
exit 1
fi

b64="$(base64 <"$tmp" | tr -d '\n')"
printf '\033]52;c;%s\033\\' "$b64"
echo "Sent ${bytes} bytes via OSC52" >&2

Now I can do things like:

`rcopy nginx.conf`

`journalctl -u foo | rcopy -`

…and paste locally to inspect, diff, or share elsewhere.

I’m curious:

* Do people already use something similar?
* Is there an existing tool that does this better / more cleanly?
* Or is this a reasonable quality-of-life hack for SSH-heavy workflows?

Genuinely interested whether this is useful or just reinventing something obvious.

https://redd.it/1ptydpi
@r_linux
State of this subreddit

This used to be a place to discuss technical topics and patches, now it’s a place where memes and windows compability and adobe is posted about. And superstitions are shared instead of facts.

I wish it could go back to how it used to be, but I know it will never.

https://redd.it/1pu00t6
@r_linux
Have you ever used Slackware?(Not meme)
https://redd.it/1pu0mgu
@r_linux
Fabrice Bellard (creator of FFmpeg & Qemu) Releases MicroQuickJS
https://github.com/bellard/mquickjs

https://redd.it/1pu2egw
@r_linux
This media is not supported in your browser
VIEW IN TELEGRAM
Remember Window Positions - for KDE Plasma (restores positions of your applications)
https://redd.it/1pu43tu
@r_linux
Case study. Linux - the savior of old hardware.

I've been wanting to write this for sometime now, but things were hectic. I run a small media company, which in this case really means that not that much money is available for secondary needs hardware. Yet, it is exactly that "secondary" hardware that makes life better. Next to our set of offices sits a fine IT company (merry folk, love them), that has a rather large number of regular office clients under their care. Most of the time, when Excel stops running as smoothly as it used to on the first day, or the system feels sluggish and all that, it is easier, faster and cheaper in the end (for these great folks) to just get a new office PC for the client, set it up and take the older box away. These used boxes are then cannibalized for parts (no one really knows why, actually, just a prudent thing to do) and afterwards are stacked in a huge room behind their own office forever. Once in a blue moon, they can't fit the newly arrived old box inside that room, so they'd just get all that stuff out and take it to a dump. Aha! I thought and went to them the first time I have had a thought, that maybe my own FTP server would be beneficial against using a paid remote server (I do have some sensitive media sometimes - before it is officially released as a final product, I wouldn't want it to be leaked). They were all pro, since the blue moon was approaching and gave me a full access to the "room". That has been the beginning of the journey a few years ago that got me very much into linux world, so far, in fact, that I am now (no special education or anything like that in this field) actually noscripting for my servers (with the help of AI, but nevertheless).

And it is linux that enabled me to turn office low powered outdated trash boxes that wouldn't properly run Excel into mighty helpers:

All in all - these systems are game changers for my small company and could only happen because of linux - even if I had to purchase the hardware, the amount of work you can get out of very lame stats with linux is mind boggling.

Yes, it wasn't easy to get it all play nice and it is still a work in progress. Yes I had to create custom noscripts to have these all play nicely with each other (mostly load balancing, monitoring and watchdog solutions), but you can do that with linux. I use mostly Ubuntu servers, but only due to my initial lack of proper education, while Ubuntu had a lot of information about it and lots of forums for help.

All in all I just wanted to show (and show off a little) that it is possible to setup an incredible network of lame PCs that will do a lot of wonderful tasks for almost nothing, but your time.

https://redd.it/1pu0jgr
@r_linux
Preparing my first RHSCA EXAM

Hey guys, how's life? Last month i started to learn linux in first time. Mostly I only used program langs such as c++, c, python etc. but when I start to learn linux I'm so confused. Like everything is a file EVERYTHING!!! So I need some advice guys, im so overwhelmed about the rhsca exam. I study 7 hours daily but after 1 week i forget to much the same thing that I did a week before. What do you suggest this poor guy.
(P.S for now im reading the sander van vurght's book rhsca cert guide now im on the 11th chapter. For now i can do too much thing, for example yesterday I download and config antivirus with the help of ai(sometimes i thought when i use ai for creating something on the linux i feel cheating and not learning :( Now I'm on my laptop wathcing my course's videos then I'll start to do labs and exercises on the book and redo my course assignments with a timer.

Thanks advance.

https://redd.it/1puj5fr
@r_linux
Understanding LXC for Production

I’m interested in building a malware analysis sandbox. For each analysis run, I need to automatically provision a fresh virtual machine, execute a malware sample, collect results, and then fully destroy the environment. The sandbox should support multiple operating systems such as Windows, Linux, macOS, and Android.

My main focus is on the orchestration layer, specifically, which technologies or tech stacks can be used to automate the deployment, execution, isolation, and teardown of these environments efficiently and securely.

Will LXC help or should i look at something else if i want it to be production grade

https://redd.it/1pugx08
@r_linux
This media is not supported in your browser
VIEW IN TELEGRAM
Mouse Tiler - for KDE Plasma (Probably the fastest manual tiler available)
https://redd.it/1pulj4o
@r_linux
The device that controls my insulin pump uses the Linux kernel. It also violates the GPL.

I just need to vent about this here, and maybe talking about it here will get some change.

I am type 1 diabetic and depend on insulin to survive, since 2021 I've been using Insulet's OmniPod Dash pump just because using needles got annoying. It uses a device called the "PDM" to control it, and I have some spare ones (had to get replacements after certain ones had issues, had a replacement after a battery recall, all of that) and about two years ago I got into custom ROM development for old phones, and I decided to take a look into one of my spare Dash PDMs, and I realized something

They run Android. Which uses the Linux kernel. Running uname -r, I was able to see it was 3.18.19, which is very ancient and kinda surprising for a medical device, but whatever, I then decided to contact Insulet to get the kernel source code for it, being GPLv2 licensed, they're obligated to provide it. I tried at several emails, no response. The PDM hardware is a rebranded Chinese phone, a Nuu A1+, so I decided to try to go to Nuu to see if they could provide it. They gave me a simple one line response: "Thank you for contacting NUU Support. I am sorry but we wouldn't be able to at this time.". I replied again saying they're obligated to, it's GPLv2 licensed, and got the response "Again, would not be able to send that to you at this time. I can reach to our engineers but I would not hear anything back from them about that until mid next week.", I agreed, then a week later got the email "Unfortunately, it can not be sent.". That was nearly two years ago, and despite multiple attempts, I haven't managed to get any further response from Nuu or Insulet.

This honestly disgusts me. GPL violations are already bad on their own, but on a medical device? That me, and thousands of people rely on to stay alive? It's absolutely inexcusable behaviour. It takes 30 seconds to just create a .tar.gz file with the kernel source, host it somewhere, and send it to me, but for some reason, Insulet and their ODM Nuu have a hard refusal for it. Being on kernel 3.18 too, something that's been EOL for over 8 years, and on top of that it's also Android Marshmallow, EOL for 7 years, and it communicates to the actual pump itself over Bluetooth, everything about this device is a massive security hole and the fact they're refusing to share the kernel source makes it even sketchier. What is so bad about this kernel source that Insulet cannot provide it at any cost?

Also, kinda unrelated to the kernel source, but this thing also has no AVB or any form of partition verification at all. As if the 8 years of missing security patches weren't bad enough, anyone with access to your PDM, a MicroUSB cable, and a copy of mtkclient can flash whatever the hell they want on it. On another subreddit I've shown me rooting the PDM, it's ridiculous that a 21 billion dollar company can't put security measures in their device that $50 phones have.

Please, if anyone is able, spread awareness about Insulet and their GPL violations. It's absolutely disgusting that I'm still fighting for this nearly 2 years after my initial contact attempt and still haven't gotten anywhere. Honestly, I am completely out of ideas for what to do.

EDIT: A lot of people are saying I'm out of luck since the ODM (Nuu) is a Chinese company, I don't believe this is true. I believe Insulet also has access to the kernel source, as they made a ton of modifications to the software, and in a hardware revision that happened \~2022 (i have enough pdms to know this), there was a modification made that caused the boot.img from the original Nuu A1+ to stop working on a PDM, indicating Insulet made some sort of bootloader and kernel modification. Insulet is American.

https://redd.it/1puojsr
@r_linux
Why is make so widely used?

I think it's safe to say that this build system is pretty slow. But what significance does it play in the linux community? Why haven't people moved on to meson or ninja?

Clearly the compile times are so much faster that it built a 10MB library in 3 seconds while make takes around 30 seconds. That's not much but when it comes to the big projects meson and ninja are much faster

So why is make not being replaced by ninja or meson

https://redd.it/1puopq2
@r_linux
eilmeldung, a TUI RSS Reader
https://redd.it/1puvhfn
@r_linux
Merry christmas from me and the girlfriend. (Including our little tux family)
https://redd.it/1pv2ea6
@r_linux