on xenial help sign in
Stop showing a lockscreen on startup on the desktop
7dc67ccMichael Terry
data/unity8.conf+11−1
@@ -50,9 +50,19 @@ pre-start script
50 # the lag seen in the indicator panel pull-down (LP: #1488327) and also
50 # the lag seen in the indicator panel pull-down (LP: #1488327) and also
51 # reduces lag seen in apps:
51 # reduces lag seen in apps:
52 initctl set-env --global QML_NO_TOUCH_COMPRESSION=1
52 initctl set-env --global QML_NO_TOUCH_COMPRESSION=1
53+
54+ if [ "$XDG_SESSION_DESKTOP" = "ubuntu-touch" ]; then
55+ # On Ubuntu Touch, we currently use a trick where we auto-login the
56+ # user without a LightDM greeter at all. In this case, we want to
57+ # start with the lockscreen visible. Once we switch to using a
58+ # proper greeter for the first login, we can remove this code path.
59+ initctl set-env MODE=full-greeter
60+ else
61+ initctl set-env MODE=full-shell
62+ fi
53end script
63end script
54
64
55−exec ${BINARY:-unity8} $ARGS
65+exec ${BINARY:-unity8} --mode=$MODE $ARGS
56
66
57post-start script
67post-start script
58 initctl emit --no-wait indicator-services-start
68 initctl emit --no-wait indicator-services-start
qml/Greeter/Greeter.qml+5−3
@@ -163,11 +163,13 @@ Showable {
163 }
163 }
164 }
164 }
165
165
166− function checkForcedUnlock() {
166+ function checkForcedUnlock(hideNow) {
167 if (forcedUnlock && shown && loader.item) {
167 if (forcedUnlock && shown && loader.item) {
168 // pretend we were just authenticated
168 // pretend we were just authenticated
169 loader.item.notifyAuthenticationSucceeded();
169 loader.item.notifyAuthenticationSucceeded();
170 loader.item.hide();
170 loader.item.hide();
171+ if (hideNow)
172+ root.hideNow(); // skip hide animation
171 }
173 }
172 }
174 }
173 }
175 }
@@ -178,8 +180,8 @@ Showable {
178 }
180 }
179 }
181 }
180
182
181− onForcedUnlockChanged: d.checkForcedUnlock()
183+ onForcedUnlockChanged: d.checkForcedUnlock(false /* hideNow */)
182− Component.onCompleted: d.checkForcedUnlock()
184+ Component.onCompleted: d.checkForcedUnlock(true /* hideNow */)
183
185
184 onRequiredChanged: {
186 onRequiredChanged: {
185 if (required) {
187 if (required) {
qml/Shell.qml+1−1
@@ -419,7 +419,7 @@ StyledItem {
419 hides: [launcher, panel.indicators]
419 hides: [launcher, panel.indicators]
420 tabletMode: shell.usageScenario != "phone"
420 tabletMode: shell.usageScenario != "phone"
421 launcherOffset: launcher.progress
421 launcherOffset: launcher.progress
422− forcedUnlock: wizard.active
422+ forcedUnlock: wizard.active || shell.mode === "full-shell"
423 background: wallpaperResolver.background
423 background: wallpaperResolver.background
424
424
425 // avoid overlapping with Launcher's edge drag area
425 // avoid overlapping with Launcher's edge drag area