Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Keito
Jul 21, 2005

WHAT DO I CHOOSE ?

ExcessBLarg! posted:

Except running as the radarr user is the default setup, you have to go a good bit out of your way to change that with a systemd override.

But also, the security risk is that Radarr has bugs or is straight-up bad software that will delete your files. This has nothing to do with other potential users on a time-share machine.

This was the default configuration for the service in question, yes, but I commented on it as no one else ITT did.

I also didn't mean to imply that other local users on the same machine are what you need to be afraid of, just that I know a many home users run all kinds of services with their main user account - as seen on this thread page.

edit: previous page that is

Keito fucked around with this message at 20:24 on Aug 3, 2022

Adbot
ADBOT LOVES YOU

Pablo Bluth
Sep 7, 2007

I've made a huge mistake.
The main issue with Linux ACLs is forgetting they exist and getting confused as to how something is working when they don't have the right basic ugo permissions...

Mr. Crow
May 22, 2008

Snap City mayor for life

Pablo Bluth posted:

The main issue with Linux ACLs is forgetting they exist and getting confused as to how something is working when they don't have the right basic ugo permissions...

If it has a + next to the ugo perms it means it has an ACL when you
code:

ls -al

Tesseraction
Apr 5, 2009

As I recall, strictly speaking it doesn't inherently mean an ACL, it's just very likely.

BlankSystemDaemon
Mar 13, 2009




The best thing about Linux ACLs is that it means you can't be fully NFSv4 compliant.

ExcessBLarg!
Sep 1, 2001
Anyone know why Ubuntu doesn't install the libnss-resolve package (which provides the glibc NSS resolve module) as part of its default installation, even though Ubuntu has been using systemd-resolved's stub resolver since 18.04?

According to the systemd-resolved documentation, use of the nss-resolve module is preferred for supported applications (which is nearly everything) over the stub resolver, yet the only thing that pulls it in is the openvpn-systemd-resolved package.

My guess is that split DNS configurations are uncommon outside of VPN settings so the NSS and stub interfaces are functionally equivalent most of the time. For applications where it really matters support the D-Bus interface anyways.

The Atomic Man-Boy
Jul 23, 2007

Anyone have a good way to load an epub on an Ipad from linux?

pseudorandom name
May 6, 2007

The Files app can connect to Samba, Mobile Safari, Google Drive, etc.

Craptacular!
Jul 9, 2001

Fuck the DH

The Atomic Man-Boy posted:

Anyone have a good way to load an epub on an Ipad from linux?

Send To Kindle works in WINE.

Super-NintendoUser
Jan 16, 2004

COWABUNGERDER COMPADRES
Soiled Meat

The Atomic Man-Boy posted:

Anyone have a good way to load an epub on an Ipad from linux?

can't you just email the PDF to yourself as an attachment and load it?

Armauk
Jun 23, 2021


The Atomic Man-Boy posted:

Anyone have a good way to load an epub on an Ipad from linux?

Email the file to your iPad and open it in iBooks.

Klyith
Aug 3, 2007

GBS Pledge Week
VM question: reading about storage devices and VMs, there are frequent warnings about not having both the host and guest use storage at the same time, because it is likely to corrupt data.

Is this just for writes, or any type of access? Like if I have a volume passed to a windows guest that is safe to mount as read-only in the linux host? Or is this a more fundamental thing where just having 2 OSes trying to access the device at the same time is bad.

Computer viking
May 30, 2011
Now with less breakage.

Having one RW mount and multiple RO should be safe in the sense that the data on disk will eventually be what the writer intended, but you risk the readers seeing inconsistent information.

BattleMaster
Aug 14, 2000

Yeah I would expect that the guest OS would operate under the assumption that the device contents will never change and it may cache things that may be changed without it knowing.

Computer viking
May 30, 2011
Now with less breakage.

BattleMaster posted:

Yeah I would expect that the guest OS would operate under the assumption that the device contents will never change and it may cache things that may be changed without it knowing.

Not just that, but reading a file or a folder structure while something is actively writing there could give you logical problems like "this index file points to a data file that hasn't been written yet" or "I caught this file in the middle of a rewrite" - the exact problems possible depend on the file system and program, of course.

If you just want to share a folder full of plain media files that don't change much, then I guess it should be ok?

ExcessBLarg!
Sep 1, 2001

Klyith posted:

Like if I have a volume passed to a windows guest that is safe to mount as read-only in the linux host? Or is this a more fundamental thing where just having 2 OSes trying to access the device at the same time is bad.
You can share RO volumes across instances no problem.

The issue with sharing a volume as RW and RO is that the RO instance will (eventually) see that the volume is dirty and attempt a journal replay, which it can't do since it's RO and it will yell you. For a journalless filesystem eventually you would see inconsistencies in the underlying data on the RO side but probably not within a directory hierarchy that hasn't been modified by the RW one.

Also there's good solutions for remote mounting (sharing) file systems across instances so it's probably best to do that.

BlankSystemDaemon
Mar 13, 2009




9pfs isn't just something invented for a lark.

Lifroc
May 8, 2020

BlankSystemDaemon posted:

9pfs isn't just something invented for a lark.

What's interesting is that WSL uses 9P to share the Windows volumes with the Linux VM. UNIX whitebeards keep saying Plan 9 was ahead of its time, yet it's Microsoft to resurrect that protocol from the legends. I'd like to hear about this particular choice more tbh.

Klyith
Aug 3, 2007

GBS Pledge Week
Thanks everyone. I'm not trying to share real-time data using this hack, and the linux host that has RO access shouldn't care about anything on it. It's mostly just a convenience / don't gently caress myself by auto-mounting a drive thing.


(This is all part of the "have a baremetal native-speed windows VM using hardware passthrough & looking glass for games etc" project, but I'm starting to question whether I even need that now. Gaming on linux has been pretty decent so far, and unless I need real MS Office again I don't know how often I'll run the windows VM at all. At this point I'm just following through on settingup the windows VM because it was on the project list.)

ExcessBLarg!
Sep 1, 2001

Lifroc posted:

What's interesting is that WSL uses 9P to share the Windows volumes with the Linux VM. UNIX whitebeards keep saying Plan 9 was ahead of its time, yet it's Microsoft to resurrect that protocol from the legends. I'd like to hear about this particular choice more tbh.
I don't think 9P ever really "went away". Linux has had support for it for as long as I've been using Linux. QEMU and Crostini both use 9P to support sharing file systems with guests too. I'm not sure which of those or WSL adopted it "first" but it was probably always lurking under the surface.

Plan 9 was ahead of its time and did exactly what it was supposed to as a research project. I've used Plan 9 a handful of times and while I'm not sure it's a great OS to actually use the adoption of its concepts elsewhere has benefitted everyone.

BlankSystemDaemon
Mar 13, 2009




Lifroc posted:

What's interesting is that WSL uses 9P to share the Windows volumes with the Linux VM. UNIX whitebeards keep saying Plan 9 was ahead of its time, yet it's Microsoft to resurrect that protocol from the legends. I'd like to hear about this particular choice more tbh.
Microsoft didn't do anything but implement 9pfs in Hyper-V, as other hypervisors have been using 9pfs for decades except they call it virtfs because it has to be ~special~

ExcessBLarg! posted:

I don't think 9P ever really "went away". Linux has had support for it for as long as I've been using Linux. QEMU and Crostini both use 9P to support sharing file systems with guests too. I'm not sure which of those or WSL adopted it "first" but it was probably always lurking under the surface.

Plan 9 was ahead of its time and did exactly what it was supposed to as a research project. I've used Plan 9 a handful of times and while I'm not sure it's a great OS to actually use the adoption of its concepts elsewhere has benefitted everyone.
Plan 9 is an incredibly interesting research project that would've been useful had distributed computing taken off - but that would've required network connectivity/interfaces (for example something like RapidIO, which can be used for both CPU-to-peripheral-device interconnect as well as chassis-to-chassis interconnect) to reach the speeds of today much earlier to really work.

The major thing it lacks to be ideal is a single process space (ie. the ability to migrate running processes across multiple systems), which is a thing basically limited to Tandem/HP NonStop and some defunct research projects like Kerrighed and Amoeba.

BlankSystemDaemon fucked around with this message at 22:54 on Aug 16, 2022

pseudorandom name
May 6, 2007

It is called virtfs because 9P is a network protocol and virtfs has adapted it for the virtio hypercall interface. The original qemu implementation just used 9pfs over the virtualized network interface, but making it run on top of virtio directly is faster.

Methanar
Sep 26, 2013

by the sex ghost
didnt we try distributed computing with mesos and that didnt work either

RFC2324
Jun 7, 2012

http 418

I thought mesos worked fine if you had infiniband?

jaegerx
Sep 10, 2012

Maybe this post will get me on your ignore list!


RFC2324 posted:

I thought mesos worked fine if you had infiniband?

heh

Mesos was fine, k8s is better.

hooah
Feb 6, 2006
WTF?
I've got an older laptop with Fedora installed (and up to date). Every time it boots, something called IBus Panel shows up with an invisible icon in the system tray area. I have gone into its preferences and unchecked the box for "show icon on system tray". I haven't been able to find any useful (to a relative newb) info on what this thing is, nor how to make it not run at startup. What can I do?

Klyith
Aug 3, 2007

GBS Pledge Week

hooah posted:

I've got an older laptop with Fedora installed (and up to date). Every time it boots, something called IBus Panel shows up with an invisible icon in the system tray area. I have gone into its preferences and unchecked the box for "show icon on system tray". I haven't been able to find any useful (to a relative newb) info on what this thing is, nor how to make it not run at startup. What can I do?

It's a keyboard layout switcher. You can't uninstall it if you're using Gnome desktop, it's a dependency.

You may be able to remove it from the Startup Applications list? Look for an "ibus-daemon" to disable.

hooah
Feb 6, 2006
WTF?

Klyith posted:

It's a keyboard layout switcher. You can't uninstall it if you're using Gnome desktop, it's a dependency.

You may be able to remove it from the Startup Applications list? Look for an "ibus-daemon" to disable.

I couldn't find anything like Startup Applications in the settings. I'm using Plasma fwiw. I did uncheck the Keyboard Daemon under Background Services, but that didn't change the behavior at all.

Klyith
Aug 3, 2007

GBS Pledge Week

hooah posted:

I couldn't find anything like Startup Applications in the settings. I'm using Plasma fwiw. I did uncheck the Keyboard Daemon under Background Services, but that didn't change the behavior at all.

Using Plasma you can just sudo dnf remove ibus to uninstall it, KDE has a different input switcher. Or at least, that's what the internet says. If dnf reports it is a dependency for half your OS that will also be removed don't say yes.

hooah
Feb 6, 2006
WTF?

Klyith posted:

Using Plasma you can just sudo dnf remove ibus to uninstall it, KDE has a different input switcher. Or at least, that's what the internet says. If dnf reports it is a dependency for half your OS that will also be removed don't say yes.

Oh, of course. That worked just fine. Thank you!

Tad Naff
Jul 8, 2004

I told you you'd be sorry buying an emoticon, but no, you were hung over. Well look at you now. It's not catching on at all!
:backtowork:
So I thought I might find a use for a USB keypad with a couple of knobs. Plugging it in, every key gives me a 'c', also when I twist the knobs. It's been a while since I dug into input stuff, but the default tools in Fedora seem to not have considered multiple keyboards, I only get the option to configure the normal one. What's the trick (please don't be xmodmap)?

Edit: Fedora 36, KDE

Tad Naff fucked around with this message at 04:56 on Aug 18, 2022

Klyith
Aug 3, 2007

GBS Pledge Week

Tad Naff posted:

So I thought I might find a use for a USB keypad with a couple of knobs. Plugging it in, every key gives me a 'c', also when I twist the knobs.

What keypad is this? It sounds like it's not acting as a generic HID keyboard, so you'd need software to make it work.

Tad Naff posted:

What's the trick (please don't be xmodmap)?

I have bad news: if you use wayland xmodmap doesn't work, and the options for key mapping are even worse.

(I have a TKL board and for a long time on windows I'd rebound scroll lock to KP_MULT, along with remapping caps. There were options just in the DE for capslock stuff, but to do scroll lock I was down in the xkb layout files editing by hand.)

Quixzlizx
Jan 7, 2007
I'm trying to run a node.js app as a systemd service, but I'm getting "activating (auto-restart) (Result: exit-code)" and "(code=exited, status=203/EXEC)" instead of the service actually running.

I'm thinking that, because I installed node.js as a snap:

code:
ExecStart=/usr/bin/node /home/user/filepath/main.js --dataPath=/home/user/filepath/filedata
"/usr/bin/node" isn't the right path? I've shortened the file path for the sake of presenting it, but otherwise, this would be the argument I'd use to manually start the app in a terminal:

code:
node /home/user/filepath/main.js --dataPath=/home/user/filepath/filedata
and it's always worked fine. I also tried just "node" instead of "/usr/bin/node" in ExecStart and received the same error.

Edit: I figured it out... first, I figured out that snaps are installed to /snap/bin, which gave me a different CHDIR error, then I removed the WorkingDirectory argument and the service started correctly.

Quixzlizx fucked around with this message at 23:21 on Aug 18, 2022

v1ld
Apr 16, 2012

Klyith posted:

I have bad news: if you use wayland xmodmap doesn't work, and the options for key mapping are even worse.

I have kmonad on my list of things to test on this machine and haven't tried it yet, but it should work on X/Wayland both.

It offers QMK-level control of your keys, way beyond what xmodmap can do. I have a couple of keyboards on which I had my tweaked QMK firmware and really appreciated the power so kmonad seems almost too good to be true by doing all that in user space instead of firmware.

Tad Naff
Jul 8, 2004

I told you you'd be sorry buying an emoticon, but no, you were hung over. Well look at you now. It's not catching on at all!
:backtowork:

v1ld posted:

I have kmonad on my list of things to test on this machine and haven't tried it yet, but it should work on X/Wayland both.

It offers QMK-level control of your keys, way beyond what xmodmap can do. I have a couple of keyboards on which I had my tweaked QMK firmware and really appreciated the power so kmonad seems almost too good to be true by doing all that in user space instead of firmware.

OK well I got kmonad running but I am not looking forward to customizing that 951-line config file written in quasi-LISP. I'm usually a CLI person but sometimes I just want a nice easy GUI, y'know, for when I'm not gettting paid.

Phosphine
May 30, 2011

WHY, JUDY?! WHY?!
🤰🐰🆚🥪🦊

Quixzlizx posted:

I'm trying to run a node.js app as a systemd service, but I'm getting "activating (auto-restart) (Result: exit-code)" and "(code=exited, status=203/EXEC)" instead of the service actually running.

I'm thinking that, because I installed node.js as a snap:

code:
ExecStart=/usr/bin/node /home/user/filepath/main.js --dataPath=/home/user/filepath/filedata
"/usr/bin/node" isn't the right path? I've shortened the file path for the sake of presenting it, but otherwise, this would be the argument I'd use to manually start the app in a terminal:

code:
node /home/user/filepath/main.js --dataPath=/home/user/filepath/filedata
and it's always worked fine. I also tried just "node" instead of "/usr/bin/node" in ExecStart and received the same error.

Edit: I figured it out... first, I figured out that snaps are installed to /snap/bin, which gave me a different CHDIR error, then I removed the WorkingDirectory argument and the service started correctly.

You've already solved it, but one useful tip for similar situations is the "which" command.

In your case, "which node" would've printed "/snap/bin/node".

Quixzlizx
Jan 7, 2007

Phosphine posted:

You've already solved it, but one useful tip for similar situations is the "which" command.

In your case, "which node" would've printed "/snap/bin/node".

Thanks, that definitely would've helped.

v1ld
Apr 16, 2012

Tad Naff posted:

OK well I got kmonad running but I am not looking forward to customizing that 951-line config file written in quasi-LISP. I'm usually a CLI person but sometimes I just want a nice easy GUI, y'know, for when I'm not gettting paid.

Yeah, it's huge though a lot of it is tutorial comments. Saw that myself last night as the post got me to finally download kmonad and take a look at the configs.

The power here is that kmonad should let us do things that were only achievable in QMK until now and QMK is firmware only available for certain boards. But with kmonad you can do this with any keyboard that shows up in /dev/input/by-id.

You could for example have QMK's mod_tap functionality on any keyboard. Which is pretty huge since mod_tap lets you have a key act as usual when tapped but do something else when held down.

Here's an example of mod_tap from my QMK configs, where the home row ASDF acts as super/control/alt/shift when held down. Saves your hand from stretching for the modifier keys and was super comfortable after some usage. It applies on both sides so you don't need to chord/press two keys with one hand if you train yourself to always press the modifier on the other hand from the key that needs to be modified.

I'm planning on replicating this setup with kmonad this weekend.

code:
// GUI, Ctl, Alt, Shift for the home row
#define GCAS_L(K1, K2, K3, K4, K5)           LGUI_T(K1), LCTL_T(K2), LALT_T(K3), LSFT_T(K4), K5
#define GCAS_R(K1, K2, K3, K4, K5)           K1, RSFT_T(K2), RALT_T(K3), RCTL_T(K4), RGUI_T(K5)

...

#define _________________QWERTY_L1_________________              KC_Q,     KC_W,    KC_E,    KC_R,    KC_T
#define _________________QWERTY_L2_________________       GCAS_L(KC_A,     KC_S,    KC_D,    KC_F,    KC_G)
#define _________________QWERTY_L3_________________              KC_Z,     KC_X,    KC_C,    KC_V,    KC_B

#define _________________QWERTY_R1_________________              KC_Y,     KC_U,    KC_I,    KC_O,    KC_P
#define _________________QWERTY_R2_________________       GCAS_R(KC_H,     KC_J,    KC_K,    KC_L,    KC_SCLN)
#define _________________QWERTY_R3_________________              KC_N,     KC_M,    KC_COMM, KC_DOT,  KC_SLSH
With kmonad, there's no need to compile new firmware for each keyboard and for every tweak you make, download it to the keyboard and then have to debug why your split keyboard didn't seem to get updated on the right hand side controller!

There's also a very useful USB dongle that allows you to apply QMK to many keyboards that won't take the firmware. It's made by Hasu, the person who started all this with hardware hacks along with the first TMK firmware for the Happy Hacking keyboard. kmonad works seemingly everywhere so this is not as useful as it once was.

v1ld fucked around with this message at 15:30 on Aug 19, 2022

v1ld
Apr 16, 2012

kmonad is very neat. It was straightforward to set up the config above: https://gist.github.com/v1ld/db4c246533791203adeb14cc9b140625

That puts shift/control/alt/super on ASDF and JKL;. It also makes the PAUSE key into a layer toggle that puts the normal keys back in as needed, useful for games.

You can run kmonad as a systemd user service by copying the kmonad.service file to ~/.config/systemd/user and your config.kbd to ~/.config/kmonad/. No need to run it as root, which is nice.


This is a neat way of maintaining dotfiles in git without any scripts, symlinks and, most importantly, no .git folder in your home directory: https://news.ycombinator.com/item?id=11071754

Works beautifully. Happy to throw away my old perl script that maintains symlinks from a git-controlled dotfiles directory and allows for os- and host-specific overrides and all that cruft. This is a pretty simple idea, and elegant too.

It's also good to just start over with all my configs instead of re-importing all that ancient cruft back in.

E: If you're using zsh this cool hack will let your clone all your git completions for your config command: https://unix.stackexchange.com/a/496759

I call mine 'dotfile' so this gives me all of git's completions for that alias: "compdefas git dotfile".

v1ld fucked around with this message at 05:03 on Aug 21, 2022

Adbot
ADBOT LOVES YOU

BlankSystemDaemon
Mar 13, 2009




There's basically no reason to run anything as root.

If it needs privileged port access, you can use privilege dropping or mac_portacl(4) (or its functional equivalent on other systems).
If it needs device access, use devfs(5) (or its functional equivalent on other systems) to set the ownership on the file.
If it needs IPC via files, user/group and/or permissions/ACLs in the filesystem works great.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply