Bug 273038 - kdm doesn't list all available session files
Summary: kdm doesn't list all available session files
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kdm
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdm bugs tracker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-11 14:37 UTC by Jesús Guerrero Botella
Modified: 2011-07-12 16:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesús Guerrero Botella 2011-05-11 14:37:49 UTC
Version:           unspecified (using KDE 4.6.2) 
OS:                Linux

kdm doesn't list the session files under /etc/X11/Sessions. x11-wm/fvwm only
installs the session file in there, which means that fvwm is not in the kdm
list, not even if I edit kdmrc and add that path to the SessionsDirs directive.

It kind of lists the option for fvwm (without label, but it works) if I ln -s
/etc/X11/Sessions/fvwm to /etc/X11/Sessions/fvwm.desktop

By researching a bit I discovered that this shouldn't be needed at all, since
kde installs .desktop files for about any existing WM, and there's a line for
that in kdmrc that's commented out by default.

So, my question is, shouldn't we be doing this with the default kdmrc?


--- /usr/share/config/kdm/kdmrc.orig    2011-04-26 00:24:57.245051737 +0200
+++ /usr/share/config/kdm/kdmrc 2011-04-26 00:25:08.501718029 +0200
@@ -283,8 +283,8 @@
 # The directories containing session type definitions in .desktop format,
 # ordered by falling priority.
 # Default is "/usr/share/apps/kdm/sessions"
-#SessionsDirs=/usr/share/config/kdm/sessions,/usr/share/apps/kdm/sessions
-SessionsDirs=/usr/share/xsessions
+SessionsDirs=/usr/share/config/kdm/sessions,/usr/share/apps/kdm/sessions
+#SessionsDirs=/usr/share/xsessions
 # The file (relative to $HOME) to redirect the session output to. The
 # following character pairs are replaced:
 # - %d -> current display

Reproducible: Didn't try

Steps to Reproduce:
Install fvwm, look at the kdm session list, it's not there for me.

Actual Results:  
Fvwm is not listed in the kdm sessions list.

Expected Results:  
fvwm should be listed, if not because of the .desktop file fvwm itself installs, at least because of the fvwm desktop file that kdm itself installs.
Comment 1 Oswald Buddenhagen 2011-05-11 17:15:34 UTC
this is a packaging problem. please report to gentoo.
Comment 2 Jesús Guerrero Botella 2011-05-11 23:51:12 UTC
(In reply to comment #1)
> this is a packaging problem. please report to gentoo.

I did, they sent me here. Can you, please, explain your reasoning a bit? I really don't know in which side the problem lies, but this kdmrc seems the stock one from upstream.

Just for reference:
http://bugs.gentoo.org/show_bug.cgi?id=364861
Comment 3 Oswald Buddenhagen 2011-05-12 07:38:57 UTC
a) the defaults in kdmrc are distro-specific. the upstream defaults are as "neutral" as possible. distros should patch config.def (and genkdmconf.c for some things) to adjust defaults.
b) the fvwm package is broken, as the session file needs to have a .desktop extension
c) the fvwm session from the kdm package might be either disabled by gentoo (because technically it doesn't belong there) or it may be simply wrong for the given configuration (containing the wrong executable name)
Comment 4 Jesús Guerrero Botella 2011-05-12 09:17:13 UTC
Thanks for the reply. 

I'll comment some things. Bear in mind always that is not my desire to argue you, mainly because I couldn't ever do that because I know nothing about this concrete matter.

(In reply to comment #3)
> a) the defaults in kdmrc are distro-specific. the upstream defaults are as
> "neutral" as possible. distros should patch config.def (and genkdmconf.c for
> some things) to adjust defaults.

The default upstream kdmrc says that session files must be looked for in SessionsDirs=/usr/share/xsessions, there's an alternate SessionsDirs in kdmrc that is commented out, pointing to #SessionsDirs=/usr/share/config/kdm/sessions,/usr/share/apps/kdm/sessions. There are directories where kdm itself (not any other package, but kdm) install its own session files.

I am guessing that the default kdmrc is set so that distro specific session files will take precedence over the kde-branded ones. Is that a correct assumption?

Understand that I need to know the reasoning behind this if I want to have any chance to get this fixed in Gentoo, since they think that this belongs upstream.

> b) the fvwm package is broken, as the session file needs to have a .desktop
> extension

Actually, I might have mixed the things a bit up. The no-.desktop file goes in /etc/X11/Sessions/, which I guess is fine. There's no file for fvwm at all in the default /usr/share/xsessions/ directory. So, I guess fvwm has no .desktop file at all (with or without the proper extension). Files in /etc/X11/Sessions are shell scripts.
Comment 5 Oswald Buddenhagen 2011-05-12 10:38:56 UTC
(In reply to comment #4)
> The default upstream kdmrc says [...]
>
no, it doesn't. this is not the upstream default setting. if you want to get that, compile unpatched upstream sources and run genkdmconf --no-old.

> Files in /etc/X11/Sessions are shell scripts.
>
ah, that's entirely unrelated to kdm's session definitions (one could create .desktop files for these scripts, though).
Comment 6 Jesús Guerrero Botella 2011-05-12 10:58:33 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > The default upstream kdmrc says [...]
> >
> no, it doesn't. this is not the upstream default setting. if you want to get
> that, compile unpatched upstream sources and run genkdmconf --no-old.
> 
> > Files in /etc/X11/Sessions are shell scripts.
> >
> ah, that's entirely unrelated to kdm's session definitions (one could create
> .desktop files for these scripts, though).

Thank you for the insight. It seems I have some work to do if I want to get this sorted out. :)
Comment 7 Andreas K. Huettel 2011-07-11 20:25:35 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > The default upstream kdmrc says [...]
> >
> no, it doesn't. this is not the upstream default setting. if you want to get
> that, compile unpatched upstream sources and run genkdmconf --no-old.

I disagree. First of all, Gentoo always compiles kdm with GENKDMCONF_FLAGS="--no-old --no-backup", second none of our patches even touches this section. So, this may actually be upstream default. 

(This whole configuration generation business may be great for a power user installing his own kde from scratch; for a distribution it's just a mess.)

Anyway, I guess we'll just figure out how to effectively apply Jesus' patch.
Comment 8 Jesús Guerrero Botella 2011-07-12 06:47:57 UTC
(In reply to comment #7)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > The default upstream kdmrc says [...]
> > >
> > no, it doesn't. this is not the upstream default setting. if you want to get
> > that, compile unpatched upstream sources and run genkdmconf --no-old.
> 
> I disagree. First of all, Gentoo always compiles kdm with
> GENKDMCONF_FLAGS="--no-old --no-backup", second none of our patches even
> touches this section. So, this may actually be upstream default. 
> 
> (This whole configuration generation business may be great for a power user
> installing his own kde from scratch; for a distribution it's just a mess.)
> 
> Anyway, I guess we'll just figure out how to effectively apply Jesus' patch.

I can't find how Gentoo is modifying anything here either. I somehow lost interest in this anyway, since some other login manager I am using now gained consolekit support.
Comment 9 Oswald Buddenhagen 2011-07-12 07:48:01 UTC
> second none of our patches even touches this section.
>
and what exactly does line 81 in http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/kde-base/kdm/kdm-4.6.5.ebuild?view=markup do, huh?

you are supposed to patch config.def instead of the generated files.
Comment 10 Andreas K. Huettel 2011-07-12 16:33:30 UTC
:( me stupid. sorry for the noise.