Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a proper dropdown for the session selection widget #5

Closed
jleclanche opened this issue Jan 26, 2013 · 12 comments
Closed

Use a proper dropdown for the session selection widget #5

jleclanche opened this issue Jan 26, 2013 · 12 comments

Comments

@jleclanche
Copy link
Member

The session selection widget is awkward to use. I have 6 different sessions so navigating through them is slow and annoying, as there's no dropdown that gives me a good overview on them.

@sddm
Copy link
Collaborator

sddm commented Jan 26, 2013

In SDDM user interface is completely dependent on the used theme and there are no restrictions on how should the theme should look like or how should it behave.

For example, for session selection you can choose to use a spinbox, a dropdown, a list of images or you can implement your own awesome idea of how should session selection be. This is the real point where SDDM differs from most other DMs.

But whatever you choose you have to code it from scratch since QML does not have regular widgets as we know it (yet).

For the default theme I have opted for the spinbox because:

  1. I wanted to have a more classical theme as default,
  2. coding a spinbox is much easier than coding a dropdown :)

In the future I may tweak the default theme and use a dropdown instead of a spinbox, but for now I want to focus creating a clean core that just works.

So you are welcome to create a new theme that uses a dropdown or something else you like more. QML is really easiy. The default theme took a few hours to do from scratch with almost no prior QML knowledge.

@ghost ghost assigned sddm Jan 26, 2013
@jleclanche
Copy link
Member Author

Will do; I wanted to recreate the razor lightdm theme in SDDM anyway. But I'm having trouble starting sddm in Xephyr, how do you use it?

I use Xephyr :1 -terminate -screen 800x600 & sleep 1 && DISPLAY=:1 sudo sddm but it outputs this when starting sddm:

/usr/bin/xauth:  file /var/run/sddm.auth does not exist

Fatal server error:
Server is already active for display 0
        If this server is no longer running, remove /tmp/.X0-lock
        and start again.

(EE) 
Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 
(EE) 
Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyerror: could not connect to the X server.
error: could not start display manager. 

@sddm
Copy link
Collaborator

sddm commented Jan 26, 2013

Well, I had hardcoded to use display 0. I should change to use the environment variable if set. Shouldn't take too long.

@sddm
Copy link
Collaborator

sddm commented Jan 26, 2013

It turns out that things are more complicated. I changed SDDM to use DISPLAY environment variable but now when run through Xephyr it crashes the main instance. But when you set it when another instance is not running there is no problem and uses the correct DISPLAY.

Two things come to mind:

  1. First we use vt07 which is set in the config file for both instances, probably we should grab the first empty vt.
  2. Normally, SDDM starts the X server itself. But in this we start the X(ephyr) and trying to run SDDM on it. I think I need to investigate further. Probably if there is an active X server on the display, we should try to connect to that.

@sddm
Copy link
Collaborator

sddm commented Jan 26, 2013

OK, good news. I have success running SDDM in Xephyr. I will push after I clean things up.

@sddm
Copy link
Collaborator

sddm commented Jan 26, 2013

I pushed a fix for Xephyr mode. You just need to add -t to the end of the commandline, and it should work.

Xephyr :1 -terminate -screen 800x600 & sleep 1 && DISPLAY=:1 sudo ./sddm -t

In fact if you just want to test a theme you dont need Xephyr at all. Just use the -t parameter. For further info on command line parameters please consult Readme.md

@jleclanche
Copy link
Member Author

Is it possible for a background image to be resized to fit to the DM screen's width/height?

@sddm
Copy link
Collaborator

sddm commented Jan 26, 2013

Yes of course. For the default theme just change fillMode property of the Image element in Main.qml: http://doc.qt.digia.com/4.7.1/qml-image.html#fillMode-prop

@jleclanche
Copy link
Member Author

Ok, super-basic razor theme here:
https://github.com/Adys/razor-sddm-themes

I don't have too much time to spend on it right now so I'll leave it like that and ping the ML to see if anyone's up to improve it and/or make more.

BTW, you might want to remove background.psd from the resources in the default theme.

@sddm
Copy link
Collaborator

sddm commented Jan 26, 2013

This is the first user-generated theme for SDDM, yaay! Looks nice too.

I am closing this issue btw.

@sddm sddm closed this as completed Jan 26, 2013
@jleclanche
Copy link
Member Author

I still think a dropdown would be a much better widget to have in the default theme, to be honest; so I'd rather this stays open. I've never worked with QML before; I'll look into doing it myself but I'm in the middle of a thousand things right now :)

@sddm sddm reopened this Jan 26, 2013
@sddm
Copy link
Collaborator

sddm commented Jan 26, 2013

Ok, reopened the isssue. I will see if I can do something in the future.

@aavci1 aavci1 closed this as completed in a74a5c7 Feb 10, 2013
aleixpol added a commit that referenced this issue Jun 24, 2021
 #0  0x0000aaaab9a06298 in SDDM::Display::seat (this=0x0) at /home/apol/sddm/src/daemon/Display.cpp:152
 #1  0x0000aaaab9a1889c in SDDM::Greeter::start (this=0xaaaaf738fb20) at /home/apol/sddm/src/daemon/Greeter.cpp:190
 #2  0x0000aaaab9a08a7c in SDDM::Display::slotHelperFinished (this=0xaaaaf736b600, status=SDDM::Auth::HELPER_AUTH_ERROR) at /home/apol/sddm/src/daemon/Display.cpp:464
 #3  0x0000aaaab9a0d704 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<SDDM::Auth::HelperExitStatus>, void, void (SDDM::Display::*)(SDDM::Auth::HelperExitStatus)>::call (f=(void (SDDM::Display::*)(SDDM::Display * const, SDDM::Auth::HelperExitStatus)) 0xaaaab9a0897c <SDDM::Display::slotHelperFinished(SDDM::Auth::HelperExitStatus)>,
    o=0xaaaaf736b600, arg=0xffffd341f288) at /usr/include/qt/QtCore/qobjectdefs_impl.h:152
 #4  0x0000aaaab9a0cfd4 in QtPrivate::FunctionPointer<void (SDDM::Display::*)(SDDM::Auth::HelperExitStatus)>::call<QtPrivate::List<SDDM::Auth::HelperExitStatus>, void> (f=(void (SDDM::Display::*)(SDDM::Display * const, SDDM::Auth::HelperExitStatus)) 0xaaaab9a0897c <SDDM::Display::slotHelperFinished(SDDM::Auth::HelperExitStatus)>, o=0xaaaaf736b600,
    arg=0xffffd341f288) at /usr/include/qt/QtCore/qobjectdefs_impl.h:185
 #5  0x0000aaaab9a0c588 in QtPrivate::QSlotObject<void (SDDM::Display::*)(SDDM::Auth::HelperExitStatus), QtPrivate::List<SDDM::Auth::HelperExitStatus>, void>::impl (which=1, this_=0xaaaaf73904b0, r=0xaaaaf736b600, a=0xffffd341f288, ret=0x0) at /usr/include/qt/QtCore/qobjectdefs_impl.h:418
 #6  0x0000ffff8ee86b44 in ?? () from /usr/lib/libQt5Core.so.5
 #7  0x0000aaaab99d7ec8 in SDDM::Auth::finished (this=0xaaaaf7370360, _t1=SDDM::Auth::HELPER_AUTH_ERROR) at /home/apol/build-sddm/src/daemon/sddm_autogen/FQWVTXS267/moc_Auth.cpp:451
 #8  0x0000aaaab99f9bac in SDDM::Auth::Private::childExited (this=0xffff84015810, exitCode=1, exitStatus=QProcess::NormalExit) at /home/apol/sddm/src/auth/Auth.cpp:234
 #9  0x0000aaaab9a0061c in QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>, QtPrivate::List<int, QProcess::ExitStatus>, void, void (SDDM::Auth::Private::*)(int, QProcess::ExitStatus)>::call (f=
    (void (SDDM::Auth::Private::*)(SDDM::Auth::Private * const, int, QProcess::ExitStatus)) 0xaaaab99f99b8 <SDDM::Auth::Private::childExited(int, QProcess::ExitStatus)>, o=0xffff84015810, arg=0xffffd341f4f0) at /usr/include/qt/QtCore/qobjectdefs_impl.h:152
 #10 0x0000aaaab99ffd5c in QtPrivate::FunctionPointer<void (SDDM::Auth::Private::*)(int, QProcess::ExitStatus)>::call<QtPrivate::List<int, QProcess::ExitStatus>, void> (f=(void (SDDM::Auth::Private::*)(SDDM::Auth::Private * const, int, QProcess::ExitStatus)) 0xaaaab99f99b8 <SDDM::Auth::Private::childExited(int, QProcess::ExitStatus)>, o=0xffff84015810,
    arg=0xffffd341f4f0) at /usr/include/qt/QtCore/qobjectdefs_impl.h:185
 #11 0x0000aaaab99fecdc in QtPrivate::QSlotObject<void (SDDM::Auth::Private::*)(int, QProcess::ExitStatus), QtPrivate::List<int, QProcess::ExitStatus>, void>::impl (which=1, this_=0xaaaaf7370300, r=0xffff84015810, a=0xffffd341f4f0, ret=0x0) at /usr/include/qt/QtCore/qobjectdefs_impl.h:418
 #12 0x0000ffff8ee86b44 in ?? () from /usr/lib/libQt5Core.so.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants