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

No Session options after saving changes #42

Closed
Bluey26 opened this issue Mar 2, 2024 · 7 comments
Closed

No Session options after saving changes #42

Bluey26 opened this issue Mar 2, 2024 · 7 comments

Comments

@Bluey26
Copy link

Bluey26 commented Mar 2, 2024

Hello.

I was trying to change my sddm login wallpaper and i decided to try this tool, since you have to change the theme for change the sddm wallpaper.

I have done what i was looking for creating a 'dummy' sddm theme and then pointing to the desired wallpaper.

I have change the theme using sddm-conf (i previewed that everything was OK, using the preview button), and then i saved the changes.

When i tried to log in again, i discovered that i had no 'choices' in the 'session' section of my sddm.

Usually i have a few (lxqt-desktop,i3,labwc,lxqt-lawbc,etc.) and after inserting the password, i log in.

When this happened, my sessions choices dissapeared and i was not able to log in.
To solve this, i changed my sddm.conf (located in /etc/sddm.conf) for the original one (/usr/lib/sddm/sddm.conf.d/default.conf)
and i was able to log-in again.

I noticed that in the 'Autologin' tab, there is a drop-down (Name of the session file for autologin session) which is empy, and lets me choose a file (i do now know if this is related to the issue, just a idea).

I do not know what happened, but this seems to break somehow my sddm.conf and i do not know why.

The package version that i have installed is : sddm-conf 0.1.0-1 (from the AUR).

@Bluey26 Bluey26 changed the title No Session after saving changes No Session options after saving changes Mar 2, 2024
@redtide
Copy link
Collaborator

redtide commented Mar 2, 2024

Hello!
It might have to do with what I was talking about with @tsimonq2 in this issue, my bad to not make an advisement to backup the config file before starting using this app, which has a basic way (in practice only local, non system configurations) to manage the config file in /etc/sddm.conf or alternatively in /etc/sddm.conf.d/sddm.conf.

The combobox in the autologin tab takes the list of session files from X11 and Wayland sections (SessionDir settings in each, you can see them in the last File tab as preview), so if the dirs set in the related tabs are correct (those are the first text fields with the folder button on the right in each of the above tabs) and you see no choices or wrong files or as you say there are no choices in the SDDM greater, then there seems to be a bug I'm not aware of (unless it has to do with #41).

If the choices are there but it's just that none are selected is because no choice means to use the last used previously (it should be described in the text label above the combobox), so the resulting setting is empty:

[Autologin]
Session=

[Wayland]
SessionDir=/usr/share/wayland-sessions

[X11]
SessionDir=/usr/share/xsessions

Can you please provide the file here so I can take a look?

@Bluey26
Copy link
Author

Bluey26 commented Mar 2, 2024

I can confirm that setting up the Wayland and X11 session, in their respective tabs, solves the problem. I find strange the way the sddm specification has set it up, because before changes (in the original file), there are 2 directories in each option:

# Comma-separated list of directories containing available X sessions
SessionDir=/usr/local/share/xsessions,/usr/share/xsessions

# Comma-separated list of directories containing available Wayland sessions
SessionDir=/usr/local/share/wayland-sessions,/usr/share/wayland-sessions

As you stated in your previous comment, setting the options to only that directory, makes the sddm.conf work, and the /usr/local/.... ones seems to not contain anything in my case.

I left untouched the autologin tab, since i do not use autologin.

I provide in here both sddm.conf, the one that i used to have (backup), and the one which is generated after using sddm-conf (setting up the session paths inside the program, so it works now).

There are some diffefences in other minor arguments, but overall the important thing is what has been described (check the diff between the files). As .txt because github dont like the .conf extension xD

sddm-previous-sddconf.conf.txt
sddm-after-sddmconf.conf.txt

@stefonarch
Copy link
Collaborator

stefonarch commented Mar 2, 2024

Made some tests, no file, used sddm-conf to set a theme and could not reproduce with Session= with or without user, as this section is only about autologin.

Only if users clear the path for files in SessionDir=/usr/share/xsessions no options are available anymore for X11.

To be on the safe side we could avoid writing empty settings maybe?

To restore defaults it's enough to remove or rename `/etc/sddm.conf '.

@Bluey26
Copy link
Author

Bluey26 commented Mar 2, 2024

Made some tests, no file, used sddm-conf to set a theme and could not reproduce with Session= with or without user, as this section is only about autologin.

Only if users clear the path for files in SessionDir=/usr/share/xsessions no options are available anymore for X11.

To be on the safe side we could avoid writing empty settings maybe?

To restore defaults it's enough to remove or rename `/etc/sddm.conf '.

I do not know how sddm configs work in other distributions, just checked for debian and ubuntu, and they use the same path for X11 and Wayland sessions:

/usr/share/xsessions
/usr/share/wayland-sessions

https://manpages.debian.org/testing/sddm/sddm.conf.5.en.html
https://manpages.ubuntu.com/manpages/xenial/man5/sddm.conf.5.html

Maybe making the sessions values to be :

SessionDir=/usr/local/share/wayland-sessions,/usr/share/wayland-sessions
SessionDir=/usr/local/share/xsessions,/usr/share/xsessions

by default, instead of a empty string?

@redtide
Copy link
Collaborator

redtide commented Mar 2, 2024

I find strange the way the sddm specification has set it up, because before changes (in the original file), there are 2 directories in each option:

that is what #41 points out: currently sddm-conf manage a single path, so using more comma separated ones will result in a malformed file path, so I should manage it as a "string array" (QStringList) so that we can set the default, 2 paths directories.

@redtide
Copy link
Collaborator

redtide commented Mar 2, 2024

To be on the safe side we could avoid writing empty settings maybe?

I don't think it could be enough, one can set also a wrong directory, otherwise I have to change the way to to add/remove directories using a listbox with [+] [-] buttons, like in lxqt-panel configurator.
OTOH One should know what he is doing when setting these sensible system settings, more or less a one time thing.

Closing this as duplicate of #41.

@redtide redtide closed this as completed Mar 2, 2024
@redtide
Copy link
Collaborator

redtide commented Mar 2, 2024

Sorry I forgot to thank you both for the time and information in this issue, which gave me some more inputs to how to solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants