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.

  • slazer2au@lemmy.world
    link
    fedilink
    English
    arrow-up
    24
    ·
    3 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.

  • allywilson@lemmy.ml
    link
    fedilink
    arrow-up
    10
    ·
    3 months ago

    I had to upgrade some OL6 VMs to OL7 VMs running Oracle DBs and Apps (on OVMM no less). There was no appetite for buying additional storage, or restoring the environments with RMAN. Luckily, everything had been installed under /u01 which was on its own virtual disk.

    So I built a new VM as OL7 (same hostname, etc.), installed the pre-req RPMs for Oracle DB, disconnected the virtual disk from the OL6 and attached it to the new OL7, synced users and home dirs - and it only bloody worked.

  • Samueru@lemmy.ml
    link
    fedilink
    arrow-up
    4
    ·
    3 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
      ·
      3 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.

  • cryoistalline@lemmy.ml
    link
    fedilink
    arrow-up
    28
    ·
    3 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 $@"
    
  • dizzy@lemmy.ml
    link
    fedilink
    arrow-up
    8
    ·
    3 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.

  • umbrella@lemmy.ml
    link
    fedilink
    arrow-up
    17
    ·
    3 months ago

    holy shit i was about to post about how i have automatic login and lock to start a program that refuses to work correctly on boot through systemd.

    but then you guys are here casually posting some of the worst duct tape shit ive heard of so far. im not sure if i should reprimand or congratulate you for that jankiness.

  • xp19375@sh.itjust.works
    link
    fedilink
    arrow-up
    21
    arrow-down
    1
    ·
    3 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
    ·
    3 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

  • mycodesucks@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    3 months ago

    My Nvidia card won’t properly resume the display after suspend with the default suspend script, but if I correct the script file, every time aptitude updates the nvidia drivers, it restores the bad version of the configuration file. If you set the file immutable with chattr, aptitude throws a fit and goes into a broken state when it can’t overwrite the file on a driver update.

    So I keep a good copy of the script file in the directory, and in my pre-suspend script file I overwrite the main suspend script with the good version. Every single time.

    • deltapi@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      3 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:

  • Ephera@lemmy.ml
    link
    fedilink
    arrow-up
    56
    ·
    3 months ago

    I like to use unclutter to hide my mouse pointer after a few seconds without being moved.

    Now, the thing is, it doesn’t just visually hide the cursor, it actually removes it, so UI elements triggered by hovering disappear. Sometimes that’s great, other times it’s infurriating, like when reading a tooltip or menu.

    I mostly use a touchpad, and so I developed a habit to wiggle my finger while I’m intentionally hovering something, so that there was enough mouse movement for unclutter to not remove my pointer.

    Then I found a setting for the jitter threshold of the touchpad. Basically, with the threshold on, it ignores tiny movements, because the hardware reports finger wiggling, even if you hold your finger perfectly still. Which is perfect for me to turn off.

    Now when I have my finger on the touchpad, it automatically wiggles and allows me to read hover elements. If I take my finger off, it stops wiggling and removes the cursor.
    It’s almost like someone designed an OS with touchpads in mind, rather than them being an afterthought.

  • The Doctor@beehaw.org
    link
    fedilink
    English
    arrow-up
    14
    ·
    3 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
    ·
    3 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
    
  • Ving Thor@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    3 months ago

    I wrote a systemd unit file to force my wireless keyboard to always switch the fn key to normal F-keys.

    • Archr@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      3 months ago

      I think there is a value you can put into a /sys file to fix this. Had the same issue on my k10 keyboard. (the fix was easily findable on their forums)

  • everett@lemmy.ml
    link
    fedilink
    arrow-up
    6
    ·
    3 months ago

    Possibly my light/dark mode scripts. They change my Plasma theme, which is honestly most of the job, but also set the matching GTK theme, set the new theme in running Konsole sessions, do a bunch of manual sed edits on conf files for applications that don’t follow system theming, finally restarting plasmashell to clean up the occasional edge case where a tray icon is supposed to follow the theme but doesn’t.

    • iiGxC@slrpnk.net
      link
      fedilink
      arrow-up
      5
      ·
      3 months ago

      Oh yeah I do this, I’ll raise you that mine also sshs into my server to update the editor theme