After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 707430 - gnome-shell fails to start if bluetooth is not enabled
gnome-shell fails to start if bluetooth is not enabled
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-09-03 23:20 UTC by Olivier Blin
Modified: 2013-09-04 10:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
panel: fix crash when bluetooth is disabled (2.09 KB, patch)
2013-09-03 23:24 UTC, Olivier Blin
needs-work Details | Review
panel: fix crash when bluetooth is disabled (2.17 KB, patch)
2013-09-04 09:02 UTC, Olivier Blin
committed Details | Review

Description Olivier Blin 2013-09-03 23:20:42 UTC
gnome-shell fails to start if bluetooth is not enabled at build-time (HAVE_BLUETOOTH=0 in config.js):
Sep  4 00:30:37 localhost gnome-session[3919]: Entering running state
Sep  4 00:30:38 localhost gnome-session[3919]: (gnome-settings-daemon:3940): color-plugin-WARNING **: failed to add user icc: Permission non accordée
Sep  4 00:30:38 localhost gnome-session[3919]: Avertissement du gestionnaire de fenêtres : Log level 16: Could not load applications usage data: Erreur à l'ouverture du fichi
er : Permission non accordée
Sep  4 00:30:38 localhost gnome-session[3919]: (gnome-shell:3948): Gjs-WARNING **: JS ERROR: Error: Requiring GnomeBluetoothApplet, version none: Typelib file for namespace '
GnomeBluetoothApplet' (any version) not found
Sep  4 00:30:38 localhost gnome-session[3919]: @/usr/share/gnome-shell/js/ui/status/bluetooth.js:5

This seems to occur since commit 5c8c4e0aad4c1e2d05960efdfded7c69225e2d95
Comment 1 Olivier Blin 2013-09-03 23:24:37 UTC
Created attachment 254025 [details] [review]
panel: fix crash when bluetooth is disabled

Attached patch fixes the issue.
Comment 2 Giovanni Campagna 2013-09-04 07:42:39 UTC
Review of attachment 254025 [details] [review]:

Thanks for the patch, it's almost correct.

::: js/ui/panel.js
@@ +838,3 @@
+            this._bluetooth = new imports.ui.status.bluetooth.Indicator();
+            this._indicators.add_child(this._bluetooth.indicators);
+            this.menu.addMenuItem(this._bluetooth.menu);

No, you need to keep the relative order with the rest of the menu.
Comment 3 Olivier Blin 2013-09-04 09:02:20 UTC
Created attachment 254045 [details] [review]
panel: fix crash when bluetooth is disabled

Attached is an updated patch keeping ordering.
Thanks for your comment
Comment 4 Giovanni Campagna 2013-09-04 09:04:36 UTC
Review of attachment 254045 [details] [review]:

You can omit braces if the body of the if/else is one line.
Otherwise this is good to commit.

Do you have git access?
Comment 5 Olav Vitters 2013-09-04 10:19:26 UTC
Aargh, I thought Olivier didn't have git, but he does.

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.