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.

demesisx ,
@demesisx@infosec.pub avatar

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.

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.

popekingjoe ,
@popekingjoe@lemmy.world avatar

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.

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

mactan ,

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 ,

Fucking network daemons messing with my resolv.conf

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.

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.

captain_aggravated ,
@captain_aggravated@sh.itjust.works avatar

I duct taped a Raspberry Pi to the back of a television once. Does that count?

popekingjoe ,
@popekingjoe@lemmy.world avatar

I personally like this, so as far as I’m concerned, yes.

cm0002 ,

Well it was more like a temporary duct tape, but I “installed” a copy of Ubuntu in RAM from the running Ubuntu system so that I could “boot” (pivot_root) into it without restarting it

All because I didn’t want to wait on a ticket for my dedicated server provider to hook in a KVM LOL

(See my meme post I posted to c/linuxmemes a few weeks back for more info)

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.

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

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.

MicrowavedTea ,

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.

julianh ,

So I use a surface device with the Linux surface kernel, and there was (and probably still is) an issue where the type cover doesn’t properly rebind after being detached and re-attatched. To make matters worse, connecting other USB devices disconnected the type cover. My solution was to make a udev rule that detected if the keyboard is “removed” and then try to rebind it, effectively unplugging it and plugging it back in again in software.

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