I one crossgraded a debian server from x86 to x86_64.
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
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.
Wow, Lotta smart people here doin some.hacky shit
Prior to switching (upgrading?) to Wayland, Debian KDE crashed under X11 regularly when waking from hibernation and the taskbar would disappear. Restarting the plasma shell made it operable again, so I created an alias and regularly rebooted the DE shell 2-3x a day:
alias damnTaskbar='killall plasmashell ; kstart plasmashell &'
I still occasionally need to use one of these two
# for plasma desktop
alias kplasma='plasmashell --replace & disown'
# when kwin crashes or acts weird
alias kbug='if [ "${XDG_SESSION_TYPE}" = "x11" ]; then kwin_x11 --replace & disown; else kwin_wayland --replace & disown; fi'
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.
Had a zfs array on an adaptec raid card. On reboot the partition table would get trashed and block the zfs pool from coming up, but running fdisk against the disk would recover it from the backup.
Had a script to run on reboot that just ran "fdisk -l" on every disk, then brought up the zfs pool. Worked great for years until I finally did a kernel upgrade that resolved it.
I ran chmod 777 /dev/uinput
so AntiMicroX worked on Wayland. The PC was intented to be used as an HTPC. A Dualshock 3 would be the remote and KDE Plasma Bigscreen would be used to launch Linux native apps ie. Firefox and Android apps via Waydroid, hence the Wayland requirement. AntiMicroX would bind gamepad inputs to arrow keys, enter, ESC, volume up/down, mouse navigation, left/right click etc. The whole setup was duct tape, user unfriendly and it ultimately did not solve the problem that sent me down this rabbit hole: Internet was unstable even with an ethernet cable so it had no advantage over the crappy Android TV stick that had trouble streaming anything but Chromecast.
A close contender is having to disable Internet when launching a specific online only game otherwise performance halves.
There is also a guide I uploaded to Reddit that describes how to import ringtones from Linux to iOS that has 8 steps and involves rebooting your phone. And another guide to run 2 games at once and stream one of thrm while playing the other locally.
I have a problem with half working duct tape solıtions.
I had an external hard drive enclosure that I stored my Plex content on before I built a nas, and the enclosure would go to sleep after 15 minutes and take the drives offline. So i had a cron script write a 1 kb file to each drive every 14 minutes. Worked well enough
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
Fucking network daemons messing with my resolv.conf
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.
I was trying to customize shit and accidentally deleted my entire task bar. I couldn't figure out how I did it so I just installed a different one which needed to boot on startup.
sometime ago I had my home directory managed by systemd-homed
on Fedora (before 38 even afaik). the SELinux policy wasn't configured properly for it though, so I had to keep setting it to permissive mode. for some stupid reason I remember running the command to do that on every. single. boot. lol
Using crontab to execute these kinds of quick fixes that don't really solve the problem so much as reset the countdown to failure are the real Duck tape Linux hacks.
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'm not technically inclined at all, so the most duct tapey thing I can remember was hacking Gnome to use Nemo as my file browser instead of Gnome's default file browser once.
something kept messing with my dns and i’m too lazy to find out why so i hardcoded etc/resolv.conf and chmod +i on it
I wrote a systemd unit file to force my wireless keyboard to always switch the fn key to normal F-keys.
I'm rebooting my router every week via a crontab because some dynamic dns update process fails from time to time and I find it hanging. No time to debug the actual problem.
Not exactly mine but I've used it. I have a fast but data-limited internet connection and a slower unlimited connection. When I need the faster connection to do something I connect to it through wifi while staying connected to the other through Ethernet. Then use this project to bind a specific app to wifi while everything else keeps using Ethernet. It uses LD_PRELOAD to link its own version of network connect that calls the real method. There's definitely a better way to do this with iptables but it's a good enough patch for when needed.
Actually really few instances of jerry rigging, but I do remember during my distro-hopping days where I used a binary gcc package to compile a more optimized binary of gcc. At the time, that felt pretty weird, but looking back I see why.
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.
Oh yeah I do this, I'll raise you that mine also sshs into my server to update the editor theme
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.
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.
Did a physical-to-virtual-to-physical conversion to upgrade and unbreak a webserver that had been messed up by simultaneously installing packages from Debian and Ubuntu.
I really needed to run a compositor from an arch chroot and systemd's udev is straight up broken in chroot, so I used libudev-zero and made sure that every time systemd updated I would delete the libudev .so file and plunk libudev-zero ontop of it, no i've moved on to greener pastures (Artix) but hey, it did work.
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.
It makes me mad to see the current state sway is in, I even bought an AMD GPU for nothing.