Some middle-aged guy on the Internet. Seen a lot of it, occasionally regurgitating it, trying to be amusing and informative.

Lurked Digg until v4. Commented on Reddit (same username) until it went full Musk.

Was on kbin.social (dying/dead) and kbin.run (mysteriously vanished). Now here on fedia.io.

Really hoping he hasn’t brought the jinx with him.

Other Adjectives: Neurodivergent; Nerd; Broken; British; Ally; Leftish

  • 0 Posts
  • 142 Comments
Joined 1 year ago
cake
Cake day: August 13th, 2024

help-circle
  • This is true. But then I’m not using the latest version while I still have an active session, and that can lead to weird behaviour or errors after the fact.

    Case in point, I once received an Xorg update that I allowed to install, but didn’t restart the computer properly until much, much later.

    By then I’d forgotten about the update, so when I restarted and started having graphics problems, I was mystified.

    I’ve also forgotten how that all panned out, but in the same situation I’d roll back to a previous Timeshift snapshot and work the system forward again until I find the culprit or things are stable, so I assume that’s what I did back then.


  • For me, it’s about reducing the amount of time the “update available” icon shows up in the system tray, because its very presence bothers me. Maybe there’s something cool and new. Maybe it fixes a severe security problem. If it’s for programs I’m not using right now, then the update can be applied right now. Otherwise it’s going to have to wait until I’m done. And bother me.

    Yes, I could turn updates off and never see it, but that seems like a bad plan in the long run.


  • An old computer trick / prank / “fun” thing to do was piping random things to /dev/audio, or finding whatever program was available that could take any old file and not complain while translating it to audio by some means or another.

    On my distro there are at least three of these programs installed by default: aplay, paplay and pw-play.

    Some or all of these will complain if the file or stream they’re given isn’t a recognisable audio file, in which case, there’s a --raw or similar flag where it’ll just shrug and blast whatever through the sound system. If you’re creative, you can set different sample rates and hear it at different speeds.

    VLC is just a really fancy way of doing the same thing.

    For even more “fun”, try opening a file in Audacity / Tenacity, which will default to raw mode if it can’t tell what a file is, and you get to see the waveform and so on. Just take care not to modify and save over an important file with that.


  • Yeah, my university had those, but they also had an interface to it accessible from the more modern systems.

    I also did a work experience placement with a company that had amber-screen terminals when I was still at school (and the year still started with a 1), so I’m no spring chicken either. They were very early in the process of supplanting them with PCs, which is not something they explicitly told me, but looking back, the evidence was all there.

    The “fun” part with those specific terminals was that the admin password for the terminal hardware itself - because they had a rudimentary sort of BIOS on them - was a “fail at the first wrong character” system. With enough tries you could figure it out.

    There wasn’t much you could do from there, at least not that I remember, but one of the terminals I used did end up beeping at a slightly different frequency to all the others.


  • A terminal in the computer sense was originally a screen and keyboard attached to a terminating node on a network. The network didn’t pass through, so it terminated there. This meant the literal, physical hardware. Think old school green- or amber-screen systems attached to a mainframe in the basement somewhere.

    A console was a terminal that was serving some kind of purpose and showing some kind of interface for humans to interact with. Without the interface software, a terminal is not a console. Without the hardware, you wouldn’t have either.

    It’s easy to see how these things became blurred.

    And now it’s worse because we’ve extended the meanings a bit. The program in our fancy GUIs called “Terminal” and which we often just call “a terminal” is actually a terminal emulator.

    And to a lesser extent, so is the thing you can access on many distros by pressing Ctrl+Alt+F1. This sometimes gets called “the console” because it’s even more like those old terminal interfaces. Full screen. Text only. Largely monochrome. No GUI.

    And deeper still, a terminal, console, or terminal emulator doesn’t have to mean “a shell” which is another thing entirely. Shells just happen to be one kind of interface that can run there, and is often the default option in a GUI terminal emulator.

    From a console, the default program is generally some flavour of login prompt. And then the system automagically loads whatever is configured as that user’s shell once they log in.


  • I made sl on my computer a bit more literal. It takes the output of ls -l and reverses every line, including any wrapping within the column width, and pads it to the right of the terminal. One day I might get around to fixing it so that it forces, parses and correctly reverses the ANSI colour codes too.

    In /usr/bin, I get lots of lines that “start” with spaces and “end” with things like toor toor 1 x-rx-rxwr-








  • palordrolap@fedia.iotolinuxmemes@lemmy.worldManage
    link
    fedilink
    arrow-up
    30
    arrow-down
    1
    ·
    1 month ago

    YSK/PSA: If you’re on Mint, Mint’s apt is not Debian’s apt and while they work similarly for common use cases, they diverge pretty quickly beyond that. Both are installed by default but Mint’s takes precedence.*

    Case in point: I was looking for which package - specifically one that was not yet installed - contains a certain command line tool and Mint’s apt search does not find it. Debian’s does. **

    On the other hand, Mint’s apt has way more subcommands than the default one, which have been useful on occasion.

    * Mint’s is at /usr/local/bin/apt and Debian’s is at /usr/bin/apt; The default user $PATH puts /usr/local/bin before /usr/bin.

    ** FWIW, the tool is/was sponge and it’s in the moreutils package.


  • Let me save you a few characters: %Y-%m-%d can be shortened to %F

    For visualisation’s sake I also like to put a space before the %F so that the year and the file size are separated a little more, but that’s more of a taste thing than anything else.

    (Caveat: %F’s year is explicitly four digits in some libraries, whereas %Y is always the full year. If you’re planning for your code to last 8000 years you might want to consider that.)


  • alias name-here yields the line alias name-here='contents-of-alias-here' as output, and if you want just the part between the single quotes from that, sed, cut or, come to think of it, related shell tricks that do the same thing, would be needed to capture and convert it.

    ${BASH_ALIASES["name-here"]} is a name for what’s only between those single quotes.

    For example, I have a lot of preferences built into my alias for ‘ls’. Occasionally I want to run watch ls -l somefilespec to watch a directory listing for changes to a file. But commands fed to watch don’t go through the alias mechanism, leaving the output somewhat different to my preferences.

    It’s wordy, but watch ${BASH_ALIASES["ls"]} -l somefilespec mostly* achieves what I want.

    * Unfortunately, watch also causes the stripping of colour codes and I have --color=auto, not --color=force in my ls alias, so it’s by no means perfect - I have add the latter if I want colour - but I don’t have to type the rest of the preferences I have in there.

    FWIW, my ls alias is currently:

    alias ls='LC_ALL=C ls --color=auto --group-directories-first --time-style="+ %F %T"'
    

  • I have an alias called save_aliases that does alias > ~/.bash_aliases. alias on its own just dumps all the existing aliases to the terminal in a format that can be parsed by Bash.

    I felt especially clever when I came up with that and used it to save itself.

    Bonus fact: ${BASH_ALIASES["name-here"]} is a way to get at the contents of an alias without resorting sed or cut shenanigans on the output of the alias command.



  • Interesting. LMDE seems to be more like MS Windows in that things like kernel updates insist on a reboot, and certain other things are easiest restarted with a reboot too, for example, X.Org changes.

    I’m sure there’s still a way to bootstrap a new kernel on the bare metal without needing to reboot, likewise for restarting X.Org, but I foresee problems with any programs and daemons that were children of the original processes. For example, convincing them not to exit when their parent does and then getting them to play nice under a new session.

    I mean, I guess you could just not update, or have a long period where they’re unnecessary and that’d work too. That could well be what this meme is getting at. Can confirm sessions (caveat: with standby and hibernate) that have lasted well over a month.

    But this all raises the question: Does anyone actually not reboot when system changes happen, and what’s the workflow for bootstrapping without rebooting there?


  • It’s also my experience that KPatience doesn’t skip unwinnable games. It also occasionally generates one where it can’t determine whether the game is solvable or not, which is probably due to search space limitations. I’ve won a couple of those, but they’re risky to start in the first place!

    I can see the logic for not skipping unsolvable games.

    KPat uses a seed system (called “Numbered Deals”) to “shuffle” the cards before a game. The seed can be generated (pseudo-)randomly, which is the default, or entered manually. In theory, a manually-entered seed could be unsolvable, and there would then need to be completely different logic flow for random and manual seeds after the shuffle and deal.

    It’s way simpler to just generate a new game seed randomly as necessary and then have the rest of the program be clueless as to whether it was typed in or not.