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.

cizra ,

Mounting a Samba share and moving my LVM pvolumes of / onto a losetup’ed file on it, while running the system. Bass ackwards.

chtk ,
@chtk@feddit.nl avatar

Good grief. Why?

cizra ,

I needed to redo partitions, but didn’t want to reboot.

chtk ,
@chtk@feddit.nl avatar

That’s not even a bad idea then.

One of my machines has a boot partition that’s a bit too small, on an otherwise LVM setup.

cizra ,

I’d recommend a Linux installer on a memory stick, instead. It’s bound to have less network lag.

chtk ,
@chtk@feddit.nl avatar

Nah, it’ll be fine.

I might have a large enough USB SSD laying around some where. I could probably use that instead.

  • extend VG with the USB PV
  • move LV’s to USB
  • shrink root LV
  • resize boot
  • move things back on a new internal PV
cizra ,

Does your FS support online resizing? EXT4 doesn’t, so you’d have to use an installer stick.

Be super careful about partition sizes. I once tried to shrink my FS to an exact size, then shrink the LV to the same size - it ended up corrupting my FS. After that time, I started undersizing the FS, then resizing LV, finally expanding the FS again.

Have backups.

chtk ,
@chtk@feddit.nl avatar

Does your FS support online resizing?

Yeah. I mainly use btrfs; it supports online growing and shrinking.

Be super careful about partition sizes. […]

I know. I have done plenty of same device partition resizing. I know the pit falls, and for safety shrink the FS to below what the LV is going to be.

Have backups.

Thanks for the reminder. I’ve been meaning to set up snapshot backups for this machine using rsnapshot as an experiment. I mainly use Dirvish

NauticalNoodle ,

I have a hardware malfunction with my secondary hard drive. Every once in the while it locks itself into read-only mode and corrupts a log file that crashes my system. My solution is to reboot Fn + Alt + Sysrq + ‘b’ and periodically delete the log files that exacerbate the issue. I need to replace the drive but that requires money and a backup solution, neither of which i currently have. It’s been an ongoing issue for at least 4 years now.

pastermil ,

Not me personally, but in one of my past project, my boss was running a bunch of “services” by leaving it on GNU screen terminal sessions and detaching from them.

Everytime I went in to debug something, I’d need to go thru a list of sessions, attach to one hoping that it’s the right one (sometimes they’d name 'em), then see the console output.

ReveredOxygen ,
@ReveredOxygen@sh.itjust.works avatar

I’ll admit to doing this (but with tmux)

martinb ,

I may or may not do this occasionally with byobu and my own services. Byobu is easier to use.

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.

ReveredOxygen ,
@ReveredOxygen@sh.itjust.works avatar

The Pixel watch has this problem too. However, it randomizes the MAC per network, so that strategy won’t even work. I’ve tried to get it from the debug log but failed I’ve resigned that it won’t be getting connected to the school network

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

DarkSirrush ,

But there is a setting to disable that? I don’t remember where I found it because I don’t remember where to find any settings, but you can definitely disable automatic shut off of audio devices.

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!

BlueEther ,
@BlueEther@no.lastname.nz avatar

I wonder if the windows docker image could be of use?

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 , (edited )

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 in the recent versions of the driver.

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.

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.

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