[blfs-dev] sddm

Fernando de Oliveira famobr at yahoo.com.br
Sat Aug 1 05:28:17 PDT 2015

Em 30-07-2015 16:50, Ken Moffat escreveu:
> On Thu, Jul 30, 2015 at 12:01:48PM -0300, Fernando de Oliveira wrote:
>> Em 25-07-2015 16:06, Ken Moffat escreveu:
>> Ken, thought I should share with you and the list.
> Thanks.  Comments for casual readers: I've replied inline, then put
> some notes on where I have got to in trying to change a theme,
> followed by some notes on using QML.  At the end is my reply about
> adding sddm to the book.

To properly reply, I may repeat what is written in previous post. Sorry
for the redundancy.

>> I've  replaced lxdm by sddm, *without systemd*:

>>> Just a note of some developments in my issue with the keymap choice
>>> always showing USA with an American flag :

For me it is a couple of question marks "??", without flag.

>>> 1. If I select the dropdown with the mouse (only USA is visible) and
>>> then hit any key, it changes to gb with a British flag (actually,
>>> two identical instances).  The keyboard then sort-of works in sddm -
>>> if the theme has a login button, I can key my password and login.
>>> But if the theme does not have a login button (i.e. needs enter,
>>> like the default theme) the main enter key seems to be treated as
>>> another character, but the numeric keypad enter key works.

>> Similar here, but both enter keys work for me, and the change is 
>> from "??" to my locale flag [summary]

> I'm still working on a theme to suit my own preferences or
> prejudices, but I have *dropped* the keymap choice - I got lost
> looking in the code, the only real reference was in a moc version of
> one of the .cpp files in the build directory, but my impression is
> that the choice is only for the keyboard (I had wondered if I was
> mistaken and perhaps it controlled language).

I would like to have both choices. With the help you give below, when I
test in a logged session, it works, so I need to figure out why.
>> Anyway, I have changed Xsetup:
>> $ cat /usr/share/sddm/scripts/Xsetup
>> #!/bin/sh
>> # Xsetup - run as root before the login dialog appears
>> LANG=pt_BR.UTF-8
>> Did that hoping to not have your issue. Perhaps it is the reason I'm
>> getting question marks.
> I did not think of hacking the scripts - at the moment I am running
> kde in runlevel 3 (I could not find anywhere to set my environment
> so that kf5 and plasma in /opt/kf5 would be found) so that I can
> test my theme with sddm-greeter (if I use icewm from sddm, even
> after exporting the environment variables then running the greeter
> for a test does not work).  Testing an sddm theme means
>  sddm-greeter --test --theme /path/to/your/theme

Thank you very much for this! The help gave me an option "--test-mode",
it is working now, but I may have done some mistake, when I first tested.

Well, as I wrote above, it "works for me".

About hacking the scripts: they are empty and are there exactly for
that. The (apparently main) developer has even recommended it (or agreed
with recommending, cannot remember) to solve this issue. It is written
in the following, quoted from a previous post I sent.

>> Searched "sddm keyboard" and have just seen in a post at
>> [https://bbs.archlinux.org/viewtopic.php?pid=1508261#p1508261]
>> {{{
>> You edit file
>> /usr/share/sddm/scripts/Xsetup
>> and write
>> setxkbmap "your layout"
>> }}}
>> Removed LANG and included:
>> setxkbmap -option "br,us"
>> Gives me the Brazilian flag, as expected, but not the second option,
>> differently from expected.
> I'll maybe take a look, but I don't really have a need for multiple
> keyboard layouts.

99% of agreement - but it should work. I can think about cases where it
is necessary.

>>> I'll take a look at trying to create my own theme.  This may take
>>> some time, I really do not understand any of this at the moment.
>> When you succeed, I would like very much to learn how to do it, please.
> At the moment, I have finally learned how to create png images with
> transparent backgrounds (using the gimp - much of what google finds
> does not match gimp-2.8 : maybe one day I'll get back to trying to
> use layers in photos), reworked one of the themes - to use one of my
> own photos and added a clock, added buttons at the side and used
> those to replace the text buttons for login | poweroff | reboot,
> removed the dropdown for keyboard.

I investigated this and will try eventually with the help you give in
the post.

> Some fun along the way.  In particular, after removing the text 
> buttons got screwed up.  After a bit more research, I decided that
> the theme I had started from seemed to have excessive nesting within
> its mainColumn.  So I tried stripping the Columns and Rows out to
> leave just the items they contained, and I was back in business.

I noticed something like that, although not understanding! Thanks for
telling us that code simplification can be performed.

> I also noticed that image buttons did not appear when running the
> test (not surprising, sddm is not running because I'm in runlevel 3)
> but the text buttons  ('login' etc) do : on images, these were only
> visible if the 'can' function returned true.

Think I have to do it myself to understand this "can" (two or three days
since I read the code, cannot remember anymore).

> At the moment I have
> made these unconditional (with the elarun theme I got varying results
> for canSuspend in my earlier testing) but I have not yet reached a
> place where I'm ready to see if my new theme works.

Please, update here, when you get it done.

> I've treated this like adding a new page, or a new perl module - make
> a lot of backups ;-)


> Aside: the gentoo patch to sddm re upower is because they are using
> a newer version of upower, 0.99, where suspend and hibernate have
> been removed because part of systemd (logind, I think) can do them.
> It is possible that polkit is also involved with suspend (and
> hibernate, if anybody uses that) - I added a local polkit file
> yesterday, hoping that it would create a suspend option on the plasma
> logout screen, but no joy.  In practice I use xbindkeys to suspend,
> but I need to be logged in to a desktop to do that.

This patch may be very important for us. We are not using latest in
BLFS, due to exactly those issues (IIRC). Now in my to-do list, to check
if we can upgrade. Perhaps I will create a ticket about it. Thanks once

> Useful links I have found: QML documentation for Qt-5.5 is at
>  http://doc.qt.io/qt-5/qtquick-index.html and also:
>  https://qmlbook.github.io/en/ch04/index.html
> Google also found Qt-4 QML documentation, I avoided that in case
> things had changed.
> For comments, use C++ style, i.e. /* ... */ or //


> As with *all* gui layout tools, experiment and reviewing the
> examples you can find is the key to learning how to do it.  I have
> not attempted to do any gui programming for nearly 20 years, I'm sure
> that QML is a lot simpler than many alternatives but it is still
> quite hard if your task is not described in a tutorial.
> It seems quite hard to find themes apart from what is shipped.  I
> found one from arch (with the arch name on the background) and one
> other which worked ('urbanlifestyle' - might not be to everyone's
> taste).  I also found one called 'numix' which does not work for me
> (maybe it required qt4, dunno).  kf5 or plasma provided the breeze
> theme - that works when I test it, but I cannot use it for real
> because it relies on things in /opt/kf5.  So, I need to use /usr
> throughout on my next build [ with qtchooser in my case ].

I need to test those. Don't think in using qtchooser. Also, the Qt /usr
install does not place Qt in standard locations. That is why I would
prefer one set of instructions and choose either /opt/qt4,5 or

> For the many themes with user icons, I have no idea how these are
> supposed to work - google images found themes with pictures of
> animals for the icons, but my attempts to use an image failed and I
> did not spend time on it (only 1 physical user here).


>> Changing the topic a bit:
>> SDDM is *recommended* for KDE5 and LXQt.
>> I think at some time, preferably before freeze we should include it in
>> BLFS. Opinions, please? Volunteer, please? I also volunteer.
> At the moment I'm not willing to touch it until I've got a usable
> version - for me, that means building plasma in /usr.  Apart from
> all the other things I'm doing, or should be doing (non-BLFS) I've
> got to update the package versions in my scripts, and then fix up my
> compare-my-versions-to-the-book script (probably multiple versions
> of more packages).

I'll try to solve the locale issue. In general, not using the Xsetup script.

> My scripts are about 2 weeks out of date (except for plasma) and I'm
> expecting a new version of plasma to arrive any day now (they seem
> to come out near the end of each month), with a new version of kf5
> early next month.  I'm inclined to wait.

I know you have a strong version control system (git) for your scripts.
Not me, but I also try to update them and actually use them to update my
dev machine, for the packages I didn't update the book. This sddm issue
is taking a lot of time, and I am behind in TexLlive, GCC and OpenJDK.

> When I do try it, I'll hope to also try it with xfce (I don't expect
> problems there, but in 7.6 I eventually managed to get lxdm working
> with xfce thanks to your help, and then in 7.7 things had changed
> and I ended up reverting to startx on that machine).

I decided to try sddm, when  release upgrading my old heat afraid
printer server running Lubuntu to 15.04. Fortunately I did it only now,
after your post about sddm and that I saw sddm was recommended for LXQt.
It was using LXDM, and it could not handle systemd, default, after the
upgrade. Only worked if I chose to boot with upstart. Then, I replaced
with lightdm, and it worked. Expended a some time, because the image was
for Ubuntu, not Lubuntu, but sorted it out. This issue suggested me that
lxdm was probably becoming outdated and used too much system resources,
so I should switch my BLFS to something else. Obvious choice was sddm,
not lightdm, because it is Qt based, and would be useful as default for
KDE5 and LXQt.

>> Should not go with either KDE5 and LXQt, because it is general and to
>> the best of my knowledge, it is not from either, although the maintainer
>> seem to be the same as the one for many LQXt packages, correct me if I'm
>> wrong.
> Perhaps we should have a page listing Desktop Managers.  At the
> moment I'm not sure which we have in BLFS, but if any are dependent
> on a DE we could have a 'chapter' page with links to standalone DMs
> (I think lxdm is standalone) and then at the bottom it could say
> something like "You may also wish to use other Desktop Managers which
> depend on packages from a desktop environment, such as [link to kdm] or
> [link to any other DM in the book].  I would suggest that such a
> page should go *before* the desktop environments.

I totally agree!!! Like the "Editors" chapter.

> ĸen

Thank you very much, again.

I know that there is one thing I wanted to write and forgot. Will do it
if comes again to my mind.


More information about the blfs-dev mailing list