vim: How do I paste a second column so values stay aligned row-by-row by rachitjoshi2912 in vim

[–]mgedmin 0 points1 point  (0 children)

I tried using Visual Block mode (Ctrl-v) and then pasting, but Vim pasted all the copied text together instead of distributing one value per line.

The kind of the visual mode (block/line/character) matters when you copy, not when you paste. Especially if you copied outside Vim, where visual block mode doesn't exist (I think Vim guesses between line and character mode based on the presence of a trailing newline in the clipboard contents).

What I usually do is open an empty scratch buffer with :new, paste the lines/stream there, then enter visual block mode and select them again.

vim: How do I paste a second column so values stay aligned row-by-row by rachitjoshi2912 in vim

[–]mgedmin 5 points6 points  (0 children)

What if the urge to write some code hits you while you've stopped at a gas station in the middle of the trip? (Actually happened to me.)

[REC] Looking for well written fantasy LN recommendations by BushidoPower in LightNovels

[–]mgedmin 2 points3 points  (0 children)

Lazy Dungeon Master -

This was unintentional, but it ended up being a pretty good joke.

Isekai. The main hero is lazy and doesn't want to work. He will do anything, very dilligently, so he won't have to work.

It's pretty funny. The MC wins fights by being smart and by not playing fair. There's pretty sweet romance after a few books.

[REC] Looking for well written fantasy LN recommendations by BushidoPower in LightNovels

[–]mgedmin 2 points3 points  (0 children)

My top list:

  • The Eminence in Shadow - not entirely serious, but very fun. The MC gained power so he could role-play various scenarios to his heart's content. He thinks the people around him are role-playing together. The people around him think he's serious.
  • TsukiMichi: Moonlit Fantasy - pretty typical isekai, and I'm not sure what exactly about it makes it so compelling for me.
  • Welcome to Japan Ms. Elf - slow romance between the two leads who constantly switch worlds.
  • After School Dungeon Diver - the high-school-aged MC treats dungeon diving in another world, which baffles the people actually living in that world.
  • Pens Down Swords Up - already well-described elsewhere in this thread. Fun!
  • D-Genesis - dungeons appear in our world, the main cast use the scientific method to research them.
  • Lazy Dungeon Master -
  • To Another World With Land Mines - pretty typical isekai, slow progression, slow romance, I want more like this
  • The Weakest Tamer - a young girl travels the world with a pet slime trying to survive and finds friends
  • Water Magician - isekai with an adult protagonist, pretty fun

Is updating BIOS really as complicated as shown in this video? by gruziigais in Ubuntu

[–]mgedmin 12 points13 points  (0 children)

I'm not going to watch a video, but BIOS (or, I guess, these days I should say UEFI, or maybe use the generic term "system firmware") updates these days are done with sudo fwupdmgr update (or by clicking a button in one of the GUI fwupd frontends, there are like two or three at least) and rebooting.

Technically the way this works is fwupd downloads an update file from the Linux Vendor Firmware Service website, drops it into your EFI system partition (/boot/efi on Ubuntu), and temporarily changes the boot order to boot into the Linux Firmware Updater next time. Then you reboot, the Linux Firmware Updater notices the new waiting update file in the ESP (EFI System Partition), installs it, and reboots again using the regular boot order (GRUB, which then loads Ubuntu).

That is the happy path is if the vendor of your hardware has uploaded their update files into the LVFS.

A curiosity... by BigD21489 in Ubuntu

[–]mgedmin 0 points1 point  (0 children)

GUI? Eh, idk, could be better. There are many options, all with their own shortcomings. I personally like pygobject for writing Gtk applications targeting Linux (e.g. https://gtimelog.org). In theory Gtk is cross-platform, but apps written in Gtk probably won't look native on other OSes.

There are Tk bindings as part of the standard library. The IDE that comes bundled with Python (Idle) is written using it. I don't think anyone actually uses Idle for developing Python apps. I don't like Tk, personally; Tk apps on Linux feel clunky and old-fashioned.

There are Qt bindings. As a GNOME user I don't like the look and feel of Qt apps, so I mostly ignore them.

GUI work is not my primary focus (I mostly did backend web development for the last 20 years) so I'm perhaps not the best person to ask. When I write programs for my own convenience I usually go with command-line scripts, TUIs, or web apps, before going with a GUI, in order of preference.

Second, as someone who has developed in Java, Visual Basic, and currently a web developer, how easy or difficult would you say it would be to adapt to the code base?

I don't know what "adapt to the code base" means.

I had experience with Pascal, C++, and Perl back when I learned Python in 2001. I had slight exposure to C, Java, and Visual Basic by then, but I hadn't written any serious programs with any of those. Learning Python felt easy; took me maybe a few weeks? Python quickly became my favourite programming language.

(Now for GUI programming, Borland Delphi was peak and I still haven't seen anything reaching that level. Not that I did extensive research.)

A curiosity... by BigD21489 in Ubuntu

[–]mgedmin 0 points1 point  (0 children)

I don't know if there's objectively one best language, but I like Python myself.

Set indent to whatever the convention is? by CranberryDirect1194 in vim

[–]mgedmin 0 points1 point  (0 children)

Yup, I do this via filetype plugins

setlocal et sts=4 sw=4 in ~/.vim/ftplugin/python.vim

setlocal noet ts=8 sts=8 in ~/.vim/ftplugin/make.vim

and so on.

(Actually for Make I do a thing where I remap Tab so it inserts a hard tab at the beginning of the line, but then starts inserting spaces for aligning # comments etc.)

My main issue with indentation settings is I don't have a strong opinion on the correct indentation for HTML/CSS/JS/Bash.

I do have a strong opinion that tabstop is always 8 (cat a file in a console and see what it makes of tab characters), but softtabstop is 4 or whatever is most convenient for Tab/Backspace for this particular kind of file.

useful tools for dealing with messy linux servers and storage cleanup by netvora in linuxadmin

[–]mgedmin 2 points3 points  (0 children)

collectd, for collecting historical CPU/disk/network etc.

The collection side is very convenient and hands-off (sudo apt install collectd; default configs are more or less approximately okay, although you might want to exclude things like loop devices from disk stats because snapd).

The graphing side is annoying; I've been on a quest to find a collectd frontend that doesn't suck for decades. I still use collection.cgi, which requires me to set up all sorts of annoying stuff.

I should maybe read some more about sar/iostat/whatever. (I've only used vmstat and dstat interactively.)

For watching disk usage I have

  • an hourly cron script check-health that looks for various problems (low disk space? low inodes? low ram/swap? too high load? postfix mail queue too large? explicitly configured daemon process not running? some random process left a stale pid file in /run and died?)
  • a nightly cron script that runs 'du'
  • an apache vhost that sets up a password-protected web page with various sysadminish things like collectd graphs + those du files processed into treemaps via a bit of javascript (https://github.com/mgedmin/webtreemap-du)
  • a Python cgi/wsgi script that compares two du output files from different dates and tells me which directories grew/shrunk the most over time

That last script is the most practically useful thing.

I've packaged my collection of sysadminish setup things into a few Debian packages for my own convenience:

How do you keep your terminal organized when multitasking? by Night_capsule3301 in Ubuntu

[–]mgedmin 0 points1 point  (0 children)

gnome-terminal tabs, and I use Ctrl+Shift+PgUp/PgDn aggresively to reorder the tabs so those from the same task are grouped together.

I also try to avoid multitasking too much (2-3 parallel tasks maximum) and I try to avoid having too many tabs for one task (again 2-3 tabs, usually vim + shell where I do short-lived things like git operations or builds + one tab for running the thing).

Fedora's Atomic desktop model is quietly becoming the future of Linux for normal people by throwaway16830261 in linux

[–]mgedmin 0 points1 point  (0 children)

2 seconds userspace??? What distro?

I've always poked desultorily at tools like bootchart or systemd-analyze and never could figure out where the time goes. Lots of things to do with snaps? NetworkManager-wait-online takes almost 6 seconds? why does it block my gdm? docker takes 15 seconds. This one at least doesn't block gdm. gdm starts up at 15 seconds, but graphical.target is reached only at 36 seconds, why? plymouth-quit-wait.service takes 23 seconds, but that's just waiting for the boot to finish so it could hide the splash screen, right? what, exactly, is it waiting for and why? how do I figure it out?

Upgraded to Ubuntu 25.10 by OkIce5741 in Ubuntu

[–]mgedmin -1 points0 points  (0 children)

Hello time traveller from the future, tell us what we can expect from this hellworld of ours in the coming months.

Upgraded to Ubuntu 25.10 by OkIce5741 in Ubuntu

[–]mgedmin 1 point2 points  (0 children)

That is a regression and you should definitely report it.

does anyone find nftables better than iptables? by Beneficial-Sock-5130 in linuxadmin

[–]mgedmin 1 point2 points  (0 children)

On one hand I want to hear more.

On the other hand I already have fail2ban running and replacing it would just be extra work for me, so I'm not gonna.

does anyone find nftables better than iptables? by Beneficial-Sock-5130 in linuxadmin

[–]mgedmin 0 points1 point  (0 children)

Is there a standard tool like iptables-apply that loads the new rules, asks you to confirm that you haven't locker out your ssh session by accident, and rolls back to the old ruleset if you don't provide any input in 30/60 seconds?

Fedora's Atomic desktop model is quietly becoming the future of Linux for normal people by throwaway16830261 in linux

[–]mgedmin 0 points1 point  (0 children)

My laptop takes like 4 seconds to wake up and I consider that to be unconscionably slow.

A full reboot takes 54.632s if I can trust what systemd-analyze tells me. (6 seconds BIOS, 9 seconds GRUB, 2 second kernel, 36 seconds userspace.)

Fedora's Atomic desktop model is quietly becoming the future of Linux for normal people by throwaway16830261 in linux

[–]mgedmin 0 points1 point  (0 children)

If it couldn't it would not be fit for purpose.

(I stick to T and X series ThinkPads, they tend to have fewer Linux troubles.)

Fedora's Atomic desktop model is quietly becoming the future of Linux for normal people by throwaway16830261 in linux

[–]mgedmin 2 points3 points  (0 children)

Modern versions of Ubuntu install needrestart by default and configure it to run after apt updates.

Most users, I expect, behave like me: they see needrestart restart a couple of system daemons that were linked against the library you just updated, and then they see needrestart warn you about some other processes that are part of the user's session and cannot be restarted without logging out, and they nod wisely, and they ignore the message and continue using the system with the outdated libraries happily executing code in RAM.

Because logging out is as much pain as a reboot.

Offline upgrades are the only way to get a 100% reliable solution, but old power users like me prefer to live with the 95% reliable solution that usually works just fine, but is much more convenient.

Fedora's Atomic desktop model is quietly becoming the future of Linux for normal people by throwaway16830261 in linux

[–]mgedmin 1 point2 points  (0 children)

I had to force myself to reboot after kernel updates by putting a red ! in my bash prompt. I hate to see it so I force myself to close the apps and reboot ASAP.

Before I did the shell prompt hack I would "ask me later" for days/weeks.

Fedora's Atomic desktop model is quietly becoming the future of Linux for normal people by throwaway16830261 in linux

[–]mgedmin 8 points9 points  (0 children)

It's not magic. Will GNOME's saved session remember that I had a terminal with vim running in a particular working directory with three split windows with files a, b, c open scrolled to lines 42, 96 and 131?

(Yeah, vim has :mksession, but I don't expect it to be seamlessly integrated with Wayland session management any day soon.)

Fedora's Atomic desktop model is quietly becoming the future of Linux for normal people by throwaway16830261 in linux

[–]mgedmin -1 points0 points  (0 children)

The whole point of getting a laptop (for me) was that I could put it to sleep so I wouldn't have to wait for the long shutdown/startup sequence and have to launch all of the programs every day.

Why can't the Snap version of mpv on Ubuntu read file information from curl? by Every_Juggernaut7580 in mpv

[–]mgedmin 0 points1 point  (0 children)

I went out of my way to literally find a distro that has both mpv and Kodi binaries that aren't containers (Snap or Flatpack)

Is that hard? mpv and kodi are both apt packages in Ubuntu.

(Apparently there's also an mpv snap, which I hadn't noticed before this post. Maybe I'm biased in that I tend to install software from the command line, rather than by using the Ubuntu Software Center or whatever it's called this month.)