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.

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!

SnotFlickerman ,
@SnotFlickerman@lemmy.blahaj.zone avatar

I have an old laptop running some basic services.

I have taken it apart before to replace the hard drive with an SSD, but I never replaced the dead CMOS battery because you have to literally completely disassemble it to get at the battery.

So I have a cronjob that runs on startup to change the system clock to the right time-zone.

It just felt simpler than completely disassembling a hard-to-take-apart laptop.

UNY0N ,

This certainly isn’t of the same caliber as some of these other comments, but I found it to be fitting to the topic.

Last year I was having problems getting the game stellaris working on arch. (I use bazzite now, btw) My solution was the following:

  1. download the game via steam.
  2. switch it to use proton
  3. switch it back to linux version
  4. use the terminal to make the entire game folder read-only, so that steam couldn’t touch the game anymore and screw it up.
  5. add the exicutable to PATH
  6. start the game via terminal

If any one of those step was left out, it didn’t work. I’m no linux expert, so I didn’t have the skills to actuality find the real problem.

prole ,

Even when Proton doesn’t work, it still somehow works.

Magic.

julianh ,

I… What? Why does that work? How did you figure this out?

Ephera ,

I like to use unclutter to hide my mouse pointer after a few seconds without being moved.

Now, the thing is, it doesn’t just visually hide the cursor, it actually removes it, so UI elements triggered by hovering disappear. Sometimes that’s great, other times it’s infurriating, like when reading a tooltip or menu.

I mostly use a touchpad, and so I developed a habit to wiggle my finger while I’m intentionally hovering something, so that there was enough mouse movement for unclutter to not remove my pointer.

Then I found a setting for the jitter threshold of the touchpad. Basically, with the threshold on, it ignores tiny movements, because the hardware reports finger wiggling, even if you hold your finger perfectly still. Which is perfect for me to turn off.

Now when I have my finger on the touchpad, it automatically wiggles and allows me to read hover elements. If I take my finger off, it stops wiggling and removes the cursor.
It’s almost like someone designed an OS with touchpads in mind, rather than them being an afterthought.

CrabAndBroom ,

I have a folder full of scripts tied to aliases that fix various things when they go wonky, and I’ve long since forgotten what any of them do. I just know if xxx app stops working, I type fix_xxx into the terminal and then it does a bunch of stuff and then it works again lol.

Also I have a bunch of aliases tied to common tasks, like e1 = reboot, e2 = shutdown etc. I have no idea where that habit came from.

Edit: ALSO, just the general mish-mash of apps. I won’t have anything to do with Snaps, but the rest of it is an unholy combination of native apps, things from the AUR, flatpaks, Appimages, Docker containers and wine setups, mostly (but not all) in Bottles.

MonkderVierte ,

I dare you to try grep -Irn alias in your home dir.

CrabAndBroom ,

I’m not even sure what that would do! Presumably list every time the word alias appears in every file across the whole home directory or something like that?

slazer2au ,

Had a Centos VM that kept slipping time. Every week it would loose about 30min. No amount of NTP syncing got the time correct until manual intervention.
Msp couldn’t work it out, couldn’t rebuild the server for infrastructure reasons, and only that server had the issue. The other 3 VMs on that host were fine.

Cron job on one server took it current time, sshed to the dodgy server and configured the correct time.

xp19375 ,

sssd didn’t work well with my company’s AD server, which would cause repeated authentication failures until I restarted sssd. I rigged up a bash script which would restart sssd any time xscreensaver logged an auth fail.

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.

communism ,
@communism@lemmy.ml avatar

Youtube doesn’t seem to inhibit idle for me for some reason, so my screen would always turn off with swayidle while watching youtube videos. So I made my lockscreen script (which is called by swayidle)


<span style="font-weight:bold;color:#a71d5d;">if </span><span style="color:#62a35c;">[ </span><span style="color:#183691;">"$(</span><span style="color:#323232;">playerctl</span><span style="color:#183691;"> status)" </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#183691;">"Playing" </span><span style="color:#62a35c;">]</span><span style="font-weight:bold;color:#a71d5d;">; then
</span><span style="color:#323232;">    </span><span style="color:#62a35c;">exit</span><span style="color:#323232;"> 0
</span><span style="font-weight:bold;color:#a71d5d;">else
</span><span style="color:#323232;">    </span><span style="color:#62a35c;">exec </span><span style="color:#183691;">"/path/to/lockscreen/script"
</span><span style="font-weight:bold;color:#a71d5d;">fi
</span>

(lockscreen script was just swaylock called with a bunch of arguments)

Not super crazy compared to some of the things people are saying in the comments, but also definitely not how you’re meant to handle idle inhibition when media is playing lol

iiGxC ,

Hey that’s pretty good, I’m gonna steal it. It might even be worth making a pullrequest to update swaylock to have a flag to do this, I use waybar and it has a lock inhibit button that I use before I start watching anything, but automating it like this is seems super nice

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
MajorHavoc ,

I regularly recommend configurations to peers that are arguably impossible for normal humans. (Not on purpose! Sorry Dave!)

I love to run stuff on Raspberry Pi, and I fear no gcc compile flag. (Ok. That’s a bold faced lie, even I fear a couple of them.) So I frequently forget the bullshit I had to do to get something weird running on a random Pi.

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.

mrvictory1 ,

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.

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

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