Announcement

Collapse
No announcement yet.

How to tell SDDM to reload configuration?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to tell SDDM to reload configuration?

    Hi, I'd like to tell SDDM to reload config (theme change). It seems that it uses DBus for that. I'd like to cause dbus-monitor --system to output something like this:
    Code:
    method call time=1672220102.585064 sender=:1.328 -> destination=:1.6 serial=18 path=/org/freedesktop/PolicyKit1/Authority; interface=org.freedesktop.PolicyKit1.Authority; member=CheckAuthorization
       struct {
          string "system-bus-name"
          array [
             dict entry(
                string "name"
                variant                string ":1.329"
             )
          ]
       }
       string "org.kde.kcontrol.kcmsddm.save"
       array [
       ]
       uint32 0
       string ""
    method call time=1672220102.604099 sender=:1.329 -> destination=org.freedesktop.DBus serial=11 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=StartServiceByName
       string "org.kde.kcontrol.kcmsddm"
       uint32 0
    method call time=1672220102.641931 sender=:1.329 -> destination=org.kde.kcontrol.kcmsddm serial=12 path=/; interface=org.kde.kf5auth; member=performAction
       string "org.kde.kcontrol.kcmsddm.save"
       array of bytes ":1.329"
       array [
       ]
       array of bytes [
          00 00 00 0b 00 00 00 46 00 6b 00 64 00 65 00 5f 00 73 00 65 00 74 00 74
          00 69 00 6e 00 67 00 73 00 2e 00 63 00 6f 00 6e 00 66 00 2f 00 41 00 75
          00 74 00 6f 00 6c 00 6f 00 67 00 69 00 6e 00 2f 00 52 00 65 00 6c 00 6f
          00 67 00 69 00 6e 00 00 00 01 00 00 00 00 00 46 00 6b 00 64 00 65 00 5f
          00 73 00 65 00 74 00 74 00 69 00 6e 00 67 00 73 00 2e 00 63 00 6f 00 6e
          00 66 00 2f 00 41 00 75 00 74 00 6f 00 6c 00 6f 00 67 00 69 00 6e 00 2f
          00 53 00 65 00 73 00 73 00 69 00 6f 00 6e 00 00 00 0a 00 00 00 00 1c 00
          70 00 6c 00 61 00 73 00 6d 00 61 00 2e 00 64 00 65 00 73 00 6b 00 74 00
          6f 00 70 00 00 00 40 00 6b 00 64 00 65 00 5f 00 73 00 65 00 74 00 74 00
          69 00 6e 00 67 00 73 00 2e 00 63 00 6f 00 6e 00 66 00 2f 00 41 00 75 00
          74 00 6f 00 6c 00 6f 00 67 00 69 00 6e 00 2f 00 55 00 73 00 65 00 72 00
          00 00 0a 00 00 00 00 0e 00 6b 00 75 00 62 00 75 00 6e 00 74 00 75 00 00
          00 4a 00 6b 00 64 00 65 00 5f 00 73 00 65 00 74 00 74 00 69 00 6e 00 67
          00 73 00 2e 00 63 00 6f 00 6e 00 66 00 2f 00 47 00 65 00 6e 00 65 00 72
          00 61 00 6c 00 2f 00 48 00 61 00 6c 00 74 00 43 00 6f 00 6d 00 6d 00 61
          00 6e 00 64 00 00 00 0a 00 00 00 00 00 00 00 00 4e 00 6b 00 64 00 65 00
          5f 00 73 00 65 00 74 00 74 00 69 00 6e 00 67 00 73 00 2e 00 63 00 6f 00
          6e 00 66 00 2f 00 47 00 65 00 6e 00 65 00 72 00 61 00 6c 00 2f 00 52 00
          65 00 62 00 6f 00 6f 00 74 00 43 00 6f 00 6d 00 6d 00 61 00 6e 00 64 00
          00 00 0a 00 00 00 00 00 00 00 00 3e 00 6b 00 64 00 65 00 5f 00 73 00 65
          00 74 00 74 00 69 00 6e 00 67 00 73 00 2e 00 63 00 6f 00 6e 00 66 00 2f
          00 54 00 68 00 65 00 6d 00 65 00 2f 00 43 00 75 00 72 00 72 00 65 00 6e
          00 74 00 00 00 0a 00 00 00 00 20 00 66 00 61 00 6e 00 74 00 61 00 73 00
          79 00 2d 00 62 00 6c 00 75 00 65 00 2d 00 76 00 2e 00 32 00 00 00 44 00
          6b 00 64 00 65 00 5f 00 73 00 65 00 74 00 74 00 69 00 6e 00 67 00 73 00
          2e 00 63 00 6f 00 6e 00 66 00 2f 00 55 00 73 00 65 00 72 00 73 00 2f 00
          4d 00 61 00 78 00 69 00 6d 00 75 00 6d 00 55 00 69 00 64 00 00 00 03 00
          00 00 ea 60 00 00 00 44 00 6b 00 64 00 65 00 5f 00 73 00 65 00 74 00 74
          00 69 00 6e 00 67 00 73 00 2e 00 63 00 6f 00 6e 00 66 00 2f 00 55 00 73
          00 65 00 72 00 73 00 2f 00 4d 00 69 00 6e 00 69 00 6d 00 75 00 6d 00 55
          00 69 00 64 00 00 00 03 00 00 00 03 e7 00 00 00 1e 00 74 00 68 00 65 00
          6d 00 65 00 2e 00 63 00 6f 00 6e 00 66 00 2e 00 75 00 73 00 65 00 72 00
          00 00 0a 00 00 00 00 6e 00 2f 00 75 00 73 00 72 00 2f 00 73 00 68 00 61
          00 72 00 65 00 2f 00 73 00 64 00 64 00 6d 00 2f 00 74 00 68 00 65 00 6d
          00 65 00 73 00 2f 00 66 00 61 00 6e 00 74 00 61 00 73 00 79 00 2d 00 62
          00 6c 00 75 00 65 00 2d 00 76 00 2e 00 32 00 2f 00 74 00 68 00 65 00 6d
          00 65 00 2e 00 63 00 6f 00 6e 00 66 00 2e 00 75 00 73 00 65 00 72 00 00
          00 44 00 74 00 68 00 65 00 6d 00 65 00 2e 00 63 00 6f 00 6e 00 66 00 2e
          00 75 00 73 00 65 00 72 00 2f 00 47 00 65 00 6e 00 65 00 72 00 61 00 6c
          00 2f 00 62 00 61 00 63 00 6b 00 67 00 72 00 6f 00 75 00 6e 00 64 00 00
          00 0a 00 00 00 00 74 00 2f 00 75 00 73 00 72 00 2f 00 73 00 68 00 61 00
          72 00 65 00 2f 00 73 00 64 00 64 00 6d 00 2f 00 74 00 68 00 65 00 6d 00
          65 00 73 00 2f 00 66 00 61 00 6e 00 74 00 61 00 73 00 79 00 2d 00 62 00
          6c 00 75 00 65 00 2d 00 76 00 2e 00 32 00 2f 00 4e 00 4f 00 20 00 4c 00
          4f 00 47 00 4f 00 20 00 49 00 4d 00 50 00 20 00 32 00 31 00 2e 00 70 00
          6e 00 67 00 00 00 38 00 74 00 68 00 65 00 6d 00 65 00 2e 00 63 00 6f 00
          6e 00 66 00 2e 00 75 00 73 00 65 00 72 00 2f 00 47 00 65 00 6e 00 65 00
          72 00 61 00 6c 00 2f 00 74 00 79 00 70 00 65 00 00 00 0a 00 00 00 00 0a
          00 69 00 6d 00 61 00 67 00 65
       ]
    signal time=1672220102.643753 sender=:1.367 -> destination=(null destination) serial=3 path=/; interface=org.kde.kf5auth; member=remoteSignal
       int32 0
       string "org.kde.kcontrol.kcmsddm.save"
       array [
       ]
    method call time=1672220102.644534 sender=:1.366 -> destination=:1.6 serial=8 path=/org/freedesktop/PolicyKit1/Authority; interface=org.freedesktop.PolicyKit1.Authority; member=CheckAuthorization
       struct {
          string "system-bus-name"
          array [
             dict entry(
                string "name"
                variant                string ":1.329"
             )
          ]
       }
       string "org.kde.kcontrol.kcmsddm.save"
       array [
       ]
       uint32 1
       string "cancellation-id-0"
    signal time=1672220102.652435 sender=:1.367 -> destination=(null destination) serial=4 path=/; interface=org.kde.kf5auth; member=remoteSignal
       int32 2
       string "org.kde.kcontrol.kcmsddm.save"
       array of bytes [
          00 00 00 00 00 00 01 2e 00 43 00 6f 00 70 00 79 00 69 00 6e 00 67 00 20
          00 62 00 61 00 63 00 6b 00 67 00 72 00 6f 00 75 00 6e 00 64 00 20 00 66
          00 72 00 6f 00 6d 00 20 00 20 00 22 00 2f 00 75 00 73 00 72 00 2f 00 73
          00 68 00 61 00 72 00 65 00 2f 00 73 00 64 00 64 00 6d 00 2f 00 74 00 68
          00 65 00 6d 00 65 00 73 00 2f 00 66 00 61 00 6e 00 74 00 61 00 73 00 79
          00 2d 00 62 00 6c 00 75 00 65 00 2d 00 76 00 2e 00 32 00 2f 00 4e 00 4f
          00 20 00 4c 00 4f 00 47 00 4f 00 20 00 49 00 4d 00 50 00 20 00 32 00 31
          00 2e 00 70 00 6e 00 67 00 22 00 20 00 20 00 74 00 6f 00 20 00 20 00 22
          00 2f 00 75 00 73 00 72 00 2f 00 73 00 68 00 61 00 72 00 65 00 2f 00 73
          00 64 00 64 00 6d 00 2f 00 74 00 68 00 65 00 6d 00 65 00 73 00 2f 00 66
          00 61 00 6e 00 74 00 61 00 73 00 79 00 2d 00 62 00 6c 00 75 00 65 00 2d
          00 76 00 2e 00 32 00 2f 00 4e 00 4f 00 20 00 4c 00 4f 00 47 00 4f 00 20
          00 49 00 4d 00 50 00 20 00 32 00 31 00 2e 00 70 00 6e 00 67 00 22
       ]
    signal time=1672220102.655492 sender=:1.367 -> destination=(null destination) serial=5 path=/; interface=org.kde.kf5auth; member=remoteSignal
       int32 1
       string "org.kde.kcontrol.kcmsddm.save"
       array of bytes [
          00 00 00 00 00 00 00 00 00 00 00 02 ff ff ff ff
       ]
    Maybe it can be done differently, but dpkg-reconfigure sddm didn't help and restarting sddm requires logout, so I'm not going to use it. Unfortunately I haven't found a way to pass a structure to qdbus.

    May someone help me, please? ​

    #2
    Can you please explain what exactly you are trying to do? It seems you are asking to change the login theme of sddm after you have logged in, which you can't see because you are logged in, so I'm having trouble grasping the purpose of this.

    Please Read Me

    Comment


      #3
      I've written a script that configures my system including SDDM, but when I log out, the theme doesn't change even though the config has been changed.
      The only way to make SDDM reload the config from terminal that I can do so far is through restarting it, but that forces logout, which I don't want.
      KDE's settings use the DBus calls listed above to make SDDM reload its config, so I'd like to do the same thing from my script, but I have no idea how to do that from a script or terminal.
      (Tried qdbus but I have no idea how to pass a structure to it.)

      Comment


        #4
        I am not even sure if it is possible, without fully restarting SDDM, for any changes to take effect.

        But it likely would be a qdbus call, I imagine this may what the system setting KCM module is doing?

        I bet you can get a good answer from plasma devs directly, either from the plasma-devel mailing list or plasma on [/url=https://mail.kde.org/mailman/listinfo/plasma-devel]irc[/url] or matrix
        I am almost 100% positive SDDM devs hang out in both regularly enough.

        Now, if you are looking for a preview of the changes while customizing a theme, you can test that out quite easily:

        sddm-greeter --test-mode --theme /usr/share/sddm/themes/breeze

        Click image for larger version  Name:	Screenshot_20221230_131229.png Views:	0 Size:	843.8 KB ID:	667503

        Comment


          #5
          I used strace on systemsettings and it doesn't execve qdbus, it sends the messages differently, I'd guess it's using a library, but I don't care enough to find this particular detail out as I'm not compiling anything, I'm writing a script.
          Thank you very much for pointing me to the devs, I'll have a look at it.

          Comment


            #6
            Either nobody responded on the mailing list or I've missed it. But I've figured it out myself. On live Kubuntu 22.10, it can be done by running:

            Code:
            gdbus emit --system --object-path / --signal org.kde.kf5auth.remoteSignal 1 org.kde.kcontrol.kcmsddm.save "[ byte 0,0,0,0,0,0,0,0,0,0,0,2,255,255,255,255 ]"​
            or

            Code:
            dbus-send --system / org.kde.kf5auth.remoteSignal int32:1 string:org.kde.kcontrol.kcmsddm.save array:byte:0,0,0,0,0,0,0,0,0,0,0,2,255,255,255,255​

            Comment

            Working...
            X