Bug 121807 - kmahjongg ignores pictures in ~/.kde/share/apps/kmahjongg/pics - you are forced to use the the systemwide directory
Summary: kmahjongg ignores pictures in ~/.kde/share/apps/kmahjongg/pics - you are forc...
Alias: None
Product: kmahjongg
Classification: Applications
Component: general (show other bugs)
Version: 0.7.6
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Mauricio Piacentini
Depends on:
Reported: 2006-02-12 03:20 UTC by Janet
Modified: 2008-07-22 11:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Janet 2006-02-12 03:20:03 UTC
Version:           0.7.6 (using KDE 3.5.1, Debian Package 4:3.5.1-1 (testing/unstable))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.14-kanotix-9

Kmahjongg consequently ignores a pics folder and its content I created in the ~/.kde/share/apps/kmahjongg/ directory. That forces the user to use the systemwide kmahjongg directory and become root just to install a new kmahjongg theme.
Comment 1 Albert Astals Cid 2006-02-12 13:53:35 UTC
SVN commit 508616 by aacid:

Allow reading of pictures in  ~/.kde/share/apps/kmahjongg/pics so people don't need to be root to add themes, etc
BUGS: 121807

 M  +83 -105   Preview.cpp  
 M  +15 -15    Preview.h  
 M  +0 -7      boardwidget.h  
 M  +5 -5      kmahjongg.cpp  
 M  +1 -1      version.h  
Comment 2 Janet 2006-02-12 23:31:58 UTC
So with the next release the user can save designs in home, thanks. When I now, in the current unpatched release, want to save a design it has the (wrong) path /usr/share/apps in it. Is that also be corrected with this? Themes saved now in the home directory won't need that path information.

Comment 3 Albert Astals Cid 2006-02-12 23:37:03 UTC
Hmmm, did not understood the question sorry, my english is not as good as i would want sometimes.

Can you make a "simple" example of what is the problem now and how do you want the program to behave?
Comment 4 Janet 2006-02-14 16:05:04 UTC
Well... I try it: 

I do not yet have the version of kmahjongg you have fixed, I still have the official version. When I save a new design (Game - Save Design) I get a text file (for example saved in my home directory) with the following content:


Note that /usr/share/apps. 

If I (as root) move the text file to /usr/share/apps/kmahjongg/pics I have to delete that /usr/share/apps entry manually because otherwise kmahjongg cannot load the theme. Kmahjongg cannot load desings from other places than /usr/share/apps/kmahjongg/pics so the entry /usr/share/apps in the design text file is useless and wrong.

Imagine now I have your fixed version. When I now save a new design I expect it to be saved in ~/.kde/share/apps/kmahjongg/pics. Do I still have to manually delete the line /usr/share/apps from the saved design file or is it also fixed? 
Comment 5 Albert Astals Cid 2006-02-14 23:34:04 UTC
Reopening the bug as that still does not seem to work
Comment 6 Albert Astals Cid 2006-02-25 14:20:35 UTC
Theme loading will be fixed also on 3.5.2, no need to edit the .theme file.
Comment 7 Janet 2008-07-13 14:50:56 UTC
Same problem applies to kmahjongg of KDE4. Tilesets and backgrounds in the user's home (~/.kde4/share/apps/kmahjonggglib/tilesets) are ignored. Every user should be able to use own tilesets without need to manipulte the content of the systemwide directory.
Comment 8 Albert Astals Cid 2008-07-20 14:23:08 UTC
Reassigning to kmahjongg maintainer. I think he's on holidays for a few days though, so you'll have to wait for a correct answer.

Anyways, just a wild guess, are you sure the tilesets you are putting on your .kde dir are kmahjongg4 compatible? The format may have changed from kde3 to kde4
Comment 9 Janet 2008-07-21 01:56:32 UTC
Yes I'm sure they are compatible because they are based on copies of the default KDE4 ones. And when I put them in the systemwide directory they do work. So it must be a problem with the user's directory. But maybe I just use the wrong directory, I orientated on the location of the tiles and backgrounds  in the systemwide directory and created the same directory tree in  ~/.kde/share/apps.
Comment 10 Mauricio Piacentini 2008-07-21 18:11:28 UTC
I can not reproduce this in my KDE4 environment. I was able to install a copy of a background and a tileset to


And have them show up when kmahjongg starts, listed alongside the regular ones installed in the systemwide directory. In my case the KDEDIR for the KDE4 session is ~/.kde4, yours might be different.

However, if you simply copy the files and launch the game the duplicated ones will not show up. Make sure you edit the .desktop file and the svg one: Give the theme another name in the .desktop file, and make sure it lists a different svg filename as well. If kmahjongg can not load the SVG filename specified it will discard the theme and not show it: it also can not show two themes if both use the same SVG filename, as KDE will locate one or the other, in the order of preference used by all system config files.

Hope that helps!
Comment 11 Janet 2008-07-22 11:47:43 UTC
It wasn't the name or content of the files for they were recognized when put into /usr/share/kde4/apps/kmahjongglib/... I now tried again and moved them back to ~/.kde4/share/apps/kmahjongglib/.. and now it works. Sorry for bothering you.