GNOME Bugzilla – Bug 161649
gnome-theme-manager theme installation is broken.
Last modified: 2005-01-09 19:37:46 UTC
I am unable to install themes from gnome-look.org. 1. Drag downloaded theme package over the gnome-theme-manager window. 2. Drop the package on the window. 3. The Theme Installation dialog pops, click Install. Gnome-theme-manager displays an error message, "Insufficient permissions to install the theme in: /home/develop/.themes/18932-SolarCity-in-6-colors.tar.gz". I have the permissions to write to .themes: [develop@Imagination ~]$ pwd /home/develop [develop@Imagination ~]$ ls -lsagFL | grep .theme 4 drwxrwxr-x 9 users 4096 Dec 8 22:31 .themes/
Created attachment 35110 [details] [review] Proposed Patch
The patch checks the permission for HOME/.themes/ directory, not for HOME/.themes/<themes.tar.gz> file.
Created attachment 35115 [details] [review] slightly modified patch
the patch is not good imho, what about the icon themes case (should look on ~/.icons, not ~/.themes). BTW what's the cause of the bug exactly, it should work even with the test on the filename. What do you think about this change base on the current CVS (some code have been added to not overwritte files in the themes dir) ? --- gnome-theme-installer.c 3 Jan 2005 18:08:23 -0000 1.12 +++ gnome-theme-installer.c 5 Jan 2005 01:10:09 -0000 @@ -163,9 +163,9 @@ base = gnome_vfs_uri_extract_short_name (src_uri); src = g_list_append (NULL, src_uri); if (icon_theme) - path = g_build_filename (g_get_home_dir (), ".icons", base, NULL); + path = g_build_filename (g_get_home_dir (), ".icons", NULL); else - path = g_build_filename (g_get_home_dir (), ".themes", base, NULL); + path = g_build_filename (g_get_home_dir (), ".themes", NULL); if (access (path, X_OK | W_OK) != 0) { GtkWidget *dialog;
When we download a theme package it doesn't have executable permission. test@linux:~/Desktop> ls -l 18932-SolarCity-in-9-faces.tar.gz -rw-r--r-- 1 test users 83089 2004-12-21 17:54 18932-SolarCity-in-9-faces.tar.gz test@linux:~/Desktop> Now the path variable will be having value path = /home/test/.themes/18932-SolarCity-in-9-faces.tar.gz So, access (path, X_OK | W_OK) will fail.
Created attachment 35527 [details] [review] modified patch Modified the patch as per Sebastien's comment on .icons directory.
This bug is introduced due to the fix for bug #121427. To show the error-dialog the check should be done for .themes and .icons directory.
thanks for the update patch, but have you looked on my version in the comment #4 ? Seems to do the same job but doesn't add an extra variable ... what do you think ?
Your patch too works fine. Down the line it uses the 'path' variable. So, not to disturb the 'path' variable I used a new variable for checking the directory access of .themes and .icons directories.
in fact in the CVS the path variable is just used here and set again just after that, I've commited my version of the patch. BTW thanks for your work on this issue.
Fine. Thanks.
I updated from cvs, and this patch fixed the install problem. Unfortunately, immediately after installing the theme the capplet's CPU usage stays at 100%, and the capplet does not refresh. This is probably bug # 160803.
*** Bug 163480 has been marked as a duplicate of this bug. ***