Wednesday, December 17, 2025

Gentoo: Please select pinentry-gnome3 as default pinentry provider

Create `/run/host/etc/portage/package.use/gcr` with the content of: app-crypt/gcr gtk
app-crypt/pinentry gtk

Then rebuild: `sudo emerge -avuDN @world`. Now `eselect pinentry list` should also list `pinentry-gnome3`. To select it:
sudo eselect pinentry set pinentry-gnome3

Tuesday, December 16, 2025

gentoo: install xdg-open

sudo emerge -av x11-misc/xdg-utils

gentoo: distrobox-host-exec on gentoo host does not do notthing

Have to install flatpak on gentoo host:
sudo emerve -av flatpak


https://github.com/89luca89/distrobox/issues/1198#issuecomment-1951056599

Oklular: Doesn't open epub files

yay -S ebook-tools kdegraphics-mobipocket

Monday, December 15, 2025

lsblk: list model name of hard drive

lsblk -o NAME,FSTYPE,LABEL,MOUNTPOINT,SIZE,MODEL

gentoo: VirtualBox can't operate in VMX root mode

sudo modprobe -r kvm_amd
sudo modprobe -r kvm_intel

Arch: Install matlab

mpm install --release=R2024b --destination=/mnt/b/opt/matlab MATLAB Parallel_Computing_Toolbox
https://wiki.archlinux.org/title/MATLAB

X forwarding from a distrobox on a remote host

X11 connection rejected because of wrong authentication.

Assuming ssh is set to allow X11Forwarding, on a remote host .Xauthority will be created. But if you enter a distrobox on the remote host, the file can't be found. So in distrobox, export `XAUTHORITY` to point to the host's .Xauthority
distrobox-enter archbox
export XAUTHORITY=/run/host/home/username-on-host/.Xauthority
xeyes
It also works same when waypipe is used.

tigervnc: Service deactivets immedietly after start

cd /etc/X11/Sessions
mv Xsession Xsession.backup
ln -s fluxbox Xsession

from: https://forums.gentoo.org/viewtopic-t-1150142.html

tigervnc: logs location

are in `~/.local/state/tigervnc`

Tuesday, December 09, 2025

waypipe: "Error: Can't open display:" when using waypipe in Fedora distrobox

In ssh inside distrobox enable ForwardX11:
sudo vim /etc/ssh/ssh_config

Enable ForwardX11
ForwardX11 yes

Sunday, December 07, 2025

Monday, December 01, 2025

wayvnc: WAYLAND_DISPLAY is not set in the environment

Run it with set WAYLAND_DISPLAY:


env WAYLAND_DISPLAY=wayland-1 wayvnc


Check in `/run/user/$UID` the number of active walyand session, e.g. 1 in `niri.wayland-1.1846.sock= `

Saturday, November 29, 2025

VNC: Applications in a vnc client (tigervnc) running fluxbox open in a Wayland host instead of the vnc client

In the vnc:

set -e XDG_RUNTIME_DIR
set -e DBUS_SESSION_BUS_ADDRESS


To do it automatically at the start add the following
to `.fluxbox/startup` before `exec fluxbox`:
unset XDG_RUNTIME_DIR
unset DBUS_SESSION_BUS_ADDRESS

exec fluxbox

Firefox crashes when opening through waypipe on Wayland

Run it without GPU:
``` waypipe --no-gpu ssh user@host firefox ```

Niri: share clipboard between Niri and Vnc

https://github.com/dnut/clipboard-sync
https://aur.archlinux.org/packages/clipboard-sync

Friday, November 28, 2025

Install Niri on Gnetoo

emerge -av gui-wm/niri gui-apps/waybar gui-apps/fuzzel gui-apps/mako gui-apps/xwayland-satellite xdg-desktop-portal xdg-desktop-portal-gnome

Tuesday, November 25, 2025

Arch: Krusader does not have open with menu

install yay xdg-desktop-portal-kde
and
cd /etc/xdg/menus
ls -Agl # to show the links in the directory as they are
sudo ln -sf ./plasma-applications.menu applications.menu
sudo ln -sf ./plasma-applications.menu gnome-applications.menu
sudo ln -sf ./plasma-applications.menu kde-applications.menu
ls -Agl # to see of they changed

https://forum.openmandriva.org/t/krusader-does-not-remember-file-associations/6449/13

Sunday, November 23, 2025

Linux: use FreeRDP instead of rdesktop



rdesktop -u "domain\userID" -a 16 -z -g 1850x1080 -r sound:local:pulse -r disk:b=/mnt/b ip_addr


xfreerdp3 /u:userID /d:domain /v:ip_addr -themes /dynamic-resolution /drive:/mnt/b,b

Friday, November 21, 2025

gentoo: No icons font in distrobox

install `fontawesome-fonts-all` fonts.

sudo emerge -av media-fonts/fontawesome

Fedora:
sudo dnf install fontawesome-fonts-all
Arch:
sudo pacman -S otf-font-awesome

Friday, November 14, 2025

Run KDE Menu Editor from a commandline

kmenuedit

Krusader: add user action to open distrobox terminal in the currently active folder

cd %aPath% && distrobox-host-exec bash -i

https://docs.kde.org/trunk5/en/krusader/krusader/useractions.html


cd %aPath% && distrobox-host-exec bash -i

Sunday, November 09, 2025

podman: container cannot bind to priviliged port 631 (cups)

On the host, you can make 631 to be unproviliged
sudo sysctl -w net.ipv4.ip_unprivileged_port_start=631
https://stackoverflow.com/questions/413807/is-there-a-way-for-non-root-processes-to-bind-to-privileged-ports-on-linux/51439516#51439516

Saturday, November 08, 2025

udisks2: manual mount and unmount hard drives

For example: udisksctl mount -b /dev/sdb1
udisksctl unmount -b /dev/sdb1

Thursday, November 06, 2025

gentoo & xfce4: no authorized to mount hard drives

https://gist.github.com/Scrumplex/8f528c1f63b5f4bfabe14b0804adaba7

xfce by default uses https://packages.gentoo.org/packages/gnome-extra/polkit-gnome

If not automatically started, you can manually start it (as a user, not root):
/usr/libexec/polkit-gnome-authentication-agent-1

Wednesday, November 05, 2025

distrobox fedora

distrobox create --nvidia -i quay.io/fedora/fedora:42 -n fbox -H ~/home-fbox --init --additional-packages "systemd"
https://distrobox.it/compatibility/#Host-Distros

gentoo: reinstall packages after changing USE flags

emerge -avtDUu @world

Tuesday, November 04, 2025

distrobox: ublue-os/arch-distrobox

distrobox create --nvidia -i ghcr.io/ublue-os/arch-distrobox -n abox -H ~/home-abox --init --additional-packages "systemd"
https://github.com/ublue-os/arch-distrobox

Tuesday, October 28, 2025

LibreOffice: Use XLOOKUP instead of VLOOKUP

=IFERROR(XLOOKUP(C2,'file:///mnt/marks.ods'#$Sheet1.$C$2:$C$115,'file:///mnt/marks.ods'#$Sheet1.$AC$2:$AC$115,""),"")

Wednesday, October 08, 2025

vscodium in flatpak golang not found

Install SDK extensions:

flatpak install flathub org.freedesktop.Sdk.Extension.golang

and then set env variable `FLATPAK_ENABLE_SDK_EXT`:

#in fish in ~/.config/fish/config.fish
set -U FLATPAK_ENABLE_SDK_EXT 'golang'

https://gist.github.com/pojntfx/2e1ea30df020924e5d40f823adc6ae09

Thursday, August 14, 2025

Ansys 25 R2 and SolidWorks plugin not working

Create `SolidWorksAddIn_Ansys252.bat`:
@echo on
copy /Y "%AWP_ROOT252%\Framework\bin\Win64\Xalan-C_1_12.dll" "%AWP_ROOT252%\aisol\CADIntegration\SolidWorks\winx64"
copy /Y "%AWP_ROOT252%\Framework\bin\Win64\XalanMessages_1_12.dll" "%AWP_ROOT252%\aisol\CADIntegration\SolidWorks\winx64"
copy /Y "%AWP_ROOT252%\Framework\bin\Win64\xerces-c_3_2.dll" "%AWP_ROOT252%\aisol\CADIntegration\SolidWorks\winx64"
copy /Y "%AWP_ROOT252%\Framework\bin\Win64\zlib1.dll" "%AWP_ROOT252%\aisol\CADIntegration\SolidWorks\winx64"

and run as Administrator

Friday, August 08, 2025

pandoc: Word to markdown

pandoc input.docx -t markdown_strict -o output.md

Friday, August 01, 2025

Wednesday, July 30, 2025

Add Browser MCP to Claude Code

claude mcp add-json browsermcp '{ "type": "stdio", "command": "npx", "args": ["@browsermcp/mcp@latest"]}'
https://github.com/browsermcp/mcp

Wednesday, July 23, 2025

Linux: convert docx to markdown using pandoc

pandoc -f docx -t markdown_strict input.docx -o foo.md From: https://stackoverflow.com/a/33149947/248823

Thursday, June 19, 2025

Thursday, April 10, 2025

Friday, April 04, 2025

Thursday, March 27, 2025

Convert all pdf files to txt files

find . -name '*.pdf' -print0 | xargs -0 -n1 pdftotext