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.
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 opensneovim
inkonsole
.#!/usr/bin/env bash konsole -e "nvim $@"
based
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.
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
Using this with Steam to prevent games from updating.
Fucking network daemons messing with my resolv.conf
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.
I duct taped a Raspberry Pi to the back of a television once. Does that count?
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:
Tbh I’ve always wanted to do this
It’s good for bragging rights, but a u2955 Celeron Chromebook is better value for money.
I personally like this, so as far as I’m concerned, yes.
deleted by creator
gtk3-classic
still doesn’t work properly on Wayland and I doubt it will ever be fixed so I includeWAYLAND_DISPLAY=0
in each shortcut file to force them into xwayland.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.
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.
Wow, that sounds like quite the adventure!! I can’t imagine juggling all those steps just to boot up the system…
Huge pain in the ass to set up, but from the user’s end of things it was pretty easy to do.
@drwho It’s amazing how much work can go on behind the scenes to make things smooth and simple for the user…
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
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:
- download the game via steam.
- switch it to use proton
- switch it back to linux version
- use the terminal to make the entire game folder read-only, so that steam couldn’t touch the game anymore and screw it up.
- add the exicutable to PATH
- 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.
Even when Proton doesn’t work, it still somehow works.
Magic.
Indeed. Proton for the win yet again.
I… What? Why does that work? How did you figure this out?
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.
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.
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.
It makes me mad to see the current state sway is in, I even bought an AMD GPU for nothing.
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.
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
i did almost exactly the same thing lol