- go to the “Editor→Open/Save→Modes and file types” section and hit the [New] button.
- in the name section well… you put a name (maybe “NFO”? )
- in the variables section you put “kate: encoding cp437;”
- in the File extensions section you put “*.nfo”
- hit [OK], restart Kate and open your NFO. VOILA!
Category Archives: Uncategorized
Checking the file system calls made by a process
strace -f -e trace=file dpkg-reconfigure >/tmp/dkms.log 2>&1
Systemd: Setup a static IP Address
Create new file /etc/systemd/network/eth0.network.
[Match]
Name=eth0
[Network]
Address=192.168.100.2/24
Gateway=192.168.100.1
DNS=192.168.100.1systemctl enable systemd-networkd.service
Better flags for makepkg.conf Samsung Chromebook 2 XE503C32
CFLAGS="-mcpu=cortex-a15.cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -O2 -pipe -ffast-math -ftree-vectorize -mvectorize-with-neon-quad -fstack-protector --param=ssp-buffer-size=4" CXXFLAGS="-mcpu=cortex-a15.cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -O2 -pipe -ffast-math -ftree-vectorize -mvectorize-with-neon-quad -fstack-protector --param=ssp-buffer-size=4" LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" #-- Make Flags: change this for DistCC/SMP systems MAKEFLAGS="-j8"
Manually connect to wifi in a terminal
Find wireless device
iwconfig
Bring it up
ip link set mlan0 up
Scan
iwlist mlan0 scan |less
Set up wpa_supplicant
wpa_passphrase ESSID PASSWORD > /etc/wpa_supplicant/my.conf
Connect
wpa_supplicant -Dwext -imlan0 -c/etc/wpa_supplicant/my.conf -B
If your lucky dhcpcd ! other set ip addr and route
dhcpcd mlan0 ip addr add 192.168.1.212/24 broadcast 192.168.1.255 dev mlan0 ip route add default via 192.168.1.1 echo "nameserver 1.1.1.1" > /etc/resolv.conf
manually bring up network on eth0
ip link set eth0 up ip addr add 192.168.1.100/24 broadcast 192.168.1.255 dev eth0 ip route add default via 192.168.1.1 echo "nameserver 1.1.1.1" > /etc/resolv.conf
Or
ifconfig eth0 up ifconfig eth0 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255 route add default gw 192.168.1.1 echo "nameserver 1.1.1.1" > /etc/resolv.conf
Restore my rsnapshot backups
From the root folder of the backup (take away the -n dryrun to make changes, but run with first to test)
sudo rsync -avxXAHn --exclude=dev/ --exclude=sys/ --exclude=proc/ --exclude=run/ --exclude=lost+found --delete * root@IPADDRESS:/
Only console users are allowed to run the X server
It used to be enough to create /etc/X11/Xwrapper.config with the following in it
allowed_users = anybody needs_root_rights = no
That is no longer enough. So patch X.
Place this following in /etc/portage/patches/x11-base/xorg-server/console.diff
(version 1.20.8 tested but probably works on others ?)
If you’re not using Gentoo then you should be 😉
You’ll need to google how to patch and compile packages on your distro.
diff -Naur a/hw/xfree86/xorg-wrapper.c b/hw/xfree86/xorg-wrapper.c --- a/hw/xfree86/xorg-wrapper.c 2020-03-29 21:21:15.000000000 +0100 +++ b/hw/xfree86/xorg-wrapper.c 2020-05-22 14:23:59.825069376 +0100 @@ -206,29 +206,6 @@ parse_config(&allowed, &needs_root_rights); - /* For non root users check if they are allowed to run the X server */ - if (getuid() != 0) { - switch (allowed) { - case ROOT_ONLY: - /* Already checked above */ - fprintf(stderr, "%s: Only root is allowed to run the X server\n", argv[0]); - exit(1); - break; - case CONSOLE_ONLY: - /* Some of stdin / stdout / stderr maybe redirected to a file */ - for (i = STDIN_FILENO; i <= STDERR_FILENO; i++) { - if (on_console(i)) - break; - } - if (i > STDERR_FILENO) { - fprintf(stderr, "%s: Only console users are allowed to run the X server\n", argv[0]); - exit(1); - } - break; - case ANYBODY: - break; - } - } #ifdef WITH_LIBDRM /* Detect if we need root rights, except when overriden by the config */
dkimproxy ignores user settings
Very useful, but unmaintained, dkim email message signing program.
All the time I’ve been using it the sysvinit script to start it has been a mess and various workarounds are needed. With the refusal to accept a different location for private.key being particularly annoying.
At least on debian and ubuntu thisis the case.
Even though you are supposed to be able to override default settings in
/etc/dkimproxy/dkimproxy_out.conf it does not happen.
This is only for dkimproxy.out because that’s all I use but should be adaptable to dkimproxy.in
To do
Mask the sysvinit script. (even though there’s currently no service file for dkimproxy the below still works).
systemctl mask --now dkimproxy.service
Create /etc/systemd/system/dkimproxy-out.service
[Unit] Description=dkimproxy.out slightly more sane After=network.target [Service] Type=forking User=dkimproxy ExecStart=/usr/sbin/dkimproxy.out --conf_file=/etc/dkimproxy/dkimproxy_out.conf ExecStop=/bin/kill -15 $MAINPID Restart=always RestartSec=3 [Install] WantedBy=multi-user.target
Create (or edit) /etc/dkimproxy/dkimproxy_out.conf with options of your choosing which will now be honoured.
user dkimproxy group dkimproxy min_servers 2 min_spare_servers 1 listen 127.0.0.1:10027 relay 127.0.0.1:10028 domain xxxx.co.uk,bbbb.com signature dkim method relaxed keyfile /etc/dkimproxy/private.key selector selector1 daemonize
Enable and start.
systemctl enable --now dkimproxy-out.service
GTA 5 Proton – Rockstar Launcher stuck
protontricks -c 'wine /media/raid2/Steam/steamapps/compatdata/271590/pfx/drive_c/Program\ Files/Rockstar\ Games/Launcher/Launcher.exe' 271590