Zum Hauptinhalt springen

utils

Get the whole command for a process

ps -eo args

root@228b9cf33c7e:/src# ps -eo args
COMMAND
/usr/bin/tini -- jupyter notebook --port=8888 --no-browser --ip=0.0.0.0 --allow-root --NotebookApp.allow_origin='*'
/usr/bin/python3 /usr/local/bin/jupyter-notebook --port=8888 --no-browser --ip=0.0.0.0 --allow-root --NotebookApp.allow_origin='*'
bash
ps -eo args
root@228b9cf

Arch Linux Pacman broken signature

The error "failed to commit transaction (invalid or corrupted package (PGP signature))" indicates an issue with the integrity or authenticity of the downloaded package, specifically concerning its PGP signature. This often occurs when the system's package signing keys are outdated or corrupted, preventing proper verification of the package's origin and integrity. To resolve this issue, the following steps can be taken: Update the Arch Linux keyring: This ensures that the system has the latest package signing keys from Arch Linux.

    sudo pacman -Sy archlinux-keyring

Initialize and populate the pacman keyring: This rebuilds and populates the local keyring with trusted keys.

    sudo pacman-key --init
sudo pacman-key --populate

Refresh the PGP keys: This updates the local keyring with the latest keys from the key servers.

    sudo pacman-key --refresh-keys

Clean the pacman cache: Removing corrupted or incomplete package files from the cache can prevent further issues.

    sudo pacman -Scc

Attempt the package installation/update again: After performing the above steps, retry the operation that initially failed.

    sudo pacman -Syu

If the issue persists, consider checking the system clock for accuracy, as an incorrect time can sometimes interfere with PGP signature validation. In rare cases, a problematic mirror may be providing corrupted package files, in which case switching to a different mirror might be necessary.

SSH X Forwarding

  1. In order to use SSH XForwarding, enable on the host /etc/ssh/sshd_config
X11Forwarding yes
  1. If using android mobile phone, open the XServer XSDL app

Grab the DISPLAY string, like:

export DISPLAY=192.168.0.71:2

Usually it is composed by the IP address of the connecting machine.

  1. Connect to the host via SSH using the -X flag, like:
ssh -X git@gitlab.com -P 1122
  1. Paste the export DISPLAY string

  2. Open any X program you like.

It's done!

Pacman invalid signature

If you got the error:

:: Retrieving packages...
zlib-1:1.3.1-1-x86_64 downloading...
checking keyring...
checking package integrity...
error: zlib: signature from "Levente Polyak (anthraxx) <levente@leventepolyak.net>" is unknown trust
:: File /var/cache/pacman/pkg/zlib-1:1.3.1-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] Y
error: failed to commit transaction (invalid or corrupted package)
Errors occurred, no packages were upgraded.

Fix it by running:

pacman-key --refresh-keys