After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 161649 - gnome-theme-manager theme installation is broken.
gnome-theme-manager theme installation is broken.
Status: VERIFIED FIXED
Product: gnome-control-center
Classification: Core
Component: [obsolete] theme-manager
unspecified
Other Linux
: Immediate blocker
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
: 163480 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-12-18 18:31 UTC by Dennis Cranston
Modified: 2005-01-09 19:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed Patch (1.52 KB, patch)
2004-12-22 05:28 UTC, shakti
none Details | Review
slightly modified patch (2.02 KB, patch)
2004-12-22 11:45 UTC, shakti
none Details | Review
modified patch (2.32 KB, patch)
2005-01-06 04:59 UTC, shakti
none Details | Review

Description Dennis Cranston 2004-12-18 18:31:56 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/
Comment 1 shakti 2004-12-22 05:28:12 UTC
Created attachment 35110 [details] [review]
Proposed Patch
Comment 2 shakti 2004-12-22 05:29:57 UTC
The patch checks the permission for HOME/.themes/ directory, not for
HOME/.themes/<themes.tar.gz> file.
Comment 3 shakti 2004-12-22 11:45:55 UTC
Created attachment 35115 [details] [review]
slightly modified patch
Comment 4 Sebastien Bacher 2005-01-05 01:12:54 UTC
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;
Comment 5 shakti 2005-01-06 04:30:21 UTC
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.
Comment 6 shakti 2005-01-06 04:59:40 UTC
Created attachment 35527 [details] [review]
modified patch

Modified the patch as per Sebastien's comment on .icons directory.
Comment 7 shakti 2005-01-06 05:24:49 UTC
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.
Comment 8 Sebastien Bacher 2005-01-06 11:16:54 UTC
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 ?
Comment 9 shakti 2005-01-06 11:33:29 UTC
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.
Comment 10 Sebastien Bacher 2005-01-06 11:55:36 UTC
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.
Comment 11 shakti 2005-01-06 14:57:40 UTC
Fine.
Thanks.
Comment 12 Dennis Cranston 2005-01-06 16:17:08 UTC
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.
Comment 13 Andrew Sobala 2005-01-09 19:37:46 UTC
*** Bug 163480 has been marked as a duplicate of this bug. ***