• 0 Posts
  • 6 Comments
Joined 2 years ago
cake
Cake day: June 18th, 2023

help-circle
  • This is why i refuse to use zsh. I have nothing against it but if i get paged at 3 in the morning and need to access a production server I need my as little friction as possible.

    When Amazon or canonical or whoever start to ship servers with zsh instead of bash then I’ll look into it, but ultimately bash, like sh, have a different target audience than zsh. Bash and sh are designed as system admin or ops utilities first and zsh is more geared towards developers. They are incredibly similar in design and syntax, it’s really just philosophically, who is this tool best suited for?

    Fwiw if we could start it all from scratch and have our choice of today’s options, i think oils does a lot right, and the way it’s implemented especially wrt whitespace parsing is actually consistent and sane and has a robust test suite to back it up, especially compared to the old guard.

    But again, until somebody starts shipping oils I’m going to keep using bash.

    My philosophy for things like aliases and functions is to only create them for things that i cannot commit to memory and type quickly. For example a common alias is ll which often expands to ls -l. What this does to me is i tend to use that reflexively only to find out i need a different invocation anyway like ls -1 or ls -alFH .

    But let’s say i need to know what server in my ceph cluster is the manager currently so i can go to the WebUI that’s something I’ll probably not be able to remember:

    # relies on yq4
    ceph_dash ()
    {
        if [[ -z ${CEPH_DASHBOARD_ADDR:-} ]]; then
            CEPH_DASHBOARD=$(ceph mgr services | yq '.dashboard');
            CEPH_DASHBOARD_IP=$(sed -E 's|https?://([0-9\.]+):8443/?|\1|' <<< "$CEPH_DASHBOARD");
            CEPH_DASHBOARD_HOST=$(nslookup "$CEPH_DASHBOARD_IP" | sed -E 's/^.+name = ([^\.]+).+$/\1/' | head -1);
            CEPH_DASHBOARD_ADDR=$(sed -E "s|$CEPH_DASHBOARD_IP|$CEPH_DASHBOARD_HOST|" <<< "$CEPH_DASHBOARD");
            export CEPH_DASHBOARD_ADDR;
        fi;
        if [[ ${XDG_SESSION_TYPE:-} == tty || -n ${FORCE_TTY:-} ]]; then
            echo "$CEPH_DASHBOARD_ADDR";
        else
            xdg-open "$CEPH_DASHBOARD_ADDR";
        fi
    }
    

    This is more complicated than it needs to be but basically once the mgr is determined it’ll be stable so i cache the result. If i find it has moved i can unset $CEPH_DASHBOARD_ADDR or prepend the function call like CEPH_DASHBOARD_ADDR= ceph_dash. The hostname nslookup is optional but nice to have. Then if you have a desktop it should open in the default browser or whatever you have that handler pointed to. If it’s just a tty it’ll echo it out for you. You can also do FORCE_TTY=anything ceph_dash to get the echo even if you have a desktop

    Anywhere i administer ceph i need to have the _admin keys available so i have a script to place those and my functions all in one go.

    All that being said, my mentor who got me into tech is neurodivergent like myself and he has like a whole bespoke framework where depending on the folder he’s in certain aliases and functions will be available and a special global scope. He’s gone in on zsh because it helps him to pair with other engineers, and both of those decisions suit him. We work on a team together now again and i wouldn’t dream of imposing my decisions on him any more than I’d allow it in reverse.

    You end up learning cool stuff that way, like i asked him how he handles the on-call situation, he had been doing bash for decades and he can model the subtle and not so subtle differences between bash and zsh. As for aliases and functions he keeps a copy of his global set in his sshconfig that runs if the server allows running RemoteCommand on connection which i thought was super cool.






  • Yeah, the games you want to play on Linux, you should install those to a drive formatted with ext4, btrfs, or done other Linux native filesystem. Specifically you will run into issues using things like Lutris because setup scripts largely assume this to be the case and make use of things like soft or hard links.

    And while ntfs has similar functionality like junction, the standard Linux tool to create links ln and other basic commands like cp don’t work with ntfs (afaik Windows still doesn’t even expose that functionality from ntfs) and you’ll see errors similar to what you described, either looking like a permissions error (eg unable to create) or depending on the tool you may get a more specific error.

    I have less experience with Heroic but if you want something close to turnkey Linux gaming of Windows titles a Linux filesystem is non negotiable unless you feel like debugging things any time sometime doesn’t work. From my experience with Lutris that’s not the only reason you’ll see issues either and your ability to diagnose and resolve those as they come up will be a factor.

    You should also get familiar with wine and specifically valce’s proton, figure out the command line invocation that will launch a title through proton like steam does since i imagine you aren’t running these through the steam client. Finally look into proton-ge (glorious eggroll) which i use almost exclusively for Windows gaming on Linux.

    Also learn what a wine prefix is and strongly consider using a different prefix for each game. Its just folders and for transparency you’ll have redundant files across them, but it lets you have different sets of dependencies for each title. So like one game you might need mono (open source c#) but another you might need actual C# and have wine also handle running that. This is a case where installing both might make neither game playable if both games and both dependencies are in the same prefix.

    The biggest issues you’ll run into that you may not be able to resolve with any Linux gaming setup that is running Windows software is anti-cheat. Epic’s EAC can work for some titles, I’ve seen steam deck specific instructions, but my game library is single player heavy so i rarely am challenged by these. Steam Deck adoption has helped there but it’s still slow going.

    I have Baldurs Gate 3 and BG3 Mod Manager all Windows native running through steam and proton on my Debian tower, just to underscore the success of this approach

    tl;dr use a file system that supports hard and soft (symbolic links), use proton-ge and a separate wine prefix for each game