Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: /etc/sysconfig/displaymanager reverted on boot

  1. #1
    Join Date
    Dec 2012
    Posts
    11

    Question /etc/sysconfig/displaymanager reverted on boot

    Hello!

    I have opensuse 13.2 with gdm display manager (kdm was installed, but was not used). After upgrade to 13.2 I wanted to switch to kdm. I made necessary changes to /etc/sysconfig/displaymanager and /etc/sysconfig/windowmanager files. After reboot kdm was displayed properly, as expected. But after second reboot I was brought back to gdm. I noticed the shutdown is required, not software reboot.

    1) start with GDM
    2) edit displaymanager (DISPLAYMANAGER="kdm") and windowmanager
    3) shutdown / cold start
    4) system started successfully with KDM
    5) look at displaymanager => DISPLAYMANAGER=gdm
    6) shutdown / cold start
    7) system started successfully with GDM

    The modification time of /etc/sysconfig/displaymanager shows that modification was made during system boot. Does anybody know what application modifies the configuration file and how to prevent them from unattended modification at boot time?

  2. #2

    Default Re: /etc/sysconfig/displaymanager reverted on boot

    Quote Originally Posted by inok View Post
    The modification time of /etc/sysconfig/displaymanager shows that modification was made during system boot. Does anybody know what application modifies the configuration file and how to prevent them from unattended modification at boot time?
    None that I know of.

    Are you sure it happened during _boot_? (a package update might change it e.g., but even that shouldn't happen)

    Maybe some custom boot script?

    I have no idea how to track that down at the moment. Maybe grep for "displaymanager" in /etc/init.d/?
    Code:
    grep -R displaymanager /etc/init.d/
    Or misuse apparmor to detect (attempted) changes to the file...

  3. #3
    Join Date
    Dec 2012
    Posts
    11

    Default Re: /etc/sysconfig/displaymanager reverted on boot

    Quote Originally Posted by wolfi323 View Post
    Are you sure it happened during _boot_? (a package update might change it e.g., but even that shouldn't happen)

    Or misuse apparmor to detect (attempted) changes to the file...
    Apparmor is not installed. Yes, it looks like modification occurs during boot (but after X start) because system started with KDM successfully one time, and the modification time confirm that. I will check for any scripts...

  4. #4

    Default Re: /etc/sysconfig/displaymanager reverted on boot

    Quote Originally Posted by inok View Post
    Apparmor is not installed.
    It should be by default.

    But my point was that you could use it to find out what exactly modifies /etc/sysconfig/displaymanager...

  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: /etc/sysconfig/displaymanager reverted on boot

    On 2015-01-09 20:56, inok wrote:
    >
    > Hello!
    >
    > I have opensuse 13.2 with gdm display manager (kdm was installed, but
    > was not used). After upgrade to 13.2 I wanted to switch to kdm.


    The correct procedure should be:

    - log off graphical session
    - switch to text mode (ctrl-alt-f1)
    - close graphical mode (init 3)
    - edit /etc/sysconfig/displaymanager, using joe or vi, or mcedit if
    installed.
    - restart graphical mode (init 5)

    and you should have the new display manager running, without rebooting.


    > The modification time of /etc/sysconfig/displaymanager shows that
    > modification was made during system boot. Does anybody know what
    > application modifies the configuration file and how to prevent them from
    > unattended modification at boot time?


    I don't know what would do that change or why.

    Maybe something inside gnome would want gdm running, but the change
    would not be done at boot, and it would be very impolite to revert an
    administrator choice.

    Maybe some systemd configuration was not remade. Try the way I described
    above.


    The trick to prevent an unknown program from changing a particular file
    is to block the action with apparmor, or make it report the action, as
    wolfi323 mentioned. I can dig out the details from my notes if you want.


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  6. #6
    Join Date
    Dec 2012
    Posts
    11

    Lightbulb Re: /etc/sysconfig/displaymanager reverted on boot

    I think I found the problem. There was the following strings in the /etc/init.d/boot.local file:
    Code:
    if cat /proc/cmdline | grep -q kde; then    sed -i -e "s:^DEFAULT_WM=.*:DEFAULT_WM=kde4:" /etc/sysconfig/windowmanager
        sed -i -e "s:^DISPLAYMANAGER=.*:DISPLAYMANAGER=kdm4:" /etc/sysconfig/displaymanager
    else
        sed -i -e "s:^DEFAULT_WM=.*:DEFAULT_WM=gnome:" /etc/sysconfig/windowmanager
        sed -i -e "s:^DISPLAYMANAGER=.*:DISPLAYMANAGER=gdm:" /etc/sysconfig/displaymanager
    fi
    When I commented them out, the problem disappeared. This is a quite strange code: why should /proc/cmdline contain kde substring?

  7. #7

    Default Re: /etc/sysconfig/displaymanager reverted on boot

    Quote Originally Posted by inok View Post
    This is a quite strange code: why should /proc/cmdline contain kde substring?
    /proc/cmdline would contain any option you add to the kernel command line.
    This script would make it possible to specify the DISPLAYMANAGER and the DEFAULT_WM to be used via the kernel boot options, e.g. you could create different boot menu entries that boot to kdm with KDE as default and gdm with GNOME as default respectively. I.e. that script will set it to GNOME/gdm unless you specify "kde" at the kernel command line.

    Btw, that DEFAULT_WM=kde4 is incorrect and won't work. It should be DEFAULT_WM=kde-plasma since years...

    The code itself I do not find strange. But it is strange that it is even there!
    This is definitely not the case by default. The shipped boot.local looks like this:
    Code:
    #! /bin/sh
    #
    # Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany.  All rights reserved.
    #
    # Author: Werner Fink, 1996
    #         Burchard Steinbild, 1996
    #
    # /etc/init.d/boot.local
    #
    # script with local commands to be executed from init on system startup
    #
    # Here you should add things, that should happen directly after booting
    # before we're going to the first run level.
    #
    I.e. it is practically empty.
    But as it is a "config" file, it is not changed/replaced on updates/upgrades, and that wouldn't be a good idea anyway.
    Last edited by wolfi323; 10-Jan-2015 at 01:52.

  8. #8

    Default Re: /etc/sysconfig/displaymanager reverted on boot

    Hi,

    I think the question now is: 'Which app/program created that boot.local entry'
    "Unfortunately time is always against us" -- [Morpheus]

    .:https://github.com/Jetchisel:.

  9. #9

    Default Re: /etc/sysconfig/displaymanager reverted on boot

    Quote Originally Posted by jetchisel View Post
    I think the question now is: 'Which app/program created that boot.local entry'
    Or rather: "Which user/admin added that to boot.local", IMHO...

    I don't think any application did, at least none that's included in openSUSE.
    Last edited by wolfi323; 10-Jan-2015 at 04:10.

  10. #10

    Default Re: /etc/sysconfig/displaymanager reverted on boot

    I remember

    Code:
    /etc/bash.bashrc.local
    was created by some yast module in past too.
    "Unfortunately time is always against us" -- [Morpheus]

    .:https://github.com/Jetchisel:.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •