Ubuntu 22.04.3 LTS(GNOME 42.9)下普通用户调用notify-send报错,notification-daemon启动触发段错误求助
Ubuntu 22.04.3 LTS(GNOME 42.9)下普通用户调用notify-send报错,notification-daemon启动触发段错误求助
大家好,我已经看过另外两篇描述相同问题的帖子,但里面提到的解决方案对我都没用,所以来这里求助。
我的环境
- 系统:Ubuntu 22.04.3 LTS
- 桌面环境:GNOME 42.9
问题详情
我现在遇到的核心问题是,普通用户身份执行notify-send会报错:
robin@robin-workstation:~$ notify-send "test" Error calling StartServiceByName for org.freedesktop.Notifications: Process org.freedesktop.Notifications received signal 11
看起来当时没有相关的通知进程在运行,所以系统尝试启动org.freedesktop.Notifications服务,但启动失败触发了段错误(查了下signal 11对应的就是段错误)。
我手动启动notification-daemon的时候,确实直接触发了段错误:
robin@robin-workstation:~$ /usr/lib/notification-daemon/notification-daemon Segmentation fault
有意思的是,用sudo以root身份启动这个程序的话,终端会直接挂起,但进程列表里能看到它在运行,不过此时执行notify-send还是报同样的错:
robin@robin-workstation:~$ ps aux | grep notification robin 2262 0.0 0.0 250308 11892 ? Ssl 14:42 0:00 /usr/libexec/gsd-print-notifications root 7254 0.2 0.0 14268 5700 pts/0 S+ 15:27 0:00 sudo /usr/lib/notification-daemon/notification-daemon root 7255 2.4 0.1 263632 22144 pts/0 Sl+ 15:27 0:00 /usr/lib/notification-daemon/notification-daemon robin 7268 0.0 0.0 9216 2276 pts/2 S+ 15:27 0:00 grep --color=auto notification
robin@robin-workstation:~$ notify-send "test" Error calling StartServiceByName for org.freedesktop.Notifications: Process org.freedesktop.Notifications received signal 11
已排查/尝试的操作
- 确认没有安装notify-osd(我的机器上没装这个)
- 确认libnotify-bin和notification-daemon都是最新版本:
robin@robin-workstation:~$ sudo apt install notification-daemon notification-daemon is already the newest version (3.20.0-4build1).
robin@robin-workstation:~$ sudo apt install libnotify-bin libnotify-bin is already the newest version (0.7.9-3ubuntu5.22.04.1).
- 检查了DBus服务文件的内容,看起来是正常的(问题应该不是找不到服务,而是启动时段错误):
robin@robin-workstation:~$ cat /usr/share/dbus-1/services/org.freedesktop.Notifications.service [D-BUS Service] Name=org.freedesktop.Notifications Exec=/usr/lib/notification-daemon/notification-daemon
- 尝试重新安装notification-daemon和libnotify-bin,没有效果
另外附上我的环境变量信息:
SHELL=/bin/bash SESSION_MANAGER=local/robin-workstation:@/tmp/.ICE-unix/2119,unix/robin-workstation:/tmp/.ICE-unix/2119 QT_ACCESSIBILITY=1 COLORTERM=truecolor XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg SSH_AGENT_LAUNCHER=gnome-keyring XDG_MENU_PREFIX=gnome- GNOME_DESKTOP_SESSION_ID=this-is-deprecated LANGUAGE=en_GB:en LC_ADDRESS=fr_FR.UTF-8 GNOME_SHELL_SESSION_MODE=ubuntu LC_NAME=fr_FR.UTF-8 SSH_AUTH_SOCK=/run/user/1000/keyring/ssh XMODIFIERS=@im=ibus DESKTOP_SESSION=ubuntu LC_MONETARY=fr_FR.UTF-8 GTK_MODULES=gail:atk-bridge PWD=/home/robin LOGNAME=robin XDG_SESSION_DESKTOP=ubuntu XDG_SESSION_TYPE=wayland SYSTEMD_EXEC_PID=2308 XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.3SZDE2 HOME=/home/robin USERNAME=robin IM_CONFIG_PHASE=1 LC_PAPER=fr_FR.UTF-8 LANG=en_GB.UTF-8 LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00[...] XDG_CURRENT_DESKTOP=ubuntu:GNOME VTE_VERSION=6800 WAYLAND_DISPLAY=wayland-0 GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/5df7e24d_8b5c_40c5_a6a3_3c74bdc3c336 GNOME_SETUP_DISPLAY=:1 LESSCLOSE=/usr/bin/lesspipe %s %s XDG_SESSION_CLASS=user TERM=xterm-256color LC_IDENTIFICATION=fr_FR.UTF-8 LESSOPEN=| /usr/bin/lesspipe %s USER=robin GNOME_TERMINAL_SERVICE=:1.104 DISPLAY=:0 SHLVL=1 LC_TELEPHONE=fr_FR.UTF-8 QT_IM_MODULE=ibus LC_MEASUREMENT=fr_FR.UTF-8 PAPERSIZE=a4 XDG_RUNTIME_DIR=/run/user/1000 LC_TIME=fr_FR.UTF-8 XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop PATH=/home/robin/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin GDMSESSION=ubuntu DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus LC_NUMERIC=fr_FR.UTF-8 _=/usr/bin/env OLDPWD=/home/robin
有没有大佬能给点值得排查的方向?非常感谢!
备注:内容来源于stack exchange,提问作者Robin Olivier
相关产品推荐
相关产品推荐

