0%

Kubuntu 26.04 配置紀錄 (Kubuntu 26.04 Setup Notes)

本文將簡單記錄一些在 Kubuntu 26.04 上遇到的問題與解法。

藍牙鍵盤無法配對 (Bluetooth Keyboard Cannot Pair)

若系統無法成功配對藍牙鍵盤,通常是因為藍牙控制器的模式設定不正確。

Reference: Ubuntu 20.04 cannot pair Bluetooth Keyboard

解決步驟 (Solution Steps)

首先,檢查 /etc/bluetooth/main.conf 中的 ControllerMode 設定:

1
2
# Search for the ControllerMode configuration
grep "ControllerMode" /etc/bluetooth/main.conf

請根據搜尋結果進行以下調整:

  1. 若值不是 dual:請將其修改為 dual
  2. 若值為 dual 但行首有 #:請刪除 # 以取消註解。

完成修改後,重啟藍牙服務或電腦,系統應能正常搜尋到鍵盤。


鍵盤 Fn 鍵功能異常 (Keyboard Fn Key Not Working Correctly)

若 Fn 鍵預設觸發的是媒體鍵(音量、亮度等)而非功能鍵(F1-F12),可透過調整核心模組參數來修正。

臨時測試 (Temporary Testing)

執行以下指令即時更改模式並測試結果:

1
2
# Set fnmode: 0 = disabled, 1 = media keys (default), 2 = function keys (F1-F12)
echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode

永久生效 (Make Changes Persistent)

確認測試成功後,建立設定檔以確保開機自動套用:

1
2
3
4
5
# Create the configuration file for the hid_apple module
echo "options hid_apple fnmode=2" | sudo tee /etc/modprobe.d/hid_apple.conf

# Update initramfs to ensure the settings are applied during boot
sudo update-initramfs -u

Winboat 應用程式中文輸入異常 (Chinese Input Issue in Winboat)

Reference. https://github.com/TibixDev/winboat/issues/245#issuecomment-3861976728

Potential fix for KB Layout

(Version: v0.9.0)
This fix won’t work if you need multiple layouts to be available to you.
I managed to fix keyboard layout not changing by editing registry keys, but after testing a little more I’m not sure how this works because I reset the values back to what they were before my change then restarted the VM and the issue didn’t reappear, so there’s probably more to it than I’m realizing. Either way, these are the steps I took:

  1. In Windows settings, go to Time & Language > Typing > Advanced Keyboard Settings and set your keyboard layout there (you’ve probably already done this)
  2. Open the registry editor and go to HKEY_CURRENT_USER\Keyboard Layout\Preload, then delete all entries except for the one labeled “1”
  3. Go to HKEY_USERS\.DEFAULT\Keyboard Layout\Preload and change the value of entry 1 to be the same as the one for your current user (from the last step)
  4. Stop and restart the Windows VM (you can do this in WinBoat > Home)

After those steps it started working for me. Again, I’m not sure how much of this is required for it to work or if this will even work for others. Hopefully this helps anyone else facing this same issue

Introduction

UPS CP1000AVRLCDa 微開箱 之後,電池過了五、六年開開始無法蓄電,原本不太確定是 UPS 電路的問題或電池的問題,但想了一下以 UPS 相對簡單的模組(電路板 + 電池 + 螢幕),通常會壞掉的應該是電池而不是電路板,因此決定嘗試看看先換電池看續電是否正常(如果換完一樣是壞的就算了)。

Read more »

Create a Flask+uWSGI+Nginx Docker Image

In this example, we will create a Docker image for a Flask application using uWSGI and Nginx. The image will be based on the tiangolo/uwsgi-nginx-flask image, which is a popular choice for deploying Flask applications in production.

Read more »

Create a Private Docker Registry and Push/Pull Docker Images

In this guide, you will:

  1. Install Docker on an Ubuntu server
  2. Set up a private Docker registry on the Ubuntu server
  3. Create a Docker image on Windows and push it to the private registry
  4. Pull the image on the Ubuntu server and run it
Read more »

Create a ASP.NET Core Docker Image

This is a simple demo for creating a Docker image for an ASP.NET Core application.

Before starting, ensure you have the following requirements:

  1. Install Docker.

  2. Install the .NET SDK.

  3. Prepare an ASP.NET Core application. You can create a new ASP.NET Core Web API project using the following command:

    1
    $ dotnet new web -n Demo
Read more »

Introduction

This guide outlines the steps to set up an OpenVPN server on Ubuntu 24.04, including certificate management, server configuration, firewall setup, and client provisioning.

Read more »

Introduction

After enabling the OpenVPN server on an ASUS router, the exported client.ovpn file may trigger the following error in the OpenVPN client on Android:

1
OpenSSL: error:0A00018E:SSL routines:SSL_CTX_use_certificate:ca md too weak

This issue occurs because the CA certificate uses the SHA1 signature algorithm, which is outdated and considered insecure. Consequently, the OpenVPN client refuses to accept it.

There are two possible solutions:

  1. Insecure (Not Recommended): Allow weak CA certificates.
  2. Recommended: Renew the CA certificate using a stronger signature algorithm (e.g., SHA256 or higher).

Allowing weak certificates may expose your connection to man-in-the-middle (MITM) attacks or other vulnerabilities.

This guide walks you through the recommended solution.

Read more »

Introduction

This guide shows you how to set up rsync on a Windows system by leveraging Git Bash from Git for Windows.
rsync is a powerful file synchronization tool commonly used on Linux, but it can also work on Windows with a few manual steps.
No need to install WSL or Cygwin - just follow this lightweight and portable method.

Read more »