I am using Ubuntu Server, hence I want to know if a package is GFX or CLI before installing. Wrongly installing GFX apps will cause a lot of dependencies to be fetched, and they will not work anyway (due to the lack of an X server).
1 Answers
For installed application your can follow my other answer.
In any case the locations of files (executables, man-pages and other stuff) should conform Filesystem Hierarchy Standard as a rule.
For not installed application we can adapt aforementioned method but we will use apt-file command instead of dpkg.
So we will do the following:
Install
apt-file:sudo apt-get install apt-fileUpdate
apt-filecache:sudo apt-file updateList all package files with
apt-file list(seeman apt-filefor details) and find files in/bin,/sbin,/usr/bin,/usr/sbin,/usr/gamesdirectories. So we can use the following command:$ sudo apt-file list httpcode | grep -E "/bin/|/sbin/|/usr/games/" httpcode: /usr/bin/hcSo we can see that in this example
/usr/bin/hcbelongs to the package.List all man-pages:
$ sudo apt-file list httpcode | grep "/man/" httpcode: /usr/share/man/man1/hc.1.gzSo we can see that we can use
man hc.For applications with GUI I run search for
*.desktopfiles:$ sudo apt-file list httpcode | grep ".desktop" $In this particular case it will not return anything.
But in case of real GUI application such as GNOME Terminal we will try to find its
*.desktopfile$ sudo apt-file list gnome-terminal | grep ".desktop$" gnome-terminal: /usr/share/applications/gnome-terminal.desktopAnd we see that it is found, so it is a GUI application.
Also we can check first level of reverse dependencies with command like
$ apt-cache rdepends gnome-terminal | grep desktop ubuntu-gnome-desktop ubuntu-desktop ubuntukylin-desktop ubuntu-gnome-desktop cinnamon-desktop-environment ubuntu-desktop- so GNOME Terminal needs DE which is usually ran on Xorg.
Also for not installed package one can visit https://packages.ubuntu.com and use Search package directories here (for all releases or for selected release), then click on list of files link in the right column of the table:
and one will get the file list:
This list may interpreted manually or by using searchbar in the browser.
- 103,263

