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.

eldavi ,

intel won’t allow its linux drivers to work above wifi 4 speeds in ap mode, so i created a kvm virtual windows machine with pci pass through on the wifi nic plus ip masquerade and now i’m getting wifi 6 speeds in ap mode.

gregor ,

Oh god, this is horrible. I beg you to find a better solution 🙏

eldavi , (edited )

it’s horrible in more ways that you would expect and what other solutions exist with intel wifi hardware in ap mode on linux?

zelifcam ,
@zelifcam@lemmy.world avatar

this is beautiful

eldavi , (edited )

it’s a pita every time something goes wrong; it works well most of the time, but it also REALLY sucks sometimes.

avidamoeba ,
@avidamoeba@lemmy.ca avatar

I think NDISwrapper is still maintained for issues like this.

eldavi , (edited )

i wasn’t aware that you could use ndiswrapper on an access point; i’ll look into it.

UPDATE: googles says that you can’t do this because ndiswrapper uses windows drivers that don’t support ap mode.

avidamoeba , (edited )
@avidamoeba@lemmy.ca avatar

The kludge wins. 😅

unexposedhazard ,

Lots of laptops just use a removable m.2 wifi card. Have you considered replacing it with something thats properly supported? I know hardware costs money but not that much probably.

AmbiguousProps ,

This is the real solution, just stop using the built in stuff and free yourself

eldavi ,

It’s not a laptop and the hardware is fully capable of ap mode support in it’s older iteration if drivers; Intel made the decision to remove that capability.

eldavi ,

It’s not a laptop; it’s a mini desktop that I obtained to serve as a wifi router; storage server; firewall; VPN; media server; remote file storage; and my cat’s favorite warm napping surface.

the wifi nic is embedded on the motherboard and it was chosen since it included a high gain antenna; among other qualities.

Wifi works fine if you use it in ordinary client mode w full Linux support and the hardware is capable of fully supporting ap mode in older Linux kernels; it’s just that Intel decided remove higher speed ap mode support in the latest versions of the driver to force people to buy thier more expensive wifi nics.

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.

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

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

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.

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.

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.

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

ving_thor ,

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

Archr ,

I think there is a value you can put into a /sys file to fix this. Had the same issue on my k10 keyboard. (the fix was easily findable on their forums)

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.

I_like_cats ,

My mother uses some software that runs in the browser for her shop. It can print out receipts and scan items. To do these things it has a small “sattelite” application that runs on the system and interacts with the printer and scanner. This software only runs on Windows and Linux doesn’t have drivers for the scanner.

When I switched her over to Linux and found this out in the process I wanted to stop, give up and install windows.

But then I had a stupid idea. I could run the sattelite program in a Windows VM and pass through the USB devices for receipt printer and scanner. The webapp uses requests to localhost:9998 to communicate with the sattelite so I set up a apache server that proxies these requests into the VM. I also prevented the VM from acessing the Interner so Windows doesn’t update and screw everything up.

And it works. It has been in use for a week now and I’ve heard no complaints. I’m just praying to god it doesn’t break

capital ,

At least getting a snapshot of the Windows VM should be simple. And since it doesn’t connect to the internet and doesn’t update, restore should be quick and relatively easy.

averyminya ,

Create a script to send important data records (if you need that for taxes or inventory data etc) as a nightly routine, that way you have a consistent database for any important records.

Then just create a restore point. If it breaks in 2 weeks, then you just relaunch it and know that it’s going to kill itself in 2 weeks. A simple restart to that restore point solves everything.

Sounds 100% functional to me!

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.

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.

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