This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Screen Locker not showing Full User Name for LDAP users

Tags: None
(comma "," separated)
User avatar
cleary
Registered Member
Posts
32
Karma
0
Hi folks,
I'm using ubuntu 18.04 with KDE from the standard repos (5.44).

I'm experiencing an issue where the screenlocker will display the full username for any locally created users, but not for any LDAP authenticated users - this is not an uncommon issue, but there doesn't seem to have been any specific resolution I've found in any of the other threads.

The following getent commands all return correct results from the remote LDAP server
Code: Select all
getent passwd
getent passwd <remote user>
getent group
getent group <remote group>


Can anyone tell me where the screen locker sources the full username variable from?

Screenies:
Local User:
Image

LDAP User:
Image
User avatar
cleary
Registered Member
Posts
32
Karma
0
The plot thickens(?)

In the source code for kscreenlocker-5.12.8, greeter/greeterapp.cpp:300:

Code: Select all
        const KUser user;
        const QString fullName = user.property(KUser::FullName).toString();

        context->setContextProperty(QStringLiteral("kscreenlocker_userName"), fullName.isEmpty() ? user.loginName() : fullName);


edit:
It turns out this code snippet is in a function called
Code: Select all
void UnlockApp::desktopResized()
- I don't think this is where my answer will be found. The following block was probably a big waste of time :(

I followed this tutorial to build my first KDE program, copied the KUser initialisation/property ref from greeterapp.cpp and stuck the fullName variable on my button... it gets the correct fullName for LDAP authenticated users.

Next try, Simplify the logic for setting the kscreenlocker_userName context property:
Code: Select all
-        context->setContextProperty(QStringLiteral("kscreenlocker_userName"), fullName.isEmpty() ? user.loginName() : fullName);
+        context->setContextProperty(QStringLiteral("kscreenlocker_userName"), fullName);


- rebuilt the package, tested, still doesn't show for LDAP users.

The kscreenlocker_userName context property is referenced in the greeter/fallbacktheme/Greeter.qml file, but I'm not using that theme. The theme I am using (I believe, it's been a while since I delved into the config) is breeze...

Any thoughts on where a breeze qml theme file might live for me to look at?

edit: found it
Code: Select all
plasma-workspace: /usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/lockscreen/config.qml
plasma-workspace: /usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/lockscreen/LockOsd.qml
plasma-workspace: /usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/lockscreen/LockScreenUi.qml


I'll keep digging
User avatar
cleary
Registered Member
Posts
32
Karma
0
I've got an open bounty on askubuntu if anyone is interested:

https://askubuntu.com/questions/1179597 ... for-remote


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]