@@ -51,7 +51,7 @@ Item {
5151
5252 property real edgeSize: units.gu(2)
5353 property url defaultBackground: Qt.resolvedUrl(shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg")
54− property url background
54+ property url background: AccountsService.backgroundFile != undefined && AccountsService.backgroundFile.length > 0 ? AccountsService.backgroundFile : defaultBackground
5555 readonly property real panelHeight: panel.panelHeight
5656
5757 readonly property bool locked: LightDM.Greeter.active && !LightDM.Greeter.authenticated && !forcedUnlock
@@ -99,6 +99,21 @@ Item {
9999 shell.activateApplication(app)
100100 }
101101
102+ // This is a dummy image to detect if the custom set wallpaper
103+ // loads successfully. If it doesn't fall back to the defaultBackground.
104+ Image {
105+ source: shell.background
106+ height: 0
107+ width: 0
108+ sourceSize.height: 0
109+ sourceSize.width: 0
110+ onStatusChanged: {
111+ if (status == Image.Error && source != shell.defaultBackground) {
112+ shell.background = shell.defaultBackground
113+ }
114+ }
115+ }
116+
102117 Binding {
103118 target: LauncherModel
104119 property: "applicationManager"
@@ -115,15 +130,6 @@ Item {
115130 }
116131 }
117132
118− GSettings {
119− id: backgroundSettings
120− schema.id: "org.gnome.desktop.background"
121− }
122− property url gSettingsPicture: backgroundSettings.pictureUri != undefined && backgroundSettings.pictureUri.length > 0 ? backgroundSettings.pictureUri : shell.defaultBackground
123− onGSettingsPictureChanged: {
124− shell.background = gSettingsPicture
125− }
126−
127133 VolumeControl {
128134 id: volumeControl
129135 }
@@ -524,7 +530,7 @@ Item {
524530
525531 locked: shell.locked
526532
527− defaultBackground: shell.background
533+ background: shell.background
528534
529535 width: parent.width
530536 height: parent.height