PCDM settings - how/where to set default DE?


Since a few weeks/month now PCDM - at least on both my systems - doesn’t use the last used DE as default but always Lumina.

I’d think that’s a bug that the devs don’t see because they use Lumina anyway… Or it’s by design to force users to Lumina… :slight_smile:

Anyway, I’d like to change that behaviour - either back to “last used DE” or my own default DE. But I can’t find the responsible settings file.


both don’t seem to contain any entry that addresses the (pre-)selected DE.

So maybe it’s “hardcoded” into the execution file? “/usr/local/bin/PCDM-session”?

Is there any (other) settings file I could check out if there maybe any entry that changed that PCDM behaviour?



After a quick scan through the code it looks like there aren’t any other config files used. I also can’t see a default DE config value being consumed anywhere. It looks like this isn’t something you can configure. @beanpole135 or @q5sys would likely be able to give you a definitive answer though.

It looks like it is an option for auto login though if that’s something you’d be interested in? It looks like it picks up your previously used DE. There also looks to be a config value but it is marked as legacy.


I’ve managed to get to my laptop and check the GUI config app and can confirm that this isn’t an option there either.

I think your best bet is to set auto login to on from your preferred DE (although I realise this isn’t ideal if you plan to switch DE regularly or require the added security). I also haven’t had chance to test that this actually works as I expect.

See below.


Having now sat down at my PC and checked the code I can see that your last selected desktop should be pre-selected for you:

void PCDMgui::retranslateUi(){

    //The desktop switcher

    if(!user.isEmpty()){ lastDE = Backend::getLastDE(user, USERS->homedir(user) ); }
    if(DEBUG_MODE){ qDebug() << "DE's:" << deList << lastDE; }
    if(lastDE.isEmpty()){ lastDE = deList[0]; }


    //Now fill the switcher


        //Set the switcher to the last used desktop environment
        if( !lastDE.isEmpty() ){ deSwitcher->setCurrentItem(lastDE); }  // <-- HERE



        //Set the switcher to the last used desktop environment
        if(DEBUG_MODE){ qDebug() << "Last used DE:" << lastDE; }
        loginW->setCurrentDE(lastDE);  // <-- OR HERE

So while I still don’t think you can configure it you shouldn’t need to. Might be worth raising a bug on their issue tracker:



Thanks for the effort and the info.

I just wait for the next stable update maybe it’ll work itself out then. The “bug” where the cursor wasn’t in the “user name line” after boot-up on my systems went away again with the last one or two update, too.

The devs are using unstable (or even more “on the edge”), so for them the bug might be fixed already so they don’t “see” it anymore - at least that’s what I think regarding the cursor “bug”.

There was a change on April 24th regarding the “lastDE” part of the code (commit c92dfd5, https://github.com/trueos/pcdm/commit/c92dfd5e34679fa22b29e7b0f287bafd4ee6d12b#diff-18b555832848b0aae7deedb0e6b64daf). That might be the time frame when the “bug” appeared on my systems.

It maybe also have to do with this line

QStringList deList = Backend::getAvailableDesktops(); //priority ordered

This might explain the fact that lumina is favoured.

We’ll see.


No problem.

If I get time I’ll try and confirm I have the issue too. If I do I’ll try installing the latest version and see if the issue goes away; will let you know if it does. If it doesn’t I think I’ll have a go at fixing it. The change you noted does look like a likely candidate for introducing or at least exposing the issue and I’ve been looking for something simple to cut my teeth on anyway… wish me luck :smile:


May ~/.lastlogin tell us something.


Good luck then ! :slight_smile:


Well, it does. But PCDM doesn’t care - or doesn’t seem to care. :slight_smile:


I’ve tested this now on my laptop and it’s working correctly for me. When I used KDE rather than Lumina my ~/.lastlogin had KDE in it and when I rebooted KDE was selected as the DE. According to pkg I have pcdm-201706210904 installed; presumably you have the same version @to-user?

$ pkg version | grep pcdm
pcdm-201706210904                  =

And did you say that your ~/.lastlogin is being updated correctly as well?


Pcdm has the same version.

My lastlogin file says xfce Session but the login GUI always selects Lumina as default.

I suspect the “display available users” option as possible culprid. I always have turned if off. Most user will have turned it on (= never changed the default setting).
So, if that would be the cause of the problem most users will never encounter the problem in the first place.



When I set this I also get Lumina rather than my last DE. Thanks. I’ll try installing the latest version of pcdm tomorrow and let you know if it helps.


I’ve installed the latest version from github and it’s still an issue. I think like you say, not many people will uncheck this option so it’s not been picked up.


Good catch!
The previous DE logic is based on the user that is selected (~/.lastlogin) so it makes no sense for that to be used when user selection is disabled… Looks like we need to add some system-default DE option for those cases then.


Sorry. I’m a pain for TrueOS developers. :slight_smile:

I’m just a simple (and for now part-time at that!) user of TrueOS but “request” new options (“not show list of available users”) and then those options have unintended consequences and create more pain and work…

*bad (to-)user, bad user!* :slight_smile:

But I still think that the new name could one day be fitting like a glove - users will be flying to TrueOS because it became the best/favourite unix based OS for beginners and advanced users.
And I always thought that the name was a “yes offence” name towards MacOS - and will be rightously so in hindsight. :slight_smile:

If TrueOS had a token ICO (TrueToken or something like that) I’d be buying some. :slight_smile:

But back to the topic: Can’t the system recognize the user when typing in the user name or when switching to the password line?

By “user name” I mean the short name not the full name. And I guess that creates a new problem because if I recall correctly if one doesn’t disable the available user list the user names are displayed as full names. So the system should be used to connect (only?) the full names to the lastlogin value.

If I recall correctly I also asked for the short name(s) to be brought back… see above… *…!* :slight_smile:

I guess you need to introduce a new badge just for me for proposing the most painful and rarely used options… :slight_smile:


I guess this highlights convenience vs. security. Assuming not showing the list of users is supposed to provide some security.

One could argue that then you could figure out which user has logged before in by looking at what people had typed (or if that actual user existed). I guess you could go that as the password is being typed, you could try to read that username’s last login and if it it doesn’t exist select the default (or even more fun random: I knew that postgres user loved KDE).

I guess that PCDM is only ever run locally? In which case, the people have physical access to the computer and I’m not sure how much of a deterrent it is.

Anyway, I think trying to look at lastlogin is worth a shot.


@twschulz is correct, when you tell PCDM to hide the user list, then “leaking” user names by the interface checking/changing the UI depending if the name match a valid login name on the system is a bad thing.
That is also why you never get a “user icon” when the show users option is disabled - don’t want to give away usernames to random people sitting at your computer’s login screen without them first trying to login and have that attempt get logged/blocked.

You might say this is a big paranoid, but the “hide users” option was primarily designed for cases where usernames and login credentials are centrally managed for large groups of systems through LDAP or other similar protocols. In that case, every login screen is a potential attack vector for breaking into a companies servers on at least some level, so the highest orders of security protocol need to be observed.


Ok. So, it isn’t a bug - you improved security. Then I’d say no change needed or even advisable.

There really “should be” a detailed changelog for the stable updates - for unstable it would be a bit extensive because of the frequent updates.

A feature like that can easily misjudged as a bug if not mentioned as by design… :slight_smile:


No, there is still a bug here because there is no “last DE” file saved for a system itself (ignoring the last user to login). I will be looking at that later this morning and adding that in here soon.


@beanpole135 Ah, yes, I forgot about centralized login. Though, the random session might work “enough”. But, you could probably determine a pattern easy enough.

Then again, we are discussing a corner case, and it may be worth just documenting that remembering the last session is not available when “list of users” is not available and offering a solution to set the default session in that case. (I guess as was suggested above).