2019新年寄语:做人生的硬核玩家

  28 Dec 2018     New Year and Love

从10年读本科起,便每次都是在外过跨年的。这其中有与好友在觥筹交错、电话叙旧间度过的,也有独自一人通宵游戏、赶项目中度过的。我并非是一个特别在意仪式感的人,大多数节日于我的意义不过是一个可以懒散休息的假期。然而跨年多少还是不同的意味,岁月流逝的感伤,会在这样一个特殊的时间变得特别强烈。小时候这种情绪还要淡一些,然而等到要离开校园、告别学生生涯的时候,更加会伤感年少时无限的种种可能,慢慢要开始收敛汇聚,这时才会对时间更加珍惜吧。所以也许有必要用一些文字来纪念过去的时光,以及勉励自己。

18年对于我自然不是幸福快乐的一年。感情失败的阴影足够笼罩一切。面对曾经恋人的一句算了,我困惑,自责、无力、不舍、痛苦却又无可奈何。抛开感情不谈,也许更深层的痛苦来源于是自己对前路的迷惘。之前的恋爱更像是一种止痛药,麻痹了这种痛苦,而当恋爱结束,这种痛苦伴随着失恋的悲伤,变得更加难以难以承受。

一直以来,我信奉的都是做好手边的事,然后开放的心态面对这种未来的选择。但是这些前提是,做自己喜欢的事情,以及相信自己事业的价值。博士四年多,随着科研从兴趣变成一项日常工作,许多项目也并不是那么有挑战性,热情多少有衰减,毕竟如今的科学领域,不会再像20世纪初,各种惊天动地的发现每一天变革着人们对自然科学的认知。再转头看看现在热门的信息科学,机器学习之类的领域发展如此热闹,多少也会觉得有些羡慕嫉妒,却又不屑于去盲目追逐热点。我当然毫不质疑这些信息领域的成果最终将重塑我们探索、改造世界的方式,但假如投身其中,我又能扮演多重要的角色,这是我所考虑的。

然而这些并不应该成为自己彷徨不前的理由。虽然年岁渐长,似乎面前可能的路越来越少,然而应该始终相信任何时候开始都不算晚。何况选择才刚刚开始,无论是沿着自己现在的轨迹抑或是从头来过,是选择继续学术还是去工业界,重要的是不要因为畏惧或是逃避而去选择另一样。同样也不要害怕选错:让你犹豫的选择,通常都一样好(UCLA交流的时候Klug教授与我聊天时说到的)。自己恋爱的时候,想法不知不觉会偏向于找个安稳的好工作,与恋人共享余生。倘若能一切持久,这固然美妙,然而终究人心易变,人事易分。如今没有了恋情的牵挂,也能做更纯粹的选择。

前段时间看到知乎上一个有意思的问答,说怎样才算得上是人生硬核玩家。恰好之前玩过一个算是非常硬核的游戏黑魂:其中充满恶意的游戏环境,尤其是每次死亡伴随的巨大损失,令人望而却步,每走一步都只能小心翼翼。相比来说,人生的诸多选择及其后果可谓是温和多了,其最硬核之处恐怕在于所有的一切选择都没有读档重来的余地,失败的风险变得更加不可接受。然而倘若因为这些风险就畏缩不前,或者绕道而行,就如同去游乐园,因为害怕而不去做刺激的过山车,所有的乐趣也就失去了。只是与此同时,好的心态也必不可少,一切更重要的是“玩”,过于纠结成败反而也会错失许多乐趣。许多时候貌似,佛系的人,内心反而更加执着,大概也是以其成败不惊,才不至为失败所累,更能坚持初心。另外,眼光也不应该局限在身边的人和事,有时候把自己置身在更广阔的世界中,一切眼前的挫折也就微不足道了。

至于感情的事,我自然明白无法勉强,更不该用过往的经历去困住别人。但最终却是我自己深陷其中走不出来。离合循环也许也是人生常态,但发生在自己身上还是如此的难以接受。本科时候因为感情失败痛不欲生,曾经觉得以后感情上也许再也不会有那么投入了。四年之后,我还是把自己的心全部交了出去,伤的也更深了,却没有什么好后悔的。不知道这次又需要多久才能放下,但相信时间总会有一天冲淡的。古剑3里,晴雪被问到长久地惦念一个人是什么心情,答道并没有那么非同寻常,对于牵挂之人,自然尽心竭力,况时光之中也不仅仅这一人一事。也许这么古朴的感情观和现在的时代有些格格不入,可我偏偏却一直是这种心境。不过终究一切冷暖自知,既然不愿意刻意忘却过往,不妨就带着这些好好生活,相信旅途之中,会有更好的来替代。

薛烨光 于Evanston家中


Managing SSH Identities on Chrome OS

  05 Nov 2018     Chrome OS

The default shell in Chrome OS (“crosh” shell, invoked by Ctrl-Alt-T) only comes with a small set of command line commands. In order to get a full Linux development environment, the most convenient way is still to connect a remote server with the Secure Shell Extension (As of Nov 2019, Crostini, the Linux container on Chrome OS, has not come to many Chromebook models, e.g., my Samsung Chromebook Pro). However, because the Secure Shell App on Chrome OS is essentially browser based, it is not as straightforward as a normal Linux machine when it comes to management of ssh identities (public and secret keys) or known_hosts. This article tries to give solutions to some common issues.

Question: “WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!”

This issue happens when the host key of the server you are reaching does not match the record saved on your Chromebook. Secure Shell App blocks the connection to prevent potential man-in-the-middle attacks. However, in most cases, this simply happens after you reinstall the OS on your server. To address this issue, you can delete the corresponding entry in /.ssh/known_hosts.

First toggle the JavaScript console by Ctrl-Shift-J (within the Secure Shell App page). To delete a single record with index (the index can be found in the error message), type the following command in the console:

term_.command.removeKnownHostByIndex(INDEX);

To delete all records:

term_.command.removeAllKnownHosts();

Question: How to import ssh pub/private key identities (and delete them)?

Very often you want to use ssh keys instead of password to connect. You can import the keys by selecting the “Import…” link in the connection dialog page. Two files should be imported: one is a private key without file extension, and the other is a public which must ends in “.pub”. E.g., the keys generated by a Linux system are most liked “id_rsa” and “id_rsa.pub”.

It’s trickier To delete a saved identity (ssh key pair). To do this, you can select an identity from the dropdown and press the Delete key. However, since Chromebook does not come with Delete keys, you need to use Alt+Backspace instead.

Alternatively, to remove all keys, type the following in the JavaScript console:

term_.command.removeDirectory('/.ssh/')

References

  1. hterm/Secure Shell FAQ
  2. ChromeOS – removing SSH known_hosts from Chromebook

Kernel Update without Reinstalling Nvidia Driver

  31 Jan 2017     Linux

Fedora is always known as a cutting edge distribution with frequent updates. I love it so much expect when I have to reinstall my Nvidia driver everytime the kernel is updated. Recently I found a solution online using DKMS. DKMS, short for Dynamic Kernel Module Support, is used to automatically recompiles all DKMS modules when installing a kernel upgrade, thus allowing the drivers to continue working.

For the Nvidia driver on Fedora, simply install the DKMS package and install the Nvidia driver with “-dkms” option.

sudo dnf install dkms
sudo sh ./<DRIVER>.run --dkms