Commit Graph

189 Commits

Author SHA1 Message Date
Adriaan de Groot
762ad54344 Documentation: change http links to GitHub to https 2017-12-20 08:39:09 -05:00
Philip
d20285d4f2 [modules] displaymanager: try to fix regression introduced with c8fd11b 2017-09-21 13:08:13 -04:00
Adriaan de Groot
13807ceabf Licensing: add self
- to all the files I've touched recently
 - to (very incomplete) AUTHORS list

Licensing: add license info to top-level CMakeLists.txt
2017-09-19 15:57:25 +02:00
Adriaan de Groot
c8fd11b103 Replace scandir with listdir, simplify loop
FIXES: ??
2017-09-16 07:01:55 -04:00
Adriaan de Groot
ce11c7ab6d LightDM: fix type (thanks Kevin Kofler) 2017-07-10 14:43:13 -04:00
Adriaan de Groot
9561bac1c8 SUSE DM: add special case configuring autologin in sysconfig (openSUSE)
FIXES #582
2017-07-10 10:14:28 -04:00
Adriaan de Groot
984a83deb9 LightDM: if lightdm.conf doesn't exist (for autologin), create it
FIXES #568
2017-07-10 09:27:56 -04:00
Philip Müller
f64266a294 Merge pull request #758 from manjaro/lightdm-greeters
[displaymanager] check for installed lightdm greeter and configure accordingly
2017-06-28 17:04:40 +02:00
Bernhard Landauer
a1173bccc2 [displaymanager] check for installed lightdm greeter and configure accordingly
- no matter if for example slick-greeter is installed as "lightdm-slick-greeter" or whatever.
  tested with lightdm-deepin-greeter and slick-greeter.
- plus some little simplifications
- added Copyright
https://github.com/calamares/calamares/issues/756
2017-06-28 16:43:07 +02:00
Adriaan de Groot
2905a9969d SDDM-config: allow poorly formatted SDDM config
SDDM itself doesn't trip over duplicate sections or keys, but
the Python config-parser does (in strict mode). Relax a bit.

FIXES #579
2017-06-28 03:57:01 -04:00
Bernhard Landauer
72cfb83873 fix https://github.com/calamares/calamares/issues/756 2017-06-27 14:50:53 +02:00
Adriaan de Groot
4405790253 Displaymanager: simplify gdm configuration.
Replace calling out to shell to run echo redirected to a file by
opening the file and writing to it.
2017-06-19 18:20:24 -04:00
Adriaan de Groot
70af29672d Displaymanager: check alternative locations for kdmrc.
FIXES #578
2017-06-19 18:05:34 -04:00
Adriaan de Groot
582e4354a7 Displaymanager: refactor a little, don't bail out at the first DM that doesn't configure 2017-06-19 18:00:10 -04:00
Alf Gaida
f9695cabac Fixed pep8 whining in module displaymanager
Added myself to copyright
2017-06-06 20:35:07 +02:00
Teo Mrnjavac
68e2c4f901 Unbreak autologin setting. 2017-01-24 18:55:32 +01:00
Teo Mrnjavac
8d5e4cdb16 Don't assume 'User' exists in autologin section. 2017-01-17 17:02:53 +01:00
Kevin Kofler
bc8dd4225a [displaymanager] set_autologin: Unset autologin for sddm when needed
CAL-423 #close
2016-12-03 19:18:41 +01:00
Rohan Garg
d67fdccd4c Make sure we also set a preferred Xsession 2016-11-02 09:51:27 +01:00
Rohan Garg
662656a762
Better handling for when the Autologin section already has things 2016-10-31 17:55:59 +01:00
Rohan Garg
f7ac1a3ede Use configparser to parse sddm.conf
Since sddm.conf follows the INI format we can use configparser
with a few added options to properly parse the config and write
it out instead of manually parsing each line which is slow and
prone to error.

For eg. The old code would fail to parse a conf which had no
commented out User key but where the user had configured autologin
in Calamares.
2016-10-31 17:10:46 +01:00
Philip
22cf2c16a2 [displaymanager] use same pattern for all str.format calls 2016-10-26 21:40:14 +02:00
Bernhard Landauer
c99cdc0fa7 [displaymanager] add Deepin 2016-10-26 03:56:03 +02:00
udeved
c2d7890f3e displaymanager: write process DM list to globalstorage so other modules can use it 2016-08-19 09:42:28 +02:00
Philip
262fdec3f3 [bootloader] revert 8cbefa1 2016-01-03 10:13:28 +01:00
Philip
8cbefa12e0 [displaymanager] if gnome is present, budgie should be detected first 2016-01-02 10:25:17 +01:00
Philip
196ae4aaaf [displaymanager] add budgie v10.1 support 2016-01-02 07:37:19 +01:00
Teo Mrnjavac
10ce42f35c Use target_env calls in Python modules. 2015-09-15 16:48:41 +02:00
Philip
3b38aee1dd [displaymanager] adopt to Cinnamon 2.6.8 2015-06-18 07:02:16 +02:00
Gormogon
99c4b59f64 Fixed GDM auto-login bug due to typo 2015-06-13 23:12:35 -04:00
Gormogon
a4a22e3ad0 PEP Cleanup 2015-06-13 23:08:52 -04:00
Ramon Buldó
049f711f7d [displaymanager] Add i3, move openbox to the end of the list. 2015-05-15 12:50:29 +02:00
Ramon Buldó
9b7c1ff3da [displaymanager] Add budgie and pantheon support 2015-05-15 07:07:54 +02:00
Philip Müller
9fcd8113e5 [displaymanager] add pekwm 2015-03-12 21:08:23 +01:00
Teo Mrnjavac
67ed53caeb Do not try to set the username if it's None. 2015-02-25 18:01:15 +01:00
Teo Mrnjavac
b319cc1da0 [displaymanager] Explicitly unset autologin if not checked. 2015-02-25 18:00:01 +01:00
Philip
3d8ba2b088 [fstab] add python doc strings 2015-02-25 14:49:23 +01:00
Philip
e7a67b9c52 [dummypython] add python doc strings 2015-02-25 14:49:23 +01:00
Philip
60927b9363 [displaymanager] add more python doc strings 2015-02-25 14:49:23 +01:00
Gormogon
b4db9fe64b Fixing PEP – 257 Violations 2015-02-25 14:49:23 +01:00
Gormogon
113d9db7cb Python Better Docstrings 2015-02-25 14:49:23 +01:00
Gormogon
7989267e81 Unused Imports 2015-02-20 09:24:05 -05:00
Gormogon
5c1ee7bbcb [PEP 8] General Style Part 3 2015-02-18 10:03:57 -05:00
Gormogon
ebf037f247 [PEP 8] Comparison to 'None' 2015-02-18 09:21:49 -05:00
Gormogon
8e1480431a [PEP 263] Corrected Encoding Headers 2015-02-18 09:06:10 -05:00
Philip Müller
ca5132f13e [python modules] use str.format() 2015-02-17 14:38:30 +01:00
Kevin Kofler
2955c0a5a8 displaymanager: Also look for display managers in /usr/sbin. 2014-12-05 22:20:54 +01:00
Kevin Kofler
b411a66baf displaymanager: Make the settings follow the naming convention.
Make the defaultDesktopEnvironment and desktopFile settings in
displaymanager.conf follow the naming convention used in the other .conf
files.
2014-12-01 03:30:42 +01:00
Kevin Kofler
a54067f709 displaymanager: Don't run xdg-icon-resource and update-desktop-database.
Don't run xdg-icon-resource and update-desktop-database in the basic
setup for KDM. These tools have absolutely nothing to do with KDM. KDM
does not ship any icons in the hicolor theme, nor a .desktop file (let
alone one that handles any MIME type, the only case in which
update-desktop-database is needed).

I know the original shell script from Manjaro called these when setting
up KDM, but this is really the wrong place. If you need to call these,
they need to go into another module, and you also have to call them
independently of the selected display manager.
2014-12-01 03:25:44 +01:00
Kevin Kofler
a0bb108486 displaymanager: Fix the use of getent in the basic setup.
This also matches what the original shell script from Manjaro did.
2014-12-01 03:20:55 +01:00
Kevin Kofler
90a25fdc62 displaymanager: Disable basic setup by default.
Add a "basicSetup" boolean setting and default to leaving this kind of
setup operations to the distribution packages (i.e., to
"basicSetup: false").
2014-12-01 03:14:33 +01:00
Kevin Kofler
95e39e05fa displaymanager: Use libcalamares.utils.debug instead of print.
Use libcalamares.utils.debug instead of print to output a debugging
message during SDDM autologin setup.
2014-12-01 03:03:20 +01:00
Kevin Kofler
524bcc15ea displaymanager: Fix default session setup for GDM.
The default session setting in GDM is per user. Therefore, it is not of
much use to set it for the gdm user. (Nobody will log in as "gdm".)
Unfortunately, there seems to be no systemwide setting for the default
session, the AccountsService provides no such setting, and GDM just
hardcodes the fallback to use if it is not set in the AccountsService.
(GDM first tries "gnome", and if that is not available, it picks the
first session in the alphabet.)

Therefore, the best we can do right now is to set the default session
for the autoLoginUser. This is the case where it matters the most
anyway. We would also need the username of a non-autologin user in the
global storage to do any better.
2014-12-01 03:01:39 +01:00
Kevin Kofler
5e14080891 displaymanager: Remove lightdm gdmflexiserver hack.
Remove the hack that symlinks /usr/lib/lightdm/lightdm/gdmflexiserver as
/usr/bin/gdmflexiserver.

Upstream LightDM removed their gdmflexiserver implementation in 1.9.4 in
2013:
http://bazaar.launchpad.net/~lightdm-team/lightdm/trunk/revision/1841

In addition, LightDM was already adding the path containing its
gdmflexiserver implementation to PATH, so there was no use symlinking it
into /usr/bin, potentially overwriting the original version from GDM.
This must have been a workaround for an ancient LightDM version that
didn't even do that.

And finally, the hardcoded /usr/lib/lightdm/lightdm/gdmflexiserver path
was wrong on Fedora to begin with (we had used
/usr/libexec/lightdm/gdmflexiserver, but now the file is completely gone
because upstream removed it).
2014-11-29 17:21:36 +01:00
Kevin Kofler
e78418b693 displaymanager: Don't error if a DM is not installed.
If a display manager is in the list, but not installed, do not return an
error message, but only print a debugging message and proceed.

This allows distributions that support multiple display managers to list
them all, independently of what the concrete live image will be using.
2014-11-29 17:14:17 +01:00
Kevin Kofler
2783f98615 displaymanager: Add my copyright to main.py.
I have already written a bunch of code in there.
2014-11-29 16:56:43 +01:00
Kevin Kofler
a525de8f11 displaymanager: Fix typos in displaymanager.conf. 2014-11-29 16:56:16 +01:00
Manjaro Linux
0a6053dd82 Fix syntax error
This fixes e65d9c4f. Setting a variable can't end with :
This also fixes the issue with referenced before assignment
2014-11-28 22:12:19 +01:00
Kevin Kofler
6f78ecab3b displaymanager: Fix the default_desktop_environment option.
Do not use a YAML list when only a single entry actually works. (It was
just silently using the last one.)

Create the default_desktop_environment DesktopEnvironment tuple. Before,
the setting was silently ignored altogether.
2014-11-28 18:51:08 +01:00
Kevin Kofler
e65d9c4f4d Revert "Fix autologin-routine"
This reverts commit 9c799b32e9.

This was already right before. default_desktop_environment.desktop_file is not a
variable, it's a field of a variable. This commit is not valid Python:
"SyntaxError: invalid syntax".
2014-11-28 18:40:49 +01:00
Manjaro Linux
9c799b32e9 Fix autologin-routine
default_desktop_environment.desktop_file needs to been passed actually.
2014-11-28 18:36:18 +01:00
Manjaro Linux
6a70029198 Fix commit d5d74fbdcd
We need to pass default_desktop_environment if we won't use automatic desktop detection.
2014-11-28 18:27:16 +01:00
Manjaro Linux
ddc7a6057d Update displaymanager.conf
Add an example to force Plasma5 desktop (commented out)
2014-11-28 09:11:27 +01:00
Manjaro Linux
d5d74fbdcd Add option to force desktop environment
This adds the function to force a desktop environment. We might think to add it also to global storage.
2014-11-28 09:06:33 +01:00
Manjaro Linux
b4b409243f [displaymanager] make openbox session have "less priority".
Fixes settings Session= when both lxqt and openbox are installed, it will first find lxqt an use put lxqt.desktop
This fixes also #170
2014-11-28 08:23:46 +01:00
Manjaro Linux
36e8ed5f46 adjust LXDE startup scripts
- add LXQT support
- add LXDE 0.5 changes in Archlinux
2014-11-07 14:04:15 +01:00
Teo Mrnjavac
7c89613332 Merge pull request #140 from kkofler/detect-sddm-session-type
displaymanager: Detect SDDM session type
2014-11-07 11:50:28 +01:00
Kevin Kofler
8512e43405 displaymanager: Set Session= for sddm autologin.
Detect the correct value using find_desktop_environment.
2014-11-07 04:09:54 +01:00
Kevin Kofler
467d78dde6 displaymanager: Use a regex to match User= in sddm.conf.
This ensures we really only match the User= line and not the
RememberLastUser= one.
2014-11-07 04:09:54 +01:00
Kevin Kofler
e365864c05 displaymanager: Detect the KDE Plasma (5 and 4) and GNOME desktop environments.
Add them to the front of the list of desktop environments because users
are more likely to expect those as the default if they have them
installed.
2014-11-07 04:09:54 +01:00
Kevin Kofler
4990b8e3f8 displaymanager: Refactor the desktop environment detection to eliminate the copy&paste.
This also fixes some issues with the previous code:

* The code for LightDM only supported Xfce.

* The case where multiple desktop environments are installed was not
  handled in a good way.

* We now also check that the xsession definition actually exists. This
  allows handling the case where upstream changed the xsession
  definition's name without renaming the invoked binary.
2014-11-07 04:09:54 +01:00
Kevin Kofler
5a4ae7f62c displaymanager: Run "sddm --example-config > /etc/sddm.conf" in a shell.
Otherwise, the output redirection cannot work (and the argument was also
misinterpreted as part of the command name).
2014-11-07 01:09:33 +01:00
Teo Mrnjavac
1df44eddba Fix displaymanager sddm config call. 2014-11-06 10:44:53 +01:00
demmm
3828eb6d2a add the define 2014-11-05 22:42:58 -05:00
demmm
a186c7e44b Missing define, check_chroot_call replaced
not really needed here, subprocess.call well tested
2014-11-05 22:26:10 -05:00
demmm
49bdb25f30 remove erronous line line, wrongly left in 2014-10-30 14:30:53 -04:00
demmm
8cefd1dcb8 remove indent 2014-10-28 11:18:10 -04:00
demmm
e26335d2da proper check for existing sddm.conf
second set of if/else is obsolete with this, sddm.conf always exists at this point
2014-10-28 11:15:35 -04:00
demmm
231c93a513 missed colon 2014-10-27 14:00:35 -04:00
demmm
f26406daa4 actually create a sddm.conf 2014-10-27 13:53:34 -04:00
demmm
972fe23131 create sddm.conf if not present 2014-10-27 11:57:32 -04:00
Teo Mrnjavac
ea32ba6a83 Compare with None 2014-08-19 11:51:54 +02:00
Philip
ba1006a965 Fix autologin in displaymanager module 2014-08-18 21:46:44 +02:00
Teo Mrnjavac
52656190af Documentation. 2014-08-18 09:38:01 +02:00
Teo Mrnjavac
fea3b68d61 s/AutoUser/User/ 2014-08-18 09:30:45 +02:00
Teo Mrnjavac
bdc3185dbe Let's assume for now that the ISO must ship a sddm.conf. 2014-08-18 09:29:19 +02:00
Teo Mrnjavac
fd4c93c485 Create sddm.conf if it doesn't exist. 2014-08-18 09:24:43 +02:00
Teo Mrnjavac
d6d40d44ee PEP8 displaymanager. 2014-08-18 09:24:43 +02:00
Teo Mrnjavac
d93b8b9d44 New displaymanager module, based on Thus. 2014-08-18 09:24:43 +02:00