Category Archives: Linux

用容器和 msys2 在 Linux 下开发 Windows 应用

虽然 Windows 现在有 WSL,但是使用 Windows 多少感觉还是有点不方便。所以我们倒反天罡,用 Linux 和 msys2 进行一些 Windows 开发。 那么我们用到的主要就是 https://github.com/msys2/msys2-docker 这个镜像。这次我也顺带体验了一下 rootless podman,中间也遇到了一些问题。 它的原理就是运行一个 headless 的 X server 为 wine 服务,同时用一个 patch 过的可以支持 msys2 的 wine 启动 msys2。某种意义上来说,就是 WSL 反过来变成 LSW。传统的 Windows 开发总会有一个工具链的问题必须用 MS 家 cl … Continue reading

Posted in Linux | Tagged , , , , , | Leave a comment

Key repetition and key event handling issue with Wayland input method protocols

I do have lots of complaints about wayland current input method protocols. Some of them are just lacking features, but this issue is the one that I think have design flaw from the beginning. Let’s first review how the keyboard … Continue reading

Posted in fcitx development, Linux | Tagged , , , | 4 Comments

一次休眠导致的 Linux 启动项丢失

最近更新 Arch Linux 的时候,我一次想要重新开机时,却发现 systemd-boot 的启动项没了。一开始,我以为是配置文件被更新删除了,但在我进入系统之后却发现了意想不到的情况。 我的系统在内核更新到一半的时候正好休眠了!正好卡在老的内核镜像文件已经删除,新的内核还未安装的那个节骨眼上。这个系统的待机是有问题的,所以配置成自动进行休眠,但是却没想到正好卡在了更新内核的那个时刻休眠了。休眠尽管会把内存的状态写入到硬盘当中,但是下次再次启动的时候,仍然需要一个内核初始化之后才能进行休眠恢复的操作。 这个不得不说是非常巧合的一个情况。这下我也深刻理解了 Windows 下系统更新时常见的一个提示「正在配置更新,请勿关闭您的计算机」到底有何用意。 对于 Arch Linux 这种不保留老内核的更新方式来说,还是更新之后尽快重启比较好,因为从不同版本的内核恢复也会导致问题。

Posted in Linux | 3 Comments

How to make your application support Input method under Linux

As an Linux application developer, one might not aware that there could be certain effort required to support Input Method (or Input Method Editor, usually referred as IME) under Linux. What is input method and why should I care about … Continue reading

Posted in Linux | Tagged , , , , | 3 Comments

一趟神奇的 Debian 环境变量之旅

更正:startx 进行 unset DBUS_SESSION_BUS_ADDRESS 的行为是来自上游,而不是来自 debian ( https://gitlab.freedesktop.org/xorg/app/xinit/-/issues/9 ),而过去这样做的理由应该主要是让 startx 和已有的 session bus 相互隔离吧,但是在 systemd 的 user session bus 成为主流的现在,这个行为反而会导致问题。arch 只是获得这个修复更早,并不是 debian 自己的 patch 增加的这一行。 这是一件一个月之前的事情,有一个人来到 fcitx 的 telegram 群说他在 debian lxqt 不能在 chromium 下输入。在他贴了一下 chromium 在终端输出的结果之后,事情开始变得奇怪了起来。 $ [12752:12787:1013/110502.625383:ERROR:bus.cc(399)] Failed … Continue reading

Posted in Linux | Tagged , , , | 3 Comments