Score:2

How to stop nvidia-settings from installing gnome desktop?

jp flag

I am running Ubuntu 20.04 Server edition with minimal X11 installed (no desktop managers)

I want to install nvidia-settings ver 470 but it looks like it wants to pull in gnome desktop. Any ideas on how to stop this? Am I reading this right that it will pull in gnome desktop? I used sudo apt-get install nvidia-settings --no-install-recommends --no-install-suggests but it still brought in a ton of gnome software.

Just to note....on my Gentoo system nvidia-settings version 370 didn't pull in gnome desktop. Not sure why it is on Ubuntu with version 470

us flag
You mean 20.04 server edition?
hu flag
Just tested, and it does not pull in `gnome-desktop`. Where did you get it from? The package by that name isn't even in the repositores.
dman avatar
jp flag
@mikewhatever I got it from here https://dpaste.org/7xRS#L11,15,53,57,63
Score:1
zw flag

This happens because of dependencies. See terminal output from 20.04 LTS installed from mini.iso:

$ apt-cache depends nvidia-settings
nvidia-settings
  Depends: pkg-config
    pkgconf
  Depends: screen-resolution-extra
  Depends: libvdpau1
 |Depends: libgtk-3-0
  Depends: libgtk2.0-0
  Depends: libc6
  Depends: libcairo2
  Depends: libgdk-pixbuf2.0-0
  Depends: libglib2.0-0
  Depends: libjansson4
  Depends: libpango-1.0-0
  Depends: libpangocairo-1.0-0
  Depends: libx11-6
  Depends: libxnvctrl0
  Depends: libxxf86vm1
  Conflicts: 
  Replaces: 
    nvidia-settings
apt-cache depends screen-resolution-extra
screen-resolution-extra
  Depends: 
    python3
  Depends: python3-xkit
 |Depends: gnome-shell
 |Depends: policykit-1-gnome
  Depends: 
    gnome-flashback
    gnome-shell
    lxpolkit
    lxqt-policykit
    mate-polkit
    policykit-1-gnome
    polkit-kde-agent-1
    ukui-polkit
  Depends: python3-gi

In the above output you should note that gnome-shell is not located in Recommends or Suggests sections, so is not optional.

Or use packages.ubuntu.com - check pages for nvidia-settings and its dependency named screen-resolution-extra.

With known Gentoo terminology this means that Ubuntu uses gnome or gnome-shell USE-flag for nvidia-settings package.


Possible way to get minimal set of dependent package is to install lxpolkit package instead of gnome-shell as follows:

$ sudo apt install lxpolkit nvidia-settings --no-install-recommends --no-install-suggests
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  adwaita-icon-theme dbus-user-session dconf-gsettings-backend dconf-service fontconfig fontconfig-config fonts-dejavu-core glib-networking
  glib-networking-common glib-networking-services gsettings-desktop-schemas gtk-update-icon-cache hicolor-icon-theme humanity-icon-theme
  libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3 libbrotli1 libcairo-gobject2
  libcairo2 libcolord2 libcups2 libdatrie1 libdbus-glib-1-2 libdconf1 libdpkg-perl libepoxy0 libfontconfig1 libgdbm-compat4 libgdk-pixbuf2.0-0
  libgdk-pixbuf2.0-common libgraphite2-3 libgtk-3-0 libgtk-3-common libgtk2.0-0 libgtk2.0-common libharfbuzz0b libjansson4 libjbig0 libjpeg-turbo8
  libjpeg8 libjson-glib-1.0-0 libjson-glib-1.0-common liblcms2-2 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libperl5.30 libpixman-1-0
  libpolkit-agent-1-0 libproxy1v5 librest-0.7-0 librsvg2-2 librsvg2-common libsoup-gnome2.4-1 libsoup2.4-1 libthai-data libthai0 libtiff5
  libunique-1.0-0 libvdpau1 libwayland-client0 libwayland-cursor0 libwayland-egl1 libwebp6 libxcb-render0 libxcb-shm0 libxcomposite1 libxcursor1
  libxdamage1 libxfixes3 libxi6 libxinerama1 libxkbcommon0 libxnvctrl0 libxrandr2 libxrender1 libxxf86vm1 lxsession-data perl perl-modules-5.30
  pkg-config policykit-1 python3-xkit screen-resolution-extra ubuntu-mono
Suggested packages:
  colord cups-common debian-keyring gnupg | gnupg2 gcc | c-compiler binutils patch git bzr gvfs liblcms2-utils librsvg2-bin perl-doc
  libterm-readline-gnu-perl | libterm-readline-perl-perl make libb-debug-perl liblocale-codes-perl dpkg-dev
Recommended packages:
  at-spi2-core libfile-fcntllock-perl libgdk-pixbuf2.0-bin libgtk-3-bin libgail-common libgtk2.0-bin vdpau-driver-all | vdpau-driver
The following NEW packages will be installed:
  adwaita-icon-theme dbus-user-session dconf-gsettings-backend dconf-service fontconfig fontconfig-config fonts-dejavu-core glib-networking
  glib-networking-common glib-networking-services gsettings-desktop-schemas gtk-update-icon-cache hicolor-icon-theme humanity-icon-theme
  libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3 libbrotli1 libcairo-gobject2
  libcairo2 libcolord2 libcups2 libdatrie1 libdbus-glib-1-2 libdconf1 libdpkg-perl libepoxy0 libfontconfig1 libgdbm-compat4 libgdk-pixbuf2.0-0
  libgdk-pixbuf2.0-common libgraphite2-3 libgtk-3-0 libgtk-3-common libgtk2.0-0 libgtk2.0-common libharfbuzz0b libjansson4 libjbig0 libjpeg-turbo8
  libjpeg8 libjson-glib-1.0-0 libjson-glib-1.0-common liblcms2-2 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libperl5.30 libpixman-1-0
  libpolkit-agent-1-0 libproxy1v5 librest-0.7-0 librsvg2-2 librsvg2-common libsoup-gnome2.4-1 libsoup2.4-1 libthai-data libthai0 libtiff5
  libunique-1.0-0 libvdpau1 libwayland-client0 libwayland-cursor0 libwayland-egl1 libwebp6 libxcb-render0 libxcb-shm0 libxcomposite1 libxcursor1
  libxdamage1 libxfixes3 libxi6 libxinerama1 libxkbcommon0 libxnvctrl0 libxrandr2 libxrender1 libxxf86vm1 lxpolkit lxsession-data nvidia-settings
  perl perl-modules-5.30 pkg-config policykit-1 python3-xkit screen-resolution-extra ubuntu-mono
0 upgraded, 92 newly installed, 0 to remove and 0 not upgraded.
Need to get 26.2 MB/26.2 MB of archives.
After this operation, 133 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
...

and optionally install minimal desktop environment by

sudo apt-get install xinit openbox slim

or install full Lubuntu desktop by

sudo apt-get install lubuntu-desktop^
dman avatar
jp flag
I don't mind if it's gnome-shell....but does that mean it will bring the whole desktop in? From https://dpaste.org/7xRS#L15,53,57,63 I see `gir1.2-gnomedesktop-3.0` being pulled in.
dman avatar
jp flag
Thank you for the info. How come `gir1.2-gnomedesktop-3.0` shows up in my output but not yours? https://dpaste.org/7xRS#L11,15,53,57,63
N0rbert avatar
zw flag
It is unclear. I do not see the installation command, and do not know list of installed packages.
dman avatar
jp flag
`sudo apt-get install nvidia-settings --no-install-recommends --no-install-suggests`
dman avatar
jp flag
I have also installed `xserver-xorg-video-nvidia-470-server` and `nvidia-utils-470-server` if it matters
N0rbert avatar
zw flag
You have to use exact my command `sudo apt install lxpolkit nvidia-settings --no-install-recommends --no-install-suggests` which avoids gnome shell installation. Please read my answer carefully.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.