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 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.
deleted by creator
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.
About a decade ago I was playing a game on Linux and the game crashed and took the entire DE with it. So I went to a different
tty
and started a fresh x desktop session and started playing again until the game crashed again (I was running a bunch of mods so it would crash every couple of hours or so) and still didn’t feel like rebooting so I went to yet anothertty
and started yet another x desktop session. I did this about 3 times in total before I finally went “I should probably actually reboot because this has to be making a bigger mess of things”I made a script to add a middle click scroll function with a toggle. I can share the script, it’s a really bash script
this sounds quit useful tbf
Here’s a few of the micro-hacks that I’ve hacked up in the past.
A 2-line script to chroot into Debian when logging in as a certain user on FreeBSD.
#!/bin/sh clear doas chroot /linux /bin/login
I didn't have an IDE, so I just made a script called ```ide``` which runs Vim, and then compiles the code and makes it executable.
#!/bin/sh #Works only for C vim $1.c && cc -O3 -Wall -Werror -Wno-unused-result $1.c -o $1 #MODE=`stat -f "%OLp" $1` if ("stat -f "%OLp" $1 | grep -e 6 -e 4 -e 2") then chmod +x $1 fi
This thing, called ```demoronize```, which does what it says in the comments
#!/bin/sh #dos2unix -O -e -s $1 | sed 's/ / /g' | sed 's/“/"/g' | sed 's/”/"/g' cat $1 | sed 's/ / /g' | sed 's/“/"/g' | sed 's/”/"/g' #Convert DOS line endings to Unix ones and add a final newline if there isn't one, #replace sequence of 4 spaces with tab, #and replace "smart" quotes with normal ones
I just keep those ones for historical value, but there’s one hack I use every day. My keyboard doesn’t have a function key (Fn), so I use the Super/Windows key instead.
I havexdotool keyup Super_L keyup Super_R keyup F4 key XF86Sleep
bound to a custom keyboard shortcut. It unpresses the keys used for the shortcut (Super + F4), then presses the sleep key.I used to have a bug with my KVM switch muting my audio devices when I switch. Tried so many things but ended up running a login script that continuously runs unmute command on loop every 100ms.
can’t you just trigger a script after some udev event? Your battery would be happg
That was when I first switched to Linux so safe to say I did my best lol. A correction, the issue happened when I used the switch in my Bluetooth keyboard which connects to 3 devices but was working fine using a dedicated KVM switch with WiFi dongle. Maybe I should check again if its still a thing as its been almost an year now.
I wrote a script to turn the power of the the Wifi+Bluetooth chip off, then enumerate the PCIe bus again to start it back up.
The chip sometimes hung itself when using both. I looked for the bug and even found an Intel engineer on some mailing list admitting that they had issues with coexistance mode.
Just turning the wireless off and back on wasn’t enough I needed to reeinitialize the hardware and that was the best way I knew.
Not me personally, but in one of my past project, my boss was running a bunch of “services” by leaving it on GNU screen terminal sessions and detaching from them.
Everytime I went in to debug something, I’d need to go thru a list of sessions, attach to one hoping that it’s the right one (sometimes they’d name 'em), then see the console output.
I’ll admit to doing this (but with tmux)
Why is it so hard to just daemonize???
Interactivity 😂
I may or may not do this occasionally with byobu and my own services. Byobu is easier to use.
Using this with Steam to prevent games from updating.
Fucking network daemons messing with my resolv.conf
In the earlier days of Plasma 6, it would crash on me when waking from sleep, so I had a small script that would basically restart plasmashell when waking so I didn’t have to wait the several seconds for the system to realize that it was frozen before I had a functional desktop.
deleted by creator
I’m using Gentoo with systemd and a customized kernel, and additionally I have the
/usr
partition LUKS encrypted. Because/usr
is absolutely essential for systemd to function, I configured dracut to make a specially crafted initrd which activates the luks lvm and prompts for the password to decrypt and mount/usr
on startup before systemd init tries to run.About a year or two ago, some update to dracut or some other dependency (assumption) caused the dracut generated initrd’s to kernel panic. After multiple days of troubleshooting, I discovered that just copying forward an older initrd in
/boot
and naming it to match the new kernel, e.g.initramfs-6.6.38-gentoo.img
, allows the system to boot normally .So, my Gentoo is booting a kernel
6.6.something
with a ramdisk generated in the5.9
kernel era. I am dreading the day when this behavior breaks and I can no longer update my kernel 😳I can hear the ticking…
Got fed up of Pipewire suspending (old receiver takes ~2 sec to work again after spdif stream is cut) that now I auto-run aplay to play a silent .wav on loop
But there is a setting to disable that? I don’t remember where I found it because I don’t remember where to find any settings, but you can definitely disable automatic shut off of audio devices.
Yes, you kinda can disable suspend, but it will still cut off spdif transmission even then. Normally that wouldn’t be an issue but my receiver is super old and takes its sweet time to start actually playing audio after it gets a signal
Ah, didn’t know it worked differently for spdif, never had anything nice enough to use it.
You guys will probably groan but lots of people in this comment section should look into NixOS. My old Ubuntu machine was loaded with hacks I got from stack overflow to get certain things working (a script that runs at boot and shutdown to mount and unmount some network drives I wanted to appear natively). But now, I just use NixOS and there’s nothing on my machines that is even remotely hackey now. I just declare the drives as I want them and when I boot they are there and work as needed.
Knowing myself, I shiver at the idea of my nix config… It’ll probably have more ductape than a 3M distribution center
At least all the ductape would be easily findable and documentable in a nixos config
bindntr=CTRL,C,exec,hyprctl dispatch closewindow alacrittyclipboard & hyprctl activewindow | rg -q "class: Wfica" && alacritty -qq --config-file ~/.config/alacritty/alacrittyclipboard.toml --class 'alacrittyclipboard' --title 'Office365 Desktop - Nexus (SSL/TLS Secured, 256 bit)' -e sh -c 'sleep .03 && xclip -o | wl-copy ; wl-paste | xclip -i' windowrulev2 = float,class:(alacrittyclipboard) windowrulev2 = stayfocused,class:(alacrittyclipboard) windowrulev2 = noborder,class:(alacrittyclipboard) windowrulev2 = noanim,class:(alacrittyclipboard) windowrulev2 = noblur,class:(alacrittyclipboard) windowrulev2 = opacity 0,class:(alacrittyclipboard) windowrulev2 = maxsize 1 1,class:(alacrittyclipboard)
Fixes the fucking clipboard in citrix, no, I cannot figure out a better solution.
the move to aquamarine with hyprland mostly resolved this… but not completely and i’m going to have to write a new duct tape solution for that.
If you’re wondering why I launch alacritty… it doesn’t work without alacritty, wayland needs the window to be in focus, if alacritty isn’t there there’s no in focus window and it doesn’t update the clipboard.