# 於 Ubuntu 安裝 Line Chrome 擴充功能並建立捷徑 > 日期:2021/7/7 > 作者:王一哲 ## 前言 我一開始是參考這篇文章〈[在 Linux 上讓 Chrome 的 Line 擴充元件當作獨立運作程式執行](https://hkgoldenmra.blogspot.com/2018/11/linux-chrome-line.html)〉,也在 Linux Mint 上成功地建立了快速啟動的按鈕,但是同樣的方法到了 Ubuntu 20.04 搭配 Gnome 3.36.8 卻無法使用,只會開啟 Chrome 瀏覽器並進到 chrome://extensions/ 分頁。經過一個下午的測試之後我終於找到一個可以成功運作的方法,以下是我的筆記。 <br /> ## 安裝軟體並建立捷徑 首先,於文字界面中輸入以下指令安裝開放原始碼版本的 Chromium,目前自動安裝的版本是 91.0.4472.114。 ```shell sudo apt install chromium-browser ``` <br /> 開啟 chromium-browser,進入 Chrome 線上應用程式商店,搜尋 Line 並安裝擴充功能。 <img height="80%" width="80%" src="https://i.imgur.com/wqL5A1n.png" style="display: block; margin-left: auto; margin-right: auto;"/> <div style="text-align:center">Chromium</div> <br /> <img height="80%" width="80%" src="https://i.imgur.com/VvCPeKd.png" style="display: block; margin-left: auto; margin-right: auto;"/> <div style="text-align:center">Chrome 線上應用程式商店</div> <br /><br /> 安裝後回到 Chromium 視窗,點選右上角的 Line 圖示啟動擴充功能,再關閉 Line 擴充功能視窗。 <img height="100%" width="100%" src="https://i.imgur.com/umq6K5X.png" style="display: block; margin-left: auto; margin-right: auto;"/> <div style="text-align:center">啟動 Line 擴充功能</div> <br /><br /> 回到 Chromium 視窗,點選右上角**向下方的三角形圖示**,再點選**最近關閉的分頁**中的**Line**。 <img height="100%" width="100%" src="https://i.imgur.com/fs2erCK.png" style="display: block; margin-left: auto; margin-right: auto;"/> <div style="text-align:center">開啟最近關閉的分頁</div> <br /><br /> 依序點選右上角**三個點的圖示** ⇒ **更多工具** ⇒ **建立捷徑**。 <img height="100%" width="100%" src="https://i.imgur.com/oCXF6fu.png" style="display: block; margin-left: auto; margin-right: auto;"/> <div style="text-align:center">Line 擴充功能分頁</div> <br /><br /> 桌面會出現一個名為 **chrome-bkcocnplcbgblleikhafgdopcojdccbk-Default.desktop** 的檔案,內容是 ```shell= #!/usr/bin/env xdg-open [Desktop Entry] Version=1.0 Terminal=false Type=Application Name=LINE Exec=/snap/chromium/1646/usr/lib/chromium-browser/chrome --profile-directory=Default --app-id=bkcocnplcbgblleikhafgdopcojdccbk Icon=chrome-bkcocnplcbgblleikhafgdopcojdccbk-Default StartupWMClass=crx_bkcocnplcbgblleikhafgdopcojdccbk ``` <br /> 將這個檔案複製到 **/home/[UserName]/.local/share/applications**,並將 Icon 換成從網路上找到的 Line 圖示,假設檔名為 line.jpg,並將圖片放置在同一個資料夾裡,則 Icon 那一行改成這樣即可。 ```shell Icon=/home/[UserName]/.local/share/applications/line.jpg ``` <br /> 現在應該可以在 Ubuntu 裡搜尋到 Line 應用程式。 <img height="100%" width="100%" src="https://i.imgur.com/HABYbIW.png" style="display: block; margin-left: auto; margin-right: auto;"/> <div style="text-align:center">於 Ubuntu 中搜尋 Line</div> <br /><br /> 在 Line 應用程式圖示上按滑鼠右鍵,點選**加入喜好**就完成了。 <img height="100%" width="100%" src="https://i.imgur.com/qmnLOgU.png" style="display: block; margin-left: auto; margin-right: auto;"/> <div style="text-align:center">將 Line 加入喜好</div> <br /><br /> ## 結語 雖然找到了一個可以成功運作的方法,但是這個方法看起來還是很怪,希望可以找到更簡潔的作法。 <br /> ## 參考資料 - [在 Linux 上讓 Chrome 的 Line 擴充元件當作獨立運作程式執行](https://hkgoldenmra.blogspot.com/2018/11/linux-chrome-line.html) <br /> --- **2021/7/19 補充** 同樣的方法在 [Brave 瀏覽器](https://brave.com/)也能使用,畢竟它也是以 Chromium 為基礎發展而成的瀏覽器,同一招能夠成夠似乎也不意外。 --- ###### tags:`Computer`、`Linux`
×
Sign in
Email
Password
Forgot password
or
Sign in via Google
Sign in via Facebook
Sign in via X(Twitter)
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
Continue with a different method
New to HackMD?
Sign up
By signing in, you agree to our
terms of service
.