There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

What is the most duct-tape thing you've done to Linux?

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’


<span style="color:#323232;">[Unit]
</span><span style="color:#323232;">Description=Switch to tty1 on resume
</span><span style="color:#323232;">After=suspend.target
</span><span style="color:#323232;">
</span><span style="color:#323232;">[Service]
</span><span style="color:#323232;">Type=simple
</span><span style="color:#323232;">ExecStart=/usr/local/bin/switch-to-tty1.sh
</span><span style="color:#323232;">
</span><span style="color:#323232;">[Install]
</span><span style="color:#323232;">WantedBy=suspend.target
</span>

‘switch-to-tty1.service’ executes ‘/usr/local/bin/switch-to-tty1.sh’ and send user to tty1


<span style="color:#323232;">#!/bin/bash
</span><span style="color:#323232;"># Switch to tty1
</span><span style="color:#323232;">chvt 1
</span>

.bashrc login from tty1 then kicks user to tty2 and logs out tty1.


<span style="color:#323232;">if [[ "$(tty)" == "/dev/tty1" ]]; then
</span><span style="color:#323232;">    chvt 2
</span><span style="color:#323232;">    logout
</span><span style="color:#323232;">fi
</span>

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.

Willdrick ,

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

eager_eagle ,
@eager_eagle@lemmy.world avatar

I keep a small local knowledge base with common fixes for problems I find recurrently (over and over again in some cases).

It has a bit over 1,300 lines of markdown files split by category of problem. It saves me the trouble of finding that exact solution in stack overflow that fixed this exact problem 5 months ago.

linearchaos ,
@linearchaos@lemmy.world avatar

Haaaa! I do the same with a tiddlywiki

Shadow ,
@Shadow@lemmy.ca avatar

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.

InternetCitizen2 ,

Side of the case fell off.

TimeSquirrel ,
@TimeSquirrel@kbin.melroy.org avatar

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 ,

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.

macattack ,

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 ,
@eager_eagle@lemmy.world avatar

I still occasionally need to use one of these two


<span style="font-style:italic;color:#969896;"># for plasma desktop
</span><span style="color:#62a35c;">alias </span><span style="font-weight:bold;color:#795da3;">kplasma</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">'plasmashell --replace & disown'
</span><span style="color:#323232;">
</span><span style="font-style:italic;color:#969896;"># when kwin crashes or acts weird
</span><span style="color:#62a35c;">alias </span><span style="font-weight:bold;color:#795da3;">kbug</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">'if [ "${XDG_SESSION_TYPE}" = "x11" ]; then kwin_x11 --replace & disown; else kwin_wayland --replace & disown; fi'
</span>
prime_number_314159 ,

I ran out of crtcs, but I wanted another monitor. I widened a virtual display, and drew the left portion of it on one monitor, like regular. Then I had a crown job that would copy chunks of it into the frame buffer of a USB to DVI-d adapter. It could do 5 fps redrawing the whole screen, but I chose things to put there where it wouldn’t matter too much. The only painful thing was arranging the windows on that monitor, with the mouse updating very infrequently, and routinely being drawn 2 or more places in the frame buffer.

mycodesucks ,
@mycodesucks@lemmy.world avatar

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.

rotopenguin ,
@rotopenguin@infosec.pub avatar

I made a systemd script that fires when going to / waking up from sleep - it checks how long the sleep was and if it was just a few seconds, it puts the computer back to sleep.

In hindsight, I think the thing that made it work was bluetooth was somehow responsible for the initial failed suspend. The second shot at sleep happened before bluetooth came back up, so it succeeded.

jbk ,

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

Wolf314159 ,

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.

data1701d ,
@data1701d@startrek.website avatar

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.

SimplyTadpole ,
@SimplyTadpole@lemmy.dbzer0.com avatar

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.

314xel ,
@314xel@lemmy.world avatar

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.

everett ,

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 ,

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

Samueru ,

It makes me mad to see the current state sway is in, I even bought an AMD GPU for nothing.

downhomechunk ,

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.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines