tell me the most ass over backward shit you do to keep your system chugging?
here’s mine:
sway struggles with my dual monitors, when my screen powers off and back on it causes sway to crash.
system service ‘switch-to-tty1.service’

[Unit]
Description=Switch to tty1 on resume
After=suspend.target

[Service]
Type=simple
ExecStart=/usr/local/bin/switch-to-tty1.sh

[Install]
WantedBy=suspend.target

‘switch-to-tty1.service’ executes ‘/usr/local/bin/switch-to-tty1.sh’ and send user to tty1

#!/bin/bash
# Switch to tty1
chvt 1

.bashrc login from tty1 then kicks user to tty2 and logs out tty1.

if [[ "$(tty)" == "/dev/tty1" ]]; then
    chvt 2
    logout
fi

also tty2 is blocked from keyboard inputs (Alt+Ctrl+F2) so its a somewhat secure lock-screen which on sway lock-screen aren’t great.

  • cryoistalline@lemmy.ml
    link
    fedilink
    arrow-up
    28
    ·
    4 months ago

    I had to use unity game engine for one of my assignments for school, but unity wouldn’t generate files needed for the language server unless I set the code editor to vscode. I fixed this by creating a bash script with the path /usr/bin/code that opens neovim in konsole.

    #!/usr/bin/env bash
    konsole -e "nvim $@"
    
  • xp19375@sh.itjust.works
    link
    fedilink
    arrow-up
    21
    arrow-down
    1
    ·
    4 months ago

    sssd didn’t work well with my company’s AD server, which would cause repeated authentication failures until I restarted sssd. I rigged up a bash script which would restart sssd any time xscreensaver logged an auth fail.

  • Mactan@lemmy.ml
    link
    fedilink
    arrow-up
    8
    ·
    4 months ago

    not sure if duct tape or brute force but if I can’t stop a file from getting overwritten like resolv.conf I just make it immutable with chattr

  • woelkchen@lemmy.world
    link
    fedilink
    arrow-up
    21
    ·
    4 months ago

    An old (now decommissioned) notebook of mine had a broken headphone jack. I didn’t have BT headphones then. Audio output worked technically but the detection whether headphones were plugged in or not did no longer work.

    I wrote a very short amixer script to force unmute the jack, set the volume to 50 or so percent and set the speaker volume to 0% but not “mute” state. I could then use my wired headphones again.

    • deltapi@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      4 months ago

      I duct taped a RPi4 to the back of a Motorola Lapdock and used custom cables to make the combo into the worst laptop ever. If yours counts, mine does too. This is what the Lapdock looks like:

  • StarlightDust@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    4
    ·
    4 months ago

    gtk3-classic still doesn’t work properly on Wayland and I doubt it will ever be fixed so I include WAYLAND_DISPLAY=0 in each shortcut file to force them into xwayland.

  • dizzy@lemmy.ml
    link
    fedilink
    arrow-up
    8
    ·
    4 months ago

    Couldn’t figure out how to access my headless server’s desktop environment via VNC without a monitor connected and turned on. I bought a hardware displayport dummy adapter to pretend to be a real display to get it to work.

    A hardware solution to a software problem… felt really wrong.

    I’ve since wrapped my head around tmux and managing all my services via command-line or web-ui so I have no need for it anymore.

  • The Doctor@beehaw.org
    link
    fedilink
    English
    arrow-up
    14
    ·
    4 months ago

    Some years ago, I had a client with a really fucked up set of requirements:

    • Must run Gentoo Linux. (No, I don’t know why. But it was written into the project specs and everybody who had to sign off did.)
    • Must use LUKS for FDE.
    • Login (loosely interpreted as “booting up”) must have MFA.

    This was during the days when booting into a LUKS encrypted Gentoo install involved copy-and-pasting a shell script out of the Gentoo wiki and adding it to the initrd. I want to say late 2006 or early 2007.

    I remember creating a /boot partition, a tiny little LUKS partition (512 megs, at most) after it, and the rest of the drive was the LUKS encrypted root partition. The encrypted root partition had a randomly generated keyfile as its unlocker; it was symmetrically encrypted using gnupg and a passphrase before being stored in the tiny partition. The tiny partition had a passphrase to unlock it. gnupg was in the initrd. I think the workflow went something like this:

    • System boots up.
    • Script in the initrd prompted the user for the passphrase for the tiny LUKS partition. (first authentication step)
    • User entered passphrase.
    • Script in the initrd unlocked the tiny partition and prompted the user for the passphrase to decrypt the root partition’s keyfile stored therein.
    • User entered the symmetric passphrase for keyfile. (second authentication step_
    • Script used the passphrase to decrypt the keyfile to stdout, piped into an evocation of cryptsetup to unlock the root partition.
    • /dev/mapper/root mounted, /boot mounted, boot process continued.
    • User logged into the box.

    I don’t miss those days.

  • WFH@lemm.ee
    link
    fedilink
    English
    arrow-up
    19
    ·
    4 months ago

    On my previous laptop, the trackpad had a bug that made it spam interrupts after waking up from sleep. It ruined battery life and basically kept one core at 100% permanently.

    So I duct-taped a systemd script that unbound and bound the trackpad after each wake up.

    #!/bin/sh
    case "$1" in
            post)
                    echo -n "i2c_designware.0" > /sys/bus/platform/drivers/i2c_designware/unbind
                    echo -n "i2c_designware.0" > /sys/bus/platform/drivers/i2c_designware/bind
            ;;
    esac
    
  • UNY0N@lemmy.world
    link
    fedilink
    arrow-up
    48
    ·
    4 months ago

    This certainly isn’t of the same caliber as some of these other comments, but I found it to be fitting to the topic.

    Last year I was having problems getting the game stellaris working on arch. (I use bazzite now, btw) My solution was the following:

    1. download the game via steam.
    2. switch it to use proton
    3. switch it back to linux version
    4. use the terminal to make the entire game folder read-only, so that steam couldn’t touch the game anymore and screw it up.
    5. add the exicutable to PATH
    6. start the game via terminal

    If any one of those step was left out, it didn’t work. I’m no linux expert, so I didn’t have the skills to actuality find the real problem.

      • UNY0N@lemmy.world
        link
        fedilink
        arrow-up
        7
        ·
        4 months ago

        Blind trial and error, mostly. Making the game folder read-only was the real “duct-tape” part, it occued to me to do that after steam kept “updating” the game and breaking my solution.

  • usa_suxxx [they/them]@hexbear.net
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 months ago

    My Fedora distro can’t restart and stalls when it tries to shutdown with the auto update checked. So it never shuts down. I set up a cronjon to run dnf update to make sure that I don’t need to uncheck the auto update option. Just a really silly thing that bothers me.

  • slazer2au@lemmy.world
    link
    fedilink
    English
    arrow-up
    24
    ·
    4 months ago

    Had a Centos VM that kept slipping time. Every week it would loose about 30min. No amount of NTP syncing got the time correct until manual intervention.
    Msp couldn’t work it out, couldn’t rebuild the server for infrastructure reasons, and only that server had the issue. The other 3 VMs on that host were fine.

    Cron job on one server took it current time, sshed to the dodgy server and configured the correct time.

  • Samueru@lemmy.ml
    link
    fedilink
    arrow-up
    4
    ·
    4 months ago

    It makes me mad to see the current state sway is in, I even bought an AMD GPU for nothing.

    • downhomechunk@midwest.social
      link
      fedilink
      English
      arrow-up
      4
      ·
      4 months ago

      I too was a bit underwhelmed by sway. I also bought an amd gpu, but I don’t regret it. I couldn’t get Wayland to work at all on my 3060 ti.

  • Nibodhika@lemmy.world
    link
    fedilink
    arrow-up
    17
    ·
    4 months ago

    I have a Logitech mouse with extra buttons, I used Piper to set one of those buttons to be Play/Pause media button. It worked well, however for some reason it only worked when the mouse was connected via the dongle, via Bluetooth the button did nothing. So I configured to a random shortcut (don’t remember what it is now, something like super+p) and configured that to call playctl play/pause.

    Not as creative or duct tapey as others but it’s what I remember now, pretty sure there are many others too hahaha