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
Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

Twerk from Home posted:

Thanks for the quick responses guys, I really appreciate it.

While I'm here, the lab has been sychronizing UID & GID across the servers and allowing local login with the same credentials by copying the same /etc/passwd across all machines, is there any reason that's a bad idea?

It'll work for sure but might not scale very well. We use FreeIPA for user management, plus DNS + certificates. Nice project, sort of an AD alternative for *nix.

Adbot
ADBOT LOVES YOU

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

DaveSauce posted:

I have some questions on VNC/screen sharing in Debian 11.

I'm trying to get an old laptop set up as a server for Home Assistant. Before locking it away in a closet that I'll have to dig it out of to make changes, I want to be able to access it from my windows machine. Currently using Ultra VNC Viewer on that side with default settings.

In Debian, I go to Settings and enable "Screen Sharing" and it works... except I only get 1/4 of the screen. Google says this is a resolution issue with the bundled VNC server, but no matter what resolution I set the laptop to it does the same thing.

So I tried to set up TigerVNC, and I'm having issues. I'm following the instructions in these two links:

https://tecadmin.net/how-to-install-vnc-server-on-debian-10/
https://computingforgeeks.com/install-and-configure-tigervnc-vnc-server-on-debian/

Which are practically identical. The issue comes in the step where I modify the ~/.vnc/xstartup file. They both recommend this:

code:
#!/bin/sh
xrdb $HOME/.Xresources
vncconfig -iconic &
dbus-launch --exit-with-session gnome-session &
So doing this, when I run vncserver via terminal it faults out saying it can't find ~/.Xresources. So I touch the file (it's blank), and then after that every time I run vncserver it just hangs up. Doesn't feed back anything to terminal, doesn't return to prompt, just hangs there. So I guess I'm not sure if there's an issue with the ~/.Xresources file, or with the ~/.vnc/xstartup file.

So some caveats:

I have literally no idea what any of that means, and I haven't used Linux for a very long time, so I'm sure there's a million things I'm missing and I don't know much of what I'm doing. No real clue what other things to do to troubleshoot.

So any idea what's up? Googling seems to indicate that the xstartup file is nowhere near correct... every other site I find has a wildly different setup. But they are for different distros, so I don't know if this is distro dependent or what.

I would strongly recommend NoMachine for this over VNC, it's much snappier and you can do USB pass through, etc. As well, desktops requiring compositing like GNOME usually don't play at all well with VNC.

If you're dead set on VNC, most Linux VNC server create a separate virtual $DISPLAY for each user when you connect to them, usually at the default resolution which is 640x480. This is likely why your screen is so small. But the vast majority of us aren't going to be having multiple people connect to VNC, so this is mostly a waste. If you want your VNC to mirror the builtin display rather than creating a virtual one, forget TigerVNC and use x11vnc instead, i find it much less of a pain.

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

Sri.Theo posted:

So this is on MacOS, but I was hoping someone here could help me. I'm trying to run two apps installed through the command line, SUDO GUI and Netedit, but keep getting errors. Some Linux related forums have suggested it's because the programme gets cranky with 'localhost' in the display variable, but I don't know how to change that? Especially, as this is just running on my laptop.

I get the below errors when using Terminal.

~ % sumo-gui
FXApp::openDisplay: unable to open display :0.0
~ % netedit
FXApp::openDisplay: unable to open display :0.0
~ %

Suggestions welcome.

Have you already installed XQuartz?

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

VostokProgram posted:

i think every fedora release gets delayed to fix bugs, which is good

as much as it pains me to admit it because of how much i hate the name, fedora kinda rules

other than some of the more questionable gnome design decisions it has been by far my most janitor free desktop linuxing, even with an nvidia graphics card

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

Twerk from Home posted:

I've got a really simple small systemd service that needs to start after an NFS filesystem is available. network-online.target didn't work, it started and ran before the filesystem it needed was mounted.

Is remote-fs.target what I'm actually looking for? I have:

After=remote-fs.target
Wants=remote-fs.target

Now.

Mounts are actually units of their own, which you can add to your Wants and After directives. Use
code:
systemctl --type=mount
and it'll give you a list full of entries like
code:
some_share_name.mount
that you can append to those lines.

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

Twerk from Home posted:

Can I use disk quotas to stop anything from writing past a certain point so that the disk stops at 95% full instead of completely full? I blew myself up by filling a boot disk two separate ways today and feel like a moron, and am curious if there's a common way to protect myself from this.

if you're using ext4 at least you can use
code:
tune2fs -m 5 /dev/sdX
which will reserve the last 5% of free space for the root user. If your services that are filling the disks are running as root then that might not resolve the issue though

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

Mr. Crow posted:

Is there a way to tell apache to not drop privileges?

Trying to hook up nextcloud in a podman container to nfs and I can't figure out why the unprivileged user in the container can't see the folder/contents but the "root" user can. I've added both UIDs to the ACLs on both client/server so idk what the hell is happening, I have like half a dozen other containers that it works just fine.

UIDs won't match between a privileged and an unprivileged context so permissions might be weird. LXC unprivileged containers map all UIDs to something higher, like uid 500 -> uid 100500. Are your NFS exports using sec=sys?

It also may be the <Directory> settings in the Apache config. If you start a shell inside the container and su to the apache user can you see your file shares?

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

waffle iron posted:

Edit: I looked it up and choom is the command line command https://man7.org/linux/man-pages/man1/choom.1.html

I'll never not think of Barry & the Choom Gang when i use it

edit to the person asking about sed:

if you have Perl available to you, you could do something like this
code:
perl -pi -e 's/$ENV{OLDVAL}/$ENV{NEWVAL}/g' file
which would also use environment variables instead of relying on shell expansion

Voodoo Cafe fucked around with this message at 14:37 on Dec 1, 2021

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

ExcessBLarg! posted:

Ruby is better for every use case of PERL

almost unanimously true, though it is less likely to be part of a base configuration for most distros in my experience while Perl usually tends to be present in some capacity, though widely displaced by Python these days. It's a shame; Ruby is a language that i find both fun to write and without so many of Perl's more 'esoteric' choices

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

Saukkis posted:

For the Perl vs Python vs Ruby question, do we have any assurances that we don't have to go through the migration mess with Python 4? Have we had to go through the same with Perl or Ruby? Probably not with Perl, since we've had Perl 5 for close to three decades.

I doubt Python 3->4 will be as much of an upheaval as 2->3 has been (hopefully).

Perl 6 was planned for nearly 20 years, ultimately it became own beast entirely called Raku and Perl 7 will be a more iterative upgrade to 5.32

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

RFC2324 posted:

My own current wtf is, as usual, the point where 2 projects meet.

Project 1 is a generic docker-compose file that starts up a tdarr compute node. It uses an env file to find $HOSTNAME and set that as the nodes reporting name.

Project 2 is an ansible playbook that will do everything to prep the node and then kick off the compose file. It works perfectly other than the fact that it isn't parsing $HOSTNAME, and all the nodes end up with the same name and cant register/work.

As far as I can tell the docker compose implementation in ansible never calls bash, and so never actually populates or parses vars. I think the solution is going to be use ansible to define the var as the inventory name? My hacky solution is just getting hackier

$HOSTNAME is a bashism. your container probably uses sh or dash or busybox. try
code:
HOSTNAME=`hostname`
in your script

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

Pablo Bluth posted:

Having an increasing number of Linux VMs to play with, I decided to try setting up a domain controller (probably overkill for a one person setup...). I briefly considered using Samba-DC but went the route of FreeIPA. Having once inherited a linux facility at work that used YP/NIS, something that always seemed to be unreliably black magic, I've been impressed with how easy it was to get up and working.

Don't worry. Once you get into troubleshooting multi-master replication failures you'll be firmly back in black magic territory

(kidding aside, it's a pretty great project)

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

MrPablo posted:

You're not the only one; I also prefer Ruby to Python and Perl. I usually have an irb session or three running on various virtual desktops for miscellaneous tasks.

+1, Ruby is awesome, especially with the improvements to irb since 2.7. I just wish it was more ubiquitous!

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

RFC2324 posted:

I can't help but think it would be more efficient to just write a quick oneliner that interrogates the remote system and then mounts the output

isn't this literally what /net does? it's a shell script that looks at the exports of a hostname and mounts the export it if one matches.

(i use /net and on Linux FWIW)

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

feedmegin posted:

Re: 2. Yout BIOS does not know how to load a Linux kernel. You will definitely need a bootloader and these days that's Grub on the desktop.

Surprisingly this is actually completely possible. . However, this forces you to keep your kernel and initramfs on the EFI partition, which isn't the default in any installer that i know of

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

Tacos Al Pastor posted:

Has anyone used youtube-dl? I'm wondering if there is a way to speed up a download. There is a "-r" option which I tried to set to the example 4.2M, but that didnt seem to work. Its download everything at the KiB/s rate.

Use yt-dlp instead, it uses some workarounds to get around Google's bandwidth limits

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

xzzy posted:

Kind of a long shot but I'm gonna try anyways: anyone know of a daemon that provides an exporter that prometheus can ingest for collecting metrics of a linux host? The standard stuff like cpu usage and memory and all that fun stuff.

We've been using netdata for several years now and I kind of like a lot of things it does, but it keeps going crazy on our batch cluster with filling up disks and memory. It's related to running jobs in docker, it doesn't seem to handle high cardinality very well (every job gets a new container name and this generates a new batch of metrics netdata tries to collect).

Just curious if there's anything cool out there I might have missed.

You want Node Exporter.

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

Nitrousoxide posted:

I think the real question is whether it would nuke the binary for rm or some other mission critical system dependency before it gets to /home

as long as the rm command is still running, the binary still referenced in /proc/$PID/exe and so still resident in memory and will still happily run until completion, as far as i know

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

hooah posted:

Lol removed the metapackage and now I get dumped to the terminal on boot.

The KDE metapackage must include the login manager sddm, try installing another like lightdm and then
code:
systemctl enable --now lightdm

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

F_Shit_Fitzgerald posted:

So....I have a question and I hope I haven't hosed up my system.

I wanted to move the download of the recent The Mads are Back live riff to a USB stick, so I connected a stick, did the usual lsblk and sudo mount /dev/xxxx yyyyy . Then I downloaded the file to my desktop (since it wouldn't download directly to the stick) and then used

sudo mv name_of_file.mp4 /media/yyyyy

It said that "permissions couldn't be preserved" and appeared to fail in moving the file, but when I ls'ed my desktop and then the location of my USB stick, the video was there. I was even able to play it in VLC from my terminal.

Is the file safely on the stick or should I redownload and try again? These download links are only good for about a day, so I want to make sure I have my video file.

e: Supposedly cp is a better command to use with sudo when doing something like this? There's still a lot I have to learn.

That error usually means that the file system you're copying to doesn't natively support POSIX permissions. usually because it's FAT32 or exFAT or whatever.

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

VostokProgram posted:

pip might even come with python now? I know I've sometimes done `python -m pip` instead of just pip.

pip itself is implemented as a python module so you can launch it like that, but it doesn't necessarily come with the python package (e.g. in redhat it's usually python-pip)

Mezcal, it's also worth nothing that no matter what anything says, never, ever, ever run pip as root, this is a super easy way to trash your system

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

BrainDance posted:


And thank God it still has it. This is my main reason why I think Debian is better than Ubuntu (that and I really hate the idea of ppas.) I had to install Ubuntu because it was the easiest way to do some cuda stuff (turned out to be not as easy as it was supposed to be) except, at the time, my gpu was too new for, I guess, nouveau. The Ubuntu installer forced me into 640x480, but it couldn't run in that low of a resolution, the windows were too big. None of the suggestions for moving the windows beyond the screen edges actually worked, so in the end I had to just press tab, count how many times, and pray. Which was super ball clenching at the partitioning stuff.

Oof. If you ever need to reinstall, Ubuntu Server still has a curses based installer, or at least it did when i installed 22.04 in a VM last year

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

ExcessBLarg! posted:


I guess the answer is that it's generally closer to upstream, has a bit less friction, but is more loosey-goosey about package dependencies and understood that you should always be running the most recent version of existing package when installing anything new.


it is also pretty barebones in its default incarnation, and has no strong ties to any particular DE, so it's a popular choice for those who want to assemble their own desktop with a tiling WM, TUI, or something else that's not well served by most of the big distros. It appealed to me mainly because it was small enough that i could fit it into my brain and feel like i had a reasonable understanding of its components, and allow me to replace those components piecemeal if i wanted a particular feature or piece of software that wasn't covered by the defaults.

No one can really convince you of its virtues (though many will try), but i think that it can be interesting to users that have any basic curiosity about how their computer/operating system works, or to appeal to power users who have a very particular idea of how they want their system to work.

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

Son of Thunderbeast posted:

I'll try the forking option, thanks! And yeah it's set up as a user service

Just write a shell script that invokes it correctly and have systemd call that instead

e.g. in /home/thunderbeast/bin/launch_cli-app

code:
#!/bin/bash

/bin/cli-app service config /path/to/config/file
chmod +x /home/thunderbeast/bin/launch_cli-app

Test running the service with /home/thunderbeast/bin/launch_cli-app to make sure it works

Then in your systemd service:

code:
[Unit]
Description=Description
After=network.target

[Service] 
ExecStart=/home/thunderbeast/bin/launch_cli-app 

[Install] 
WantedBy=default.target RequiredBy=network.target
and systemctl --user enable --now your service

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

Computer viking posted:

This is one of those things where the more I think about it, the less foreign it feels. An immutable FreeBSD would hardly take more than tying together a few existing parts, and could even end up feeling ... reasonable?

The heaviest work would be to make pkg upgrade work in a clone and swap over at reboot (spiritually similar to BE), I guess - plus the fallout from a lot of ports expecting all of /usr/local to be rw at runtime.

Isn't FreeNAS/TrueNAS basically an immutable FreeBSD? As far as i remember, it boots a read only image and applies any changes made in the UI as an overlay of some sort

edit: it is very much an appliance though, not a general purpose distro

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

Mr. Crow posted:

Debian is good for servers you want to forget about not much else.

I'm daily driving the desktop for work and I wish I wasnt.

speaking as someone who supports 100+ desktop users and develops software on CentOS 7, i envy you greatly

gcc 4.8.5 + glibc 2.17 in 2023 :shepicide:

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

Twerk from Home posted:

Tell me that you saw the drama where conda-forge considered moving to Centos 7 minimum compatibility and decided it would leave too many people behind:

https://github.com/conda-forge/conda-forge.github.io/issues/1436



Anyway, their hand is getting forced and June 30, 2024 is the last day they're supporting new software builds for Centos 6.

Holy crap. No, thankfully our last CentOS 6 system was decommissioned in 2021 (!). I can't imagine still having infrastructure or even builds on 6. That's pre kernel 3.0, pre systemd. Kids born when CentOS 6 shipped would be in high school this year.

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

CaptainSarcastic posted:

I think Mandrake used Lilo instead of GRUB, back in the day.

Also, was it Gnome that relied on Compiz for compositing, or was it more general? The reference to Cairo earlier made me remember Compiz for some reason.

by default gnome 2/3 use metacity/mutter as their windowmanager respectively but you could install compiz and use it instead for your wobbly window needs

also jesus i never would have put the cairo pun together in 100 years

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

CaptainSarcastic posted:

I'd be highly suspicious of the multi-card reader. If that's something on the front panel that attaches to USB on the motherboard I'd try unplugging it and see if the problem goes away.

Seconded, i had one of these (cheapo no-name chinese one from fasttech iirc) in my machine that i had to remove when i upgraded my motherboard because it made booting atrociously slow for whatever reason

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

Pablo Bluth posted:

code:
cd /path/to/somewhere
ret=$?
if [ $ret -ne 0 ]; then
        echo "error exit message"
	exit 1
fi



Testing on $? is error prone, you can branch on the return status directly

code:
if ! cd /path/to/somewhere; then
  echo "some error message";
  exit 1;
fi
or something like this:

code:
die() {
  echo "$1";
  exit 1;
}

cd /path/to/somewhere || die "couldn't change directory";

Adbot
ADBOT LOVES YOU

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

Mantle posted:

I'm using Fedora and on a recent dnf update, Chrome stopped working in Sway.

I think it's this issue because there is a workaround to set an envvar on the cli that works. However, I want to use the launcher in Sway.

https://issues.chromium.org/issues/329678163?pli=1

I tried to downgrade to the last known good Chrome but I'm getting some error that there is no version found. Alternatively I don't know how to add the command line flag to the launcher.

What else can I try?

copy chrome's .desktop file from /usr/share/applications to $HOME/.local/share/applications/ , then you can edit the lines starting with 'Exec=' to include the flag you want

so change

code:
Exec=/path/to/google/chrome 
to something like

code:
Exec=/path/to/google/chrome --my-commandline-flag
There may be multiple 'Exec' lines so you would have to change them all.

In addition, i don't know if Sway reloads these files automatically on changes, so you might have to log out and log back in for changes to take effect

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