vineri, 7 februarie 2025

Kitty SSH Issue: No Output in top and htop Error

With Kitty, the top command in SSH shows nothing. I tried htop, but it returned an error.

What I did: Googled the issue and looked for a better solution.

Solution 1: Directly in the SSH terminal session:

TERM=xterm top

Solution 2: Add to local .ssh/config file

SetEnv TERM=xterm

miercuri, 29 ianuarie 2025

One conclusion as a project manager

Before my experience as a project manager, I had thought that you knew the details of how to perform a task only if you had implemented it yourself. However, I have discovered another aspect. If you closely participate in the implementation process of a task carried out by someone else—engaging in discussions about progress, problems, taking notes, etc.—you also gain detailed knowledge of how to implement it.

In conclusion, my initial assumption was not the minimal conclusion in terms of the level of detail required. The minimal level is having a good level of communication and involvement in the process.

duminică, 26 ianuarie 2025

How do I make a Docker container start automatically on system boot?

I have a Redis/Redis Stack container that I would like to start automatically at system boot. Since it is already running, I needed command

docker update --restart=always aa6daa0d965e
However, if it is starting for the first time, I use command
docker run --restart=always

There is also a third option: transform the container into a service and manage it with systemctl: https://stackoverflow.com/a/39493500/2806801.

 

duminică, 19 ianuarie 2025

java.net.UnknownHostException: host.docker.internal

There is no host.docker.internal provided by default on Linux. On macOS and Windows, Docker Desktop creates a virtual network bridge and provides host.docker.internal as a hostname to allow containers to communicate with the host system. However, Linux uses a different approach for container networking, so host.docker.internal is not automatically provided.

One solution is to use the host's IP address. Run the command ip addr show docker0 to find the IP address of the Docker bridge network. It is usually 172.17.0.1.


 

Downgrading Automatically Upgraded Packages in Arch Linux

 

After the last upgrade of Arch Linux using pacman -Syu, PostgreSQL failed to start, displaying an error indicating that the database was in an outdated format. This meant that I had inadvertently upgraded PostgreSQL from one major version to another without first exporting the database as a precaution.

Fortunately, I found this article: How to Downgrade Packages in Arch Linux, and the following steps resolved my problem:

yay -S downgrade

sudo downgrade postgresql    

duminică, 12 ianuarie 2025

OpenVPN Connecting but No Internet Access on Arch Linux

 Here is an answer: AskUbuntu: OpenVPN Connecting but No Internet Access

On my system running Cinnamon with Network Manager, I followed these steps:

  1. Open Network Settings.
  2. Edit the settings for the specific VPN connection.
  3. Under IPv4, scroll down and check the option "Use this connection only for resources on its network".
  4. Under IPv6, scroll down and check the option "Use this connection only for resources on its network".
  5. Click Apply.

This resolved the issue for me.

sâmbătă, 11 ianuarie 2025

No Password Prompt for VPN? How I Fixed It on Arch Linux

Yesterday, I upgraded packages on my Arch Linux system. Today, I noticed that the VPN refused to connect. There were no error messages, but the dialog to enter the password didn’t appear. I discovered that Arch Linux (and possibly most modern Linux distributions) no longer uses `/var/log/syslog` or `/var/log/messages`.  
To debug, I used the following command (https://wiki.archlinux.org/title/Systemd/Journal#Filtering_output):  

journalctl --since "2 min ago"
I found the error:  
Jan 10 15:45:56 myarch NetworkManager[487]: <warn> ...  secrets: failed to request VPN secrets #3: No agents were available for this request.


I searched Google for the error and came across these helpful links:  
Unix Stack Exchange: Failed to request VPN secrets #3 
Arch Linux Forums: Failed to request VPN secrets 
 

The solution I found was to "Store the password for all users."  In my case, this translates to the following steps:  
1. Open Network Settings.  
2. Edit the VPN connection.  
3. Go to the Identity section.  
4. Click the dropdown to the right of the password field.  
5. Select Store the password for all users.  
Additionally, I discovered that logs specific to NetworkManager can be viewed with:  

journalctl -u NetworkManager

I also found that I can see all NetworkManager connections using nmcli command or listing the content of the directory /etc/NetworkManager/system-connections/. Then try to start that connection:

nmcli conn up <my-vpn-config>

Then I saw this message

You need to authenticate to access the Virtual Private Network “my-vpn-config”.
Warning: password for 'vpn.secrets.password' not given in 'passwd-file' and nmcli cannot ask without '--ask' option.
Error: Connection activation failed: No valid secrets
Hint: use 'journalctl -xe NM_CONNECTION=453a0f43-dc10-4557-b524-a762c99833d4 + NM_DEVICE=wlp3s0' to get more details. 
Thus
nmcli conn up <my-vpn-config> --ask

also solved the issue.

A more general solution

sudo pacman -S gnome-keyring 

Etimologia zilelor săptămânii

Această postare a apărut când exersam zilele săptămânii împreună cu fiica mea în engleză și am observat că atât ea, cât și eu ne amintim mai greu cum se spune joi în engleză. Am înțeles că este din cauză că nu avem asociații cu Thursday. Așa că m-am gândit că ar fi bine să investighez puțin. Întrebarea a fost: în română, zilele săptămânii provin de la denumirile planetelor (sau ale zeilor ale căror nume le poartă planetele). Dar în engleză? Aici m-a ajutat prietenul meu, care mi-a oferit un punct de pornire și mi-a spus că Thursday vine de la zeul Thor, iar Friday de la zeița Frigg (soția lui Odin).

English Monday Tuesday Wednesday Thursday Friday Saturday Sunday

The Moon Týr Odin (also known as 'Woden') Thor Frigg Saturn The Sun
Română Luni Marți Miercuri Joi Vineri Sâmbătă Duminică

Lunae dies („Ziua Lunii”) Marte Mercur Jupiter Venus Saturn Dies Dominicus („Ziua Domnului”)

Týr este zeul războiului (precum e Marte la romani).

Surse: