0%

原来的usb接口以太网卡适配器坏掉了,安装新的usb网卡后,无法自动启动网卡,手动ifup没问题

Read more »

lxd reset/reinit with snap

first delete all container instances and all images
then execute:

1
sudo snap remove --purge lxd

then

1
sudo snap install lxd --channel=4.0/stable

last

1
lxd init

安装acme.sh

1
2
$ curl https://get.acme.sh sh
$ source ~/.bashrc

会自动添加cron任务

创建api token

acme.sh支持name.com,访问https://www.name.com/account/settings/api,随意设置token昵称acme_sh_dns,生成token
编辑~/.acme.sh/account.conf添加如下两行:

1
2
export Namecom_Username="your_name_com_username"
export Namecom_Token="*********"

Namecom_Username指定你在name.com的用户名而不是token name

申请证书

1
$ acme.sh --issue --dns dns_namecom -d g.openwares.net

可以会有提示

1
g.openwares.net:Verify error:DNS problem: SERVFAIL looking up CAA for openwares.net - the domain's nameservers may be malfunctioning

忽略即可

安装证书

1
2
3
4
$ acme.sh --install-cert -d g.openwares.net \\
--cert-file /path/to/certfile/cert.pem \\
--key-file /path/to/keyfile/key.pem \\
--fullchain-file /path/to/fullchain/certfile/fullchain.pem

自动更新
acme.sh自动安装了crontab入口,acme.sh会自动记录下申请证书和安装证书的命令,所以会在设定的周期内自动更新证书。

使用alacarte删除了几个菜单项后,再也打不开gnome main menu了,终端下运行alacarte出现错误:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$ alacarte
usr/share/alacarte/Alacarte/MainWindow.py:22: PyGIWarning: GMenu was imported without specifying a version first. Use gi.require_version('GMenu', '3.0') before import to ensure that the right version gets loaded.
from gi.repository import Gtk, GdkPixbuf, Gdk, GMenu

(alacarte:1718): Gtk-CRITICAL **: 16:54:24.699: gtk_accel_label_set_accel_closure: assertion 'gtk_accel_group_from_accel_closure (accel_closure) != NULL' failed

(alacarte:1718): Gtk-CRITICAL **: 16:54:24.699: gtk_accel_label_set_accel_closure: assertion 'gtk_accel_group_from_accel_closure (accel_closure) != NULL' failed
Traceback (most recent call last):
File "/usr/bin/alacarte", line 26, in <module>
main()
File "/usr/share/alacarte/Alacarte/MainWindow.py", line 464, in main
app.setMenuBasename(basename)
File "/usr/share/alacarte/Alacarte/MainWindow.py", line 62, in setMenuBasename
self.editor = MenuEditor(menu_basename)
File "/usr/share/alacarte/Alacarte/MenuEditor.py", line 36, in __init__
self.load()
File "/usr/share/alacarte/Alacarte/MenuEditor.py", line 49, in load
if not self.tree.load_sync():
gi.repository.GLib.Error: g-markup-error-quark: Error on line 1 char 1: Document was empty or contained only whitespace (1)

发现~/.config/menus目录下多了一个空白文件gnome-applications.menu,将其删除问题解决。