#archlinux-cn
!YkBCOsxHJvtzDSJCGa:nichi.co
5,700 messages · Page 19 of 57
* 我有 LUKS,配置了 GDM 自动登录,以前开机都是用硬件密钥开机的,今天偶然用了密码开机,发现我的 login Keyring 密码本来是空的,自动变成 LUKS 密码了,我应该如何禁用这个自动更改密码的功能
我有 LUKS,以前开机都是用硬件密钥开机的,今天偶然用了密码开机,发现我的 login Keyring 密码本来是空的,自动变成 LUKS 密码了,我应该如何禁用这个自动更改密码的功能
它在多数OS里和US布局完全对等
比如还有另一个可选的澳大利亚键盘布局
就像格式条款一样,其实可选的Keyboard Layout里还有一些布局和其他1/N个布局相同
不过还有藏语、蒙语键盘等等,所以写了个 Chinese Keyboard 作为 base layout
也就是为什么存在一个Chinese Keyboard
但是系统能设定两种布局那这俩种布局真的能映射出不同的keysym吗
标准中文键盘就是美式键盘
https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/blob/master/symbols/cn
// The default Chinese layout is the same as the American.
default partial alphanumeric_keys
xkb_symbols "basic" {
include "us(basic)"
name[Group1]= "Chinese";
};
虽然它和US在使用逻辑上完全没有区别
我只是说存在一个叫做中文键盘的东西
对于Linux桌面来说,键盘布局是libxkbcommon里面keycode到keysym的映射吧,这个键它真的会映射出不同的东西吗?
比如US键盘的[{和}]在正式的中文键盘布局上会再印刷一对「【】」
> <@nicolasyang:matrix.org> 我不理解为什么存在 keyboard-chinese 这个东西,中国的键盘布局就是 us 键盘啊
其实有差别
lulala 创建了新帖 使用optimus-manager出现窗口黑屏 - https://forum.archlinuxcn.org/t/topic/15959/1
我不理解为什么存在 keyboard-chinese 这个东西,中国的键盘布局就是 us 键盘啊
这样应该就能做到了吧(
哦是不是可以 Before=xxx.mount
可能是人类的脑子是单线程的吧😂
好几个依赖项其实是差不多的,有细微差异,很难对上实际需求。
其实我觉得 umount 完直接拔也没啥事(
如果能做到关联那个mount unit, 在它之后启动就感觉能对上用了
它的那套东西说实话人类不太能记得住
但是我不知道这个能不能做到是在挂载点之后再启动😢
说实话我也不是非常熟悉 systemd 这些依赖管理方式(
我有个想法是这样
...
BindsTo=xxx.mount
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/true
ExecStop=/opt/safe-eject/safe-eject --shutdown
...
把它当成特殊的U盘处理就行了
感觉不是很有必要,你的移动硬盘又不是 fstab 挂载的
盯挂载点就好了
停转指令下发本身我这边已经能用了, 但是我想控制一下它的触发时机, 同时保留systemd自己本身的卸载挂载点行为
我的意思是没必要等 umount.target 来 umount 移动硬盘
是不是更适合用 ExecStart=/bin/true, 然后用 BindsTo 绑定到挂载mount unit上, 在ExecStop那边写停转指令呀
umount.target 不分这个的吧
udisksctl power-off 应该足以发送停转指令
pareo 创建了新帖 使用 Virt-manager 安装 Windows XP SP3 的一些注意事项 - https://forum.archlinuxcn.org/t/topic/15958/1
只是 umount 移动硬盘,不是根分文件系统
我觉得应该在 Before=umount.target 调用 udisksctl unmount 和 udisksctl power-off 就行了
我想着让 systemd 正常做挂载点卸载, 在它卸载之后, 要插入一个停转指令下发的环节, 免得直接强制断电停转收回磁头了.
你们的github pages能够正常显示吗?我这边今天下午推送了几次之后,pages页面变成404了,运行一直卡在排队合并中..
你都 umount 完了,日志还往哪儿记呢
图太黑我刚没看清(还是 fcitx5-diagnose 好看
我脚本里面用了 hdparm -Y "$dev" 和 sg_start --stop "$dev"
I don't even know how to input that on computer, I mean fctix5
did you choose pinyin?
如果装了请在输入法列表中添加拼音
do you have fcitx5-chinese-addons installed?
不会是加了 dǎ pīnyīn de zhègè ba
我觉得我们需要一个计数器看看有多少人把 keyboard-chinese 当成拼音...
你装Chinese Addons了么
[ghodawalaaman] be right back after a reboot
[ghodawalaaman] let me reboot my machine and then try again
[ghodawalaaman] it's still not working?
哦,他没加中文输入法
右边那个是启动顺序无关的
[ghodawalaaman] okay let me try again
USB 硬盘应该用 udisksctl 吧?
我觉得没意义)
ghodawalaaman: this
you need pinyin, not "chinese keyboard"
* 问一个问题
我有使用USB硬盘盒, 当我电脑关机时, 硬盘盒里的HDD会强制断电停转. 我就写了一个脚本, 用于在关机时, 先向HDD下发停转指令. 这个脚本我想着使用 systemd unit 来做关机时自动调用.
[Unit]
Description=Spin Down External USB Drives on Shutdown
DefaultDependencies=no
After=umount.target
Before=shutdown.target systemd-udev-trigger.service systemd-udevd.service
[Service]
Type=oneshot
ExecStart=/opt/safe-eject/safe-eject --shutdown
TimeoutStartSec=0
[Install]
WantedBy=shutdown.target
我测试发现, 脚本是有效果, 但是这个 service 完全没有被 journal 记录了.
$ journalctl -b -1 -u safe-eject.service
-- No entries --
$ journalctl -rb -1
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounted /root.
Feb 15 12:24:14 UM690Lite systemd[1]: root.mount: Deactivated successfully.
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounted /home.
Feb 15 12:24:14 UM690Lite systemd[1]: home.mount: Deactivated successfully.
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounted /docker.
Feb 15 12:24:14 UM690Lite systemd[1]: docker.mount: Deactivated successfully.
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounted /boot.
Feb 15 12:24:14 UM690Lite systemd[1]: boot.mount: Deactivated successfully.
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounted /.snapshots.
Feb 15 12:24:14 UM690Lite systemd[1]: \x2esnapshots.mount: Deactivated successfully.
Feb 15 12:24:14 UM690Lite kernel: EXT4-fs (sda1): unmounting filesystem 6686b8bf-0b7c-4b7c-969f-f3b5e76f1c9b.
Feb 15 12:24:14 UM690Lite kernel: BTRFS info (device sdb1): last unmount of filesystem cca02f85-9304-46cf-9bf1-b67536061849
Feb 15 12:24:14 UM690Lite systemd[1]: Stopping Flush Journal to Persistent Storage...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /var/tmp...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /var/lib/docker...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /var/cache...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /usr/local...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting Temporary Directory /tmp...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /root...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /mnt/data...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /mnt/archive/insecure...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /home...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /docker...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /boot...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /.snapshots...
Feb 15 12:24:14 UM690Lite systemd[1]: Stopped target Local File Systems.
而且我也没看到 Unmounting /var/log
如果我 systemd unit 不用 After=umount.target, 用 Before=umount.target ..., 日志是有的, 但我感觉会不会时机不太好, 那就需要我脚本内部做 umount 了😶🌫️
问一个问题
我有使用USB硬盘盒, 当我电脑关机时, 硬盘盒里的HDD会强制断电停转. 我就写了一个脚本, 用于在关机时, 先向HDD下发停转指令. 这个脚本我想着使用 systemd unit 来做关机时自动调用.
[Unit]
Description=Spin Down External USB Drives on Shutdown
DefaultDependencies=no
After=umount.target
Before=shutdown.target systemd-udev-trigger.service systemd-udevd.service
[Service]
Type=oneshot
ExecStart=/opt/safe-eject/safe-eject --shutdown
TimeoutStartSec=0
[Install]
WantedBy=shutdown.target
我测试发现, 脚本是有效果, 但是这个 service 完全没有被 journal 记录了.
$ journalctl -rb -1
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounted /root.
Feb 15 12:24:14 UM690Lite systemd[1]: root.mount: Deactivated successfully.
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounted /home.
Feb 15 12:24:14 UM690Lite systemd[1]: home.mount: Deactivated successfully.
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounted /docker.
Feb 15 12:24:14 UM690Lite systemd[1]: docker.mount: Deactivated successfully.
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounted /boot.
Feb 15 12:24:14 UM690Lite systemd[1]: boot.mount: Deactivated successfully.
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounted /.snapshots.
Feb 15 12:24:14 UM690Lite systemd[1]: \x2esnapshots.mount: Deactivated successfully.
Feb 15 12:24:14 UM690Lite kernel: EXT4-fs (sda1): unmounting filesystem 6686b8bf-0b7c-4b7c-969f-f3b5e76f1c9b.
Feb 15 12:24:14 UM690Lite kernel: BTRFS info (device sdb1): last unmount of filesystem cca02f85-9304-46cf-9bf1-b67536061849
Feb 15 12:24:14 UM690Lite systemd[1]: Stopping Flush Journal to Persistent Storage...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /var/tmp...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /var/lib/docker...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /var/cache...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /usr/local...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting Temporary Directory /tmp...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /root...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /mnt/data...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /mnt/archive/insecure...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /home...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /docker...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /boot...
Feb 15 12:24:14 UM690Lite systemd[1]: Unmounting /.snapshots...
Feb 15 12:24:14 UM690Lite systemd[1]: Stopped target Local File Systems.
而且我也没看到 Unmounting /var/log
如果我 systemd unit 不用 After=umount.target, 用 Before=umount.target ..., 日志是有的, 但我感觉会不会时机不太好, 那就需要我脚本内部做 umount 了😶🌫️
yeah, I knew it...
试试右边那个
[ghodawalaaman] https://ibb.co/fG9HzhQs
hmmm, just ~/.config/fcitx5/profile should be a good start
[ghodawalaaman] :o
[ghodawalaaman] farseerfc: it says it contains sensitive info
[ghodawalaaman] VirtualKeyboardEnabled=true
[ghodawalaaman] ➜ grep -i virtual ~/.config/kwinrc
ghodawalaaman: could you check `grep -i virtual ~/.config/kwinrc`?
post the output of fcitx5-diagnose to some pastebin
ctrl+space and try again?
[ghodawalaaman] here you can take a look
[ghodawalaaman] https://ibb.co/SXVfG57b
[ghodawalaaman] but when I write pinyin it's writing latic char instead of the chinese chars
[ghodawalaaman] hmm, I have already selected Fcitx 5
https://wiki.archlinux.org/title/Fcitx5#KDE_Plasma
和environment
install fcitx5-im fictx5-chinese-addons
just choose fcitx5 in system settings "virtual keyboard" page
[ghodawalaaman] does anyone know how to setup chinese input keyboard in kde plasma?
flatpak:com.github.gmg137.netease-cloud-music-gtk
[ghodawalaaman] ni hao!
[ghodawalaaman] Hello everyone!
顺便可以去老马那里抱怨一番,说不定烦他们的人多了他们就要修了(
kill qq 可以了
但是才一百多个连接就不行了吗(
kill qq 应该就行
位置占完了其他人就没法来坐了
现在我是kill qq就行还是得重启了
可以认为是程序占用的位置,而总共的位置数量是有限的
这个是啥语义,引发异常的次数吗
解决方案,qq不要一直挂着
草,果然是 qq 搞的
[m.image] image.jpeg
我试试 我完全不会sh
或者在 do 前面塞一个分号也行
while read port
do
...
done