Friday, July 19, 2024

gentoo cups "Unable to print test page: No such file or directory"

Had to install net-print/cups-filters

gentoo arch-chroot not working for gui appliacations

chroot from gentoo to arch:


XAUTHORITY=/root/.xauthcOumRQ arch-chroot /mnt/arch/


More: https://unix.stackexchange.com/a/47579/90216 Use xauth info to find the correct XAUTHORITY file path.

Fedora LXQT autologin

Edit /etc/sddm.conf
Add

[Autologin]
User=USERNAME
Session=DENAME.desktop
Relogin=false

where DENAME must be replaced with the name of one of the files found under /usr/share/xsessions/ or /usr/share/wayland-sessions/
More at : https://wiki.debian.org/SDDM#Enable_autologin

Thursday, July 18, 2024

Gentoo xfce4 udisks2 can't mount usb without root

As explained in https://unix.stackexchange.com/a/519979:

Just created `/etc/polkit-1/rules.d/50-udisks.rules` with
polkit.addRule(function(action, subject) {
var YES = polkit.Result.YES;
var permission = {
// required for udisks1:
"org.freedesktop.udisks.filesystem-mount": YES,
"org.freedesktop.udisks.luks-unlock": YES,
"org.freedesktop.udisks.drive-eject": YES,
"org.freedesktop.udisks.drive-detach": YES,
// required for udisks2:
"org.freedesktop.udisks2.filesystem-mount": YES,
"org.freedesktop.udisks2.encrypted-unlock": YES,
"org.freedesktop.udisks2.eject-media": YES,
"org.freedesktop.udisks2.power-off-drive": YES,
"org.freedesktop.udisks2.filesystem-mount-system": YES,
// required for udisks2 if using udiskie from another seat (e.g. systemd):
"org.freedesktop.udisks2.filesystem-mount-other-seat": YES,
"org.freedesktop.udisks2.filesystem-unmount-others": YES,
"org.freedesktop.udisks2.encrypted-unlock-other-seat": YES,
"org.freedesktop.udisks2.encrypted-unlock-system": YES,
"org.freedesktop.udisks2.eject-media-other-seat": YES,
"org.freedesktop.udisks2.power-off-drive-other-seat": YES
};
if (subject.isInGroup("users")) {
return permission[action.id];
}
});

Friday, April 07, 2023

Monday, March 20, 2023

LibreOffice freezes on logo

Disable opengl: SAL_DISABLE_OPENCL=1 libreoffice

Monday, February 27, 2023

Linux: Copy all files from subdirectories into one folder

find zfiles/* -type f -mindepth 2 -print0 | xargs -0 cp -t ./sub1

Monday, December 19, 2022

ImageMagick: resize and ignore aspect ratio

for f in *.jpg; do echo $f; mogrify -resize 64x64\! -set colorspace Gray -separate -average $f; done

Wednesday, November 16, 2022

Arch: Install dotnet 6.0 and jupyter kernel

wget https://dot.net/v1/dotnet-install.sh
chmod +x ./dotnet-install.sh
./dotnet-install.sh --install-dir /usr/share/dotnet -channel STS -version 6.0.110
/usr/share/dotnet/dotnet tool install -g Microsoft.dotnet-interactive
/usr/share/dotnet/dotnet interactive jupyter install
Also add `/usr/share/dotnet` to `PATH`.
https://github.com/dotnet/interactive/blob/main/docs/NotebookswithJupyter.md
https://dotnet.microsoft.com/en-us/download/dotnet/6.0