Skip to main content

5 posts tagged with "linux"

View All Tags

· 2 min read

I've been use Elementary OS as my primary laptop OS over a year and have been written some posts for it. I Upgraded to Elementary OS Juno at December last year. Juno is based on Ubuntu 18.04, the experience is very positive. Most things works fine and not much things need to tune for daily usage.

Here's my setup for my Dell XPS 13-9360 laptop.

1. Package installer

  1. Insatll Eddy on AppCenter instead of sudo apt install gdebi

  2. install essentials

    sudo apt install software-properties-common git

## 2. Setup Fonts

$ apt instsall firacode

3. Bluetooth, Touchpad and Mouse

The Bluetooth connectoin is basically stable. No need for extra setup.

To make right click works for Touchpad, go Settings > Mouse & TouchPad, select from MultiTouch to TouchPad in Physical Click section.

To use logitech mouse with unifying USB dongle, you can do sudo apt install solaar solaar-gnome3 and there will be solaar-cli command line tool and the GUI tool available.

To customize the extra buttons in mouse, install xbindkeys

sudo apt-get install xbindkeys xautomation x11-utils

Then create the config file using xbindkeys --defaults > $HOME/.xbindkeysrc.

4. Saving Power

tlp is a good tool for auto power management and now it can be installed through the default repo.

sudo apt-get install tlp
sudo tlp start

5. Auto adjust color temperature

It's build-in now.

Go Settigns > Monitor > Night Light to toggle it on.

6. Chinese Input Method

Instead of configure by yourself. It's build-in now.

  1. Select Traditional Chinese during install Elementary OS.
  2. Enter System > Language & Area > Keyboard Setting > Input Method Settings.
  3. Remove all other IME except 新酷音 and it just works.

7. Tweaks

Can use elementary-tweaks to easily change system font to Noto Sans CJK TC regular instead of Open Sans

sudo add-apt-repository ppa:philip.scott/elementary-tweaks
sudo apt update
sudo apt install elementary-tweaks

Then open Tweaks in System Settigns panel.

· 2 min read

I'm a happy Elementary OS user and use it as my default desktop OS (~95%) several month. There are some useful tweakings that help me live with the Linux desktop.

1. Package installer

Elementary OS does not provide deb installer by default, need install manually:

sudo apt install gdebi
sudo apt install software-properties-common

And you can download ubuntu software center as well(optional).

2. Setup Fonts

List system supported fonts

fc-list | cut -f2 -d: | sort -u

Setup fonts

gsettings set org.pantheon.terminal.settings font 'Roboto Mono'
gsettings set org.gnome.desktop.interface font-name 'Open Sans 9'
gsettings set org.gnome.desktop.interface document-font-name 'Open Sans 10'

If you like Fira code for coding font, you can follow https://github.com/tonsky/FiraCode/wiki/Linux-instructions#installing-with-a-package-manager to install it.

3. Pairing Bluetooth Mouse

I can't use GUI Bluetooth manager to pair with bluetooth device, but these commandline works well for me.

$ bluetoothctl
$ agent on
$ default-agent
$ pairable on
$ scan on
$ devices (to see the devices and macs that you want to pair)
$ pair <dev mac>
$ trust <dev mac>
$ connect <dev mac>

4. Saving Power

tlp is a good tool for auto power management

sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp
sudo tlp start

5. Auto adjust color temperature

redshift is by far the great f.lux like app for linux.

$ sudo apt-get install redshift redshift-gtk
$ redshift-gtk

Then configue it as auto start in task bar.

6. Touchpad indicator

Sometimes you may found the cursor is moving to the wrong place. Install Touchpad indicator solved this issue.

sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install touchpad-indicator

and Toggle Disable Touchpad on typing.

7. Dropbox icon

Install Dropbox from its website, then configue to fix the missing icon.

8. Backup

Install Timeshift for system backup. Its pretty easy to use via GUI.

sudo apt-add-repository -y ppa:teejee2008/ppa
sudo apt update
sudo apt install timeshift

參考資料

· 6 min read

今天已把前陣子買到的 Ledget Nano S 硬體錢包在 Windows 10/Elementary OS (/Ubuntu 16.04) 上設定好,正式開始使用。和預期一樣,雖然在 Linux 上剛開始設定時需要多做一些步驟,但是一旦設定好後,使用過程和在其他平台上並沒有區別。

硬體錢包

過去透過 NAS,外接硬碟等方式來保護自己的相片,作品等「數位資產」,以防哪天檔案遺失或外流。現在要守護的範圍更要擴及「加密代幣」,即保護自己的「數位財產」。

graph LR 作品 --> NAS 相片 --> NAS 相片 --> 線上備份 NAS --> 數位資產 線上備份 --> 數位資產 加密代幣 --> 硬體錢包 硬體錢包 --> 數位資產

MyEtherWallet 網站推薦任何擁有超過「2 周的薪資」數位財產的人,使用「硬體錢包」來保管自己的「加密代幣」,以避免可能的財產損失。

目前 Ledget Nano S 和 TREZOR 是兩款較多人使用的硬體錢包。硬體錢包的安全性從產生錢包帳號開始。硬體錢包帳號的私鑰一直保存在硬體設備中,只要保存好「recovery phase」(Mnemonic Seed),不會發生使用線上交易所時帳號或帳戶中的代幣可能被盜的風險。只有在發送代幣時需要解鎖錢包帳號。解鎖錢包帳號時,輸入 PIN 碼解鎖的過程,也是透過硬體錢包上的按鍵完成,從而避免了所使用的電腦可能已被入侵者安裝鍵盤側錄軟體而造成的財產上的風險。

設定流程

1. 設定 Ledget Nano S 硬體

在 Ledget Nano S 上透過按壓左右兩顆硬體按鈕,設定 4~8 字的 PIN Code 與 24 個單字的「recovery phase」,並用紙筆等實體方式記錄下來(千萬別用拍照的...)。完成後機器會隨機挑幾個次序測試,而你需要選擇對應的單字來確認安全性。如果以後機器壞了或遺失了,仍然可以透過這 24 個單字的「recovery phase」來取回帳號。

2. 在電腦上安裝 Chrome 或 Chromium

因為目前 Ledger Nano S 使用 Chrome App 技術來提供桌面應用程式,Chrome 也是唯一支援WebUSB API的瀏覽器...Google 近期公告 Chrome App 即將被 Progressive Web App 取代,我們拭目以待 Ledger 公司將拿出什麼方案來應對。

3. 安裝 Ledger Manager

前往https://www.ledgerwallet.com/apps/manager安裝 Ledger Manager。

4. 設定 USB 連線

這時開啟 Ledger Manager,將 Ledget Nano S 連線到電腦並解鎖,Ledger Manager 無法找到對應的設備。

這時可以參考What if Ledger Wallet is not recognized on Linux?在命令行環境下輸入以下命令:

wget -q -O - https://www.ledgerwallet.com/support/add_udev_rules.sh | sudo bash

執行後重新將 Ledget Nano S 連線到電腦並解鎖,可以看到 Ledger Manager 開始更新資料。

4. 安裝 Ethereum App

Ledger Manager 與 Ledget Nano S 連線後,除了可以更新韌體之外,也能安裝不同的「加密代幣」App 進 Ledget Nano S。

這邊選擇安裝 Ethereum App。

安裝完成後,在 Ledget Nano S 上可以看到多出一個Ethereum的圖示。

點選進入Ethereum,確認Browser Support選項為No (Ethereum> Settings > Browser Support > No),這樣稍後安裝的 Ledger Wallet Ethereum 才能辨識到 Ledget Nano S。

5. 安裝 Ledger Wallet Ethereum

參考How to install and use Ethereum and Ethereum Classic? 前往https://www.ledgerwallet.com/apps/ethereum下載 Ledger Wallet Ethereum App。

安裝好後重新將 Ledget Nano S 連線到電腦並解鎖,可以看到相關操作界面。

使用 MyEtherWallet 取代 Ledger Wallet Ethereum

若不喜歡使用 App,還可透過 MyEtherWallet 來存取。

參考Moving from MyEtherWallet to LedgerHow to use MyEtherWallet with Ledger 這兩篇設定,將Setting中的Contract DataBrowser support選項都設成Yes

Ethereum > Settings > Contract Data > Yes
Ethereum > Settings > Browser Support > Yes

透過 Chrome 瀏覽器,在 MyEtherWallet 中看到How would you like to access your wallet選項時,選擇Ledger Wallet並在硬體上解鎖即可。

參考資料

· 3 min read

在前一篇文章中我已經設定好了雙系統(Elementary OS/Windows 10)開機。在這篇中將繼續把系統的基礎中文環境(中文界面 + 輸入法)設定起來。感謝前路上的貢獻者讓整個過程變得相當容易。

設定好的中文環境如下 Imgur

為什麼要用 Elementary OS?

其實 Ubuntu 等發行版的中文環境已經做得很好,如果使用 Ubuntu 等更成熟的發行版,基礎的中文環境都是預設好開箱即用的。

但我就是任性想用基於 Ubuntu,但是界面看起來更養眼的Elementary OS

調整語系

Imgur

首先,打開Settings中的Language & Region,在左側Installed Languages選單中將界面切換到中文。並選擇完全安裝(Complete Installation)。

等待安裝好後重新登入,就可以看到全中文界面了。

Imgur

安裝新酷音輸入法

在安裝好 Elementary OS 0.4.1 後,預設並沒有輸入法選項,但其實內部已安裝了 ibus 輸入法框架。

因為沒有內建輸入法,所以若要使用輸入法,需要自行安裝。

在命令列中輸入以下命令以安裝新酷音輸入法

$ sudo apt update
$ sudo apt install ibus-chewing

安裝好後再輸入ibus-setup,可開啟輸入法設定畫面

$ ibus-setup

在 「輸入法」 分頁底下的 「漢語」 子選單當中可以加入剛安裝的新酷音輸入法。

Imgur

按「確定」,在設定畫面中可以看到的新酷音輸入法。

Imgur

最後重要的步驟,就是將切換方式改成個人較習慣的Ctrl+Space

Imgur

如此一來,就可以在 Elementary OS 上輸入中文啦!這篇文章就是從截圖到文章編輯 / 上傳,全程在已照上述方式安裝好 Elmentary OS 基礎中文環境的筆電上完成的。

fcitx 版

我也試了安裝 fcitx 版本的新酷音

$ sudo apt install fcitx fcitx-chewing

安裝好後使用im-config命令將預設輸入法框架切換成fcitx,重新開機後就可以看到輸入法圖示了。

參考資料

· 3 min read

I just successfully installed Elementary OS Luna (0.4.1) along side with Windows 10 on my new Dell XPS 9360 machine.

Comparing this XPS 13 9360 (8th Gen i7) with my previous model 9343 (5th Gen i7), the CPU is way faster(feels like 3 times faster), the wireless works well and the signal is stronger (which I was encountered some issues in XPS 13 9343), the keyboard feedback is pleasent, and the battery life did last longer in 9360.

Several settings are trickier than early days when I try to install *nux on Notebook. Here's the self reference guide and hope it could help others.

Settings on Windows

Login to Microsoft account

It's necessary to bind your account with the device, so you can get recovery key later.

Flash Elementary OS to the USB disk

I download the OS image from Elementary OS web site and use Unetbootin to flash the image into the disk.

Shrink the disk space

I have the 256GB SSD, I use Partition Wizard to slice ~100GB for Elementary OS.

I have 8GB RAM so I reference the recommend swap size and left ~8GB for swap.

Disable fast startup

I also need to follow the instructions to disable the fast startup on Windows.

Switch SATA operation mode from RAID to AHCI

Here's the most tricky part. It takes me a while to figure out how to switch the SATA storage from RAID to AHCI. The trick is doing this procedure with Windows safe mode.

Settings on BIOS

Press F12 during booting.

  • Don't need to turn off the security boot.
  • Follow above link's instructions to config SATA storage.
  • Save the configureation before exit.

Reboot to windows and make sure windows runs nicely in safemode. Then follow above link's instructions to jump out of safemode.

Now I'm prepared and able to install Elementary OS.

Install Elementary OS through USB disk

Install Elementary OS as usual Ubuntu distribution.

First connect to wifi and allow install 3rd party softwares.

Add the left space as /(root) with Ext4 format. And set the left ~8GB as SWAP format.

Then continue the auto install process.

Now I have a clean Elementary OS.

Recover Windows with BitLocker recovery keys

After restart I can see an option menu with Elementary OS and Windows Boot Manager.

I can boot to Elementary OS without major issue.

Well, I met the problem that AppCenter can't start correctly, so I do sudo apt update && sudo apt upgrade then sudo apt purge appcenter && sudo apt purge packagekit then restart and run sudo apt install appcenter && sudo apt install packagekit to make it work normally.

The input method and bluetooth pairing seems not work out of box, but I can live with that.

Then when I boot to Windows, I need to enter the BitLocker recovery keys. That could be solved by following the FAQ from microsoft. I need to login to Microsoft Account and find the recovery key.

Enter the recovery key then everything works.