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’

[Unit]
Description=Switch to tty1 on resume
After=suspend.target

[Service]
Type=simple
ExecStart=/usr/local/bin/switch-to-tty1.sh

[Install]
WantedBy=suspend.target

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

#!/bin/bash
# Switch to tty1
chvt 1

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

if [[ "$(tty)" == "/dev/tty1" ]]; then
    chvt 2
    logout
fi

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.

138 points

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.

permalink
report
reply
74 points

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

permalink
report
parent
reply
16 points
*

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

permalink
report
parent
reply
30 points

I think NDISwrapper is still maintained for issues like this.

permalink
report
parent
reply
19 points
*

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.

permalink
report
parent
reply
6 points
*

The kludge wins. 😅

permalink
report
parent
reply
23 points

this is beautiful

permalink
report
parent
reply
5 points
*

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

permalink
report
parent
reply
9 points

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.

permalink
report
parent
reply
12 points

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.

permalink
report
parent
reply
3 points

Ah okay thats the one kind of device where there is nothing you can really do true.

permalink
report
parent
reply
3 points

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

permalink
report
parent
reply
2 points
*

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

permalink
report
parent
reply
99 points
*

My control key was broken, but I found that when I used an app and held down the space bar key, the CPU would get abnormally hot.

So I wrote an Emacs interrupt to interpret a rapid CPU rise as “press the control button”.

Unfortunately the dev pushed an update that broke space bar heating, which broke my workflow. I opened a bug report about it, though…

permalink
report
reply
80 points
10 points

How the fuck…

permalink
report
parent
reply
19 points

Other way around.

permalink
report
parent
reply
32 points

That’s horrifying.

permalink
report
parent
reply
41 points

Hey, my setup works for me! Just add an option to enable CPU overheating in the next update!

permalink
report
parent
reply
8 points

Just think how many children are holding down spacebar to keep warm in the winter. We need to keep this feature around.

permalink
report
parent
reply
5 points

This is an absolute winner IMHO. I’m imagining all the hotkeys that are accidentally activated when a CPU-intensive task spins up.

permalink
report
parent
reply
4 points

Wow…

permalink
report
parent
reply
22 points

It’s not real, it’s an xkcd joke

permalink
report
parent
reply
91 points

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

permalink
report
reply
25 points

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.

permalink
report
parent
reply
14 points

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!

permalink
report
parent
reply
5 points

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

permalink
report
parent
reply
3 points

Is there such a thing as a windows docker image that doesn’t run Linux on Windows?

permalink
report
parent
reply
2 points

I saw a reference to it the other day but didn’t look further, it looks like the windows docker image can only run as athe same os as the base release

permalink
report
parent
reply
55 points

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.

permalink
report
reply
3 points

That reminds me of this

https://xkcd.com/1172/

permalink
report
parent
reply
3 points

Everything here reminds everyone of that.

permalink
report
parent
reply
2 points

thats really cool actually

permalink
report
parent
reply
1 point

What is unclutter?

permalink
report
parent
reply
2 points

Uh, well, I kind of already wrote most of what there’s to say in the comment above, it hides your mouse pointer when you don’t move it for a few seconds.

In most distros, it’s available as the unclutter package, directly from the repos. On Debian-based systems, the package you want is called unclutter-xfixes.

https://wiki.archlinux.org/title/Unclutter

It is built for X11 and won’t work on Wayland.
But KDE recently shipped a built-in feature as part of Plasma 6.1 (a Desktop Effect called “Hide Cursor”), which also works very nicely. That one does not cause hover elements to disappear.

permalink
report
parent
reply
48 points
*

I think this one beats them all.

My home server keeps a few services up, including an instance of Jitsi Meet. The server runs nixos and the nixos package for jitsi is incomplete to say the least and doesn’t even support authentication, so I use the docker-compose version and I have a script that runs periodically to keep it updated. So far so good, right? Well, no.

Because the server is at home, I have a dynamic external IP address, so I have to use a DDNS provider, but jitsi doesn’t expect this and uses a stun server at startup to determine the public IP of the server once, so if my connection goes down or is restarted and the IP changes, jitsi needs to be restarted or it won’t work anymore.

The solution?

  • My router runs OpenWrt, so I am able to run a script that checks for external IP changes. When a change is detected, it uses SSH to connect to my server to restart jitsi
  • Because I don’t want the router to just be able to run any command, I created a jitsi-restart user that has no shell
  • When the router tries to log in with its pubkey, sshd creates a file called restartasap in the jitsi folder and closes the connection
  • On the server, there’s a systemd unit running a script as the jitsi user that periodically checks for that file, and if it exists it deletes it and restarts jitsi

I’ve been running this setup since mid 2020 and I expect this to continue until IPv6 becomes the norm.

permalink
report
reply
2 points

why not just run the IP check script on the box jitsi is on? a quick google gave me this: dig +short myip.opendns.com @resolver1.opendns.com and this: wget -q -O - checkip.dyndns.org | sed -e 's/.\*Current IP Address: //' -e 's/<.\*$//'

permalink
report
parent
reply
6 points

I already had a script on the router that I used to notify me of network outages, IP changes, keep the DDNS updated, etc. and I thought it was easier to just add a couple lines to that

permalink
report
parent
reply
2 points

Valid!

permalink
report
parent
reply
1 point

Couldn’t it be possible to set a script that restarts jitsi as that user’s login shell?

permalink
report
parent
reply
2 points

The jitsi user is a system user so it can’t login even if you set a key for it. Besides, I wouldn’t risk it anyway since that user is in the docker group, if it gets compromised somehow, the attacker would have very high privileges.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 7.7K

    Monthly active users

  • 3.6K

    Posts

  • 45K

    Comments