Wednesday, June 18, 2025

X.org (X system) 停止作用

跳到文字介面(console): Ctrl Alt F1 ~ F6 ,登入後輸入 /etc/init.d/lightdm stop 重新啟動 /etc/init.d/lightdm start 或是 service lightdm start 跳回圖形介面(windows): Ctrl Alt F7 ------------------------ To stop the X Window System (and return to the command line), you can use the command sudo systemctl stop display-manager if you are using a systemd-based distribution like Ubuntu or Fedora. Alternatively, on some systems, pressing Ctrl+Alt+Backspace will force-stop the X server. Detailed Explanation: 1. Identifying the Display Manager: Most modern Linux distributions use a display manager (like GDM, LightDM, or SDDM) to start the X server and handle graphical logins. The systemctl command is used to manage system services, including the display manager. 2. Stopping the Display Manager: If your system uses a display manager, you can stop it using sudo systemctl stop display-manager. This will typically log you out of the graphical session and return you to a text-based console. If your system uses a different display manager, replace display-manager with the specific name (e.g., sudo systemctl stop gdm, sudo systemctl stop lightdm). 3. Using the Keyboard Shortcut (Ctrl+Alt+Backspace): On some systems, pressing Ctrl+Alt+Backspace will immediately kill the X server and return you to the console. This is a quick way to exit the graphical interface without logging out or stopping the display manager. This shortcut may be disabled by default on some distributions, and you might need to re-enable it if it's not working. 4. Alternative Method (init levels/runlevels): In the past, systems would use different "runlevels" or "init levels" to start or stop the X server. While less common now, you might see this referred to. For example, sudo init 3 might switch you to a text-based console (though systemd handles this differently in most cases). 5. Checking for Graphical Login: If you're not sure if X is running, you can check if you have a graphical login screen or a graphical desktop environment. If you are already at a text-based console, X is not running, and you don't need to stop it.

大家來學VIM(一個歷久彌新的編輯器)

http://www.study-area.org/tips/vim/ vim - Debian Wiki https://wiki.debian.org/vim vimrc設定教學 http://wiki.csie.ncku.edu.tw/vim/vimrc vi 指令是Unix 和類Unix 作業系統中常用的文字編輯器指令。 它主要有兩種模式:一般模式和命令模式。 一般模式下,使用者可以使用鍵盤上的按鍵來移動游標、刪除文字等;而命令模式下,則可以輸入指令來執行儲存、離開等操作。 以下是一些常用的vi 指令: 基本操作 移動游標: h、j、k、l: 分別向左、下、上、右移動游標。 w: 跳到下一個字的開頭。 b: 跳到上一個字的開頭。 0: 跳到行首。 $: 跳到行尾。 gg: 跳到檔案第一行。 G: 跳到檔案最後一行。 :<行號>: 跳到指定的行號。 刪除文字: x: 刪除游標所在位置的字元。 dd: 刪除整行。 dw: 刪除游標所在的字元到下一個字的開頭。 插入文字: i: 在游標前插入文字。 a: 在游標後插入文字。 o: 在游標下插入新的一行。 O: 在游標上插入新的一行。 取代文字: r: 取代游標所在的字元。 R: 開始取代文字,直到按下Esc 鍵。 命令模式指令 :w: 儲存檔案。 :w filename: 儲存檔案到指定名稱。 :q: 離開vi。 :q!: 強制離開vi,不儲存修改。 :wq: 儲存檔案並離開vi。 :set nu: 顯示行號。 :set nonu: 隱藏行號。 其他指令 u: 復原上一個動作。 Ctrl-r: 重做上一個被復原的動作。 :e filename: 開啟指定檔案。 :n: 編輯下一個檔案(用於多檔案編輯)。 :$: 跳到檔案的最後一行。 注意事項 vi 有兩種模式,進入vi 後預設是指令模式,按下i 鍵後會進入插入模式。 在插入模式下,可以輸入文字,按下Esc 鍵可以返回指令模式。 vi 的指令需要在一行中輸入,並以冒號(:) 開頭。 vi 的指令通常是單一字母或字母組合,例如 w、q、x、dd 等。 vi 的指令不區分大小寫,但有部分指令有大小寫的區別,例如 G 和 gg,w 和 W。 vi 編輯器是一個功能強大的工具,掌握這些基本指令後,可以有效地編輯文字檔案。 根據IBM 的說明文件, vi 編輯器還有許多進階功能和設定,可以進一步學習和應用。 此外, 鳥哥的Linux 基礎教學也有詳細介紹vi 指令。

Tuesday, June 17, 2025

關於 Linux 中文字型

Debian Wiki - fonts https://wiki.debian.org/Fonts 可安裝 CNS11643中文標準交換碼全字庫 利用 X 字體別名,讓 Linux 桌面環境顯示文件中的標楷體、細明體與黑體 https://www.rocksaying.tw/archives/12397861.html Debian 中文自由軟體 https://www.debian.org/international/chinese/software.zh-tw.html 建立中文化使用的環境 https://docs.huihoo.com/gnu_linux/debian/tutorial/Debian-Install-Guide-8.html 於 Debian Linux 使用 Ubuntu Linux 的字型 https://blog.longwin.com.tw/2013/11/ubuntu-linux-font-debian-install-2013/

Saturday, June 14, 2025

介紹各種在 Linux 中以手動來調整系統時間的方法

https://blog.gtwang.org/linux/howto-set-date-time-from-linux-command-prompt/

Debian 12 安裝完後沒有聲音

可以試試 alsamixer, 把所有能開的選項都打開(按往上鍵)或是 有沒有靜音設定 進階: peWire is a server and API for handling multimedia on Linux. Its most common use is for Wayland and Flatpak applications to implement screensharing, remote desktop, and other forms of audio and video routing between different pieces of software. Per the official FAQ, "you can think of it as a multimedia routing layer on top of the drivers that applications and libraries can use." https://wiki.debian.org/PipeWire 如果您的Linux電腦喇叭音質不好,又不想外接喇叭,您應該試試「Easy Effects」增強音效。 https://ivonblog.com/posts/linux-easyeffects/ 分享一款跨平台的開源音樂播放器「Strawberry Music Player」草莓播放器。支援Linux / Windows / macOS,可以擷取 CD 音樂 https://ivonblog.com/posts/strawberry-music-player/

在 Debian底下使用酷音輸入法

因為現今的主流 Linux 發行版及 FreeBSD/NetBSD/OpenBSD 大多採用 IBus 或 Fcitx 輸入法框架,如果有收錄進套件庫的話,請安裝 ibus-chewing 或 fcitx5-chewing 即可。安裝 ibus-chewing 套件後,在Region & Language裡設定Input Source 新增Chinese(chewing) · 用 ibus-setup 設定輸入法細項 輸入日語:安裝 ibus-mozc套件 · 用 ibus-setup 設定輸入法細項