ChromeOS那些事儿

0x00 前言

心血来潮,想搞一个可以随身带着的办公设备,最先开始考虑买一个支持桌面模式的安卓手机+便携屏+充电宝,但是后来想想好像有些累赘,又寻摸着买mini主机,价钱高一点,但是性能相对强悍,后面又觉得没有必要,在不断寻找过程中,发现了Chromebook这种东西,也就是搭载Chromeos的笔记本电脑,查询发现可以运行linux和安卓软件,顿时觉得这就是我想要的,最后在咸鱼花不到1400入手了Acer spin713 二代,CPU是i7-10510u,16+128。又可以360翻转,又可以触摸,我觉得很有意思,便"不知天高地厚"的入手了,于是"坎坷"的路开始了。

0x01 开发者模式

  1. 将Chromebook关机。
  2. 按下 Esc 键与 Refresh 键,按住后再按下开机键。
  3. 在亮屏后,会提示警告信息,此时可以松开 Esc 与 Refresh 键,然后按下Ctrl+D组合键。
  4. 下一步系统会提示你是否继续,按下Enter键继续。
  5. 系统会进行 Powerwash,然后重新开机。此时Chromebook就开启了开发者模式。
  6. 此时,ChromeOS会进入首次设置页面,在第一页找到"启用调试模式"按钮并单击。
  7. 系统会提示设置root密码,需要设置一个稍微复杂的密码,以免被破解。
  8. 根据流程激活Chromebook。

Esc + 刷新键 + 电源键进入界面开启,此举会使系统进行Powerwash,也就是重置操作,数据会被清空,建议有需要的拿到手就做,或者备份数据。

激活需要fq,因为需要使用google账户激活,建议可以连接wifi之后,在右下角点击wifi对它进行设置,配置代理或者旁路由之类的进行激活。

0x02 更新操作系统

设置 -> 关于ChromeOS -> 检查更新

更新完之后重启升级就可以了,如果你开启了开发者模式,开机或重启会有一个提示界面,按Ctrl + D跳过。

0x03 中文输入法

设置 -> 语言和输入法 -> 语言 设置为中文,这样系统就会以中文显示了,如果你有google助手的使用需要就不要改了,因为那个只能在英文下使用。

安装真文韵输入法,https://chromewebstore.google.com/detail/fyderhythm-input-method/ppgpjbgimfloenilfemmcejiiokelkni

然后在设置 -> 语言和输入法 -> 输入法中添加真文韵输入法,启用之后点击旁边的按钮进行设置。

image-20240506213904553

image-20240506214005595

可以选择想要的方案,下滑到下面可以设置候选词数量。

0x04 开启Linux

设置 -> 高级 -> 开发者 -> Linux开发环境

按照提示配置用户名即可,大小自己看着来,后面也可以改。

默认情况下是Debian,我当前的版本是Debian12,,可以用cat /etc/os-release进行查看,主要是为了更换镜像源,网上也有可以切换为Arch Linux的教程,感兴趣的可以去搜下

image-20240506214550726

修改/etc/apt/sources.list更换镜像源(记得用sudo),这里给出清华大学的Debian12软件源,大家也可以在https://mirrors.tuna.tsinghua.edu.cn/help/debian/中根据自己的版本进行调整。

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware

deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
# deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware

运行下面的命令更新

sudo apt-get update

sudo apt-get upgrade

0x05 Linux中文环境以及调整字体

sudo apt install fonts-noto-cjk fonts-wqy-microhei fonts-wqy-zenhei

sudo dpkg-reconfigure locales

选择zh_CN.UTF-8

sudo apt install gnome-tweaks

运行gnome-tweaks,在"字体"选项中,设置"界面文本"与"文档文本"分别为"Noto Sans CJK SC Regular" 和 "Noto Sans Regular"

image-20240506215418042

0x06 共享文件夹

在ChromeOS下的文件夹中,右键下载内容,选择与Linux共享,会自动到/mnt/chromeos/MyFiles/Downloads,然后终端运行ln -s /mnt/chromeos/MyFiles/Downloads ~/Downloads

0x07 安装软件

  • Typora
wget -qO - https://typora.io/linux/public-key.asc | sudo tee /etc/apt/trusted.gpg.d/typora.asc
sudo echo "\ndeb https://typora.io/linux ./\n" >> /etc/apt/sources.list
sudo apt-get update
sudo apt-get install typora
  • code-server

这个是VSCode客户端的一种替代方式,可以在浏览器端进行访问。

curl -fsSL https://code-server.dev/install.sh | sh
sudo systemctl enable --now code-server@$USER
code-server --port 10086 --host 127.0.0.1
  • 其他安卓软件/Linux软件包

直接下载然后打开安装就可以了,开了开发者模式之后,基本都可以装了,只不过就是或多或少会有兼容性的问题,所以不要报有太高的期待。

0x08 Reference

  • https://zhuanlan.zhihu.com/p/646957410
  • https://chromewebstore.google.com/detail/fyderhythm-input-method/ppgpjbgimfloenilfemmcejiiokelkni
  • https://mirrors.tuna.tsinghua.edu.cn/help/debian/
  • https://github.com/coder/code-server
  • https://juejin.cn/post/7102250183064289316
  • https://zhuanlan.zhihu.com/p/391210581