我决定尝试 lxdm(使用的是fluxbox和xfce),并发现对于许多程序,url处理程序都失败了,产生了这个错误消息;
如您所见,这很奇怪,它将用户目录添加到 url。这里的例子来自电报,但它发生在不和谐,以及从命令行执行时;xdg-open https://www.google.com
产生类似的错误。
xdg-settings get default-web-browser
输出的 firefox.desktop 作为 xfce 和 lxdm 中的链接。更多信息; 我在上面运行了 bash -x 并且...
$ bash -x /usr/bin/xdg-open http://www.google.com
+ check_common_commands http://www.google.com
+ '[' 1 -gt 0 ']'
+ parm=http://www.google.com
+ shift
+ case "$parm" in
+ '[' 0 -gt 0 ']'
+ '[' -z '' ']'
+ unset XDG_UTILS_DEBUG_LEVEL
+ '[' 0 -lt 1 ']'
+ xdg_redirect_output=' > /dev/null 2> /dev/null'
+ '[' xhttp://www.google.com '!=' x ']'
+ url=
+ '[' 1 -gt 0 ']'
+ parm=http://www.google.com
+ shift
+ case "$parm" in
+ '[' -n '' ']'
+ url=http://www.google.com
+ '[' 0 -gt 0 ']'
+ '[' -z http://www.google.com ']'
+ detectDE
+ unset GREP_OPTIONS
+ '[' -n LXDE ']'
+ case "${XDG_CURRENT_DESKTOP}" in
+ DE=lxde
+ '[' xlxde = x ']'
+ '[' xlxde = x ']'
+ '[' xlxde = x ']'
+ '[' xlxde = xgnome ']'
+ '[' -f /run/user/1000/flatpak-info ']'
+ '[' xlxde = x ']'
+ DEBUG 2 'Selected DE lxde'
+ '[' -z '' ']'
+ return 0
+ case "${BROWSER}" in
+ case "$DE" in
+ open_lxde http://www.google.com
+ pcmanfm --help -a is_file_url_or_path http://www.google.com
++ file_url_to_path http://www.google.com
++ local file=http://www.google.com
++ echo http://www.google.com
++ grep -q '^file:///'
++ echo http://www.google.com
+ local file=http://www.google.com
+ echo http://www.google.com
+ grep -q '^/'
++ pwd
+ file=/home/nesmerrill/.local/share/applications/http://www.google.com
+ pcmanfm /home/nesmerrill/.local/share/applications/http://www.google.com
+ '[' 0 -eq 0 ']'
+ exit_success
+ '[' 0 -gt 0 ']'
+ exit 0
重要的部分似乎是,pcmanfm --help -a is_file_url_or_path http://www.google.com
但是,如果是这样使用的命令,它似乎没有做任何事情?
$ pcmanfm --help -a is_file_url_or_path http://www.google.com
Usage:
pcmanfm [OPTION…] [FILE1, FILE2,...]
Help Options:
-h, --help Show help options
--help-all Show all help options
--help-gtk Show GTK+ Options
Application Options:
-p, --profile=PROFILE Name of configuration profile
-d, --daemon-mode Run PCManFM as a daemon
--no-desktop No function. Just to be compatible with nautilus
--desktop Launch desktop manager
--desktop-off Turn off desktop manager if it's running
--desktop-pref Open desktop preference dialog
--one-screen Use --desktop option only for one screen
-w, --set-wallpaper=FILE Set desktop wallpaper from image FILE
--wallpaper-mode=MODE Set mode of desktop wallpaper. MODE=(color|stretch|fit|crop|center|tile|screen)
--show-pref=N Open Preferences dialog on the page N
-n, --new-win Open new window
-f, --find-files Open a Find Files window
--role=ROLE Window role for usage by window manager
--display=DISPLAY X display to use