GNOME Bugzilla – Bug 433582
Behaves badly without internet connection (implement network-manager support?)
Last modified: 2020-03-10 11:50:59 UTC
Hi, this bug was originaly filed as http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=383696: > I have a laptop which is connected to the internet most of the time > (wireless), but sometimes the connection breaks (because of suspend to > RAM, or when logging in until I enter the wireless password). > > last-exit does not cope very well with this situation :( > > When last-exit is started without a working internet connection then > all buttons are grayed-out. This does not change if the internet > connection becomes available again. > > If last-exit is playing and the connection breaks then last-exit just > hangs without doing anything anymore. Sometimes it can recover when > hitting the play/pause button a few times but often it cannot even be > closed without force any more. As a solution for this network-manager support would be possible. Look at banshee for example code. Bye
Added to my TODO list, stay tuned
Here is the Banshee code for interfacing with NM via Dbus ( http://svn.gnome.org/svn/banshee/trunk/banshee/src/Core/Banshee.Services/Banshee.Networking/NetworkManager.cs ). The main point of interest is the StateChange event (see, fpr example, NetworkDetect() in http://svn.gnome.org/svn/banshee/trunk/banshee/src/Core/Banshee.Services/Banshee.Networking/NetworkDetect.cs ). I'm not sure if using NM might be a bit heavyweight, though. A simple poll (GLib.Timeout) with retrying to connect every N milliseconds may be sufficient. I'll try to cobble together a lightweight patch with just a timeout in the next few days, and if times permits, a fuller patch using NM via Dbus.
Closing all open last-exit tickets as it does not seem to be maintained anymore. See https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/267 for more information.