1

After getting a 3G modem for my laptop, I've started using Network Manager to manage my connections, and I quite like it. However, it is slightly annoying to have to be root to make any changes, especially since the applications (nm-applet, nm-connection-editor) do not ask for elevation - I have to launch them manually with "sudo". If I understand correctly this is because my minimal install lacks a login manager (I log in at a prompt and startx) and thus DBus privileges are not being set. So I tried installing both LightDM and GDM, but my god the bl0at! Pulseaudio required for DBus? I don't think so. Here's the shocking package list generated by apt-get install lightdm:

The following NEW packages will be installed
  apg cheese-common cups-pk-helper dialog evolution-data-server
  evolution-data-server-common evolution-data-server-online-accounts geoclue
  geoclue-ubuntu-geoip gir1.2-gnomebluetooth-1.0 gir1.2-ibus-1.0 gkbd-capplet
  gnome-bluetooth gnome-control-center-shared-data gnome-desktop3-data
  gnome-screensaver gnome-session-bin gnome-settings-daemon-schemas
  gnome-user-share gsettings-ubuntu-schemas gstreamer1.0-clutter hwdata ibus
  ibus-gtk ibus-gtk3 im-config indicator-bluetooth indicator-datetime
  indicator-keyboard indicator-power indicator-session indicator-sound
  libaccount-plugin-1.0-0 libaccount-plugin-generic-oauth
  libaccount-plugin-google libaccounts-glib0 libaccounts-qt5-1 libcamel-1.2-45
  libcanberra-pulse libcheese-gtk23 libcheese7 libclutter-1.0-0
  libclutter-1.0-common libclutter-gst-2.0-0 libclutter-gtk-1.0-0
  libcogl-common libcogl-pango15 libcogl15 libebackend-1.2-7 libebook-1.2-14
  libebook-contacts-1.2-0 libecal-1.2-16 libedata-book-1.2-20
  libedata-cal-1.2-23 libedataserver-1.2-18 libfftw3-single3 libgdata-common
  libgdata13 libgnome-desktop-3-7 libgnomekbd-common libgnomekbd8
  libgoa-1.0-0b libgoa-1.0-common libgweather-3-6 libgweather-common
  libibus-1.0-5 liblightdm-gobject-1-0 liboauth0 libopenobex1 libpulsedsp
  libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5opengl5
  libqt5positioning5 libqt5printsupport5 libqt5qml5 libqt5quick5
  libqt5sensors5 libqt5sql5 libqt5sql5-sqlite libqt5test5 libqt5webkit5
  libqt5widgets5 libqt5xml5 librest-0.7-0 libsignon-extension1 libsignon-glib1
  libsignon-plugins-common1 libsignon-qt5-1 libsystemd-journal0
  libtimezonemap1 libunity-control-center1 liburl-dispatcher1 libwacom-common
  libwacom2 libxcb-icccm4 libxcb-image0 libxcb-render-util0 libxcb-xkb1
  libxkbcommon-x11-0 lightdm mousetweaks nautilus-data obex-data-server
  obexd-client pulseaudio pulseaudio-module-x11 pulseaudio-utils rtkit
  session-migration signon-keyring-extension signon-plugin-oauth2 signon-ui
  signond ubuntu-system-service unity-control-center
  unity-control-center-signon unity-greeter unity-settings-daemon
0 to upgrade, 121 to newly install, 0 to remove and 47 not to upgrade.
Need to get 18.7 MB/32.1 MB of archives.
After this operation, 128 MB of additional disk space will be used.
Do you want to continue? [Y/n] Most definitely NOT!
Abort.

I don't want any of those things, thank you! Surely there must be a better way to gain permissions for editing Network Manager config?

Edit: I should add that I tried changing /etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf from at_console="true" to group="netdev", but that seemed to have no effect. Yes, I am a member of netdev.

Edit: And the irony of seeing a libclutter in the list is not lost on me. This is clearly a terrible, awful, cluttery mess... What were they thinking?

  • Of the two lightdm is way smaller than GDM. How many packages do you think that your "minimal" install of Ubuntu is make out of? – le3th4x0rbot Jun 21 '15 at 11:17
  • You know what: I really couldn't care less! Clearly, 90% of the stuff that gets bundled with LightDM has nothing whatsoever to do with DBus privileges or providing a graphical login. libqt5printsupport5? Nope. libgnome-desktop-3-7? Nope. geoclue-ubuntu-geoip? Nope. libwacom2? Nope. libgweather-3-6? Nope. It's just wrong. Very, very, very, very wrong. I have been hacking on 'buntu flavours for more than a decade, so I know quite well how I want my system configured and what parts can be thrown out. Pulseaudio for example belonging firmly in the latter category. – Ola Tuvesson Jun 21 '15 at 11:33
  • 1
    It sounds like you really could care a lot. The lightdm package has a lot of features that are pre-configured for you in Ubuntu. Maybe try compiling it yourself? The 10,000ft aerial view: not having pulseaudio installed in Ubuntu is likely not worth hours of your life. – le3th4x0rbot Jun 21 '15 at 11:52
  • I care about keeping a lean system, yes. And Pulseaudio is just evil and must die - my system runs beautifully with plain ALSA, thank you! Did you even read my question? – Ola Tuvesson Jun 21 '15 at 12:00
  • The answer to your question is that Ubuntu does not support an ultra light desktop use case, and you are fighting an uphill battle. Lighdm only solves your problem by running parts as root. Have you considered using suid root scripts to launch network tools? – le3th4x0rbot Jun 21 '15 at 12:15
  • The answer is that you don't have a clue what you're talking about :) – Ola Tuvesson Jun 21 '15 at 12:21
  • I think tdm is still maintained with xorg ;) – le3th4x0rbot Jun 21 '15 at 21:43
  • Ah, many thanks, that's a nice tip! I also found CDM, which is a similar Bash-based DM. However, for the time being at least, I'm perfectly happy with XDM; it's in the repos and it seems to work very well - although the resolution is like VGA or something, and it moves the default graphical console to tty7, which confused me at first :) I'm sure this can be configured though. I'll make a note to check out TDM if/when I tire of XDM! – Ola Tuvesson Jun 22 '15 at 00:55
  • Just curious: What does your .xinitrc contain? Or if you don't use it, what is your usual startx command? – muru Jun 22 '15 at 03:23
  • I meant twm, not tdm. – le3th4x0rbot Jun 22 '15 at 05:36
  • Oh. There is a display manager known as Tiny Display Manager (TDM), which is based on bash. TWM I haven't run into yet - will have to take a look! – Ola Tuvesson Jun 22 '15 at 10:02

2 Answers2

1

The Arch Wiki lists several Display Managers, of which three lightweight Display Managers are XDM (153 total dependencies1), LXDM (172 total dependencies1) and SLiM (121 total dependencies1). Personally I'd liked the themes available for LXDM, and the SLiM Arch Wiki page says the project is abandoned (it worked well, though). It also lists a couple of console DMs, neither of which is packaged for Ubuntu, as far as I can tell.


1 Use apt-rdepends to find the dependencies recursively:

for i in lxdm xdm slim
do
    apt-rdepends "$i" | grep -c '^\S'
done

GDM, for reference, has 445.

muru
  • 197,895
  • 55
  • 485
  • 740
0

The answer is XDM.

$ sudo apt-get install xdm
The following NEW packages will be installed
  xdm
0 to upgrade, 1 to newly install, 0 to remove and 47 not to upgrade.
Need to get 0 B/169 kB of archives.
After this operation, 848 kB of additional disk space will be used.

Edit: Please note that the exact packages required to install XDM may vary depending on what distribution you are using, and what packages are already present on your system! I cannot guarantee that it is a light-weight solution in your particular case and I will not be held responsible for any unnecessary bloat which may result from the copying and pasting of commands found on the Internet. Please carefully review the package list before accepting your package manager's suggested solution. Thank you.

Not pretty, but hey, it's one package, and just 848kb - and it works! I can now change Network Manager configuration without having to sudo killall nm-applet && sudo nm-applet :)

Edit: For those wanting to go down this route (and frankly, why wouldn't you?), it may be worth knowing that you can change the fonts/colours etc by editing /etc/X11/xdm/Xresources. Here's part of what I have put in mine, to somewhat update the 1995 looking defaults:

xlogin*greetFont: -adobe-helvetica-medium-r-normal--12-180-75-75-p-98-iso8859-1
xlogin*font: -adobe-helvetica-medium-r-normal--12-180-75-75-p-98-iso8859-1
xlogin*promptFont: -adobe-helvetica-medium-r-normal--12-180-75-75-p-98-iso8859-1
xlogin*failFont: -adobe-helvetica-medium-r-normal--12-180-75-75-p-98-iso8859-1
xlogin*greetFace:   Helvetica-12
xlogin*face:        Helvetica-12
xlogin*promptFace:  Helvetica-12:bold
xlogin*failFace:    Helvetica-12:bold

xlogin*borderWidth: 1
xlogin*frameWidth: 1
xlogin*innerFramesWidth: 1
xlogin*shdColor: #242424
xlogin*hiColor: #353535
xlogin*background: #2A2A2A
!xlogin*foreground: #FFFFFF
xlogin*greetColor: #3465A4
xlogin*failColor: #CE3117
*Foreground: grey
*Background: #191919

I simply copied the colour values from the excellent Mona GTK theme that I'm using. If someone knows how to generate font strings for other fonts available on the system I'd love to hear about it.

Beware though that this file is likely to be overwritten if XDM is updated.

Update: Found this regarding those font strings:

"Fonts under X are difficult to deal with. They have an abundance of options and modifiers, most of which are never used. The xfontsel program can make font selection much easier. Just browse through the fonts, selecting the font style, size and attributes you want. Then click on the select button and paste the font string into the Xresources file"

Not every day one reads software guides from last century, but that just adds to the fun :) Source: Customizing the XDM Login Screen by Brian Lane, Linux Journal Issue #68, December 1999

  • Whether it is one package or a hundred depends on where you start from. xdm depends on 43 packages over and above those required by network-manager-gnome, lxdm on 51 over. lxdm then has the advantage of being easier to customize at 10 packages extra. – muru Jun 22 '15 at 01:24
  • Yeah, well, in my case those packages were apparently already present, which makes the choice pretty obvious. Also, Pulseaudio will not be installed; any DMs that depend on it are automatically off the list. – Ola Tuvesson Jun 22 '15 at 02:08
  • lxdm doesn't depend on PulseAudio, so that's irrelevant. All I'm saying is that your post is misleading, just because you had to install only xdm doesn't mean others won't have to install more packages. – muru Jun 22 '15 at 02:11
  • LXDM depends on LXDE - and I'm using XFCE. XDM depends on X.org, which should already be present in most cases. Look, there is nothing to argue about here, I was just looking for help in finding a light-weight DM that did what I needed. The only help I got here was people saying I was wrong even to look for one, so I had to figure things out on my own. As usual. – Ola Tuvesson Jun 22 '15 at 02:16
  • Your post is only 15 hours old, and you won't even listen to someone who's suggesting an alternate. Just look at http://packages.ubuntu.com/trusty/lxdm and tell me where it depends on LXDE? – muru Jun 22 '15 at 02:18
  • The following NEW packages will be installed: libfm-data libfm-extra4 libfm-gtk-data libfm-gtk4 libfm-modules libfm4 libimlib2 libmenu-cache-bin libmenu-cache3 libobrender29 libobt2 lxde-common lxde-core lxdm lxmenu-data lxpanel lxsession lxsession-data lxsession-logout obconf openbox pcmanfm – Ola Tuvesson Jun 22 '15 at 02:20
  • You're installing the recommended packages as well! For someone who cares about bloat, that's a mistake. sudo apt-get install lxdm --no-install-recommends (which, on my system, is also just one package - lxdm). – muru Jun 22 '15 at 02:21
  • My /etc/apt/apt.conf:

    APT::Get::Install-Recommends "false"; APT::Get::Install-Suggests "false";

    – Ola Tuvesson Jun 22 '15 at 02:23
  • Wrong syntax if you're on a recent version of Ubuntu: http://askubuntu.com/a/312612/158442, and also try my command and see for yourself. – muru Jun 22 '15 at 02:28
  • Aha! Apparently it's changed to APT::Install-Recommends "false"; APT::Install-Suggests "false"; Thanks for pointing me in the right direction! – Ola Tuvesson Jun 22 '15 at 02:31
  • May I ask, what exactly do you have against XDM? Would I gain any functionality by using LXDE's DM? – Ola Tuvesson Jun 22 '15 at 02:33
  • Oh, I don't have anything against it. I'm just suggesting lxdm as alternative, and that your post is slightly misleading about the way it presents xdm's dependencies. You gain easier theming, I suppose. I use https://aur.archlinux.org/packages/lxdm-themes on Arch Linux for that. – muru Jun 22 '15 at 02:36
  • Theming of the login screen does not rank that high on my list - as long as it doesn't look like a Power Point presentation with yellow background and 72pt cyan Comic-Sans I'm golden. It wasn't hard to change the colours of XDM - in fact I've easily spent ten times more time arguing about it here! Also, if you have an answer to my question, please consider posting it as such. – Ola Tuvesson Jun 22 '15 at 02:42
  • Xdm is maintained in xorg, so has no dependencies besides what is already there. – le3th4x0rbot Jun 22 '15 at 05:34
  • Exactly; if you already run a graphical desktop you will likely not need to install any additional packages to install XDM. To be fair, the same appears to be true for LXDM and SLiM as well. It's just LightDM and GDM that suffer from this unnecessary bloat. – Ola Tuvesson Jun 24 '15 at 17:06