From 72ea70cbb500e5e8247c05a58b22262203f84cf7 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Tue, 30 Dec 2025 17:40:29 +0100 Subject: [PATCH] update --- Tech/Flatpak/install.md | 24 ++++++++++++++ Tech/SteamDeck/README.md | 2 ++ Tech/SteamDeck/unlock.sh | 69 +++++++++++++++++++++++++++++++++------- Tech/bash.md | 62 ++++++++++++++++++++++++++++++++++++ index.md | 4 ++- 5 files changed, 149 insertions(+), 12 deletions(-) create mode 100644 Tech/Flatpak/install.md diff --git a/Tech/Flatpak/install.md b/Tech/Flatpak/install.md new file mode 100644 index 0000000..736840b --- /dev/null +++ b/Tech/Flatpak/install.md @@ -0,0 +1,24 @@ +# Install + +First, of course, you need to install Flatpak itself. + +Then: +* at least one repository +* possibly a gui installer +* an access rights management + +## Repository: Flathub + +`flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo` + +## GUI installers + +* plasma-discover (qt, but *not* on flatpak) +* [Warehouse (gtk)](https://flathub.org/fr/apps/io.github.flattool.Warehouse) +* [Easy Flatpak gtk?](https://flathub.org/fr/apps/org.dupot.easyflatpak) + +## Access rights management + +* [Flatseal](https://flathub.org/fr/apps/com.github.tchx84.Flatseal) + + diff --git a/Tech/SteamDeck/README.md b/Tech/SteamDeck/README.md index d4cff92..799a57c 100644 --- a/Tech/SteamDeck/README.md +++ b/Tech/SteamDeck/README.md @@ -4,3 +4,5 @@ Some scripts are also present here: * **fix_victor_vran.sh**: required commands to install deps for **Victor Vran** * **unlock.sh**: unlock the package installation system *pacman* + +/home/deck/.steam/root/config/uioverrides/ : boot movies diff --git a/Tech/SteamDeck/unlock.sh b/Tech/SteamDeck/unlock.sh index 84408f2..4e4bcbe 100755 --- a/Tech/SteamDeck/unlock.sh +++ b/Tech/SteamDeck/unlock.sh @@ -1,25 +1,72 @@ #!/bin/sh if [ "$USER" != root ]; then - echo Requires root access >&2 + echo "Requires root access (call passwd if needed first)" >&2 exit 2 fi +# +# systemctl stop docker.service +# systemctl stop docker.socket +# +# Docker: /lib/systemd/system/docker.service +# look for ExecStart=/usr/bin/dockerd -H fd...... +# add a "--data-root /new/path" before the -H +# copy /var/lib/docker there +# +# systemctl daemon-reload +# systemctl start docker +# +# add deck to the docker group +# + steamos-readonly disable +if [ "$1" = init ]; then + # How to disable sigs ? + # /etc/pacman.conf + # Under the [options] section, add the following line: + # SigLevel = Never + if ! grep -q "^SigLevel = Never" /etc/pacman.conf; then + sed -i "s:^\(SigLevel .*\):#\1\nSigLevel = Never:" /etc/pacman.conf + fi + pacman-key --init + pacman-key --populate archlinux + pacman -Sy + ( + echo '#!/bin/sh' + echo cat /etc/hostname + ) > /usr/local/bin/hostname + chmod a+rx /usr/local/bin/hostname + ln -s deck /home/user -if [ "$INIT" = 1 ]; then - pacman-key --init - pacman-key --populate archlinux - pacman -Sy -fi + ( + echo '#/bin/sh' + echo + echo 'mkdir -p /tmp/shared' + echo chown deck:deck /tmp/shared + echo true + ) > /etc/rc.local + chmod a+rx /etc/rc.local + ( + echo '[Unit]' + echo Description=Startup Script + echo + echo '[Service]' + echo ExecStart=/etc/rc.local + echo + echo '[Install]' + echo WantedBy=default.target + ) > /lib/systemd/system/startup.service + systemctl enable startup.service --now +fi pacman -S imagemagick +pacman -S mc +pacman -S inotify-tools pacman -S docker -pacman -S linux-neptune-61-headers # for VBox -pacman -S virtualbox virtualbox-host-dkms virtualbox-guest-iso - +#pacman -S linux-neptune-61-headers # for VBox +#pacman -S virtualbox virtualbox-host-dkms virtualbox-guest-iso steamos-readonly enable -modprobe vboxdrv +#modprobe vboxdrv -echo If it failed, you may want to try again with INIT=1 diff --git a/Tech/bash.md b/Tech/bash.md index fd9705a..b7a00c6 100644 --- a/Tech/bash.md +++ b/Tech/bash.md @@ -9,6 +9,12 @@ You may now use Ctrl+R again to search for the previous match. **Ctrl-X**, **Ctrl-E**: will open the current line in EDITOR. +## Terminal title + +```sh +echo -ne "\033]0;MY_NEW_TITLE\007" +``` + ## Arrays ```bash @@ -17,4 +23,60 @@ You may now use Ctrl+R again to search for the previous match. echo ${arr[@]} echo ${arr[*]} echo ... + copy=("${arr[@]}") ``` + +## Cursor + +### Hide cursor + +tput civis + +#### Cursor movement + +- Position the Cursor: + \033[;H + Or + \033[;f + puts the cursor at line L and column C. +- Move the cursor up N lines: + \033[A +- Move the cursor down N lines: + \033[B +- Move the cursor forward N columns: + \033[C +- Move the cursor backward N columns: + \033[D + +- Clear the screen, move to (0,0): + \033[2J +- Erase to end of line: + \033[K + +- Save cursor position: + \033[s +- Restore cursor position: + \033[u + +## Escape + +escape1() { + rul1='s:\\:\\\\:g' + rul2="s:':'\\\\'':g" + /bin/echo -nE "$1" | sed "$rul1;$rul2;" +} + +escape() { + # bashism: last part is to "cancel" empty, single argument + #builtin printf ' %q' "$@" | cut -c2- | sed "s:^''$::" + + # pure sh version for alpine and zimit and... + if [ "$*" != "" ]; then + while [ $# -gt 0 ]; do + /bin/echo -nE "'`escape1 "$1"`' " + shift + done + fi | sed 's: $::' + + echo +} diff --git a/index.md b/index.md index 0955af4..0aa61c9 100644 --- a/index.md +++ b/index.md @@ -4,7 +4,7 @@ Some documentation: * Politique: * [Le droit d'asile (France)](/Politique/Le%20droit%20d'asile%20pour%20les%20nuls) - * [Qu'est-ce qui cloche dans mon CV ? ](/Politique/Qu'est-ce%20qui%20cloche%20dans%20mon%20CV) + * [Qu'est-ce qui cloche dans mon CV ?](/Politique/Qu'est-ce%20qui%20cloche%20dans%20mon%20CV) * Quotes: * [Humans need lies](/Quotes/Humans%20need%20lies) * History: @@ -24,6 +24,8 @@ Some documentation: * [Force X11](/Tech/SteamDeck/force-x11) * [Docker](/Tech/SteamDeck/docker) * [SSH](/Tech/ssh) + * python: + * [Virtual Environments (venv)](/Tech/python/Virtual%20Environments%20(venv)) * [Web CSS](/Tech/web-css) * [MP4 Conversion](/Tech/mp4) * Raspi: -- 2.27.0