Reconfigure the display-manager non-interactively
I am trying to change the default display-manager on a Ubuntu 18.04.1 in a non-interactive way to do this in a script.
Everything works as expected when using
dpkg-reconfigure gdm3
dpkg-reconfigure lightdm
I tried setting shared/default-x-display-manager
to a valid display-manager and run dpkg-reconfigure
, but that did not do the trick.
First check which display-manager is set.
root@host:~# cat /etc/X11/default-display-manager
/usr/sbin/gdm3
root@host:~# cat /etc/X11/default-display-manager
/usr/sbin/gdm3
Then set shared/default-x-display-manager
to lightdm
and validate it.
root@host:~# echo set shared/default-x-display-manager lightdm | debconf-communicate
0 value set
root@host:~# echo get shared/default-x-display-manager | debconf-communicate
0 lightdm
Finally run dpkg-reconfigure --frontend noninteractive lightdm
and check which display-manager is active. Which unfortunately is gdm3
again.
root@host:~# dpkg-reconfigure --frontend noninteractive lightdm
root@host:~# echo get shared/default-x-display-manager | debconf-communicate
0 gdm3
root@host:~# cat /etc/X11/default-display-manager
/usr/sbin/gdm3
root@host:~# ll /etc/systemd/system/display-manager.service
lrwxrwxrwx 1 root root 32 Jan 31 20:03 /etc/systemd/system/display-manager.service -> /lib/systemd/system/gdm3.service
The same happens if I want to switch from lightdm
to gdm3
.
Anything I am missing here or is this not intended to work at all?
I have seen in the scripts for gdm3
that if there is a /etc/X11/default-display-manager.debconf-update file, the systemd
unit and the /etc/X11/default-display-manager are updated accordingly.
Unfortunately this does not work for lightdm
as this one uses some other method(s) to do the work.
Hope someone else can shed some light on this and knows a convenient way to configure the display-manager non-interactively.
18.04 lightdm gdm display-manager
add a comment |
I am trying to change the default display-manager on a Ubuntu 18.04.1 in a non-interactive way to do this in a script.
Everything works as expected when using
dpkg-reconfigure gdm3
dpkg-reconfigure lightdm
I tried setting shared/default-x-display-manager
to a valid display-manager and run dpkg-reconfigure
, but that did not do the trick.
First check which display-manager is set.
root@host:~# cat /etc/X11/default-display-manager
/usr/sbin/gdm3
root@host:~# cat /etc/X11/default-display-manager
/usr/sbin/gdm3
Then set shared/default-x-display-manager
to lightdm
and validate it.
root@host:~# echo set shared/default-x-display-manager lightdm | debconf-communicate
0 value set
root@host:~# echo get shared/default-x-display-manager | debconf-communicate
0 lightdm
Finally run dpkg-reconfigure --frontend noninteractive lightdm
and check which display-manager is active. Which unfortunately is gdm3
again.
root@host:~# dpkg-reconfigure --frontend noninteractive lightdm
root@host:~# echo get shared/default-x-display-manager | debconf-communicate
0 gdm3
root@host:~# cat /etc/X11/default-display-manager
/usr/sbin/gdm3
root@host:~# ll /etc/systemd/system/display-manager.service
lrwxrwxrwx 1 root root 32 Jan 31 20:03 /etc/systemd/system/display-manager.service -> /lib/systemd/system/gdm3.service
The same happens if I want to switch from lightdm
to gdm3
.
Anything I am missing here or is this not intended to work at all?
I have seen in the scripts for gdm3
that if there is a /etc/X11/default-display-manager.debconf-update file, the systemd
unit and the /etc/X11/default-display-manager are updated accordingly.
Unfortunately this does not work for lightdm
as this one uses some other method(s) to do the work.
Hope someone else can shed some light on this and knows a convenient way to configure the display-manager non-interactively.
18.04 lightdm gdm display-manager
add a comment |
I am trying to change the default display-manager on a Ubuntu 18.04.1 in a non-interactive way to do this in a script.
Everything works as expected when using
dpkg-reconfigure gdm3
dpkg-reconfigure lightdm
I tried setting shared/default-x-display-manager
to a valid display-manager and run dpkg-reconfigure
, but that did not do the trick.
First check which display-manager is set.
root@host:~# cat /etc/X11/default-display-manager
/usr/sbin/gdm3
root@host:~# cat /etc/X11/default-display-manager
/usr/sbin/gdm3
Then set shared/default-x-display-manager
to lightdm
and validate it.
root@host:~# echo set shared/default-x-display-manager lightdm | debconf-communicate
0 value set
root@host:~# echo get shared/default-x-display-manager | debconf-communicate
0 lightdm
Finally run dpkg-reconfigure --frontend noninteractive lightdm
and check which display-manager is active. Which unfortunately is gdm3
again.
root@host:~# dpkg-reconfigure --frontend noninteractive lightdm
root@host:~# echo get shared/default-x-display-manager | debconf-communicate
0 gdm3
root@host:~# cat /etc/X11/default-display-manager
/usr/sbin/gdm3
root@host:~# ll /etc/systemd/system/display-manager.service
lrwxrwxrwx 1 root root 32 Jan 31 20:03 /etc/systemd/system/display-manager.service -> /lib/systemd/system/gdm3.service
The same happens if I want to switch from lightdm
to gdm3
.
Anything I am missing here or is this not intended to work at all?
I have seen in the scripts for gdm3
that if there is a /etc/X11/default-display-manager.debconf-update file, the systemd
unit and the /etc/X11/default-display-manager are updated accordingly.
Unfortunately this does not work for lightdm
as this one uses some other method(s) to do the work.
Hope someone else can shed some light on this and knows a convenient way to configure the display-manager non-interactively.
18.04 lightdm gdm display-manager
I am trying to change the default display-manager on a Ubuntu 18.04.1 in a non-interactive way to do this in a script.
Everything works as expected when using
dpkg-reconfigure gdm3
dpkg-reconfigure lightdm
I tried setting shared/default-x-display-manager
to a valid display-manager and run dpkg-reconfigure
, but that did not do the trick.
First check which display-manager is set.
root@host:~# cat /etc/X11/default-display-manager
/usr/sbin/gdm3
root@host:~# cat /etc/X11/default-display-manager
/usr/sbin/gdm3
Then set shared/default-x-display-manager
to lightdm
and validate it.
root@host:~# echo set shared/default-x-display-manager lightdm | debconf-communicate
0 value set
root@host:~# echo get shared/default-x-display-manager | debconf-communicate
0 lightdm
Finally run dpkg-reconfigure --frontend noninteractive lightdm
and check which display-manager is active. Which unfortunately is gdm3
again.
root@host:~# dpkg-reconfigure --frontend noninteractive lightdm
root@host:~# echo get shared/default-x-display-manager | debconf-communicate
0 gdm3
root@host:~# cat /etc/X11/default-display-manager
/usr/sbin/gdm3
root@host:~# ll /etc/systemd/system/display-manager.service
lrwxrwxrwx 1 root root 32 Jan 31 20:03 /etc/systemd/system/display-manager.service -> /lib/systemd/system/gdm3.service
The same happens if I want to switch from lightdm
to gdm3
.
Anything I am missing here or is this not intended to work at all?
I have seen in the scripts for gdm3
that if there is a /etc/X11/default-display-manager.debconf-update file, the systemd
unit and the /etc/X11/default-display-manager are updated accordingly.
Unfortunately this does not work for lightdm
as this one uses some other method(s) to do the work.
Hope someone else can shed some light on this and knows a convenient way to configure the display-manager non-interactively.
18.04 lightdm gdm display-manager
18.04 lightdm gdm display-manager
asked 2 days ago
ThomasThomas
3,77181527
3,77181527
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1114525%2freconfigure-the-display-manager-non-interactively%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1114525%2freconfigure-the-display-manager-non-interactively%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown