Running a GUI application with sudo on Linux
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY your-gui-app
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY /opt/v2rayN/v2rayN
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY your-gui-app
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY /opt/v2rayN/v2rayN
sudo dnf install android-tools
Create a plugdev group (if it doesn’t already exist) and add the user to it:
sudo groupadd plugdev sudo usermod -aG plugdev $LOGNAME
Log out and log back in for the group change to take effect. Use the id
command to verify that you are in the plugdev
group:
id
Identify the Vendor ID:
Connect your Android device to your computer and run the following command to identify the vendor ID:
lsusb
Look for the line that corresponds to your Android device. The vendor ID is the first part of the ID after ID
, for example, 18d1
for Google.
Create a udev Rule:
Create a file for the udev rule:
sudo nano /etc/udev/rules.d/51-android.rules
Add the Following Content:
In the file, add a rule to grant the necessary permissions. Replace YOUR-VENDOR-ID
with your device’s vendor ID. Here’s an example rule:
SUBSYSTEM=="usb", ATTR{idVendor}=="YOUR-VENDOR-ID", MODE="0666", GROUP="plugdev"
For example, if the vendor ID is 18d1
(Google):
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
Change File Permissions:
Change the permissions of the file to make it readable:
sudo chmod a+r /etc/udev/rules.d/51-android.rules
Reload udev rules:
sudo udevadm control --reload-rules sudo udevadm trigger
Restart your machine.
Check ADB Devices:
Verify that your device is recognized correctly:
adb devices
Making dnf a little faster
sudo nano /etc/dnf/dnf.conf
max_parallel_downloads=8
Firmware
sudo fwupdmgr get-devices sudo fwupdmgr refresh --force sudo fwupdmgr get-updates sudo fwupdmgr update
Media Codecs
sudo dnf groupupdate 'core' 'multimedia' 'sound-and-video' --setopt='install_weak_deps=False' --exclude='PackageKit-gstreamer-plugin' --allowerasing && sync sudo dnf swap 'ffmpeg-free' 'ffmpeg' --allowerasing sudo dnf install gstreamer1-plugins-{bad-\*,good-\*,base} gstreamer1-plugin-openh264 gstreamer1-libav --exclude=gstreamer1-plugins-bad-free-devel ffmpeg gstreamer-ffmpeg sudo dnf install lame\* --exclude=lame-devel sudo dnf group upgrade --with-optional Multimedia
H/W Video Acceleration
sudo dnf install ffmpeg ffmpeg-libs libva libva-utils sudo dnf swap libva-intel-media-driver intel-media-driver --allowerasing
Set Hostname
hostnamectl set-hostname YOUR_HOSTNAME
Disable Mitigations
sudo grubby --update-kernel=ALL --args="mitigations=off"
Modern Standby
sudo grubby --update-kernel=ALL --args="mem_sleep_default=s2idle"
Enable nvidia-modeset
sudo grubby --update-kernel=ALL --args="nvidia-drm.modeset=1"
Disable NetworkManager-wait-online.service
sudo systemctl disable NetworkManager-wait-online.service
Disable SELinux
sudo grubby --update-kernel ALL --args selinux=0
sudo nano /etc/selinux/config
SELINUX=disabled
References
https://github.com/devangshekhawat/Fedora-40-Post-Install-Guide
sudo dnf install chromedriver
sudo dnf install kmodtool akmods mokutil openssl
sudo kmodgenca -a
sudo mokutil --import /etc/pki/akmods/certs/public_key.der
You will be asked to enter a password, it doesn’t have to be very strong, just make sure to remember it. You’ll only need it once during these steps.
sudo reboot
After reboot you will see MOK Manager interface and will be asked to enroll the key.
First select “Enroll MOK“.
Then “Continue“.
Hit “Yes” and enter the password.
Then select “OK” and your device will reboot again.
sudo dnf install kernel-devel-$(uname -r)
sudo dnf install gcc kernel-headers kernel-devel akmod-nvidia xorg-x11-drv-nvidia xorg-x11-drv-nvidia-libs xorg-x11-drv-nvidia-libs.i686
sudo akmods --force
sudo dracut --force
sudo reboot
lsmod | grep -i nvidia
References
https://blog.monosoul.dev/2022/05/17/automatically-sign-nvidia-kernel-module-in-fedora-36/
https://rpmfusion.org/Howto/NVIDIA#Current_GeForce.2FQuadro.2FTesla
In the ever-evolving world of web development, security is paramount. Here we provide a step-by-step guide to not only installing the .NET Software Development Kit (SDK) on Fedora, but also generating an SSL Certificate for your .NET apps, thus ensuring secure connections between client and server.
Our first step is to install the .NET SDK. The .NET SDK is a set of libraries and tools that allow developers to create .NET apps and libraries. It is the foundation for building applications and libraries with .NET Core.
Here’s how you can install the .NET SDK on your Fedora system:
sudo dnf install dotnet-sdk-7.0
Enter
. You might be asked for your password; if so, provide it and press Enter
again.After the completion of the above steps, the .NET SDK should be installed successfully on your Fedora system.
Creating an SSL certificate for your .NET applications can enhance the security of your applications. Here’s how you can generate an SSL certificate:
sudo dnf install easy-rsa
.easyrsa
with permissions set to 700
:
cd ~ mkdir .easyrsa chmod 700 .easyrsa
cd .easyrsa cp -r /usr/share/easy-rsa/3/* ./
./easyrsa init-pki
vars
and add the following details in it (You can modify these details according to your requirement):
cat << EOF > vars set_var EASYRSA_REQ_COUNTRY "US" set_var EASYRSA_REQ_PROVINCE "Texas" set_var EASYRSA_REQ_CITY "Houston" set_var EASYRSA_REQ_ORG "Development" set_var EASYRSA_REQ_EMAIL "[email protected]" set_var EASYRSA_REQ_OU "LocalDevelopment" set_var EASYRSA_ALGO "ec" set_var EASYRSA_DIGEST "sha512" EOF
nopass
option to not secure the CA key with a passphrase:
./easyrsa build-ca nopass
sudo cp ./pki/ca.crt /etc/pki/ca-trust/source/anchors/easyrsaca.crt sudo update-ca-trust
mkdir req cd req openssl genrsa -out localhost.key openssl req -new -key localhost.key -out localhost.req -subj /C=US/ST=Texas/L=Houston/O=Development/OU=LocalDevelopment/CN=localhost cd ..
./easyrsa import-req ./req/localhost.req localhost ./easyrsa sign-req server localhost
.certs
and convert the certificate to PKCS#12 format:
cd ~ mkdir .certs cp .easyrsa/pki/issued/localhost.crt .certs/localhost.crt cp .easyrsa/req/localhost.key .certs/localhost.key cd .certs openssl pkcs12 -export -out localhost.pfx -inkey localhost.key -in localhost.crt
.bashrc
file so the .NET Core Kestrel server can find it (replace YOUR_USERNAME
with your actual username and PASSWORD
with the password you want to use for your certificate):
cat << EOF >> ~/.bashrc # .NET export ASPNETCORE_Kestrel__Certificates__Default__Password="PASSWORD" export ASPNETCORE_Kestrel__Certificates__Default__Path="/home/YOUR_USERNAME/.certs/localhost.pfx" EOF
And that’s it! You’ve now installed the .NET SDK and generated an SSL certificate for your .NET apps. Your applications are not only more secure but also more professional, creating trust with users who value their data privacy and security.
Hello Linux enthusiasts! Today, we are going to guide you through the process of installing Fedora Linux on the Asus ROG Strix, a gaming beast that’s known for its performance, style, and power. Let’s dig into the steps to get this done!
Before starting with the installation process, make sure that your system is prepared for it. If you are currently using another operating system, back up any necessary files and ensure that you have the required permissions to install a new operating system.
After the installation is complete, restart your computer.
Once the system is ready and you are logged into Fedora, it’s time to disable the WiFi power saving mode. This mode can sometimes interfere with your WiFi connection, especially during heavy network usage.
Open the terminal and enter the following command to create a new configuration file:
sudo vi /etc/NetworkManager/conf.d/wifi-powersave-off.conf
Inside the file, write:
[connection] wifi.powersave = 2
Save and close the file.
Next, restart the NetworkManager service with:
sudo systemctl restart NetworkManager
In order to make the most out of your Asus ROG Strix hardware, we will install some additional utilities. The first step is to add the Asus-linux repository:
sudo dnf copr enable lukenukem/asus-linux
Now, install the Asus-linux utility and make sure your system is up to date:
sudo dnf install asusctl supergfxctl sudo dnf update --refresh
After the installation, enable the supergfx service:
sudo systemctl enable supergfxd.service
Then, start the service:
sudo systemctl start supergfxd
Install the ROG Control Center (GUI) to have a graphical interface for the Asus ROG utilities:
sudo dnf install asusctl-rog-gui
To further enhance your user experience, install some GNOME extensions. One particular extension we recommend is ‘supergfxctl-gex’. You can install it from this link.
That’s it! You have now installed Fedora Linux on your Asus ROG Strix and configured it for optimal use. The system is now ready for you to explore and conquer. Enjoy the power of Linux!
Switch GPU modes
supergfxd.mode=
. Capitalisation does not matter.GPU Modes | Command |
---|---|
Integrated | supergfxctl –mode Integrated |
Hybrid | supergfxctl –mode Hybrid |
VFIO | supergfxctl –mode Vfio |
AsusEgpu | supergfxctl –mode AsusEgpu |
AsusMuxDgpu | supergfxctl –mode AsusMuxDgpu |
killall gnome-software rm -rf ~/.cache/gnome-software
References
https://www.linuxuprising.com/2019/03/fix-gnome-software-stuck-with-software.html
rm -r ~/.wine
sudo dnf install wine-core.i686
sudo dnf install winetricks
export WINEARCH=win32
wineboot --init
winetricks
References
https://www.reddit.com/r/Fedora/comments/8m54ju/32bit_wine_for_steam/
https://forum.manjaro.org/t/wine-could-not-load-kernel32-dll-status-c0000135/69811/2
sudo dnf install samba sudo systemctl enable smb --now firewall-cmd --get-active-zones sudo firewall-cmd --permanent --zone=FedoraWorkstation --add-service=samba sudo firewall-cmd --reload
Samba does not use the operating system users for authentication, so your user account must be duplicated in Samba. So if your account is jane on the host, the user jane must also be added to Samba. While the usernames must match, the passwords can be different.
sudo smbpasswd -a jane
mkdir /home/jane/share sudo semanage fcontext --add --type "samba_share_t" ~/share sudo restorecon -R ~/share
sudo nano /etc/samba/smb.conf
[share] comment = My Share path = /home/jane/share writeable = yes browseable = yes public = yes create mask = 0644 directory mask = 0755 write list = user
sudo systemctl restart smb
Disable SELinux if required
sudo nano /etc/selinux/config
SELINUX=disabled
sudo reboot
References
https://docs.fedoraproject.org/en-US/quick-docs/samba/
https://www.cyberciti.biz/faq/disable-selinux-on-centos-7-rhel-7-fedora-linux/