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.
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.
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.
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 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
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.
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.
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
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.
I duct taped a Raspberry Pi to the back of a television once. Does that count?
I personally like this, so as far as I’m concerned, yes.
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 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.What is
unclutter
?Uh, well, I kind of already wrote most of what there’s to say in the comment above, it hides your mouse pointer when you don’t move it for a few seconds.
In most distros, it’s available as the
unclutter
package, directly from the repos. On Debian-based systems, the package you want is calledunclutter-xfixes
.https://wiki.archlinux.org/title/Unclutter
It is built for X11 and won’t work on Wayland.
But KDE recently shipped a built-in feature as part of Plasma 6.1 (a Desktop Effect called “Hide Cursor”), which also works very nicely. That one does not cause hover elements to disappear.
thats really cool actually
That reminds me of this
Everything here reminds everyone of that.
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
I wrote a systemd unit file to force my wireless keyboard to always switch the fn key to normal F-keys.
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)
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 restartingplasmashell
to clean up the occasional edge case where a tray icon is supposed to follow the theme but doesn’t.Oh yeah I do this, I’ll raise you that mine also sshs into my server to update the editor theme