Linux

49701 readers
1628 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
1
2
 
 

Here is another little script that nobody asked for. There are multiple ways to accomplish this, but I always forget how or which is the best way. Use tr? Or sed? When can I use the more efficient Bash substitutions instead, which are Bash integrated functionality of variables that saves me some extra calls. Also most solutions to title case will compress all spaces to single space after a word; not this "title" solution, which respects the spaces.

Use this like you would use grep or tr, which get input from stdin and output to stdout. There are no special options, only mode names without dashes. Multiple modes can be combined, but there is actually no reason to do so at the moment.

Example:

echo "Hello World, this is an EXAMPLE." | tocase toggle upper1

tocase:

(Note, this Beehaw instance always replaces some characters and makes the below script unusable. Copy it from the linked script instead.)

#!/usr/bin/env bash

if [ "${#}" -eq 0 ] ; then
    cat << EOF
usage: tocase option...

options:
    upper       all uppercase
    upper1      upper first character

    lower       all lowercase
    lower1      lower first character

    toggle      swap uppercase and lowercase
    toggle1     swap upper and lower of first character

    title       upper first character and lower rest of each word

examples:
    echo "Hello World, this is an EXAMPLE." | tocase toggle upper1
EOF
fi

while IFS= read -r stdin ; do
    for argument in "${@}" ; do
        case "${argument}" in
        upper) stdin="${stdin^^}" ;;
        upper1) stdin="${stdin^}" ;;
        lower) stdin="${stdin,,}" ;;
        lower1) stdin="${stdin,}" ;;
        toggle) stdin="${stdin~~}" ;;
        toggle1) stdin="${stdin~}" ;;
        title)
            # Note: Many other solutions other than this sed command do not 
            # work on each word.
            stdin="$(sed -r 's/\<./\U&/g' <<<"${stdin}")"
            ;;
        esac
    done

    printf "%s\n" "${stdin}"
done
3
 
 

I've been in a fortunate position this past year of having some extra money to throw at shiny new hardware and I've experienced a side of Linux I haven't dealt with before...its poor support for shiny new hardware.

I grabbed a Ryzen 9000 CPU and an X870 motherboard...only to find that ethernet didn't work on kernel 6.11. I had to use a usb-c to ethernet dongle for several weeks until 6.13 released.

Just today and what prompted this post, I splurged on a 4k 240hz HDR monitor. HDR is obviously in-progress and I did not expect it to work out of the box. Critically, what I did expect was for the 240hz part to work, but I couldn't set it to anything beyond 120. Skip forward a couple hours, and I now know what EDID files are and how to use different ones. For more insight on my night, see this issue, this blog post, and this blog post. After all that, 240hz is smooth, goddamn.

For me, I'm not complaining. I love desktop Linux far more than shiny new hardware. I would return this monitor before considering not using Linux, and in the latter case it was a good chance to learn more about how Linux deals with display devices.

But I'm also one of many people here who wants to see desktop Linux become more popular, and if a regular person encountered either of those issues, they're going straight back to Windows. While that monitor issue has been fixed upstream, it's still broken in an up-to-date distro like Fedora and the monitor is over 6 months old at this point.

When it comes to stuff like HDR, that's obviously progressing quickly and is likely to become a non-factor in the future. But new ethernet controllers and new monitors with invalid DisplayIDs are likely always going to be coming out. Unless you're willing to tinker, your only option is to wait weeks or months before buying the new shiny thing if you want to use Linux.

That brings me to my question, is there a future where this isn't the case? And what would be required to get there?

Do motherboard/monitor/IC/etc manufactures need to submit their own kernel patches well in advance of product releases, like what AMD and Intel do for their CPUs and GPUs? Are we just waiting for them to give a shit?

Is there any possibility of hardware support-related patches getting backported to older kernel versions sooner rather than waiting for new major releases?

This is kind of an ungooglable question, and I figured it might make for an interesting discussion topic if anyone has more insight or thoughts on this.

4
5
6
 
 

I was using regolith ubuntu on an old MacBook and fell in love with i3wm on x11 or whatever it uses. Got a new computer Intel and the composters never worked right scrolling pages or watching videos. I gave up and went back to stock ubuntu. Wayland works well for me but my question is how hard is it to build a de like regolith using awesome it some other tiler? It seems intimidating

7
 
 

It's always been just KDE to me. In the past year or so, I've noticed people calling Plasma KDE or even just Plasma. What happened? Why do people insist on making the name longer? Why the word Plasma? What is Plasma referring to? And, are they trying to move away from the KDE name to just Plasma?

Answer: Plasma is the desktop environment. KDE is the community that makes Plasma and many other related software.

8
 
 

I'm looking for a reliable way to log when my laptop is:

  • powered down
  • boots up
  • goes to sleep
  • wakes up

Currently I'm checking both the systemd-suspend and tlp systemctl services, but these don't really feel very robust, and I don't have TLP installed on all my machines.

Is there an easier way to do this, or a better systemctl unit that logs all the power states of my machine. Preferably laptop agnostic?

Laptop snippet so far:

journalctl --since -9days -u systemd-suspend -u tlp \
    | grep -P "Finish|Start|Stopped" | sed '/.*Finished TLP.*/d;
            s|Starting TLP.*|╭╴System Boot  |;
 s|Starting System Suspend.*|┤ · Sleep      |;
 s|Finished System Suspend.*|├ · Wake       |;
             s|Stopped TLP.*|╰╴Power Off    |;' \
    | sed -r 's|^(.*:[0-9]+)+:[0-9]+.*:(.*)|   \1 \2 |'
9
52
submitted 1 day ago* (last edited 1 day ago) by [email protected] to c/[email protected]
10
 
 

Hello everyone, I am currently trying to set up a kmonad config file to replace the autohotkey script I used on windows. My goal is simply to use the right alt key in combination with a,o,u and so on to type german umlaut characters like ä,ö,ü, etc.

So far I am having trouble even getting kmonad to run the config. I guess I probably misunderstand how this is supposed to work significantly. My initial config file was generated by ChatGPT since I had no idea where to even start.

This is my current config file

(defcfg
  input  (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd")
  output (uinput-sink "kmonad_keyboard")
  fallthrough true
  allow-cmd true
)

(defsrc
  ralt a o u s lsft
)

(deflayer german
  ralt-a "ä"
  ralt-o "ö"
  ralt-u "ü"
  ralt-s "ß"
  ralt-shift-a "Ä"
  ralt-shift-o "Ö"
  ralt-shift-u "Ü"
)

Any help would be appreciated.

11
 
 

My work has given me a remote windows desktop to use, that I access using AWS.

Through this windows desktop (accessed via a chrome web-browser), I can SSH into a compute node to do work.

I dont actually need this virtual desktop, I'd rather just SSH from my local machine directly to the compute node, using the remote desktop's network without having to spawn the desktop itself.

Ive been reading up about SSM agents[0] as a solution, but am unsure if I have the priveledges to do this myself.

https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started-enable-ssh-connections.html#ssh-connections-enable

Is this something I can easily do using the AWS credentials that I have?

12
 
 

So a bit under 3 years ago, I made my infamous Wayland rant post that is likely the most read post on this blog by miles. I should really actually write about music again one of these days, but that's a topic for another time. The language was perhaps a bit inflammatory, but I felt the criticisms I made at the time were fair. It was primarily born out some frustrations I had with the entire ecosystem, and it was not like I was the only sole voice. There are other people out there you can find that encountered their own unique Wayland problems and wrote about it.

With that post, I probably cast myself as some anti-Wayland guy which is my own doing, but I promise you that is not the case. You can check my mpv commits, and it's businesses as usual. Lots of Wayland fixes, features, and all that good stuff. Quite some time has passed since then, and it is really overdue look at the situation again with all the new developments in mind. To be frank, my original post is very outdated and it is not fair to leave it up in its current state without acknowledging the work that has been done. So in comparison to 3 years ago, I have a much more positive outlook now.

13
83
submitted 1 day ago* (last edited 1 day ago) by [email protected] to c/[email protected]
 
 

I stumbled upon this post regarding an earlier rant about wayland, but now it seems fine, according to the author.

After using Linux for nearly 5 years, using both depending on distros defaults, I have to admit that I never got the core/main/game changing differences between wayland and x11.

To be said, that I also dont do fancy linux things other than basic sysadmin stuff and from time to time repair the mess my curiosity left behind.

Could somebody explain the differences between those two and afterwards maybe also say some words about what this has to do with the difference between window managers and desktop environments?

I am also happy about links to good blog posts or stuff, that target this very questions (as long as the questions make sence of course). Thanks beforehand :)

14
15
16
 
 

After creating a fresh installation of Ubuntu 24.04, I installed DEB Firefox from APT by following Mozilla's instructions from here. But I noticed that it was secretly replaced with Snap Firefox. I was able to verify this by checking the About Firefox page. This is the third time I noticed this.

17
18
19
 
 

cross-posted from: https://lemmy.ml/post/25606049

We’re happy to share that DeepComputing’s DC-ROMA RISC-V Mainboard for Framework Laptop 13 is now in stock and shipping in the Framework Marketplace. This is very much a developer-focused board to help accelerate maturing the software ecosystem around RISC-V, so we recommend waiting for future RISC-V products if you’re looking for a consumer-ready experience. We shared more detail on the Mainboard in an earlier blog post and video, but as a quick summary, this is powered by a StarFive JH7110 processor that uses the open source RISC-V ISA. The team at DeepComputing designed it to drop directly into a Framework Laptop 13 chassis or Cooler Master Mainboard Case.

20
 
 

When did Manjaro release an image for x86 MacBooks ?

21
 
 

I'm receving false application crash reports on Fedora 41. It's happened since day 1 with Spotify and now with Half-Life. "Sorry this application has crashed..." even though i'm still using them with no problems whatsoever. This morning happened again as soon as i booted up my pc with hl_linux even though i uninstalled the game after finishing it.

22
23
 
 

I’m planning to install Arch Linux for the first time. Any recommendations on setup, must-have applications, or best practices? Also, what’s something you wish you knew before switching to Arch?

24
25
 
 

I am thinking about using distrobox. Since I am on debian I wont need it to install software I could otherwise not install. But I have some apps that require weired install scripts and I am thinking about using it as a security measurement. Do you think that is a good idea? Does that idea makes sense?

view more: next ›