Wednesday, November 27, 2024

Linux: ollama chagne default model location

Stop ollama sertice
Run systemctl edit ollama.service.
Add the line Environment="OLLAMA_MODELS=/path/to/new/location" under the [Service] section.
Save and exit the editor.
start ollama sertice

Wednesday, September 25, 2024

Joni pdf files into one file using pdftk

pdftk base.pdf 1.pdf 2.pdf 3*.pdf output joined.pdf

Friday, September 13, 2024

Gentoo in Distrobox

Dockerfile:
FROM registry.hub.docker.com/gentoo/portage:latest AS build
FROM registry.hub.docker.com/gentoo/stage3:systemd AS base
COPY --from=build /var/db/repos/gentoo /var/db/repos/gentoo

docker build . -t gentoo-distrobox
distrobox create --image localhost/gentoo-distrobox:latest -n gbox -H ~/home-gbox Based on: https://github.com/ardasevinc/distrobox/blob/main/docs/distrobox_gentoo.md

Monday, September 09, 2024

Distrobox: archlinux with separate networking for installaion of VPN inside a dropbox

distrobox create --nvidia -i archlinux -n abox -H ~/home-abox --unshare-netns --init --additional-packages "systemd"

Sunday, September 08, 2024

Firefox open/save window does not show in flatpak

Make sure `xdg-desktop-portal-gtk` service is working and `xdg-desktop-portal-gtk` is disabled: https://reddit.com/r/flatpak/comments/z5nwhz/how_do_i_get_firefox_to_save_downloaded_files/ldwmadz/

Slow start Midnight Commander in distrobox

There are some issuse with mc's subshell in distrobox. You can start mc without it using mc --nosubshell or mc -u

Saturday, September 07, 2024

distrobox: arch linux with systemd

distrobox create --nvidia -i archlinux -n abox -H ~/home-abox --init --additional-packages "systemd"

Saturday, July 20, 2024

gentoo sane printer HP color Laser Jet Pro MFP M283fdw

Install `net-print/hplip` and make sure to set USE flags to include "scanner". Without that scanner will not work with xsane.

Friday, July 19, 2024

Gentoo printer manager missing in xfce4

Install
app-admin/system-config-printer

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 = {
// only required for udisks1:
"org.freedesktop.udisks.filesystem-mount": YES,
"org.freedesktop.udisks.filesystem-mount-system-internal": YES,
"org.freedesktop.udisks.luks-unlock": YES,
"org.freedesktop.udisks.drive-eject": YES,
"org.freedesktop.udisks.drive-detach": YES,
// only required for udisks2:
"org.freedesktop.udisks2.filesystem-mount": YES,
"org.freedesktop.udisks2.filesystem-mount-system": YES,
"org.freedesktop.udisks2.encrypted-unlock": YES,
"org.freedesktop.udisks2.eject-media": YES,
"org.freedesktop.udisks2.power-off-drive": YES,
// required for udisks2 if using udiskie from another seat (e.g. systemd):
"org.freedesktop.udisks2.filesystem-mount-other-seat": YES,
"org.freedesktop.udisks2.encrypted-unlock-other-seat": 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];
}
});