Bug 149526

Summary: Weirdness in applications-kmenuedit.menu causes failure in screensaver configuration
Product: [Applications] kmenuedit Reporter: Frans Pop <elendil>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: wstephenson
Priority: NOR    
Version: 0.7   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshot of screensaver config dialog with empty list
The menu file that looks to be the cause of the issue
How I made the menu look in kmenuedit
Full strace that showed the cause of the screensaver config failure

Description Frans Pop 2007-09-03 20:50:41 UTC
Version:           0.7 (using KDE KDE 3.5.5)
Installed from:    Debian stable Packages
OS:                Linux

Original issue that led to this report: screensaver configuration dialog 'kcmshell screensaver' does not show any screensavers. It does not even display "Loading...".

All needed components are installed and screensaver config had always worked fine before. I created a new user and for that user screensaver configuration worked fine.

An strace of 'kcmshell screensaver' for both users showed a strange difference between them. For the user where it does not work:

</snip>
lstat64("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/home/fjp", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/home/fjp/.kde", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
lstat64("/home/fjp/.kde/share", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
lstat64("/home/fjp/.kde/share/applnk", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
lstat64("/home/fjp/.kde/share/applnk/System-2", 0xbfe6c01c) = -1 ENOENT (No such fileor directory)
lstat64("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/home/fjp", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/home/fjp/.kde", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
lstat64("/home/fjp/.kde/share", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
lstat64("/home/fjp/.kde/share/applnk", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
lstat64("/home/fjp/.kde/share/applnk/apps", 0xbfe6c01c) = -1 ENOENT (No such file or directory)
lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/share", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/share/applnk", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/share/applnk/System-2", 0xbfe6c01c) = -1 ENOENT (No such file or directory)
access("/usr/share/applnk/System-2/ScreenSavers", F_OK) = -1 ENOENT (No such file or directory)
lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/share", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/share/applnk", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/share/applnk/apps", 0xbfe6c01c) = -1 ENOENT (No such file or directory)
access("/usr/share/applnk/apps/ScreenSavers", F_OK) = -1 ENOENT (No such file or directory)
open("/home/fjp/.kde/share/applnk/System-2/ScreenSavers/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = -1 ENOENT (No such file or directory)
open("/home/fjp/.kde/share/applnk/apps/ScreenSavers/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = -1 ENOENT (No such file or directory)
</snip>

Note the "System-2" where the other user had "System". Note also that all locations which are tried fail, which probably explains why no screensavers are listed.

At least one other user seems to have had this same problem [1]:
https://answers.launchpad.net/ubuntu/+source/kdebase/+question/5488

A grep on my whole system showed that the only other place where "System-2" occurs is in ~/.config/menus/applications-kmenuedit.menu. The suspect bit is:
 <Move>
  <Old>System</Old>
  <New>System-2</New>
 </Move>

Note that there are two "System" entries in the menu. Not sure what the first one is (for "most recent applications" maybe?) or if that explains the <Move> tag. 

I recently reorganized my menu a bit using kmenuedit and that generated this file. I'm not sure I would be able to reproduce the steps.

I'm not completely sure if this is a bug in kmenuedit or in the interpretation of the file by the screensaver control center plugin (or more probably some general code). Feel free to reassign.

I will add some attachments to clarify the issue.

[1] Maybe somebody with access to Launchpad can add a link to this report there.
Comment 1 Frans Pop 2007-09-03 20:54:21 UTC
Created attachment 21541 [details]
Screenshot of screensaver config dialog with empty list
Comment 2 Frans Pop 2007-09-03 20:55:35 UTC
Created attachment 21542 [details]
The menu file that looks to be the cause of the issue
Comment 3 Frans Pop 2007-09-03 20:56:29 UTC
Created attachment 21543 [details]
How I made the menu look in kmenuedit
Comment 4 Frans Pop 2007-09-03 20:57:41 UTC
Created attachment 21544 [details]
Full strace that showed the cause of the screensaver config failure
Comment 5 Frans Pop 2007-09-03 21:48:28 UTC
Just confirmed that moving the applications-kmenuedit.menu file out of the way "fixes" the problem with the screensaver configuration.
Comment 6 Will Stephenson 2009-11-23 16:52:28 UTC

*** This bug has been marked as a duplicate of bug 89434 ***