Wednesday, May 22, 2024

Arch Linux bspwm install

sudo pacman -S bspwm sxhkd polybar picom dmenu dunst nitrogen alacritty thunar

 cd $HOME/.config

mkdir bspwm sxhkd polybar picom dunst

cp /usr/share/doc/bspwm/examples/bspwmrc bspwm/

cp /usr/share/doc/bspwm/examples/sxhkdrc sxhkd/

cp /etc/xdg/picom.conf picom/

cp /etc/polybar/config.ini polybar/

cp /etc/dunst/dunstrc dunst/

cd bspwm/

ls

chmod +x bspwmrc

nano bspwmrc

[delete bspc rule lines...add next lines...]

sxhkd &

picom --config $HOME/.config/picom/picom.conf &

nitrogen --restore &

dunst &

polybar &


[save and exit nano by press CTRL+O, enter, CTRL+X]


cd..

ls

cd sxhkd/

ls

nano sxhkdrc


[change next lines to...]


super + Return

        alacritty 


super + d

        dmenu_run


super + w

        firefox


super + e

        thunar


[save and exit nano by press CTRL+O, enter, CTRL+X]


https://makingcircuits.com/blog/spy-circuits-fm-bug-transmitters/

https://makingcircuits.com/blog/20-best-ic-741-based-diy-circuits/

https://electronics-diy.com/micro-transmitter-bug.php



Ne dozvoli da ono gde si sada postane plafon onoga što možeš postići!


Saturday, May 18, 2024

Weston (Wayland) on Void Linux

 https://store.comet.rs/Catalogue/Product/5600028/#e30%3D

**

sudo xbps-install weston
sudo usermod -a -G weston-launch `whoami`

Reboot to update the group assignment.

Now we can prepare the config. Let's create the file:

mkdir -p ~/.config
nano ~/.config/weston.ini

Then put something like this below. Change as you need.

[core]
xwayland=true

[keyboard]
keymap_layout=gb

[output]
name=LVDS1
mode=preferred
#mode=1680x1050
#transform=90

[launcher]
icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png
path=/usr/bin/weston-terminal

[launcher]
icon=/usr/share/icons/hicolor/24x24/apps/firefox.png
path=/usr/bin/firefox

Then run from a tty:

weston-launch

If any error is shown for XDG_RUNTIME_DIR, then run:

mkdir -p /tmp/westontmp
export XDG_RUNTIME_DIR=/tmp/westontmp

Press Ctrl+Alt+Backspace to logout. Super+Tab to switch between apps. Other basic keyboard shortcuts here.

Ref:












Tuesday, May 14, 2024

Tutorial = How to install LXQt on Void Linux

 root

voidlinux


void-installer

xbps-install void-repo-nonfree void-repo-multilib void-repo-multilib-nonfree

xbps-install -Su

xbps-install -S xorg nano htop lightdm

xbps-install -S pipewire wireplumber 

[in case that sound not working= ]

xbps-install -S pulseaudio pavucontrol 

xbps-install -S pipewire-devel alsa-pipewire


xbps-install -S lxqt


xbps-install -S firefox

xbps-install -S libreoffice pcmanfm lxterminal




If startx not working, just try this=


cp /etc/X11/xinit/xinitrc ~/.xinitrc

nano ~/.xinitrc


startlxqt &
exec dbus-launch --exit-with-session



[CTRL] + O

[Enter]

[CTRL] + X

...Done... Enjoy in your new system! 

...

Oh, you must to do this as #root first=

ln -s /etc/sv/lightdm /var/service/

ln -s /etc/sv/lightdm /var/service/lightdm

xbps-install dbus

ln -s /etc/sv/dbus /var/service/dbus

xbps-install -S acpid

ln -s /etc/sv/acpid /var/service/acpid

xbps-install seatd

usermod -aG _seatd $USER

ln -s /etc/sv/seatd /var/service/seatd




startx


MORE TIPS=

Use sudo for ordinary user, or su to take root rights.

You can use sudo poweroff command to shutdown system. Or just poweroff, if you are a root.

You can use sudo reboot command to reboot system. Or just reboot, if you are a root.




Friday, May 3, 2024

Smart cards on Linux





 [[opensc card inspection


$ pcsc_scan


$ pkcs11-tool --list-slots


$ pkcs11-tool --list-objects --login


[[atomic operations, download certificate from a smartcard and show its content


$ pkcs11-tool --list-object --id 01 --type cert \

    --output-file cert.der


$ openssl x509 -inform DER -in cert.der > cert.pem


$ openssl x509 -inform DER -in cert.pem -text


$ pkcs11-tool --sign -id 01 --mechanism RSA-PKCS --login \

    --input-file data --output-file data.sig


$ openssl rsautl -verify -certin -inkey cert.pem \

    -in data.sig


[[openssh client

[[List public keys on the smart card in OpenSSH format


$ ssh-keygen -D /usr/lib64/pkcs11/opensc-pkcs11.so

ssh-rsa AAAAB3..............................Q==


[[Install the keys to the server

[[Connect to server


$ ssh -I /usr/lib64/pkcs11/opensc-pkcs11.so example.com

Enter PIN for 'PIV_II (PIV Card Holder pin)':


[[Store permanent configuration in client configuration


$ cat ~/.ssh/config

Host example.com

  PKCS11Provider /usr/lib64/pkcs11/opensc-pkcs11.so

[[RSA keys only (OpenSSH bug #2474)


[[OpenSSH Client (SSH-Agent)


[[Start ssh-agent (does not work with gnome-keyring):


$test -e "$SSH_AUTH_SOCK" || eval $(ssh-agent)


[[Add a card:


$ ssh-add -s /usr/lib64/pkcs11/opensc-pkcs11.so

Enter passphrase for PKCS#11:

Card added: /usr/lib64/pkcs11/opensc-pkcs11.so


[[Connect to server:


$ssh example.com


[[SUDO (PAM_SSH_AGENT_AUTH)


[[Set up ssh-agent as in previous slide


[[Store public key in /etc/security/authorized_keys


[[Configure sudo through pam:


$cat /etc/pam.d/sudo

...

auth sufficient pam_ssh_agent_auth.so \

     file=/etc/security/authorized_keys


[[Even on remote hosts (forwarded ssh-agent)


[[TLS Client authentication


[[Firefox > Preferences > Privacy&Security > Security > Security Devices > Load


[[Concurrent access


[[Configuration opensc.conf


drivers = PIV-II; # speed up detection and avoid mismatches

reader_driver pcsc {

    disconnect_action=leave; # do not break concurrent sessions

}


[[OpenSSH ssh-agent: long-running session

eval "ssh-agent" && ssh-add -s /usr/lib64/opensc-pkcs11.so

ssh example.com


[[pkcs11-tool: ad-hoc commands


pkcs11-tool --login --sign --id02 -mRSA-PKCS -i data -o data.sig


[[Some application require exclusive access (GnuPG sdaemon) :(

[[More applet on a single card = problems


[[GNUPG


[[Email,git commit signing

[[GnuPG's scdaemon

 [not using PKCS#11 to access OpenPGP applets

 [directly accessing PC/SC with exclusive access

 [preventing other application to use the card

[[gnupg-pkcs11-scd

 [Accessing card using PKCS#11

 [More complicated configuration


[[Troubleshooting smartcard


[[Is the reader/USB device detected?

$ lsusb


[[Is the card detected in pcsc-lite?

$ pcsc_scan


[[PCSC trace (APDU messages)

$ systemctl stop pcscd

$ sudo LIBCCID_ifdLogLevel=0x000F pcscd --foreground --debug --apdu --color


[[Is the card detected in OpenSC?

 pkcs11-tool -L


[[PKCS#11 level trace:


 export PKCS11SPY=/usr/lib64/pkcs11/opensc-pkcs11.so

 pkcs11-tool -L /usr/lib64/pkcs11-spy.so


[[OpenSC debug logs:

OPENSC_DEBUG=9 pkcs11-tool -L


MORE TIPS=

Some older versions of Adobe software can work in Wine (PlayOnLinux, Bottles) under Linux as well as on Windows.

Modern gaming is possible on Linux (Proton, Lutris, Steam), some games are much better than on Windows.

Firefox, Thunderbird, Libre Office, Inkscape, Gimp, YouTube, FreeTube, VLC, Zoom, Microsoft Teams, OBS, Microsoft Visual Studio Code, Kdnlive, OpenShot, Shotcut, Flowblade, Lightworks, Blender, Cinelerra GG Infinity, DaVinci Resolve, VidCutter, can working on Linux in the latest and greatest versions.

You can bury Windows without any regrets. Losses are minimal. The advantages of Linux are very big today.

After all, you can install full blooded Windows 11 in KVM or Oracle Virtual Box under Linux.

Windows 11 working much better under Linux in virtual environment.