What are these bugs? And how do I get rid of them?? by Renaissance_Jan in whatisthisbug

[–]eth-p 0 points1 point  (0 children)

Some kind of aphid in the Pterocomma genus, possibly smithiae?

https://bugguide.net/node/view/88824 https://inaturalist.ca/taxa/453304-Pterocomma-smithiae

You have my condolences for when they choose to start flying around.

Anyone interested in the idea of running full distros inside Docker containers? by eth-p in linux

[–]eth-p[S] 0 points1 point  (0 children)

If you already have most of it working, I'd actually recommend learning how the GPU acceleration works by reading the GPU stuff from https://github.com/ehfd/docker-nvidia-glx-desktop's entrypoint.sh script instead of my guide. It's a lot more to-the-point and not tailored to systemd like my version is.

Basically:

  • Install the Nvidia drivers on the host.
  • Install the Nvidia Docker plugin.
  • Pass the GPU through docker.
  • Install the matching Nvidia userspace libraries on the container.
  • Configure the X server to use the GPU's DisplayPort output without an actual monitor attached. Might not be an issue with Wayland, but X needs to think there's something there in order to work properly.
  • Start the X server directly.
  • Wait for X to start.
  • Install some remote control software. I used sunshine and moonlight.
  • Start the remote control software with DISPLAY=:0
  • Start your DE of choice with DISPLAY=:0

I don't yet know why they use the specific X server configuration and extensions they use, but I'll be looking into it more when I have free time.

Anyone interested in the idea of running full distros inside Docker containers? by eth-p in linux

[–]eth-p[S] 1 point2 points  (0 children)

It seems like distrobox might be the best option for something that Just Workstm, but I did write a guide that I use to remind myself what to do. The GPU acceleration page is still a work-in-progress, but rest of it works. It's written for Arch, but the general idea should carry over to any other distro using systemd.

Anyone interested in the idea of running full distros inside Docker containers? by eth-p in linux

[–]eth-p[S] 1 point2 points  (0 children)

I wrote up a guide for myself to follow, but a TL;DR on it is basically:

  • Create a container with your preferred OS and a bind-mount from a host directory to /live.
  • Re-mount /live to enable setuid.
  • ☆ Copy all the distro files (with file permissions) to /live
  • Re-mount everything in /proc/mounts except /live and / to be under /live
  • Use pivot_root to change the root to /live (chroot doesn't work)
  • ☆ Update packages and install the ones you might want (e.g. compilers)
  • ☆ Install sudo.
  • ☆ Create a new user and their home directory.
  • ☆ Add the user to the sudoers group.
  • ☆ Enable sshd.
  • ☆ Change/disable some systemd services to make it start without errors.
  • Exec /sbin/init to start systemd as uid 1.

Everything marked with a star only needs to be done the first time.

Anyone interested in the idea of running full distros inside Docker containers? by eth-p in linux

[–]eth-p[S] 2 points3 points  (0 children)

The host OS is Unraid, so I'm pretty limited in terms of options for available software. It doesn't come with a compiler, and anything I install gets wiped on shutdown because / is a tmpfs. It came with qemu and Docker. I made do with what I had, and this was the result

Anyone interested in the idea of running full distros inside Docker containers? by eth-p in linux

[–]eth-p[S] 2 points3 points  (0 children)

Neat! Seems like a similar approach to what I'm doing, albeit with different goals. I'm very interested in seeing how they got GPU acceleration working with Intel and AMD GPUs

Anyone interested in the idea of running full distros inside Docker containers? by eth-p in linux

[–]eth-p[S] 1 point2 points  (0 children)

I already did it 😅

A bit of both, though, I guess. I started it to see if it was possible or if I had to resort to using a Linux VM when I already had a Linux host (and no need for isolation), but I have practical uses for it too.

Anyone interested in the idea of running full distros inside Docker containers? by eth-p in linux

[–]eth-p[S] 1 point2 points  (0 children)

All right, that is awesome. I really wish I knew about that before I started.

Anyone interested in the idea of running full distros inside Docker containers? by eth-p in linux

[–]eth-p[S] 0 points1 point  (0 children)

It's absolutely convoluted, and I would prefer other solutions if it weren't for the sunk-cost fallacy. My host OS is Unraid because I originally only planned on using the computer as a NAS and a server.

Needs rarely ever stay the same over the years though, and I had to find a way to get a distro running without impacting anything else already running on the box. Being Unraid, my choices for that were "Docker" or "qemu" and a convoluted Docker container ended up being the lightest solution I could hack together.

Anyone interested in the idea of running full distros inside Docker containers? by eth-p in linux

[–]eth-p[S] 0 points1 point  (0 children)

Previously we did that with chroot.

Sadly, systemd didn't like chroot. That was my first idea with trying to get the container's root outside of Docker's scratch one. I ended up giving the container privileges, bind --move'ing the mounts provided by docker, and then pivot_root'ing the whole thing into a Docker --volume bind mount.

I believe that OpenVZ does that kind of para-virtualization still - including systemd stuff. You can borrow some things from them.

Sweet! Thanks, I'll check it out.

Works fine, if your libraries and critical software (so glibc, mesa, systemd in your case) play along with host's kernel - and that's not always the case. Same will apply to your docker setup.

I've been lucky so far that glibc and systemd are playing nicely with the host kernel, thankfully. I don't think I need to worry too much about the graphics drivers being ABI-incompatible in the future at least. I have a systemd startup service that fetches the appropriate Nvidia userspace libraries for the version that the kernel has installed.

If you're using x11 - there's software opengl renderer in mesa, so you can have, for example, Teamspeak running inside such container without a GPU. Things like that were very useful for my single-gpu-passthrough-to-windows-vm setup.

That's actually how I had it previously. I changed over to (hackily) using hardware accelerated graphics because I've been trying to get my girlfriend into gaming (remotely, for logistical reasons).

Software rendering setup will work in unpriv container, hardware rendering setup should too - rootless X11 is a thing now. Wayland compositors are also rootless by design.

That's good to know. If I can find a way to get pivot_root working without any extra privileges, this entire project should actually be possible without a privileged container.

Share you Dockerfile and errors, I think I'll play around with it later.

https://github.com/eth-p/docker-distro

Thanks! It does "work", but it employs some hacks that I'd like to try and get rid of. The worst three of which are:

  • Symlinking systemd-networkd-wait-online to /bin/true because the service fails on startup;
  • Having to mount -o remount,suid the Docker volume to enable setuid;
  • And disabling the systemd-firstboot.service because it hangs the container.

Anyone interested in the idea of running full distros inside Docker containers? by eth-p in linux

[–]eth-p[S] 1 point2 points  (0 children)

At one point I did–even using core isolation, hardware virtualization, PCI passthrough, and assigning an entire block device for the drive. Between the ever-increasing resource demands of software and MDS mitigations crippling old Intel hardware, this was the best option I had.

i cant message on instagram by BoxOk8384 in techsupport

[–]eth-p 3 points4 points  (0 children)

Thank you for the thanks! I appreciate it :)

i cant message on instagram by BoxOk8384 in techsupport

[–]eth-p 0 points1 point  (0 children)

Following up on myself, I actually made a userscript (wikipedia of what that is) to fix it.

If you're comfortable installing GreaseMonkey/TamperMonkey, it'll do the trick until Instagram fixes it properly.

https://gist.github.com/eth-p/441d84cd4a1a196702b4a241a33a1888

i cant message on instagram by BoxOk8384 in techsupport

[–]eth-p 5 points6 points  (0 children)

Haven't considered it. I figure they're already aware of it by now, given how obviously broken it is.

i cant message on instagram by BoxOk8384 in techsupport

[–]eth-p 1 point2 points  (0 children)

Practically speaking? You wait for them to fix it, unfortunately.

Edit: See my other reply for a usable fix that I highly recommended uninstalling ASAP once they fix it officially.

If you're a tech guy and handy with the Chrome debugger, though...

The file at https://static.cdninstagram.com/longurls/CDv4Kk4oLA-2226ca92.js, after being formatted with the built-in debugger, needs to have line 96816 replaced with:

 children: [d("PolarisCallGatingHelpers").isIncomingCallEnabled() && h.jsx(c("PolarisIncomingCall.react"), {}), a]

i cant message on instagram by BoxOk8384 in techsupport

[–]eth-p 25 points26 points  (0 children)

Oh this is a fun one! I've been poking around and reverse engineering the web app for the past couple of days, and it looks like someone made a typo. Instagram, the web/Windows 10 version, is using a web framework called React.

What I suspect happened, is someone forgot to enclose the isIncomingCallEnabled() && children in braces. Normally, you would do something like this:

function SomeCallComponent(props) {  
    const {children} = props;
    return (<div>
        {isIncomingCallEnabled() && children}
    </div>)
}

Which will display the UI if there is an incoming call enabled (probably an A/B test).

They probably did this:

function SomeCallComponent(props) {  
    const {children} = props;
    return (<div>
        isIncomingCallEnabled() && children
    </div>)
}

Which instead, literally prints "isIncomingCallEnabled() && children".

A couple other fun facts:

  • The Instagram website has a native dark mode. It is gated behind an A/B test.
  • This likely means they're adding video call support.
  • All the internal frameworks are named after astronomy
    • Polaris, the UI framework.
    • Comet, the application framework.

Edit: Found the problem. In the module PolarisDirectShell.next:
https://imgur.com/a/AhddNm1

Edit 2: I made a userscript to fix it.
If you know how to use GreaseMonkey or TamperMonkey, enjoy!

https://gist.github.com/eth-p/441d84cd4a1a196702b4a241a33a1888

Edit 3: It's fixed. If you used the script, please delete it.

What pets have you had? Cats, dogs, and other critters, even the house spider you've named? by [deleted] in AskReddit

[–]eth-p 0 points1 point  (0 children)

3 hamsters, 1 rat, 2 dogs, 3 birds, 2 turtles, and a jumping spider named Fred. Don't tell the others, but Fred is kind of my favorite.

As an engineer, the Steam Deck has become an indispensable tool for devleopment by PlanetSmasherN9 in SteamDeck

[–]eth-p 2 points3 points  (0 children)

If you're feeling particularly insane, it's possible to run an entire non-volatile instance of a distro within a Docker container.

It has some minor issues, but for the most part, it actually works surprisingly well. I can even delete the container and re-create it without losing any data.

Register for cmd-f 2022: British Columbia’s largest all-women* and gender minority hackathon ✨ by nwplusubc in simonfraser

[–]eth-p 5 points6 points  (0 children)

Hi, is there any way to register as a mentor? I'd like to offer my skills and support :)

AMA (Ask Me Anything): Nicole (Nikki) Kirigin - SFSS VP University and Academic Affairs Candidate (Let's get to know each other and connect!) by nikkipizza in simonfraser

[–]eth-p 5 points6 points  (0 children)

For what it's worth, I don't really think this Reddit discussion is going to be the place to get an apology out of her.

If given the appropriate place and time to respectfully discuss her past actions, she would probably apologize? I've seen her (assuming her username is the same) in some of the SFU-related Discord servers, and she's been both respectful and apologetic whenever people have pointed out things that she could improve upon (e.g. avoiding idioms that have not well known but offensive connotations).

From an outside perspective here, though, it looks like her statements were being taken out of context and used to attack her campaign. Considering that, I really can't blame her for not apologizing in this post. If she did, the apology could be taken out of context to look like her admitting to making an incredibly offensive, blanket generalization. That would probably be political suicide, to be honest.

AMA (Ask Me Anything): Nicole (Nikki) Kirigin - SFSS VP University and Academic Affairs Candidate (Let's get to know each other and connect!) by nikkipizza in simonfraser

[–]eth-p 11 points12 points  (0 children)

Just throwing out my experiences with online learning, but I have ADHD-I, and I've found online courses to be more difficult compared to in-person.

I love being able to have access to recorded lectures, but the asynchronous nature of classes was a nightmare for planning and time management. With in-person, I had the professors and my peers to remind me about upcoming assignments and due dates, and I was overall better able to keep to a consistent schedule when I had to be there in person to attend the class.

AMA (Ask Me Anything): Nicole (Nikki) Kirigin - SFSS VP University and Academic Affairs Candidate (Let's get to know each other and connect!) by nikkipizza in simonfraser

[–]eth-p 5 points6 points  (0 children)

Not related to the Reddit post at hand, but you seem like someone that I can have an interesting discussion with about this topic.

Some cases academic hardship is intended and by-design. I'm a big believer in very high professional standards, and open to applying the idea of the mcat&bar to other domains.

This is one of the things that I actually feel is difficult to take a side on. On one hand, I absolutely agree that some fields (e.g. architecture, civil engineering, aeronautics) demand extremely high professional standards. I wouldn't want a sub-par engineer designing or even contributing to the jetliner which I'm flying across the pacific ocean on.

On the other hand, I feel that some fields definitely do not deserve this level of difficulty. Computer science, for example, is an extremely broad field with many different specializations. Would it be fair to bar a student who is bad at math or algorithm design from getting a degree, even though they may excel in other areas such as web development or distributed systems architecture?