Linux Install Line by Bottles
Introduction
本篇文章紀錄一下在 Kubuntu 下安裝 Line 的過程。
Installation
安裝 Bottles 的方法可以參考:#安裝Flatpak和Bottles - 如何在Linux安裝電腦版Line,使用Bottles管理Wine容器,整體來說只需要執行以下 command:
1 | ############################## |
在安裝完畢後開啟 Bottles,同樣可以依照前面的文章來 step by step 安裝 Line,只是有幾點需要注意:
Runner(執行器)建議使用 Kron4ek Wine 10.13。
Runner 安裝方式:
選擇 Main Menu > Preferences:

到 Runner 選單下找到 Kron4ek Wine 10.13 並按下儲存的 icon:

Bottle 中的 Depentencies(相依行組件)需要:
- cjkfonts
- d3dcompiler_47
- vcredist2005
- vcredist2022
Line 版本建議使用舊版,使用較新版本程式執行會無限等待(如下圖),因此本次安裝是使用 line-9-2-0-build-3431.exe,這邊連結提供的是第三方下載檔,可以自行評估是否使用。

安裝完畢後要作一些操作避免 Line 自動更新:
將 LineUpdater.exe 移除。
在相同路徑下移除 old current 資料夾,並建立空白檔案。
前兩點可以統一執行 command 完成:
1
2
3cd $HOME/.var/app/com.usebottles.bottles/data/bottles/bottles/Line/drive_c/users/$USER/AppData/Local/LINE/bin/
rm -rf LineUpdater.exe old/ current/
touch LineUpdater.exe old current2026-04-07 Update
經驗證後,old與current資料夾可以使用唯獨空檔(read-only empty file)卡位,我們只需要使用腳本來實時監測 LineUpdater.exe 以及更新檔案是否被建立,詳細方式請參考LineUpdater-exe - Issue and Solution。
Issue and Solution
LineUpdater.exe
由於 LineUpdater.exe 在每次執行 Line 後都會自動被建立,因此可以透過 inotify-tools 以及腳本來自動監測與刪除。
Install inotify-tools
1 | sudo apt update |
Create Script for Auto-Clean
請注意在第五行中的 USERNAME 中填入自己的使用者名稱,可以透過
$ whoami來確認。
1 | $ sudo vi /usr/local/bin/line-updater-cleaner.sh |
Create Systemd Service for Startup
首先先建立 Systemd Service:
1 | $ sudo vi /etc/systemd/system/line-updater-cleaner.service |
接著開啟開機自動執行:
1 | sudo systemctl start line-updater-cleaner |
Chinese Input
安裝完後發現在對話視窗內無法輸入中文,需要在 Bottle 下進入 (Options) Settings > (Compatibility) Environment Variables,新增以下幾個環境變數:
1 | GTK_IM_MODULE=fcitx |
Crash After Login
移除 Line 設定檔後重新登入:
1 | rm $HOME/.var/app/com.usebottles.bottles/data/bottles/bottles/Line/drive_c/users/$(whoami)/AppData/Local/LINE/Data/LINE.ini |
Change Line Theme
開啟 Line 設定檔,並在 global 中加入 app_theme 來做設定,分別是:
- app_theme=0: White
- app_theme=1: Black (Dark)
- app_theme=2: System Settings
1 | $ vi $HOME/.var/app/com.usebottles.bottles/data/bottles/bottles/Line/drive_c/users/$(whoami)/AppData/Local/LINE/Data/LINE.ini |
Crash Report
開啟 Line 並登入後出現 Crash Report 視窗,並在按下 close 後 Line 會被關閉。

可以開啟 Line.ini,並將內容中帶有下列幾個關鍵字的內容移除後重開 Line:
chatlast_selected_main_tab_indexlast_sending_time_settings
或是透過 command 完成:
1 | sed -i '/chat/d' $HOME/.var/app/com.usebottles.bottles/data/bottles/bottles/Line/drive_c/users/$(whoami)/AppData/Local/LINE/Data/LINE.ini |