<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ubuntu &#8211; 张三太爷</title>
	<atom:link href="https://www.somedoc.net/category/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.somedoc.net</link>
	<description>看前面，黑洞洞</description>
	<lastBuildDate>Mon, 11 Aug 2025 12:47:58 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>

<image>
	<url>https://www.somedoc.net/wp-content/uploads/2016/12/cropped-dandycheung-1-32x32.jpg</url>
	<title>Ubuntu &#8211; 张三太爷</title>
	<link>https://www.somedoc.net</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>使用微软重生版 edit 程序的艰难探索</title>
		<link>https://www.somedoc.net/2025/08/11/%e4%bd%bf%e7%94%a8%e5%be%ae%e8%bd%af%e9%87%8d%e7%94%9f%e7%89%88-edit-%e7%a8%8b%e5%ba%8f%e7%9a%84%e8%89%b0%e9%9a%be%e6%8e%a2%e7%b4%a2/</link>
					<comments>https://www.somedoc.net/2025/08/11/%e4%bd%bf%e7%94%a8%e5%be%ae%e8%bd%af%e9%87%8d%e7%94%9f%e7%89%88-edit-%e7%a8%8b%e5%ba%8f%e7%9a%84%e8%89%b0%e9%9a%be%e6%8e%a2%e7%b4%a2/#respond</comments>
		
		<dc:creator><![CDATA[张三太爷]]></dc:creator>
		<pubDate>Mon, 11 Aug 2025 12:44:38 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[软件]]></category>
		<category><![CDATA[问题解决]]></category>
		<guid isPermaLink="false">https://www.somedoc.net/?p=6439</guid>

					<description><![CDATA[edit 原本是微软在 MS-DOS 中附带的一个便捷工具， <a href="https://www.somedoc.net/2025/08/11/%e4%bd%bf%e7%94%a8%e5%be%ae%e8%bd%af%e9%87%8d%e7%94%9f%e7%89%88-edit-%e7%a8%8b%e5%ba%8f%e7%9a%84%e8%89%b0%e9%9a%be%e6%8e%a2%e7%b4%a2/" class="more-link">[&#8230;]</a>]]></description>
										<content:encoded><![CDATA[
<p>edit 原本是微软在 MS-DOS 中附带的一个便捷工具，用于让用户随手查看或者编辑文本文件用的，地位约等于 Windows 里的记事本。近来命令行下各种工具有卷土重来的势头，微软也在 Rust 语言的助攻下把本已凉透的 edit 复活了。</p>



<p>下午打开 WSL 里的 Ubuntu 18.04 LTS，要编辑一个 Python 源文件时突然就想试一下这个重生版的工具，于是到<a href="https://github.com/microsoft/edit/releases">官方分发页面</a>下载了下来，准备享受一番。解压缩就来了一次暴击，压缩包是个不常见的 zst 格式，原以为 tar 可以直接解决，但试过发现不行。只好先 <code>apt install zstd</code>，成功后用 zstd 解压。把得到的单文件 edit 移动到 /usr/bin 里执行，报错。</p>



<pre class="crayon-plain-tag">[crayon-68a74e7870822383659895 inline="true" ]./edit: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by ./edit)
./edit: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./edit)
./edit: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./edit)
./edit: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./edit)</pre>[/crayon]



<p>看了下系统内的 libc.so 的情况，版本是 2.27，正好差着一点。给系统升级这个重量级的 so 不是没有可能，但是风险较高，实在犯不上。正好前两天清理系统盘的时候，把 WSL 里那份不用的 Ubuntu 20.04 LTS 卸载掉了，不行就把当前的这份升级到 20.04 吧。</p>



<p>执行 <code>do-release-upgrade</code>，报错，信息的最后一句很明确：<code>ModuleNotFoundError: No module named 'apt_pkg'</code>。听了 AI 的劝，执行了 <code>apt install --reinstall python3-apt python3 python3-minimal</code> 和<br><code>apt install -f</code> 之后就好了。所谓的好了，就是 do-release-upgrade 命令可以执行了，而不是执行完成了，继续报错：</p>



<pre class="crayon-plain-tag">[crayon-68a74e7870826407456074 inline="true" ]Reading cache
pcilib: Cannot open /proc/bus/pci
lspci: Cannot find any working access method.

Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Hit http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit http://archive.ubuntu.com/ubuntu bionic InRelease
Hit http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Fetched 0 B in 0s (0 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done

Restoring original system state

Aborting
Reading package lists... Done
Building dependency tree
Reading state information... Done
=== Command detached from window (Mon Aug 11 18:33:29 2025) ===
=== Command terminated with exit status 1 (Mon Aug 11 18:33:39 2025) ===</pre>[/crayon]



<p>AI 又说了，你要打开 <code>/etc/update-manager/release-upgrades</code> 文件，找到 <code>Prompt=lts</code>，在它前面添加以下两行：</p>



<pre class="crayon-plain-tag">[crayon-68a74e7870829493513991 inline="true" ]CheckPCI=no
CheckUSB=no</pre>[/crayon]



<p>然后执行 <code>do-release-upgrade -f DistUpgradeViewNonInteractive</code>，再次失败。</p>



<p>无奈之下，先把 <code>/etc/apt/sources.list</code> 做了个备份，将其中的 <code>bionic</code> 全部替换成了 <code>focal</code>（<code>sed -i 's/bionic/focal/g' /etc/apt/sources.list</code>），然后执行了 <code>apt update</code> 和 <code>apy full-upgrade -y</code>。完成后重新打开 这份 WSL 实例，果然升级成功，libc.so 的版本升到了 2.31。于是满心期待地执行了 edit，呜呼呀，怎么界面看起来像是 VI？连退出的命令都没错，显然又有乌龙发生，应该是升级后的系统把 <code>/usr/bin/edit</code> 给覆盖了，八成成了 vim 的符号链接。</p>



<p>于是又把 edit 解压一次，这次执行就没问题了吧？嘿，报错：</p>



<pre class="crayon-plain-tag">[crayon-68a74e787082b741958794 inline="true" ]./edit: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./edit)
./edit: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./edit)
./edit: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./edit)</pre>[/crayon]



<p>除了把一行 2.28 的 glibc 找不到的信息消失了以外，涛声依旧。感情就是消遣俺来着。老夫还是先缓缓吧。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.somedoc.net/2025/08/11/%e4%bd%bf%e7%94%a8%e5%be%ae%e8%bd%af%e9%87%8d%e7%94%9f%e7%89%88-edit-%e7%a8%8b%e5%ba%8f%e7%9a%84%e8%89%b0%e9%9a%be%e6%8e%a2%e7%b4%a2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>让 Grub 把 Windows 系统设为默认</title>
		<link>https://www.somedoc.net/2025/02/14/%e8%ae%a9-grub-%e6%8a%8a-windows-%e7%b3%bb%e7%bb%9f%e8%ae%be%e4%b8%ba%e9%bb%98%e8%ae%a4/</link>
					<comments>https://www.somedoc.net/2025/02/14/%e8%ae%a9-grub-%e6%8a%8a-windows-%e7%b3%bb%e7%bb%9f%e8%ae%be%e4%b8%ba%e9%bb%98%e8%ae%a4/#respond</comments>
		
		<dc:creator><![CDATA[张三太爷]]></dc:creator>
		<pubDate>Fri, 14 Feb 2025 08:04:19 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[问题解决]]></category>
		<guid isPermaLink="false">https://www.somedoc.net/?p=6328</guid>

					<description><![CDATA[这个问题也是属于延宕了许久，实在烦不胜烦了，才决定要一劳永逸 <a href="https://www.somedoc.net/2025/02/14/%e8%ae%a9-grub-%e6%8a%8a-windows-%e7%b3%bb%e7%bb%9f%e8%ae%be%e4%b8%ba%e9%bb%98%e8%ae%a4/" class="more-link">[&#8230;]</a>]]></description>
										<content:encoded><![CDATA[<p>这个问题也是属于延宕了许久，实在烦不胜烦了，才决定要一劳永逸解决的，之前一直是手动修改 <code>/boot/grub/grub.cfg</code>，但比较烦人的地方在于，不管是 Grub 自己升级，还是有涉及到内核的其它升级，都会在完成后自动执行 <code>update-grub</code> 从而使得手动修改的部分被清空。而如果放任不改的话，Windows 又跳出来作乱，自动更新后重启系统，就会直接从 Grub 进入到 Ubuntu。</p>
<p>问了问 DeepSeek，给出的例子老是出问题，三五个回合以后，它又回到起初的回答上了。最后还是自己修修改改搞定了。</p>
<p>到 <code>/etc/grub.d/</code> 目录下，创建一个新的 Grub 钩子脚本，三太爷的命名为 <code>31_set_default_os</code>，内容如下：</p><pre class="crayon-plain-tag">#!/bin/sh

set_windows_as_default() {
    local windows_entry

    windows_entry=$(grep -i 'windows' /boot/grub/grub.cfg | grep -oP 'menuentry \K[\x27\x32].*?[\x27\x32]' | tr -d "'\"")
    if [ -n "$windows_entry" ]; then
cat &lt;&lt; EOF
set default="$windows_entry"
EOF
        echo "Windows is set as default OS." &gt;&amp;2
        # echo "Windows found." &gt;&amp;2
    else
        echo "Windows not found." &gt;&amp;2
    fi
}

set_windows_as_default</pre><p><code>\x27</code> 和 <code>\x32</code> 分别是单双引号字符，写成转义的形式是为了不影响命令行的识别和传递。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.somedoc.net/2025/02/14/%e8%ae%a9-grub-%e6%8a%8a-windows-%e7%b3%bb%e7%bb%9f%e8%ae%be%e4%b8%ba%e9%bb%98%e8%ae%a4/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>锁定 Waydroid 的屏幕方向</title>
		<link>https://www.somedoc.net/2024/04/10/%e9%94%81%e5%ae%9a-waydroid-%e7%9a%84%e5%b1%8f%e5%b9%95%e6%96%b9%e5%90%91/</link>
					<comments>https://www.somedoc.net/2024/04/10/%e9%94%81%e5%ae%9a-waydroid-%e7%9a%84%e5%b1%8f%e5%b9%95%e6%96%b9%e5%90%91/#respond</comments>
		
		<dc:creator><![CDATA[张三太爷]]></dc:creator>
		<pubDate>Wed, 10 Apr 2024 12:54:20 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[软件]]></category>
		<category><![CDATA[问题解决]]></category>
		<category><![CDATA[Waydroid]]></category>
		<guid isPermaLink="false">https://www.somedoc.net/?p=5958</guid>

					<description><![CDATA[Waydroid 下运行 app，时不时内容显示就会自动旋转 <a href="https://www.somedoc.net/2024/04/10/%e9%94%81%e5%ae%9a-waydroid-%e7%9a%84%e5%b1%8f%e5%b9%95%e6%96%b9%e5%90%91/" class="more-link">[&#8230;]</a>]]></description>
										<content:encoded><![CDATA[<p>Waydroid 下运行 app，时不时内容显示就会自动旋转成头左脚右的方向，但鼠标的响应区域却又没有旋转，导致不到你要歪着脖子看，而且还没办法去点击 app 显示内容的下半部分（当然也就是屏幕上的右半部分）。</p>
<p>苦恼了一阵，决定还是要解决一下，要不然操作太烦。在<a href="https://github.com/waydroid/waydroid/issues/584">问题区</a>找到这么个命令：</p>
<p><code>waydroid shell wm set-user-rotation lock 0</code></p>
<p>应该是强制锁定了旋转角度，用起来好不少。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.somedoc.net/2024/04/10/%e9%94%81%e5%ae%9a-waydroid-%e7%9a%84%e5%b1%8f%e5%b9%95%e6%96%b9%e5%90%91/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>5G 频率支棱起</title>
		<link>https://www.somedoc.net/2023/09/05/5g-%e9%a2%91%e7%8e%87%e6%94%af%e6%a3%b1%e8%b5%b7/</link>
					<comments>https://www.somedoc.net/2023/09/05/5g-%e9%a2%91%e7%8e%87%e6%94%af%e6%a3%b1%e8%b5%b7/#respond</comments>
		
		<dc:creator><![CDATA[张三太爷]]></dc:creator>
		<pubDate>Tue, 05 Sep 2023 12:38:41 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[电脑]]></category>
		<category><![CDATA[硬件]]></category>
		<category><![CDATA[问题解决]]></category>
		<guid isPermaLink="false">https://www.somedoc.net/?p=5648</guid>

					<description><![CDATA[有一台 ThinkPad E545 的下半身，装了 Ubun <a href="https://www.somedoc.net/2023/09/05/5g-%e9%a2%91%e7%8e%87%e6%94%af%e6%a3%b1%e8%b5%b7/" class="more-link">[&#8230;]</a>]]></description>
										<content:encoded><![CDATA[<p>有一台 ThinkPad E545 的下半身，装了 Ubuntu 22.04，在局域网里假模假式当个文件服务器啥的。当时拆掉上半身时，因为拆得太干净，无线网卡的天线就没了，剩下无线网卡自己待在壳子里，信号不好没什么用，还费电，干脆把它也拆了。当然随之而来的问题就是，总得联网吧？</p>
<p>从百宝箱里翻腾出一个十年前的小度 Wi-Fi 来，这玩意儿当年在 Windows 下用官方驱动就会搞一大堆乱七八糟的东西进来，但在 Linux 却是一块标准的无线网卡，这回正好废物利用。插上以后，又发现了个问题。路由器是又耳哥搞的，他当初不知怎么手潮了一下，结果只起了 5G 的热点，2.4G 的热点没搞。而这小度 Wi-Fi 不支持 5G，联不进去。</p>
<p>他周六鼓捣了一天也没把 2.4G 网络搭起来，老夫只好在闲鱼上下单了一块新的 USB 无线网卡，价格实惠量又足，600M 的双频无线网卡，个头也不大，RTL8811CU 的方案，22 块钱还包邮，显然没有挑三拣四的理由。到手后插到 Ubuntu 机器上，<code>lsusb</code> 能看到，但是没有自动驱动起来。</p>
<p><a href="https://askubuntu.com/questions/1162974/wireless-usb-adapter-0bdac811-realtek-semiconductor-corp">网上说有两个仓库</a>，一老一新，也就是 https://github.com/brektrou/rtl8821CU.git 和 https://github.com/morrownr/8821cu-20210916.git。老夫虽然两个都 clone 下来了，但首选肯定是新的那个。</p>
<p>进入到目录里，根据看到的指引直接执行 <code>sudo ./install-driver.sh</code>（事先还执行了 <code>sudo apt install build-essential dkms</code> 以防缺少编译设施支撑），结果这个脚本很快执行到结尾，提示（并同时建议）我打开配置文件看看是否要定制什么，并提示（并同时建议）最好立刻重启。重启之后，网卡仍未如愿驱动成功，到源代码根目录下搜索 <code>*.ko</code> 文件一无所获。无奈，只好先手动执行 <code>make</code>，这次，编译过程肉眼可见，缓缓进行；完成后也有了 8821cu.ko 文件。接着执行 <code>sudo make install</code>，再执行 <code>sudo modprobe 8821cu</code>。这下 Wi-Fi 网络就顿时出现了，那些 5G 热点也都出现在列表里了，圆满成功。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.somedoc.net/2023/09/05/5g-%e9%a2%91%e7%8e%87%e6%94%af%e6%a3%b1%e8%b5%b7/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Ubuntu 22.04 下体验 Waydroid</title>
		<link>https://www.somedoc.net/2023/05/10/ubuntu-22-04-%e4%b8%8b%e4%bd%93%e9%aa%8c-waydroid/</link>
					<comments>https://www.somedoc.net/2023/05/10/ubuntu-22-04-%e4%b8%8b%e4%bd%93%e9%aa%8c-waydroid/#respond</comments>
		
		<dc:creator><![CDATA[张三太爷]]></dc:creator>
		<pubDate>Wed, 10 May 2023 15:12:02 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[软件]]></category>
		<category><![CDATA[问题解决]]></category>
		<guid isPermaLink="false">https://www.somedoc.net/?p=5507</guid>

					<description><![CDATA[Waydroid 是 Linux 下使用容器技术运行 And <a href="https://www.somedoc.net/2023/05/10/ubuntu-22-04-%e4%b8%8b%e4%bd%93%e9%aa%8c-waydroid/" class="more-link">[&#8230;]</a>]]></description>
										<content:encoded><![CDATA[<p>Waydroid 是 Linux 下使用容器技术运行 Android 的一个产品。它有点像 Docker 而不是 Virtual Box。官方针对各种 Linux 发行版的安装文档在 <a href="https://docs.waydro.id/usage/install-on-desktops">https://docs.waydro.id/usage/install-on-desktops</a> 可以找到。</p>
<p>安装 Waydroid 成功后，再下载需要的 Android 映像，之后就可以启动 Android 了。要向 Android 中安装 apk 的话，可以使用 <code>waydroid app install</code> 命令。要是想在 Android 内部执行命令（非 GUI 应用），则可以使用 <code>sudo waydroid shell</code>。这样的用法，看上去又和 adb 类似。</p>
<p>第一个要解决的问题是 Play Store，要执行这些命令（信息源：https://github.com/casualsnek/waydroid_script）：</p>
<ul>
<li>前提：<code>sudo apt install lzip sqlite</code></li>
<li>安装 OpenGapps：
<ul>
<li><code>git clone https://github.com/casualsnek/waydroid_script</code></li>
<li><code>cd waydroid_script</code></li>
<li><code>sudo python3 -m pip install -r requirements.txt</code>，这是安装此脚本工具所需的依赖</li>
<li><code>sudo python3 main.py -g</code>，这是安装 OpenGapps</li>
<li><code>waydroid show-full-ui</code>，启动 Android，请等待完全启动就绪</li>
<li><code>sudo python3 main.py -i</code>，获取 Android ID 以便注册设备</li>
</ul>
</li>
</ul>
<p>笔者在获取 Android ID 时遇到了错误，命令行执行后一直报以下信息：</p>
<blockquote><p>ERROR: Cannot access gservices.db, make sure gapps is installed and waydroid was started at least once after installation and make sure waydroid is running !</p></blockquote>
<p>所以只好自己再去寻找答案，找到 https://github.com/waydroid/waydroid/issues/753，其中提到可以执行 <code>sudo grep android_id ~/.local/share/waydroid/data/data/com.google.android.gms/shared_prefs/Checkin.xml | cut -f2 -d"&gt;" | cut -f1 -d"&lt;"</code>。后来发现，其实也可以在 waydroid shell 中执行 <code>sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "select * from main where name = \"android_id\";"</code> 获取到。</p>
<p>然后用浏览器打开 <a href="https://www.google.com/android/uncertified/?pli=1">https://www.google.com/android/uncertified/?pli=1</a>，使用 Google 账户登录后，把上面取得的 Android ID 填进去进行注册。注册成功后，在命令行执行 <code>sudo waydroid session stop</code> 以确保 Waydroid 完全退出，然后重新启动 Waydroid。此时再打开 Play Store 应用，就可以像正常手机上那样登录，并下载安装应用了。</p>
<p>笔者另外还遇到了 Waydroid 内的 Android 网络不通的情况，折腾 Wi-Fi 连接许久无果，后来的某次重启系统后，Waydroid 内的 Android 突然以有线连接的方式联网了，就这么将就着往下用了。</p>
<p>更新（2025-04-23）：</p>
<p>时隔两年，又安装了一次。有几个小点明确一下。</p>
<ul>
<li>最开头 apt 安装的 <code>sqlite</code> 要改为 <code>sqlite3</code> 了；</li>
<li>Linux 确实需要一次重启，Waydroid 的网络才能工作；</li>
<li>上面在数据库中检索 android_id 的 SQL 语句，在 Google 网站的页面上已经写为 <code>sqlite3 /data/user/$(cmd activity get-current-user)/*/*/gservices.db \<br />
"select * from main where name = \"android_id\";"</code>；但事实是仍会报找不到 android_id 这一列，把 <code>where</code> 子句去除，然后拼接上 grep 过滤即可；</li>
<li>注册成功后，Google Play 可能要等比较久才认可设备，网帖上说的“久”是三五分钟，本人实际是好几个小时。</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.somedoc.net/2023/05/10/ubuntu-22-04-%e4%b8%8b%e4%bd%93%e9%aa%8c-waydroid/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Ubuntu 22.04 下如何把“显示所有应用”按钮移至任务栏左边</title>
		<link>https://www.somedoc.net/2023/05/10/ubuntu-22-04-%e4%b8%8b%e5%a6%82%e4%bd%95%e6%8a%8a%e6%98%be%e7%a4%ba%e6%89%80%e6%9c%89%e5%ba%94%e7%94%a8%e6%8c%89%e9%92%ae%e7%a7%bb%e8%87%b3%e4%bb%bb%e5%8a%a1%e6%a0%8f%e5%b7%a6/</link>
					<comments>https://www.somedoc.net/2023/05/10/ubuntu-22-04-%e4%b8%8b%e5%a6%82%e4%bd%95%e6%8a%8a%e6%98%be%e7%a4%ba%e6%89%80%e6%9c%89%e5%ba%94%e7%94%a8%e6%8c%89%e9%92%ae%e7%a7%bb%e8%87%b3%e4%bb%bb%e5%8a%a1%e6%a0%8f%e5%b7%a6/#respond</comments>
		
		<dc:creator><![CDATA[张三太爷]]></dc:creator>
		<pubDate>Wed, 10 May 2023 12:27:38 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[电脑]]></category>
		<category><![CDATA[问题解决]]></category>
		<guid isPermaLink="false">https://www.somedoc.net/?p=5505</guid>

					<description><![CDATA[一条命令即可：gsettings set org.gnome <a href="https://www.somedoc.net/2023/05/10/ubuntu-22-04-%e4%b8%8b%e5%a6%82%e4%bd%95%e6%8a%8a%e6%98%be%e7%a4%ba%e6%89%80%e6%9c%89%e5%ba%94%e7%94%a8%e6%8c%89%e9%92%ae%e7%a7%bb%e8%87%b3%e4%bb%bb%e5%8a%a1%e6%a0%8f%e5%b7%a6/" class="more-link">[&#8230;]</a>]]></description>
										<content:encoded><![CDATA[<p>一条命令即可：<code>gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top true</code>。</p>
<p>是的，你没看错，命令行中是 <code>top</code> 而不是 <code>left</code>，因为这个命令当初是给任务栏还是竖着摆放的时候准备的。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.somedoc.net/2023/05/10/ubuntu-22-04-%e4%b8%8b%e5%a6%82%e4%bd%95%e6%8a%8a%e6%98%be%e7%a4%ba%e6%89%80%e6%9c%89%e5%ba%94%e7%94%a8%e6%8c%89%e9%92%ae%e7%a7%bb%e8%87%b3%e4%bb%bb%e5%8a%a1%e6%a0%8f%e5%b7%a6/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>手动升级签名版的 Ubuntu 内核</title>
		<link>https://www.somedoc.net/2022/10/20/%e6%89%8b%e5%8a%a8%e5%8d%87%e7%ba%a7%e7%ad%be%e5%90%8d%e7%89%88%e7%9a%84-ubuntu-%e5%86%85%e6%a0%b8/</link>
					<comments>https://www.somedoc.net/2022/10/20/%e6%89%8b%e5%8a%a8%e5%8d%87%e7%ba%a7%e7%ad%be%e5%90%8d%e7%89%88%e7%9a%84-ubuntu-%e5%86%85%e6%a0%b8/#respond</comments>
		
		<dc:creator><![CDATA[张三太爷]]></dc:creator>
		<pubDate>Thu, 20 Oct 2022 15:07:56 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[问题解决]]></category>
		<guid isPermaLink="false">https://www.somedoc.net/?p=5234</guid>

					<description><![CDATA[Surface Pro 3 关闭安全引导后开机画面变成血红的 <a href="https://www.somedoc.net/2022/10/20/%e6%89%8b%e5%8a%a8%e5%8d%87%e7%ba%a7%e7%ad%be%e5%90%8d%e7%89%88%e7%9a%84-ubuntu-%e5%86%85%e6%a0%b8/" class="more-link">[&#8230;]</a>]]></description>
										<content:encoded><![CDATA[<p>Surface Pro 3 关闭安全引导后开机画面变成血红的红底还是引起了生理不适，所以决定还是要更新到签名过的内核上，但不考虑自行签名的方式。</p>
<p>操作主要参考此链接：https://askubuntu.com/questions/1434143/how-to-install-latest-ubuntu-signed-kernel-on-lts。</p>
<p>略作修订的版本如下：</p><pre class="crayon-plain-tag">#!/bin/bash

# from: https://askubuntu.com/questions/1434143/how-to-install-latest-ubuntu-signed-kernel-on-lts

# Note: you will need to edit the major/minor and firmware/microcode version according to what can
# be found in http://fr.archive.ubuntu.com/ubuntu/pool/main/ - as only the latest build is present.

root=http://fr.archive.ubuntu.com/ubuntu/pool/main/
major=5.19.0
minor1=21
minor2=21

wget \
$root/l/linux-signed/linux-image-$major-${minor1}-generic_$major-${minor1}.${minor2}_amd64.deb \
$root/l/linux/linux-headers-$major-${minor1}-generic_$major-${minor1}.${minor2}_amd64.deb \
$root/l/linux/linux-headers-$major-${minor1}_$major-${minor1}.${minor2}_all.deb \
$root/l/linux/linux-modules-$major-${minor1}-generic_$major-${minor1}.${minor2}_amd64.deb

wget \
$root/l/linux/linux-modules-extra-$major-${minor1}-generic_$major-${minor1}.${minor2}_amd64.deb \
$root/l/linux/linux-modules-iwlwifi-$major-${minor1}-generic_$major-${minor1}.${minor2}_amd64.deb

sudo dpkg -i *.deb

# fixes "Possible missing firmware /lib/firmware/i915/skl_guc_70.1.1.bin for module i915" etc
# wget \
# $root/a/amd64-microcode/amd64-microcode_3.20220411.1ubuntu3_amd64.deb \
# $root/l/linux-firmware/linux-firmware_20220923.gitf09bebf3-0ubuntu1_all.deb
# sudo dpkg -i --auto-deconfigure linux-firmware_*.deb amd64-microcode_*.deb</pre><p>一开始屏蔽了 extra 和 iwlwifi 两个包，发现显示器分辨率会上不去，可见没有它们会有问题。后来单独安装 extra 成功，显示正常，iwlwifi 安装失败，结果是无法连接无线网络。最后一段的代码，因为没有遇到其引用的错误信息，因此没有放开。</p>
<p>iwlwifi 安装失败的原因是内核模块编译失败。编译时的系统上，有三个内核版本，一个是用上面的脚本安装的存在网络功能缺陷的 5.19（有签名），一个是试图用 5.19 取代的无签名的 5.15，还有就是没有手动干预之前系统自动可以升级到的 5.4（有签名，但是 Snap 不能工作）。用 5.15 引导起来的系统下尝试安装 5.19 版本的 iwlwifi 的 deb 安装包，似乎也没有即刻就成功。既然如此，那就还是回到 5.19 版本的内核下去排错好了。在重启之前，尝试移除 5.15 版本的内核（没有太大使用价值了），此过程中 dpkg 工具给出了警告，因为此版本的内核正在使用中，可能导致系统出现必须手动修复的问题，于是在最后关头选择了中止。重启到 5.19 版本的内核下之后，发现网络功能竟然好了，原因未知。这下正好，没有任何后顾之忧地把 5.15 版本的内核卸载掉了。</p>
<p>以上的处理结束后又动了动脑，进行了一些验证，才发现其实可以使用 apt 命令来安装内核（应该都是签名过的版本），只是检索起来不那么方便。可以使用如下命令行查看内核（headers 和 modules 应该也可照章办理）：</p><pre class="crayon-plain-tag">#!/bin/bash

sudo apt search image | grep ^linux-image | awk '{print $1}' | awk -F '/' '{print $1}' | grep -Po "^linux-image-\d+\.*\d+.*"</pre><p></p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.somedoc.net/2022/10/20/%e6%89%8b%e5%8a%a8%e5%8d%87%e7%ba%a7%e7%ad%be%e5%90%8d%e7%89%88%e7%9a%84-ubuntu-%e5%86%85%e6%a0%b8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>解决 Surface Pro 3 上的 Snap 应用不可用的问题</title>
		<link>https://www.somedoc.net/2022/10/20/%e8%a7%a3%e5%86%b3-surface-pro-3-%e4%b8%8a%e7%9a%84-snap-%e5%ba%94%e7%94%a8%e4%b8%8d%e5%8f%af%e7%94%a8%e7%9a%84%e9%97%ae%e9%a2%98/</link>
					<comments>https://www.somedoc.net/2022/10/20/%e8%a7%a3%e5%86%b3-surface-pro-3-%e4%b8%8a%e7%9a%84-snap-%e5%ba%94%e7%94%a8%e4%b8%8d%e5%8f%af%e7%94%a8%e7%9a%84%e9%97%ae%e9%a2%98/#respond</comments>
		
		<dc:creator><![CDATA[张三太爷]]></dc:creator>
		<pubDate>Thu, 20 Oct 2022 13:59:56 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[问题解决]]></category>
		<guid isPermaLink="false">https://www.somedoc.net/?p=5232</guid>

					<description><![CDATA[现象是执行任何 Snap 应用都会失败，在命令行下观察到的错 <a href="https://www.somedoc.net/2022/10/20/%e8%a7%a3%e5%86%b3-surface-pro-3-%e4%b8%8a%e7%9a%84-snap-%e5%ba%94%e7%94%a8%e4%b8%8d%e5%8f%af%e7%94%a8%e7%9a%84%e9%97%ae%e9%a2%98/" class="more-link">[&#8230;]</a>]]></description>
										<content:encoded><![CDATA[<p>现象是执行任何 Snap 应用都会失败，在命令行下观察到的错误基本如下（以执行 firefox 为例）：</p>
<p></p><pre class="crayon-plain-tag">$ firefox
cannot attach cgroup program: Operation not permitted</pre><p> </p>
<p>这个问题的根源是：内核版本不够高。</p>
<p>理论上升级 Ubuntu 到 22.04 LTS 是不应该出现此问题的，但在 Surface Pro 3 上就是出现了。这可能是因为 Surface Pro 3 的 UEFI 设置里，<code>Secure Boot</code> 被打开了，而要被更新到的新版本内核是没有签名的，所以不会被成功加载引导，而是加载了之前签了名的 <code>v5.4.0</code>。把 <code>Secure Boot</code> 关闭即可，但关闭之后有个副作用，Surface Pro 3 开机画面会变成红底，相当难看。</p>
<p>用 <code>find /boot/vmli*</code> 可以看到系统中已安装的内核。要手动下载 Ubuntu 系统的内核文件进行更新的话，可以访问 <code>https://kernel.ubuntu.com/~kernel-ppa/mainline/</code> 获得，下载完成后用 <code>dpkg -i *.deb</code> 命令安装重启即可。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.somedoc.net/2022/10/20/%e8%a7%a3%e5%86%b3-surface-pro-3-%e4%b8%8a%e7%9a%84-snap-%e5%ba%94%e7%94%a8%e4%b8%8d%e5%8f%af%e7%94%a8%e7%9a%84%e9%97%ae%e9%a2%98/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>解决 Surface Pro 3 上的 Linux 频繁断网的问题</title>
		<link>https://www.somedoc.net/2022/10/20/%e8%a7%a3%e5%86%b3-surface-pro-3-%e4%b8%8a%e7%9a%84-linux-%e9%a2%91%e7%b9%81%e6%96%ad%e7%bd%91%e7%9a%84%e9%97%ae%e9%a2%98/</link>
					<comments>https://www.somedoc.net/2022/10/20/%e8%a7%a3%e5%86%b3-surface-pro-3-%e4%b8%8a%e7%9a%84-linux-%e9%a2%91%e7%b9%81%e6%96%ad%e7%bd%91%e7%9a%84%e9%97%ae%e9%a2%98/#respond</comments>
		
		<dc:creator><![CDATA[张三太爷]]></dc:creator>
		<pubDate>Thu, 20 Oct 2022 13:10:18 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[电脑]]></category>
		<category><![CDATA[问题解决]]></category>
		<guid isPermaLink="false">https://www.somedoc.net/?p=5227</guid>

					<description><![CDATA[用的系统是 Ubuntu 22.04 LTS，但网上搜索发现 <a href="https://www.somedoc.net/2022/10/20/%e8%a7%a3%e5%86%b3-surface-pro-3-%e4%b8%8a%e7%9a%84-linux-%e9%a2%91%e7%b9%81%e6%96%ad%e7%bd%91%e7%9a%84%e9%97%ae%e9%a2%98/" class="more-link">[&#8230;]</a>]]></description>
										<content:encoded><![CDATA[<p>用的系统是 Ubuntu 22.04 LTS，但网上搜索发现应该是许多发行版都有的问题。</p>
<p>我目前使用着且有效的解决方法是：</p>
<p>
			<span id="crayon-68a74e78714f5497299413" class="crayon-syntax crayon-syntax-inline  crayon-theme-visual-assist crayon-theme-visual-assist-inline crayon-font-droid-sans-mono" style="font-size: 13px !important; line-height: 16px !important;font-size: 13px !important;"><span class="crayon-pre crayon-code" style="font-size: 13px !important; line-height: 16px !important;font-size: 13px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-e">sudo </span><span class="crayon-v">sed</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">i</span><span class="crayon-h"> </span><span class="crayon-s">'s/wifi.powersave = 3/wifi.powersave = 2/'</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">etc</span><span class="crayon-o">/</span><span class="crayon-v">NetworkManager</span><span class="crayon-o">/</span><span class="crayon-v">conf</span><span class="crayon-sy">.</span><span class="crayon-v">d</span><span class="crayon-o">/</span><span class="crayon-st">default</span><span class="crayon-o">-</span><span class="crayon-v">wifi</span><span class="crayon-o">-</span><span class="crayon-v">powersave</span><span class="crayon-o">-</span><span class="crayon-v">on</span><span class="crayon-sy">.</span><span class="crayon-v">conf</span></span></span></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.somedoc.net/2022/10/20/%e8%a7%a3%e5%86%b3-surface-pro-3-%e4%b8%8a%e7%9a%84-linux-%e9%a2%91%e7%b9%81%e6%96%ad%e7%bd%91%e7%9a%84%e9%97%ae%e9%a2%98/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>升级到 Ubuntu 22.04 LTS</title>
		<link>https://www.somedoc.net/2022/07/23/%e5%8d%87%e7%ba%a7%e5%88%b0-ubuntu-22-04-lts/</link>
					<comments>https://www.somedoc.net/2022/07/23/%e5%8d%87%e7%ba%a7%e5%88%b0-ubuntu-22-04-lts/#respond</comments>
		
		<dc:creator><![CDATA[张三太爷]]></dc:creator>
		<pubDate>Sat, 23 Jul 2022 02:18:41 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[生活]]></category>
		<category><![CDATA[电脑]]></category>
		<category><![CDATA[问题解决]]></category>
		<guid isPermaLink="false">https://www.somedoc.net/?p=5135</guid>

					<description><![CDATA[第一部分 —— 更新 Ubuntu 22.04 LTS 发布 <a href="https://www.somedoc.net/2022/07/23/%e5%8d%87%e7%ba%a7%e5%88%b0-ubuntu-22-04-lts/" class="more-link">[&#8230;]</a>]]></description>
										<content:encoded><![CDATA[<h2>第一部分 —— 更新</h2>
<p>Ubuntu 22.04 LTS 发布有日子了，刚才正好有事切到 Ubuntu 下，现在的版本是 20.04 LTS，顺手执行了一下 <code>do-release-upgrade</code>，没有效果，又加上 <code>-d</code> 参数再试就有了动静，不过报了一个问题后中止了：</p>
<blockquote><p>Sorry, this storage driver is not supported in kernels for newer releases</p>
<p>There will not be any further Ubuntu releases that provide kernel support for the aufs storage driver.</p>
<p>Please ensure that none of your containers are using the aufs storage driver, remove the directory /var/lib/docker/aufs and try again.</p></blockquote>
<p>按照 <a href="https://askubuntu.com/questions/1361206/docker-upgrade-failure-the-aufs-storage-driver-is-no-longer-supported">https://askubuntu.com/questions/1361206/docker-upgrade-failure-the-aufs-storage-driver-is-no-longer-supported</a> 中的步骤操作，看了下 docker 里的映像，都是之前比较陈旧的测试性的东西了，即便毁了也没什么。</p>
<p>很可惜的是，只要在 <code>daemon.json</code> 里加上 <code>"storage-driver": "overlay2"</code> 这一条语句，docker 就无法再次正常启动，去掉就可以。所以老夫执行了如下几连杀：<code>systemctl stop docker</code>、<code>docker rm $(sudo docker ps -a -q)</code>、<code>docker rmi -f $(sudo docker images -q)</code>、<code>apt remove docker-ce docker-ce-cli</code>、<code>rm -rf /var/lib/docker</code>。</p>
<p>再次 <code>do-release-upgrade -d</code>，顺畅了。</p>
<h2>第二部分 —— 抢救</h2>
<p>升级程序在控制台里输出升级已完成，重启之后，机器冻结在开机画面好久。等了半天等不及了，就强行关机重启，结果悲剧了，出现以下画面。网上有与此相关的不少信息，但原因一样或者类似的几乎没有。</p>
<p><a href="https://www.somedoc.net/wp-content/uploads/2022/07/aaf9a586fed1f1babf19e0f3d128129.jpg" class="highslide-image" onclick="return hs.expand(this);"><img decoding="async" class="size-medium wp-image-5138 aligncenter" src="https://www.somedoc.net/wp-content/uploads/2022/07/aaf9a586fed1f1babf19e0f3d128129-300x116.jpg" alt="" width="300" height="116" srcset="https://www.somedoc.net/wp-content/uploads/2022/07/aaf9a586fed1f1babf19e0f3d128129-300x116.jpg 300w, https://www.somedoc.net/wp-content/uploads/2022/07/aaf9a586fed1f1babf19e0f3d128129-1024x395.jpg 1024w, https://www.somedoc.net/wp-content/uploads/2022/07/aaf9a586fed1f1babf19e0f3d128129-768x296.jpg 768w, https://www.somedoc.net/wp-content/uploads/2022/07/aaf9a586fed1f1babf19e0f3d128129-1025x396.jpg 1025w, https://www.somedoc.net/wp-content/uploads/2022/07/aaf9a586fed1f1babf19e0f3d128129.jpg 1399w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>最后在<a href="https://unix.stackexchange.com/questions/414655/not-syncing-vfs-unable-to-mount-root-fs-on-unknown-block0-0">一篇问答</a>中有人提及一个方法，在开机时使用 Grub 高级菜单中内核版本号最低且为恢复模式的那一项引导，进入后执行 <code>clean</code> 这个操作。我一时兴起，还顺手执行了 dpkg 的包修复操作。结果完成后，竟然就进入到登录图形界面了。</p>
<h2>第三部分 —— Firefox</h2>
<p>Ubuntu 22.04 中，不知道那个脑抽的人做出的决定，Firefox 不再以传统的 deb 包发行，而是改为 snap 格式。结果它自行迁移的能力基本上就是弱智到极点。以下为实录（而且去除了不少事后认识到与问题无干的中间试错环节）。</p>
<p>// 点击 Firefox 图标，等待状态的鼠标指针会显示一会儿，然后就没有然后了。为了排查问题，从终端里手动执行启动操作，以便观察：会报两个错误</p><pre class="crayon-plain-tag">➜ ~ firefox
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (failed to map segment from shared object): ignored.
ERROR: not connected to the gnome-3-38-2004 content interface.</pre><p>// 在网络上找到如下解决方案</p><pre class="crayon-plain-tag">➜ ~ export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0</pre><p>// 挺好，顺利解决一个问题，还有一个</p><pre class="crayon-plain-tag">➜ ~ firefox
ERROR: not connected to the gnome-3-38-2004 content interface.</pre><p>// 又找到了第二个问题的解决方案</p><pre class="crayon-plain-tag">➜ ~ sudo snap install gnome-3-38-2004
snap "gnome-3-38-2004" is already installed, see 'snap help refresh'

➜ ~ snap connect firefox:gnome-3-38-2004 gnome-3-38-2004:gnome-3-38-2004</pre><p>// 错误发生变化。也是两个，一个权限相关，一个显示设备相关</p><pre class="crayon-plain-tag">➜ ~ firefox
sed: can't read /home/$(USERNAME)/.config/user-dirs.dirs: Permission denied
/snap/firefox/1551/snap/command-chain/desktop-launch: line 261: /home/$(USERNAME)/.config/user-dirs.dirs: Permission denied
cp: cannot open '/home/$(USERNAME)/.config/user-dirs.locale' for reading: Permission denied
/snap/firefox/1551/snap/command-chain/desktop-launch: line 266: /home/$(USERNAME)/.config/user-dirs.locale: Permission denied
Error: cannot open display: :1</pre><p>// 到 Ubuntu Software 中，为 Firefox 设置了相应权限后</p><pre class="crayon-plain-tag">➜ ~ firefox
cannot attach cgroup program: Operation not permitted</pre><p>// 找到了 <a href="https://askubuntu.com/questions/1369947/after-ubuntu-21-10-upgrade-cannot-attach-cgroup-program-operation-not-permitt">https://askubuntu.com/questions/1369947/after-ubuntu-21-10-upgrade-cannot-attach-cgroup-program-operation-not-permitt</a>，查看后执行</p><pre class="crayon-plain-tag">➜ ~ sudo update-grub
➜ ~ sudo reboot</pre><p>// 重启再运行 Firefox，cgroup 问题消失（确实是因为上一次的启动是从一次恢复模式进入的，内核版本是旧的）。<br />
// 但是权限问题再次出现，且不能打开的显示设备从 <code>:1</code> 变成了 <code>:0</code>。</p>
<p>// 网上搜罗信息良久，感觉似乎是 Snap 对 Firefox 的配置有问题。学着这样查看：</p><pre class="crayon-plain-tag">➜ ~ snap connections firefox

Interface                Plug                           Slot                            Notes
audio-playback           firefox:audio-playback         :audio-playback                 manual
audio-record             firefox:audio-record           :audio-record                   manual
avahi-observe            firefox:avahi-observe          - -
browser-support          firefox:browser-sandbox        :browser-support                manual
camera                   firefox:camera                 :camera manual
content[gnome-3-38-2004] firefox:gnome-3-38-2004        gnome-3-38-2004:gnome-3-38-2004 manual
content                  firefox:gtk-3-themes           -                               -
content                  firefox:icon-themes            -                               -
content                  firefox:sound-themes           -                               -
cups-control             firefox:cups-control           :cups-control                   manual
dbus                     -                              firefox:dbus-daemon             -
desktop                  firefox:desktop                -                               -
desktop-legacy           firefox:desktop-legacy         -                               -
gsettings                firefox:gsettings              :gsettings                      manual
hardware-observe         firefox:hardware-observe       -                               -
home                     firefox:home                   :home                           manual
joystick                 firefox:joystick               -                               -
mpris                    -                              firefox:mpris                   -
network                  firefox:network                -                               -
network-bind             firefox:network-bind           -                               -
network-observe          firefox:network-observe        -                               -
opengl                   firefox:opengl                 -                               -
personal-files           firefox:dot-mozilla-firefox    :personal-files                 manual
removable-media          firefox:removable-media        :removable-media                manual
screen-inhibit-control   firefox:screen-inhibit-control -                               -
system-files             firefox:etc-firefox-policies   -                               -
system-packages-doc      firefox:system-packages-doc    -                               -
u2f-devices              firefox:u2f-devices            -                               -
unity7                   firefox:unity7                 -                               -
upower-observe           firefox:upower-observe         -                               -
wayland                  firefox:wayland                -                               -
x11                      firefox:x11                    -                               -</pre><p></p>
<p>// 可以看出，不管是 wayland 还是 x11，Firefox 都没有关联，于是尝试执行了：</p><pre class="crayon-plain-tag">➜ ~ snap connect firefox:x11 :x11
➜ ~ firefox
sed: can't read /home/dandy/.config/user-dirs.dirs: Permission denied
/snap/firefox/1551/snap/command-chain/desktop-launch: line 261: /home/dandy/.config/user-dirs.dirs: Permission denied
cp: cannot open '/home/dandy/.config/user-dirs.locale' for reading: Permission denied
/snap/firefox/1551/snap/command-chain/desktop-launch: line 266: /home/dandy/.config/user-dirs.locale: Permission denied
Gtk-Message: 20:21:18.121: Failed to load module "xapp-gtk3-module"

(firefox:1854179): Gtk-WARNING **: 20:21:18.129: Failed to parse /etc/gtk-3.0/settings.ini: Permission denied
Gtk-Message: 20:21:18.155: Failed to load module "canberra-gtk-module"
Gtk-Message: 20:21:18.158: Failed to load module "canberra-gtk-module"
[GFX1-]: No GPUs detected via PCI
[GFX1-]: glxtest: process failed (received signal 11)
Missing chrome or resource URL: resource://gre/modules/UpdateListener.jsm
Missing chrome or resource URL: resource://gre/modules/UpdateListener.sys.mjs
Missing chrome or resource URL: resource://gre/modules/UpdateListener.jsm
Missing chrome or resource URL: resource://gre/modules/UpdateListener.sys.mjs</pre><p>// 界面出现了，显然有了进展，但是不能加载页面；再试网络：</p><pre class="crayon-plain-tag">➜ ~ snap connect firefox:network :network</pre><p>// 然后就也可以加载网址了。看起来这里的这些条目跟软件中心里对软件的权限设置似乎有对应关系，但是在命令行下的处理又不会影响 GUI 中的开关状态，显然 Snap 是个不太成熟的东西。</p>
<p>于是决定放弃 Snap 版本的 Firefox，改回 .deb 版本。deb 版本安装步骤参见：<a href="https://www.omgubuntu.co.uk/2022/04/how-to-install-firefox-deb-apt-ubuntu-22-04">https://www.omgubuntu.co.uk/2022/04/how-to-install-firefox-deb-apt-ubuntu-22-04</a></p>
<p>照此操作行云流水，毫无滞碍，终了。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.somedoc.net/2022/07/23/%e5%8d%87%e7%ba%a7%e5%88%b0-ubuntu-22-04-lts/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
