275
submitted 3 months ago* (last edited 3 months ago) by squid_slime@lemm.ee to c/linux@lemmy.ml

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.

(page 2) 50 comments
sorted by: hot top controversial new old
[-] data1701d@startrek.website 11 points 3 months ago

Building a custom Buildroot Linux for a Pentium 2 laptop that can fit on a CD so I could back up a 2.5" IDE drive to a USB drive, probably.

On another note, last night, I had to get a Google TV set up on my dorm Wi-Fi, which requires me to either go through a portal to set it up or to go into my account and add the device's MAC address. The TV (which was brand new and doing OOBE stuff) wouldn't let me go to settings to get the MAC address without a network connection. Even more infuriating, there was a button in the Google Home app that said "Show MAC address", but when I pushed it, it would say "Can't get MAC address." What I ended up doing to get around that crap was setting up my Debian Thinkpad (which I am writing from now) to share its internet connection over ethernet to finish the setup process so I could get to settings and get the MAC address.

On one hand, a funny experience, but on the other hand, I'm simultaneously both mad at Google and my dorm internet provider.

load more comments (6 replies)
[-] savvywolf@pawb.social 11 points 3 months ago

I one crossgraded a debian server from x86 to x86_64.

[-] TimeSquirrel@kbin.melroy.org 11 points 3 months ago

I've set Raspberry Pis to auto-reboot themselves at night if they are being used for headless network services that need to be available 24/7, just to clear out memory leaks or other things that may have gotten locked up. Not sure if that's duct tape or just a standard practice. They aren't the most stable things sometimes. They're known for power supply and SD card issues.

[-] leisesprecher@feddit.org 11 points 3 months ago

I did this with my sensors running in Pi picos.

There was some wonkyness with some of the electrical stuff and since I have no idea how to debug that, I just restarted them every 24 hours and at start "drained" all pins by repeatedly reading from them.

I'm reasonably sure, this setup is cursed enough to kill an electrical engineer on sight, but it kind of works good-ish enough.

[-] Willdrick@lemmy.world 11 points 3 months ago

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

load more comments (3 replies)
[-] delirious_owl@discuss.online 10 points 3 months ago

Wow, Lotta smart people here doin some.hacky shit

[-] mrvictory1@lemmy.world 10 points 3 months ago

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.

load more comments (2 replies)
[-] macattack@lemmy.world 10 points 3 months ago* (last edited 3 months ago)

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 &'

[-] eager_eagle@lemmy.world 5 points 3 months ago* (last edited 3 months ago)

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'
load more comments (1 replies)
[-] allywilson@lemmy.ml 9 points 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.

[-] Shadow@lemmy.ca 9 points 3 months ago

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.

[-] SimplyTadpole@lemmy.dbzer0.com 8 points 3 months ago

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.

[-] mactan@lemmy.ml 8 points 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

[-] ramius345@sh.itjust.works 6 points 3 months ago

Fucking network daemons messing with my resolv.conf

load more comments (1 replies)
[-] dditty@lemm.ee 8 points 3 months ago

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

[-] mycodesucks@lemmy.world 8 points 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.

[-] dizzy@lemmy.ml 7 points 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.

[-] jbk@discuss.tchncs.de 7 points 3 months ago

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

load more comments (2 replies)
[-] Head@lemmings.world 7 points 3 months ago

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.

[-] kate@lemmy.uhhoh.com 6 points 3 months ago* (last edited 3 months ago)

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

[-] chameleon@fedia.io 6 points 3 months ago

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.

[-] communist@lemmy.frozeninferno.xyz 6 points 3 months ago* (last edited 3 months ago)
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.

[-] ving_thor@lemmy.world 6 points 3 months ago

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

load more comments (1 replies)
[-] everett@lemmy.ml 6 points 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 5 points 3 months ago

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

[-] 314xel@lemmy.world 6 points 3 months ago* (last edited 3 months ago)

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.

[-] dotslashme@infosec.pub 6 points 3 months ago

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.

[-] RogueBanana@lemmy.zip 6 points 3 months ago

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.

load more comments (2 replies)
[-] MicrowavedTea@infosec.pub 6 points 3 months ago

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.

[-] Quackdoc@lemmy.world 5 points 3 months ago

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.

[-] Kazumara@discuss.tchncs.de 5 points 3 months ago

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.

load more comments
view more: ‹ prev next ›
this post was submitted on 21 Aug 2024
275 points (100.0% liked)

Linux

48340 readers
560 users here now

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

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS