Posts

kde ksshaskpass ssh-agent plasma

Kubuntu 20.04 LTS 0. keys. put keys in $HOME/key folder (optional) make sure private key files permission is 400 or 600. (required), and file extension is ".key". 1. install ksshaskpass (mine is installed) $ sudo apt install ksshaskpass 2. add keys $HOME/.config/autostart-scripts/load-keys.sh file content: #!/bin/bash export SSH_ASKPASS=/usr/bin/ksshaskpass SSH_ASKPASS=/usr/bin/ksshaskpass ssh-add ~/key/*.key </dev/null Run this script manually once. It will ask for password if key file is password-protected, and it can save the password in kwallet so you won't need to input it again. 3. make load-keys.sh executable $ chmod +x $HOME/.config/autostart-scripts/load-keys.sh 4. load ssh-agent (not required on mine) (make it executable too) $ cat ~/.config/plasma-workspace/env/ssh-agent-startup.sh #!/bin/bash [ -n "$SSH_AGENT_PID" ] || eval "$(ssh-agent -s)" Reference https://newbedev.com/using-ssh-agent-with-kde https://dev.to/manekenpix/kde-plasma-s...

Xbox one controller Linux rpcs3 PS3

1. install xpadneo driver/utilities $ sudo apt install dkms git linux-headers-`uname -r` $ git clone https://github.com/atar-axis/xpadneo.git $ cd xpadneo/ $ sudo ./install.sh  $ sudo apt install joystick $ sudo aptitude install jstest-gtk $ jstest-gtk  2. memlock setting add these two lines to /etc/security/limits.conf or /etc/security.conf, reboot. * hard memlock unlimited * soft memlock unlimited 3. download rpcs3 4. download PS3 firmware

DELL U4320Q ddccontrol in Linux switch input

Device i2c number $ sudo ddccontrol -p | grep /dev/  - Device: dev:/dev/i2c-8 this is the device i2c number. switch input source $ sudo ddccontrol -r 0x60 -w 4883 dev:/dev/i2c-8 -r 0x60: this is the input source switch. 4883: target port. DP1  15 or 4879 DP2  16 or 4883 HDMI1  17 or 4881 HDMI2  18 or 4882 USB-C 4891 read current value $ sudo ddccontrol -r 0x60 dev:dev/i2c-8 you can get the current value this way, if you have a different monitor model. Reference https://github.com/ddccontrol/ddccontrol-db/blob/master/doc/how-to-add-a-monitor.md https://askubuntu.com/questions/860761/ubuntu-command-line-to-change-input-source-on-a-display-monitor

UEFI boot.

GPT: GUID分区表。 ESP: EFI System Partition. It is the place where UEFI will look for a boot loader. 一个专用分区,UEFI 会从这类分区搜索boot loader。 NVRAM: 是BIOS ROM中的一段区域,一般定义为64k byte, 现在EFI把所有的变量都存在这里。 boot loader: 启动引导器。让机器知道真正的要启动的系统所在。GRUB (grubx64.efi),Windows (bootmgfw.efi),SYSLINUX (syslinux.efi),都属于boot loader。 /EFI/Boot/bootx64.efi: UEFI fallback boot loader path,默认引导器路径。完整路径是\EFI\BOOT\BOOT{machine type short-name}.efi。当计算机没有引导条目或已存条目均无效时,尝试加载此文件。LiveCD和安装盘等就会用到这个文件。本文件其实就是grubx64.efi或者bootmgfw.efi,区别就是默认和指定的。 efibootmgr/Bcdedit: manipulate the UEFI Boot Manager。 创建和修改引导条目,保存在NVRAM。一般用于永久安装的系统,如安装好的Windows 10,而非安装盘或者LiveCD系统等。 常用路径 \EFI\boot\bootx64.efi \EFI\Miscosoft\Boot\bootmgfw.efi \EFI\Ubuntu\grubx64.efi \EFI\Ubuntu\shimx64.efi (secure boot) 查看NVRAM引导设置的命令: Linux: sudo efibootmgr -v Win10: bcdedit /enum firmware 参考: https://www.jianshu.com/p/a35d42daf010 https://www.happyassassin.net/posts/2014/01/25/uefi-boot-how-does-that-actually-work-then/ https://wiki.syslinux.org/wiki/index.php?...

Organize my music files.

FLAC to ALAC: $ ffmpeg -y -i source.flac -acodec alac -vcodec copy dest.m4a APE to ALAC: $ ffmpeg -y -i source.ape -acodec alac -vcodec copy dest.m4a cut using CUE $ ffcuesplit.py album.cue .py file is in https://gist.github.com/frabad/5e4505b9f6e6c0ffb29e4fdb5a05c76e ReplayGain $ rgbpm2 folder1 executables are in this git repo:  https://github.com/Moonbase59/loudgain

Nginx in Docker, IPv6 with routed prefix.

I don't want to waste my IPv6 routed prefix. Some background story first. I applied for an IPv6 tunnel broker and they assigned me a /64 routed prefix ( read the post ). How to use it? Of course, docker containers. So I grab the nginx image and run containers with IPv6 support, access with public v6 IP or a domain name. The question remains: Why do we still use IPv4??? HOW-TO In the docker documentation, it recommends creating new networks instead of using those default ones (bridge/host/none). So I follow the instruction and create a bridge network for my IPv6 routed prefix.  0. IP Forwarding Note, IP forwading is required, and you can enable it by (with root!) # echo 1 > /proc/sys/net/ipv6/conf/all/forwarding  1. Create docker network. 2001:db8:1f19:242::/64 is the routed prefix I want to use with docker and I named the network nginxipv6. $ docker network create  -d bridge --ipv6 nginxipv6 \         --subnet "2001:db8:1f19:242::/64" \   ...

IPv6 over IPv4 in an OpenVZ VPS, using Tunnel Broker.

IPv4 only OpenVZ VPS, how to gain access to IPv6? Short answer: Tunnel! I use  TunnelBroker . TunnelBroker generously provides 5 free tunnels. I have an VPS with only public IPv4 addresses, but I would like to access another VPS with only IPv6 address. So we need some help here, a proxy that encapsulates IPv6 data in an existing IPv4 connections and transfer it to a host which has both IPv4 and IPv6, and process the IPv6 request in that host, and return the result. PS. The client has to be able to process IPv6, e.g. set up an IPv6 address. Architect This setup requires a host with public IPv4+IPv6 and I will name the host 'tunnel server' afterwards. The client host and the tunnel server are connected via an IPv4 tunnel. All IPv6 data will be encapsulated in IPv4 packets and transferred through this tunnel. The tunnel server receives and  de-encapsulates the IPv4 packet, gets the IPv6 request, processes it and get the result, encapsulates in IPv4 and transfers the result b...