Run a Wine installed application from command line

If you are using wine installed from the repositories then wine related files is stored in a folder called ~/.wine

Windows programs are stored within this folder – for example :

~/.wine/drive_c/program_files/Internet Explorer

You can start a windows program in a similar way as from a command line in windows but prefix it with wine

wine "c:\program files\internet explorer\iexplore.exe"

References
https://askubuntu.com/questions/65487/invoke-a-wine-installed-application-from-command-line

Configuring IP Networking with ifcfg Files

Configuring an Interface with Static Network Settings Using ifcfg Files
For example, to configure an interface with static network settings using ifcfg files, for an interface with the name enp1s0, create a file with the name ifcfg-enp1s0 in the /etc/sysconfig/network-scripts/ directory, that contains:

DEVICE=enp1s0
BOOTPROTO=none
ONBOOT=yes
PREFIX=24
IPADDR=10.0.1.27

Configuring an Interface with Dynamic Network Settings Using ifcfg Files

DEVICE=em1
BOOTPROTO=dhcp
ONBOOT=yes

References
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-configuring_ip_networking_with_ifcg_files

Controlling Dell Laptop Keyboard Backlight in Linux

Show the configured brightness

cat /sys/devices/platform/dell-laptop/leds/dell\:\:kbd_backlight/brightness
0

See the maximum brightness

cat /sys/devices/platform/dell-laptop/leds/dell\:\:kbd_backlight/max_brightness
4

Set the desired level of brightness

$ echo 4 | sudo tee /sys/devices/platform/dell-laptop/leds/dell\:\:kbd_backlight/brightness

References
https://askubuntu.com/questions/1076393/dell-keyboard-backlight-is-not-working
https://www.unixtutorial.org/controlling-dell-laptop-keyboard-backlight-from-command-line/

Create a Samba share on Fedora

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/

Trust the ASP.NET Core HTTPS development certificate on Fedora

sudo dnf install nss-tools

Setup Firefox

echo 'pref("general.config.filename", "firefox.cfg");
pref("general.config.obscure_value", 0);' > ./autoconfig.js

echo '//Enable policies.json
lockPref("browser.policies.perUserDir", false);' > firefox.cfg

echo "{
    \"policies\": {
        \"Certificates\": {
            \"Install\": [
            	\"aspnetcore-localhost-https.crt\"
            ]
        }
    }
}" > policies.json

dotnet dev-certs https -ep localhost.crt --format PEM

sudo mv autoconfig.js /usr/lib64/firefox/
sudo mv firefox.cfg /usr/lib64/firefox/
sudo mv policies.json /usr/lib64/firefox/distribution/
mkdir -p ~/.mozilla/certificates
cp localhost.crt ~/.mozilla/certificates/aspnetcore-localhost-https.crt

Trust Edge/Chrome

certutil -d sql:$HOME/.pki/nssdb -A -t "P,," -n localhost -i ./localhost.crt
certutil -d sql:$HOME/.pki/nssdb -A -t "C,," -n localhost -i ./localhost.crt

Trust dotnet-to-dotnet

sudo cp localhost.crt /etc/pki/tls/certs/aspnetcore-localhost-https.pem
sudo update-ca-trust

Cleanup

rm localhost.crt

References
https://docs.microsoft.com/en-us/aspnet/core/security/enforcing-ssl?view=aspnetcore-6.0&tabs=visual-studio#trust-https-certificate-on-linux
https://github.com/dotnet/aspnetcore/issues/32842
https://github.com/dotnet/aspnetcore/issues/32361