Tuesday, 26 October 2021

How to force an application to run in Xwayland instead of Wayland

I had a problem with the game osu!lazer in Fedora KDE Wayland today. I know how to force a flatpak application to run in Xwayland, but this was an AppImage.

This command fixed the issue:

env -u WAYLAND_DISPLAY ./osu.AppImage

So, to force a non-flatpak application to run in Xwayland, simply type in the terminal (or modify the launcher):

env -u WAYLAND_DISPLAY <insert-name-of-application>

For flatpak applications, it's a bit different.

Download Flatseal from flathub, change permissions of your application or game in Flatseal to remove the "Wayland" socket. In my experience, in versions of KDE lower than 5.23, you might need to disable "fallback-x11" socket as well.

Friday, 8 October 2021

How to fix ugly/jagged fonts in flatpak GTK applications in Fedora 35 KDE wayland

The fonts in GTK/Gnome flatpak applications in the Fedora 35 KDE wayland session currently look like garbage (they are not antialiased) unless you run them without the wayland socket. This is due to xdg-desktop-portal-gtk being built incorrectly. You can fix this by installing xdg-desktop-portal-gnome and rebooting.

Step 1. sudo dnf install xdg-desktop-portal-gnome

Step 2. Reboot

Step 3. Verify that xdg-desktop-portal-gnome is running instead of xdg-desktop-portal-gtk

Fonts in flatpak'ed GTK/Gnome applications should look fine now.

See these bug reports for more details:

https://bugzilla.redhat.com/show_bug.cgi?id=2012315

https://github.com/flatpak/xdg-desktop-portal-gtk/issues/355

https://github.com/flatpak/flatpak/issues/4438

Wednesday, 22 September 2021

How to stop KDE Plasma and other QT Apps from Spamming your System Log

 I noticed a lot of spam in /var/log/messages on Fedora 34 KDE.

Sep 22 23:28:11 fedora-t580 plasmashell[82570]: kf.config.core: "\"NaturalSize_1\" - conversion of \"-1,-1\" to QSizeF failed"
Sep 22 23:28:11 fedora-t580 plasmashell[82570]: kf.config.core: "\"NaturalSize_1\" - conversion of \"-1,-1\" to QSizeF failed"
Sep 22 23:28:11 fedora-t580 plasmashell[82570]: kf.config.core: "\"NaturalSize_1\" - conversion of \"-1,-1\" to QSizeF failed"
Sep 22 23:28:26 fedora-t580 plasmashell[82570]: kf.config.core: "\"NaturalSize_1\" - conversion of \"-1,-1\" to QSizeF failed"
Sep 22 23:28:26 fedora-t580 plasmashell[82570]: kf.config.core: "\"NaturalSize_1\" - conversion of \"-1,-1\" to QSizeF failed"

Those lines were repeated over and over again.

I finally found a workaround for it.

Add this line to /etc/environment

QT_LOGGING_RULES='*=false'

And reboot.

No more log spam.

Monday, 27 January 2020

Geometry Dash - A Cheap Windows Game on Steam that Works Perfectly in Proton / Wine

Today I'd like to make a quick recommendation to a very addictive (and possibly - frustratingly hard!) windows game on Steam (also on Android and CrapplePhone) called Geometry Dash.

But how am I playing this on Linux? With Proton / Wine / Steamplay. (However you call it) And the game works perfectly in it. 0 issues.



I owned the Android version of this game since forever on Google Play, but I noticed it was on sale for only $1 on Steam so I decided to pick up that version of it.

The game is simple, and there's only one button to worry about. The jump button. You're a square and you have to avoid obstacles and jump at the exact moment. The gameplay is in sync with the music, and I'd like to mention that the music is very good! All / most of the music is from the site Newgrounds, which is nostalgic for me as I used to make terrible flash animations on that site.

The game runs on literally every PC out there, hopefully they don't update the system requirements because I enjoy playing this game on my old Thinkpad laptop which has the worst integrated graphics you could ever find, but for now it works great!

Just make sure you have Steamplay enabled in the Steam settings and you're good to go! It would be cool if the developers released a native version but I don't think that matters at this point given how good the game works in Steamplay.

I just have to warn you. You will die. A lot. It took me 160 tries to beat the 3rd level. But that's the fun of it. We need more games like this, that are challenging. Not some easy mode garbage.

Thanks for reading another Linux Surge article. Stay tuned for more!

Thursday, 22 August 2019

How to install Anbox in Fedora 30

Update Nov 21 2020: I fixed the SELinux commands in this article as they were incomplete and caused some confusion. Sorry about that.
I don't use Anbox currently but if you have any issues PM me on reddit. My username is tuxkrusader

How to install Anbox in Fedora 30 as quick as possible.


Open a terminal and type the following commands:

sudo dnf install dkms
sudo dnf install kernel-devel

cd ~
git clone https://github.com/anbox/anbox-modules
cd anbox-modules
sudo cp anbox.conf /etc/modules-load.d/
sudo cp 99-anbox.rules /lib/udev/rules.d/
sudo cp -rT ashmem /usr/src/anbox-ashmem-1
sudo cp -rT binder /usr/src/anbox-binder-1
sudo dkms install anbox-ashmem/1
sudo dkms install anbox-binder/1
sudo modprobe ashmem_linux
sudo modprobe binder_linux


sudo dnf install snapd
sudo ln -s /var/lib/snapd/snap /snap
reboot

snap install --devmode --beta anbox
to update do this: snap refresh --beta --devmode anbox

But wait...Anbox doesn't launch!
because SELinux.
Don't disable SELinux, that's a bad idea.
Instead use SELinux Troubleshooter to find out the cause. To fix it I did this, it might be different for you:

sudo ausearch -c servicemanager --raw | audit2allow -M my-servicemanager
sudo semodule -X 300 -i my-servicemanager.pp
sudo ausearch -c anboxd --raw | audit2allow -M my-anboxd
sudo semodule -X 300 -i my-anboxd.pp
sudo ausearch -c gatekeeperd --raw | audit2allow -M my-gatekeeperd
sudo semodule -X 300 -i my-gatekeeperd.pp

Then launch Anbox. You might need to reboot first though.

Also, install adb so you can do:
adb install filename.apk <--- to install apks into anbox (assuming you don't have your real android device plugged in)


Friday, 9 February 2018

How to allow VLC 3.0 to cast to Chromecast if you have a firewall enabled on Linux

VLC 3.0 recently came out, with the ability to cast to a Chromecast device. However, if you are behind a firewall, such as UFW, a front-end for "iptables", you need to whitelist a certain port.

That port is 8010.

Here is an image on what exactly to type in to allow this port from only your Chromecast, in GUFW (GUI for UFW):

Note: Replace 192.168.1.8 with the IP address of the Chromecast on your network that you want to cast to.


I hope you found this useful.

Thursday, 20 April 2017

Fixing the Non-Working Thinkpad T510i Mic Mute Button on Ubuntu MATE 17.04

So, apparently, the mic mute button stopped working in Ubuntu. I remember it working in Ubuntu 16.04 but not 17.04. Anyways, I fixed it with this simple instruction from a user on AskUbuntu.

https://askubuntu.com/questions/125367/enabling-mic-mute-button-and-light-on-lenovo-thinkpads

This is what I did to fix the mic mute button on the Thinkpad T510i. The LED on it works now too. If you have a different Thinkpad, I suggest following the full tutorial on the AskUbuntu link above.

Anyways, this is what I did:

Created the file /etc/acpi/events/lenovo-mutemic

with the contents:

event=button/f20 F20 00000080 00000000 K
action=/etc/acpi/lenovo-mutemic.sh

Created the file /etc/acpi/lenovo-mutemic.sh

with the contents:

#!/bin/bash
INPUT_DEVICE="'Capture'"
YOUR_USERNAME="username"
if amixer sget $INPUT_DEVICE,0 | grep '\[on\]' ; then
    amixer sset $INPUT_DEVICE,0 toggle
    #echo "0 blink" > /proc/acpi/ibm/led
    su $YOUR_USERNAME -c 'DISPLAY=":0.0" notify-send -t 50 \
            -i microphone-sensitivity-muted-symbolic "Mic MUTED"'
else
    amixer sset $INPUT_DEVICE,0 toggle                       
    su $YOUR_USERNAME -c 'DISPLAY=":0.0" notify-send -t 50 \
            -i microphone-sensitivity-high-symbolic "Mic ON"'
    echo "0 on" > /proc/acpi/ibm/led 
fi

Important: Replace username with your Linux username.

Find your Linux username by typing "whoami" in the terminal.

Finally, I did this:

sudo chmod +x /etc/acpi/lenovo-mutemic.sh
sudo service acpid restart

Thank you random user on AskUbuntu!