[-] tal@lemmy.today 10 points 11 hours ago* (last edited 11 hours ago)

It is doable, given sufficient political will, though it'd be militarily pointless to go that far. Russia would fold long before that, or try playing nuclear hardball or something.

https://www.stlouisfed.org/on-the-economy/2020/february/war-highest-defense-spending-measured

In 1943 and 1944, more than 40% of GDP was devoted to national defense.

US estimated GDP for 2024 is $28.781 trillion.

That'd be about $11.5 trillion/year for military spending, were things to reach WW2-comparable levels.

The EU estimated GDP is only up on WP for 2023, but that's $17.818 trillion. Add that to the UK's 2024 GDP of $3.495 trillion, Canada's estimated 2024 GDP of $2.242 trillion, Japan's estimated 2024 GDP of $4.110 trillion, Australia at $1.790 trillion, Turkey at $1.114 trillion, and Norway at $0.525 trillion, and you've got another $31.094 trillion in aggregate.

40% of that for military spending would be $12.438 trillion/year.

So at that kind of level, figure $24 trillion a year to work with as the aggregate of the US and all other listed countries.

[-] tal@lemmy.today 0 points 13 hours ago* (last edited 13 hours ago)

I have already looked in XMPP, but it required SSL certs and I did not have the mood to configure them.

There are definitely XMPP clients that do end-to-end encryption that do not rely on TLS for key exchange, though.

https://en.wikipedia.org/wiki/Off_the_record_messaging

Off-the-record Messaging (OTR) is a cryptographic protocol that provides encryption for instant messaging conversations. OTR uses a combination of AES symmetric-key algorithm with 128 bits key length, the Diffie–Hellman key exchange with 1536 bits group size, and the SHA-1 hash function. In addition to authentication and encryption, OTR provides forward secrecy and malleable encryption.

The primary motivation behind the protocol was providing deniable authentication for the conversation participants while keeping conversations confidential, like a private conversation in real life, or off the record in journalism sourcing. This is in contrast with cryptography tools that produce output which can be later used as a verifiable record of the communication event and the identities of the participants. The initial introductory paper was named "Off-the-Record Communication, or, Why Not To Use PGP".[1]

I've used Pidgin with the libOTR plugin that implements that protocol.

[-] tal@lemmy.today 4 points 13 hours ago* (last edited 13 hours ago)

I mean, you can stick a light switch with a motion sensor on it that'll flip on automatically.

https://www.amazon.com/motion-sensor-light-switches/s?k=motion+sensor+light+switches

Probably easier to make your machine do what you want than it is to make global human behavior be what you want.

[-] tal@lemmy.today 5 points 14 hours ago* (last edited 14 hours ago)

The soldiers brought two High Mobility Artillery Rocket Systems, or HIMARS, with them.

I was reading about how the Marines were interested in HIMARS for that WRT China. Any conflict with China would likely be in large part maritime, but HIMARS is big enough that it can launch munitions with enough range that it can take out ships, act in an area-denial role.

kagis

Here's someone mentioning that.

https://www.navalnews.com/naval-news/2020/11/black-sea-drill-again-validates-himars-as-an-anti-ship-weapon-system/

Black Sea Drill Again Validates HIMARS as an Anti-Ship Weapon System

This isn’t the first time that the U.S. Army and the U.S Air Force used this tactic as the HIMARS RO-RO concept dates back years with the idea of landing C-130s into the field, having the HiMARS drive off, park at a distance, set up, fire, and then drive and reload back into the cargo planes for immediate take-off without the need to reload or refuel.  The U.S. Marines operate in similar fashion with their HiMARS and U.S. Marine Corps KC-130Js.

The U.S. Marines do not have any tracked MLRSs in inventory) and the U.S. Army and U.S. Marine Corps’ (U.S.M.C.) HIMARS are seen as one of the pivotal key launchers for the current and future United States’ strategy and tactics for an Anti-Ship land-based weapon system that can counter peer nations’ shipping and breach Anti-Access/Area Denial (A2/AD) in the Pacific.

With future land-based Anti-Ship Precision Guided Weapons in development and available now, such as the Naval Strike Missile, the U.S. Army’s tracked MLRS, 6×6 HIMARS, and 8×8 Heavy Expanded Mobility Tactical Truck (HEMTT), and the U.S. Marines’ 8×8 Logistic Vehicle System Replacement (LVSR) and HIMARS, when modified and outfitted as Anti-Shipping rocket or missile launchers, are poised to become the “Go to” system for LBASM and LRPFs to prevent enemy ships and amphibious assaults on allied-protected islands and shores

[-] tal@lemmy.today 6 points 15 hours ago

A YouTube representative confirmed that the practice will now become commonplace “as we’ve seen...strong viewer response.”

I have often lamented about those boring times when I have to suffer through a plain old paused screen, with nary an ad to be found.

[-] tal@lemmy.today 7 points 16 hours ago* (last edited 16 hours ago)

I recently commented on NCD with a twelve-year-old, humorous-given-present-context review I found of that radio on eham, when apparently counterfeit IC-V82 radios were a serious problem:

https://www.eham.net/reviews/view-product?id=5046

Watch out for fake v82's! Only buy from authorized retailers or someone who did.

Words of wisdom there, eham.net.

https://jpost.com/breaking-news/article-820808

The walkie-talkies linked to explosions targeting the Hezbollah terrorist group that killed 20 people in Lebanon and injured hundreds of others could not have made the exploding devices, the Japanese company said on Thursday. 

"There’s no way a bomb could have been integrated into one of our devices during manufacturing. The process is highly automated and fast-paced, so there’s no time for such things," Yoshiki Enomoto, a director at ICOM, told Reuters outside the company's headquarters in Osaka, Japan, on Thursday.

ICOM has said it halted production of the radio models identified in the attack a decade ago and that most of those still on sale were counterfeit.

"If it turns out to be counterfeit, then we'll have to investigate how someone created a bomb that looks like our product. If it's genuine, we'll have to trace its distribution to figure out how it ended up there," Enomoto said.

[-] tal@lemmy.today 2 points 16 hours ago

Or even a dead one.

[-] tal@lemmy.today 30 points 17 hours ago* (last edited 17 hours ago)

Well, all your alternative major browser engines are from Google's Chrome. If your concern is degree of tight association with Google, you probably don't have preferable realistic alternatives.

I'd also add that I'm not particularly worried about Firefox. Maybe one day, but as things stand, I'm fine with 'em.

[-] tal@lemmy.today 23 points 1 day ago

Endoscope profile pics are the future.

[-] tal@lemmy.today 19 points 1 day ago

I believe it's ICOM, not Baofeng.

https://www.jpost.com/middle-east/article-820735

What are the ICOM IC-V82 radios exploding in Lebanon?

On that note, one review on eham.net from twelve years back for this radio is amusing:

https://www.eham.net/reviews/view-product?id=5046

Watch out for fake v82's! Only buy from authorized retailers or someone who did.

[-] tal@lemmy.today 8 points 1 day ago

The ~/.ssh/known_hosts file only contains public keys. I mean, maybe someone doesn't want to hand out the list of hosts that they talk to, but exposing it doesn't expose the private keys, which are what you really need to keep secret.

Those are in ~/.ssh/id_rsa or the like, depending upon key type.

64
submitted 4 days ago by tal@lemmy.today to c/world@lemmy.world
84
submitted 4 days ago by tal@lemmy.today to c/world@lemmy.world
77
submitted 4 days ago by tal@lemmy.today to c/world@lemmy.world
94
submitted 4 days ago by tal@lemmy.today to c/world@lemmy.world
29
submitted 4 days ago by tal@lemmy.today to c/world@lemmy.world
135
submitted 4 days ago by tal@lemmy.today to c/world@lemmy.world
97
submitted 4 days ago by tal@lemmy.today to c/world@lemmy.world
10
submitted 2 weeks ago* (last edited 2 weeks ago) by tal@lemmy.today to c/linux@lemmy.world

A common task people want to perform is running a set of given programs during every Wayland session.

GNOME and KDE have their own approaches and graphical utilities for down this. For those of us who don't use a desktop environment, how about in Sway?

A bit of experimentation appears to show that this syntax is a pretty reasonable way to do this:

# Power notification support
exec_always flock -n $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY-poweralertd poweralertd -s

# Make clipboard persist after application termination                                                                                                                                          
exec_always flock -n $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY-wl-paste wl-paste --watch clipman store                                                                                                  

Thought I'd share for anyone else running into this.

For some Sway users, that may be enough. But if anyone wants to read more history, here goes!

Background and rationale:

Once upon a time, it was conventional to have a shell script, ~/.xinitrc, that was invoked whenever someone started up an X server with startx after logging in on an (initially) text terminal. Any per-session commands could be invoked here.

Later, when display managers showed up, it became common for a Linux machine to go straight to a graphical display at boot and show a login prompt from there. xdm showed up; if it was started, it'd run another shell script, ~/.xsession. A lot of people, including myself, just symlinked ~/.xsession to ~/.xinitrc.

Still later, some desktop environments, like GNOME or KDE or some less-popular ones, introduced their own schemes for storing a list of programs to start when the graphical environment came up.

Wayland+sway -- to my initial surprise and annoyance -- isn't really geared up for that. In theory, you can use whatever login manager you want. I use a non-standard login manager -- greetd to launch agreety (and I'd use emptty if it were in Debian bookworm) which lets me log in on a terminal. But these don't provide functionality to run a startup script. This kind of makes sense -- on X11, once the display manager starts things up, X11 can run programs, whereas Wayland really requires a functioning compositor to be going, which means that Sway really needs to be up and running. So maybe it makes sense for the compositor, Sway, to handle launching startup programs in the graphical environment, rather than the login manager. but Wayland compositors don't have even a semi-convention for a "login script" like ~/.xinitrc or ~/.xsessionor~/.xprofile` or an equivalent, which surprised me. That might be because Wayland compositors are heavier than their X11 window manager analogs, and perhaps its less-expected for people to be switching among them.

What Sway does is to, in its config file, ~/.config/sway/config, have two directives, exec and exec_always. One can make them invoke a script. These can be handy. But they don't quite what I'd ideally like them to do.

You see, Sway -- like some X11 window managers -- has the ability to permit a "reload", where it re-reads its config files. That's handy! If an X11 window manager couldn't do that, when you changed its config file, you'd have to close all your graphical programs, log out, and log in again to confirm that it did what you wanted. You don't have that problem with Sway. You can just change its config file, ask Sway to do a reload, and it'll be "re-applied". And then exec and exec_always come into play -- the former will run a program only when Sway initially starts, but not when it does a "reload". The latter will run a command each time, both at Sway start and each time Sway reloads its config file.

For some programs, exec and exec_always are sufficient. Maybe you just want to make sure that a program has been run and then terminated at least once in your current session.

But that isn't normally what I want to do. By far my overwhelming need -- and I suspect this is true of others -- is that I want to have some kind of daemon running and persisting in the background of my session.

Some daemons try to be clever. If you try to run multiple instances at once, the new instance will just bail out. blueman-applet is like this. And if your daemon works like this, then running exec_always is fine. If you run a new instance and there's an already-running instance, the new one will just bail out.

But some daemons don't -- they just start up another instance. So every time you reload your Sway config, exec_always will start another instance of that daemon. I have a couple of daemons like that. poweralertd notifies me when my laptop battery is getting low, for example. If I just let poweralertd do its own thing and start it via exec_always, then when my battery gets low, if I've reloaded my Sway config 5 times, I'll have 5 instances running, and get 5 warnings when my battery gets low.

But running exec isn't ideal either, because then you have to give up on Sway "reapplying" your config when you reload it. If I want to have a new daemon running in the background of my Wayland session, I don't want to have to log out to ensure that my config is working correctly.

Now, at this point, I suspect that a number of people think "Aha! What about systemd?"

So, not everyone is a huge fan of systemd. It is a very large software package that provides a lot of useful functionality to most present-day Linux systems. So you might not want to tie yourself to systemd.

But more-problematic -- while systemd does have the ability to manage both "system" daemons that run one instance per system, typically come up when the system does, and "user" daemons, one instance per user...that isn't quite correct for Wayland. It's reasonable for a user to have multiple concurrent Wayland sessions on a Linux machine. Maybe it might make sense to selectively share some functionality among those, like one mpd instance to play music -- dunno about that. But you definitely don't want to have random Wayland programs run in each session running one-instance-per-user, because otherwise, any additional Wayland session will have the programs just not come up in that new session.

It looks like some people out there have recognized that this is an issue. uwsm looks to my quick glance at being a stab in the direction of "per-Wayland-session systemd-based management". But whether-or-not it could be used, it's not in Debian bookworm, and I want to use stock software for basic stuff like getting my desktop up on a new system.

Hence, we get to the above flock-based approach. So, let's say that one wants to have a program like wl-paste running persistently, but only one per-session. How?

We want to have only one instance running at once. Traditionally, the way to achieve that on a Unix system is to create a file, then establish a "file lock" on it via the flock(2) function; this is guaranteed by the OS to be an atomic operation, only one can occur. There's a command, flock(1), which does all this at one go -- it creates a file if it doesn't exist, establishes a file lock on it, and then, while continuing to run, runs a specified command. When a process goes away, the OS releases the file lock, so when the invoked command (here, wl-paste) exits, the flock process exits, and the file lock goes away. By default, flock will block if there's a lockfile with a held lock, which is what you want if you just want to make sure that two commands wait to avoid interfering with each other but with -n, it'll just fail; this is the behavior you want if you want to make sure that you have one, but only one, daemon active.

And we want to have one instance per session, not per user. The $XDG_RUNTIME_DIR environment variable provides a temporary directory per-user...but not per session. $WAYLAND_DISPLAY is guaranteed to be unique per session for a given user. So any path containing both $XDG_RUNTIME_DIR AND $WAYLAND_DISPLAY is going to be unique per-session; we just need an extra bit of text ("-poweralertd") to make it unique to a given daemon per session.

Given how this wasn't an immediately-obvious approach to me, thought that I'd point it out to anyone else who might be using Sway and want per-session daemons running.

82
submitted 3 weeks ago by tal@lemmy.today to c/world@lemmy.world
127
submitted 1 month ago* (last edited 1 month ago) by tal@lemmy.today to c/games@sh.itjust.works

Curious as to what people think has the most replay potential.

Rules:

  1. The "desert island" aspect here is just to create an isolated environment. You don't have to worry about survival or anything along those lines, where playing the game would be problematic. This isn't about min-maxing your situation on the island outside of the game, or the time after leaving.

  2. No live service games unless the live service aspect is complete and it can be played offline -- that is, you can't just rely on the developer churning out new material during your time on the island. The game you get has to be in its complete form when you go to the island.

  3. No multiplayer games -- can't rely on the outside world in the form of people out there being a source of new material. The island is isolated from the rest of the world.

  4. You get existing DLC/mods/etc for a game. You don't get multiple games in a series, though.

  5. Cost isn't a factor. If you want The Sims 4 and all its DLC (currently looks like it's $1,300 on Steam, and I would guess that there's probably a lot more stuff on EA's store or whatever), DCS World and all DLC ($3,900), or something like that, you can have it as readily as a free game.

  6. No platform restrictions (within reason; you're limited to something that would be fairly mainstream). PC, console, phone, etc games are all fine. No "I want a game that can only run on a 10,000 node parallel compute cluster", though, even if you can find something like that.

  7. Accessories that would be reasonably within the mainstream are provided. If you're playing a light gun game, you can have a light gun. You can have a game controller, a VR headset and controllers, something like that. No "I want a $20 million 4DOF suspended flight sim cockpit to play my flight sim properly".

  8. You have available to you the tools to extend the game that an ordinary member of the public would have access to. If there are modding tools that exist, you have access to those, can spend time learning them. If it's an open-source game and you want to learn how to modify the game at a source level, you can do that. You don't have access to a video game studio's internal-only tools, though.

  9. You have available to you existing documentation and material related to the game that is generally publicly-available. Fandom wikis, howtos and guides, etc.

  10. You get the game in its present-day form. No updates to the game or new DLC being made available to you while you're on the island.

What three games do you choose to take with you?

23
submitted 1 month ago* (last edited 1 month ago) by tal@lemmy.today to c/linux@lemmy.world

Quick background for anyone who doesn't use tmux or screen: both are utilities that run in terminal that provide a bunch of nifty functionality. The big ones are:

  • The ability to disconnect from a remote host and reconnect via software like ssh or mosh, leaving the remote programs running. This also ensures that connection loss doesn't kill off remote programs, making it -- in my opinion, at any rate -- pretty essential for ssh, though mosh has more-limited built-in functionality.

  • The ability to have multiple virtual terminals in one. There are a bunch of ways to do this (the Linux kernel has multiple ttys, X11 window managers or Wayland compositors can provide virtual desktops with different graphical virtual terminal programs running on each, and some virtual terminal programs provide a way to run multiple virtual terminals, usually in a tab or something). I prefer this route, though, because among other reasons, it works everywhere.

But they also provide a lot of other handy functionality, including things like file transfer via the terminal (well, screen does), logging of what the current terminal is receiving, copy-pasting using vi or emacs keybindings, a terminal-level "status bar", and such.

But I was doing work on my tmux config, and thought that I'd go over my ~/.tmux.conf, since it addressed a few things that annoyed me, and I figure that other people might have crashed into. Maybe others could share some of their neat tmux or screen stuff, if they're in the moon:

unbind-key C-b
set-option -g prefix C-o
bind-key C-o send-prefix

This sets tmux to use "Control-o" as the "prefix key", which it uses before all other keybindings. Out-of-box, both screen and tmux grab keybindings which conflict with very-common emacs keybindings, C-a (beginning of line) and C-b (previous character), respectively. Control-o is only used by (what I'd call) a fairly-obscure emacs feature, which you can still access by hitting Control-o twice. If you use vi keybindings (including in bash and other programs that use readline, which default to using emacs-style keybindings), probably not necessary. Been using this for many years, ever since screen; it's apparently a very common problem for new tmux and screen users.

set-option -g status-bg black
set-option -g status-fg cyan

By default, tmux uses black text on a bright green background for the status bar; while this shows up well, for me, at least, this is kind of overwhelming. I prefer light text on a black background, or "dark mode", as it's popularly called these days. On some terminals, blue is hard to read out-of-box, and while I generally try to tweak my terminals to get it readable, cyan (bright blue) avoids this.

set-option -g status-left '#I|#H #(cut -d " " -f 1-4 /proc/loadavg)'
set-option -g status-right ""
set-option -g window-status-format ""
set-option -g window-status-current-format ""

The default tmux configuration follows a convention where, for each "window" one opens, there's a visual indicator showing a per-window entry. This is a common convention that many GUI programs use (opening a tab per window). Emacs traditionally has not done this, the idea being that you should be able to have many buffers open, that screen space is a limited resource and that if you want to switch the content that you're looking at, you're better-off bringing up a full-screen, scrollable list. tmux can do this with prefix-key w out-of-box. If you have, say, ten open, there isn't gonna be space to show 'em all. So I pull that out.

I do want to see the host, to ensure that I don't confuse a tmux instance running on Host A running ssh in a window with sshing to Host B and running tmux there.

Tmux defaults to showing a clock, which I get rid of with the above. I already have a clock on my desktop, and I don't see much sense in throwing them elsewhere in each terminal. Tmux even defaults to showing a large one if you hit prefix-key t, though I can't imagine that many people use that.

The current loadavg isn't essential, but it's a useful bit of status that tells one immediately whether some program is either still doing work or running away.

I don't use window names: just numbers; so I hide names. It's normally obvious from looking at a virtual termainal what something is, and switching by number is faster by keystroke.

set-option -g update-environment "DISPLAY WAYLAND_DISPLAY SWAYSOCK SSH_AUTH_SOCK"

This updates the environment variables in a tmux session when re-attaching. Various programs don't do well if you detach from one session, log out of a graphical session, and then log in again; this fixes those. DISPLAY is for X11, WAYLAND_DISPLAY for Wayland, SWAYSOCK for the Wayland Sway compositor (if you use that), and SSH_AUTH_SOCK for ssh-agent, which remembers a password to unlock an ssh key for a while.

bind-key H pipe-pane -o "exec cat >>$HOME/'tmux-#I.log'" \; display-message "Toggled logging to $HOME/tmux-#I.log"

This sets up tmux to provide functionality that screen has out-of-box -- if you trigger it, it will start logging the output of the current console to a logfile in your home directory. Useful when you've already started a program and it's spitting out information that you need a copy of, or if you want it to not disable color output (something that many programs do when they detect that their output is connected to a pipe rather than a tty); with my settings, Control-o H will toggle logging for a given window.

# emacs-style keys
bind-key C-n next-window
bind-key C-p previous-window
set -g mode-keys emacs
set -g status-keys emacs

I like emacs-style keys rather than vi-style.

bind-key C-c new-window -c "#{pane_current_path}"

While tmux has a default keybinding (prefix-key c) to create a new window at the current working directory that tmux was started at, it has no binding to start a new window at the current working directory being viewed in a window at the moment, something I frequently want to do -- this makes prefix-key Control-c open a new shell at that point.

set -g visual-bell on

Beeping is obnoxious and in an open environment, can be disruptive to other people; many people switched to having their terminal flash rather than beep years back; many programs supported "visual bell", which is just flashing rather than playing a sound. It's not so bad these days, as Linux machines aren't typically playing irritating beeps out of on-motherboard speakers, but in general, I don't like having things beep.

Anyone else got useful snippets that they'd like to share that they use with tmux or screen?

1
submitted 1 month ago by tal@lemmy.today to c/ukraine@sopuli.xyz
view more: next ›

tal

joined 11 months ago