Wednesday, September 29, 2021

Fixing Ubuntu with kernel 5.11

I previously mentioned the kernel 5.11 image was completely unusable. Well, these 2 were definitely missing and I need to install manually:
sudo apt-get install linux-headers-5.11.0-36-generic
sudo apt-get install linux-modules-extra-5.11.0-36-generic
The above took care of the networking unavailable issue for me. 

Now to get the display working with proper resolutions (no 640x480 please!)
sudo apt purge nvidia* libnvidia*
This removed my previously manually installed Nvidia display driver and after reboot it shows clearly it uses the X.Org open source driver instead of "Continue using a manually uninstalled driver" 


I hope this becomes stable for another few months. Keeping my fingers crossed.

Credits go to: Nvidia's official website (the post for fixing nvidia-smi >> Failed to initialize NVML: Driver/library version mismatch) 
This seems useful for installing Nvidia driver but I did not need to follow it. 

Ubuntu and GRUB default image

My Manjaro experiment has kinda failed because it would hang from time to time. Well, with Linux you always have workarounds, in this case, use the most "mainstream" distro: Ubuntu. I actually use a less resource intensive variant of Ubuntu called Ubuntu Mate. However, one of the updates must have broken compatibility with some existing drivers (e.g. NVIDIA Driver Version: 390.138) and I ended up always going back to the oldest kernel image which I choose manually from the Boot menu of GRUB. This is the guide to change the default so no more manual intervention is needed! (BTW, I was so worried that the Wifi driver is broken for some reason even in that image. It turns out the Wifi-disabled issue went away after hitting the "hardware" Wifi button on my machine a few times. Whew!)

Wednesday, August 25, 2021

「闌干」是「欄杆」嗎?

先說一件我出醜的事,話說我為了練字在網上搜尋到一首詩詞,有繁體也有簡體,我自然採用了前者,寫完和朋友分享,朋友說:「你寫的『闌幹』應該是錯字吧!」認真地讀了該詞一下,意思的確是「欄杆」,「闌幹」顯然是從簡體編碼「阑干」轉換過來的。其實另一位朋友已經提過我:由繁轉簡再轉繁是一個lossy operation, 因為繁對簡是many-to-one的關係。

前人詩文似乎喜用「闌干」,不一定用「欄杆」。這是從中華民國教育部重編國語辭典修訂本查證過的:

  1. 竹木或金屬條編成的柵欄,常置於陽臺前或通道間。金.王特起〈喜遷鶯.登山臨水〉詞:「千里關塞遠,雁陣不來,猶把闌干倚。」也作「欄干」、「欄杆」。
  2. 縱橫散亂的樣子。漢.蔡琰〈胡笳十八拍〉:「豈知重得兮入長安,歎息欲絕兮淚闌干。」清.王鵬運〈浣溪沙.苜蓿闌干滿上林〉詞:「苜蓿闌干滿上林,西風殘秣獨沉吟。」
  3. 星光橫斜參差的樣子。唐.劉方平〈月夜〉詩:「更深月色半人家,北斗闌干南斗斜。」宋.陳興義〈早行〉詩:「露侵駝褐曉寒輕,星斗闌干分外明。」
除了第一義和「欄杆」一樣,原來還有其他意思。

Friday, March 05, 2021

CD Ripper for Ubuntu

When was the last time you need to rip tracks from CD? For me, I needed to rip a half-dozen of CDs in the past month. My only computer that still have a builtin CD-ROM drive runs Linux (Ubuntu.) It actually comes with RhythmBox that has the capability to rip (and play, of course) However, its default CD info database is MusicBrainz, which has trouble recognizing quite a few of my CDs. It does have a CDDB plugin (which I am too lazy to figure out how to install) Then I installed RipperX but got an error 22. Finally, I found that fre:ac works! And it came as a ApplImage so I didn't have to install anything. And it rips quicker than RhythmBox anyway. So, we have a winner! 

Sunday, October 25, 2020

集字作品

早一陣子有朋友問起甚麼是集字作品,我新買的禮器碑集字帖有很詳盡的剖析:集字作品中的字有以下來源:

  • 直接從原作取字
  • 原作無該字,利用已知的邊旁寫法拼合而成
  • 原作無該字亦無邊旁可參考,則從原作筆劃結構和筆意推論

以下是我最近臨的一些集字作品:

比較同一首詩用不同字體寫出來,味道各有不同,實是樂事!


Tuesday, October 20, 2020

Signal Desktop on Arch Linux

As I mentioned earlier I am using Manjaro Linux on my old laptop, and the repo of the distro it based on, Arch Linux, actually has Signal Desktop. However, it is not up-to-date, which is understandable because it is not "officially" released by Signal. Well, there is always the option to compile from source. I saw the package.json and I know it gotta be using npm. Did a npm install but apparently I also need to install yarn first. Then I just followed the steps in this post:
npm install yarn
yarn install
yarn generate
./release/linux-unpacked/signal-desktop

Wednesday, October 07, 2020

東坡和盼盼

 今早一時興起搜尋一下永遇樂這個詞牌的名作,最有名的自然是辛棄疾的《京口北固亭懷古》(千古江山),李清照的《落日熔金》寫元宵亦是佳品,對我來說,back story最有趣的自然是東坡的《彭城夜宿燕子樓》,燕子樓曾是唐朝名歌妓關盼盼的居所,是關的情人、大官張愔為她所建。張愔死後,關盼盼一直獨居燕子樓,可見兩人感情之深。張的友人張仲素寫了以下的這首詩描述關對張愔思念之情:

 樓上殘燈伴曉霜,獨眠人起合歡床。 相思一夜情多少,地角天涯未是長。

白居易則作此詩唱和:

 滿床明月滿簾霜,被冷燈殘拂臥床。 燕子樓中霜月夜,秋來只為一人長。

(又有傳說指關盼盼後來自盡,皆因為讀了白居易此詩《感故張僕射諸妓》:

黃金不惜買蛾眉,揀得如花三四枝。歌舞教成心力盡,一朝身去不相隨。

不過已有不少學者網民為白平反,因為張僕射指的是張愔之父,詳情請參閱此文,有空會寫寫此故事)

蘇東坡作為一代文學宗匠,也是風流才子,留宿燕子樓自然夢到盼盼,醒後有感而發,作詞一首《永遇樂》(節錄):

 天涯倦客,山中歸路,望斷故園心眼。燕子樓空,佳人何在,空鎖樓中燕。古今如夢,何曾夢覺,但有舊歡新怨。異時對,黃樓夜景,為余浩嘆。

感嘆世人在俗世浮沉,迷失於紅塵中,其實最終要認識到人生無常,一切只是過眼雲煙;蘇東坡時人會在燕子樓為關盼盼感嘆,而後人又會在黃樓為蘇東坡感嘆吧!

傳聞蘇東坡本人也有一位名盼盼的心愛歌妓,此女姓馬不姓關,坊間也流傳一個馬盼盼和黃樓的故事!話說蘇東坡被派往徐州做官,解決了洪水之災,為紀念此事及以「土尅水」,建了一座黃樓(此文有圖),其弟蘇轍作了一篇《黃樓賦》(原文)由也是大書法家的蘇東坡書寫後刻碑,東坡寫到一半走開了,頑皮的馬盼盼接著寫了「山川開闔」四字,原來她一直練習蘇體,寫得似模似樣,之後也被保留下來。

究竟那四字寫成怎樣?在網上完全找不到圖片,而原碑早已被毀,據報導政府在1988年重修,碑文也根據拓片重刻,希望有心的網友有機會看到拍張照片上傳過來吧。

Saturday, October 03, 2020

中環佩搖

今日翻書偶然看到一首元曲《憑欄人.客有吳郎吹洞簫》,曲詞最後四字為本帖題目,令我聯想起的竟然是火炭麗琪(FYI,有一位YouTuber好認真的分析該曲歌詞,值得一看)

言歸正傳,全曲如下:
客有吳郎吹洞簫,明月沈江春霧曉。湘靈不可招, 水雲中環佩搖。
(由書法字典集字而成)



是著名畫家倪瓚贈友人吳國良之作,吳郎既擅長製墨,又精於吹簫,本曲用江月春霧的美景讚他的演奏餘音繚繞。湘靈的典故是指傳說中舜的妃子娥皇、女英, 她們死後成為了湘水女神;吳的簫聲雖然未能令她們現身,但水雲交織的迷濛中隱約可聽到她們飾物搖動之聲。詞簡淺得來意境高,我十分欣賞。

此外,我也在網上找到有作曲家為此曲譜了(元代的版本應該失傳了吧?),有機會的話吹給大家聽聽。