为什么“man x-terminal-emulator”返回“man gnome-terminal”的输出?

为什么“man x-terminal-emulator”返回“man gnome-terminal”的输出?

我知道x-terminal-emulator是什么以及它的作用是什么,但我不明白为什么没有一个专门的手册页来介绍它,而是将其重定向到的手册页gnome-terminal。我希望看到一个手册页来解释它x-terminal-emulator到底起什么作用,并在该页面中引用man gnome-terminal

这是正确的吗 (如果正确,那么为什么,例如, 的输出man dir不返回 的输出man ls)?这一事实背后是否有一个好的动机?

答案1

x-terminal-emulator虚拟的 包裹. 终端仿真器由 Debian 的替代系统

在 Ubuntu 上,你可以轻松地遵循这个符号链接构造,例如对于 gnome-terminal:

$ which x-terminal-emulator
/usr/bin/x-terminal-emulator
$ ls -lF /usr/bin/x-terminal-emulator
/usr/bin/x-terminal-emulator -> /etc/alternatives/x-terminal-emulator*
$ ls -al /etc/alternatives/x-terminal-emulator
/etc/alternatives/x-terminal-emulator -> /usr/bin/gnome-terminal.wrapper*

现在关于手册页,还将update-alternatives手册页链接gnome-terminalx-terminal-emulatorupdate-alternatives手动的:

   It is often useful for a number of alternatives to be synchronized,  so
   that they are changed as a group; for example, when several versions of
   the  vi(1)  editor  are  installed,  the   man   page   referenced   by
   /usr/share/man/man1/vi.1 should correspond to the executable referenced
   by /usr/bin/vi.  update-alternatives handles this by  means  of  master
   and  slave links; when the master is changed, any associated slaves are
   changed too.  A master link and its associated slaves make  up  a  link
   group.

来源

答案2

您可以在 bash 中运行,以跟踪链接:

$ readlink -f $(command -v x-terminal-emulator)
/usr/bin/gnome-terminal.wrapper

和/或:

$ update-alternatives --display x-terminal-emulator
x-terminal-emulator - auto mode
  link currently points to /usr/bin/gnome-terminal.wrapper
/usr/bin/gnome-terminal.wrapper - priority 40
  slave x-terminal-emulator.1.gz: /usr/share/man/man1/gnome-terminal.1.gz
/usr/bin/lxterm - priority 30
  slave x-terminal-emulator.1.gz: /usr/share/man/man1/lxterm.1.gz
/usr/bin/uxterm - priority 20
  slave x-terminal-emulator.1.gz: /usr/share/man/man1/uxterm.1.gz
/usr/bin/xterm - priority 20
  slave x-terminal-emulator.1.gz: /usr/share/man/man1/xterm.1.gz
Current 'best' version is '/usr/bin/gnome-terminal.wrapper'.

注意:手册页也链接到gnome-terminal.1.gz

相关内容