You are not logged in.

#1 2023-12-08 00:07:36

dab9966
Member
Registered: 2023-12-05
Posts: 44

Installed new SDDM theme, time is not showing

Running command to test theme, it loads the theme successfully but the date & time is not showing. It is also not showing if it's applied and rebooted. Command used:

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

Noticed there is error message in console:

sddm-greeter --test-mode --theme /usr/share/sddm/themes/sweet
High-DPI autoscaling Enabled
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Reading from "/usr/local/share/wayland-sessions/gnome-wayland.desktop"
Reading from "/usr/share/wayland-sessions/gnome-wayland.desktop"
Reading from "/usr/local/share/wayland-sessions/gnome.desktop"
Reading from "/usr/share/wayland-sessions/gnome.desktop"
Reading from "/usr/local/share/xsessions/gnome-xorg.desktop"
Reading from "/usr/share/xsessions/gnome-xorg.desktop"
Reading from "/usr/local/share/xsessions/gnome.desktop"
Reading from "/usr/share/xsessions/gnome.desktop"
Loading theme configuration from "/usr/share/sddm/themes/sweet/theme.conf"
Socket error:  "QLocalSocket::connectToServer: Invalid name"
Loading file:///usr/share/sddm/themes/sweet/Main.qml...
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QGuiApplication(0x7fff98c91540), parent's thread is QThread(0x55738d2a38f0), current thread is QThread(0x55738d87ad70)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QGuiApplication(0x7fff98c91540), parent's thread is QThread(0x55738d2a38f0), current thread is QThread(0x55738d87ad70)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QGuiApplication(0x7fff98c91540), parent's thread is QThread(0x55738d2a38f0), current thread is QThread(0x55738d87ad70)
QObject::installEventFilter(): Cannot filter events for objects in a different thread.
file:///usr/share/sddm/themes/sweet/Main.qml:440:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/sddm/themes/sweet/components/VirtualKeyboard.qml:21:1: module "QtQuick.VirtualKeyboard" is not installed
file:///usr/share/sddm/themes/sweet/Login.qml:94:9: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/sddm/themes/sweet/components/Clock.qml:29: TypeError: Cannot read property 'DateTime' of undefined
file:///usr/share/sddm/themes/sweet/components/Clock.qml:39: TypeError: Cannot read property 'DateTime' of undefined

Clock.qml file contents:

/*
*   Copyright 2016 David Edmundson <davidedmundson@kde.org>
*
*   This program is free software; you can redistribute it and/or modify
*   it under the terms of the GNU Library General Public License as
*   published by the Free Software Foundation; either version 2 or
*   (at your option) any later version.
*
*   This program is distributed in the hope that it will be useful,
*   but WITHOUT ANY WARRANTY; without even the implied warranty of
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*   GNU General Public License for more details
*
*   You should have received a copy of the GNU Library General Public
*   License along with this program; if not, write to the
*   Free Software Foundation, Inc.,
*   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

import QtQuick 2.8
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.5
import org.kde.plasma.core 2.0

ColumnLayout {
    readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software

    Label {
        text: Qt.formatTime(timeSource.data["Local"]["DateTime"])
        color: root.clock_color
        style: softwareRendering ? Text.Outline : Text.Normal
        styleColor: softwareRendering ? ColorScope.backgroundColor : "transparent" //no outline, doesn't matter
        font.pointSize: 34
        Layout.alignment: Qt.AlignHCenter
                font.family: config.font

    }
    Label {
        text: Qt.formatDate(timeSource.data["Local"], Qt.DefaultLocaleLongDate)
        color: root.clock_color
        style: softwareRendering ? Text.Outline : Text.Normal
        styleColor: softwareRendering ? ColorScope.backgroundColor : "transparent" //no outline, doesn't matter
        font.pointSize: 17
        Layout.alignment: Qt.AlignHCenter
                font.family: config.font

    }
    DataSource {
        id: timeSource
        engine: "time"
        connectedSources: ["Local"]
        interval: 1000
    }
}

It seems this is responsible line:
text: Qt.formatDate(timeSource.data["Local"], Qt.DefaultLocaleLongDate)

I have installed sudo pacman -S plasma-framework5, could it be I need to install anything else?

The SDDM theme in question: https://store.kde.org/s/KDE%20Store/p/1334945

uname -a
Linux arch 6.6.4-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 04 Dec 2023 00:29:19 +0000 x86_64 GNU/Linux

gnome-shell --version
GNOME Shell 45.2

loginctl show-session 33 -p Type
Type=wayland

Offline

Board footer

Powered by FluxBB