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 102216 - icon themes install into ~/.themes instead of ~/.icons
icon themes install into ~/.themes instead of ~/.icons
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: [obsolete] theme-manager
git master
Other other
: High major
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
AES[BIGBADBUG]
: 97177 107189 113781 116176 116392 129220 139459 145083 147842 165807 312579 (view as bug list)
Depends on:
Blocks: 97177 107286
 
 
Reported: 2003-12-30 13:29 UTC by Mark Finlay
Modified: 2005-08-04 22:21 UTC
See Also:
GNOME target: 2.10.0
GNOME version: 2.9/2.10


Attachments
simple patch (7.10 KB, patch)
2002-12-30 13:32 UTC, Mark Finlay
none Details | Review
Shiny new patch (4.07 KB, patch)
2003-06-01 17:14 UTC, Mark Finlay
none Details | Review
Initial proposed patch (7.17 KB, patch)
2004-07-01 22:15 UTC, David Sedeño Fernández
none Details | Review
New install procedure (8.91 KB, patch)
2004-07-03 18:56 UTC, David Sedeño Fernández
none Details | Review
Cleaning up the patch (30.96 KB, patch)
2004-07-24 15:50 UTC, David Sedeño Fernández
none Details | Review
Update patch (34.81 KB, patch)
2004-07-31 18:08 UTC, David Sedeño Fernández
none Details | Review
Free the memory from g_shell_quote (35.14 KB, patch)
2004-08-02 21:40 UTC, David Sedeño Fernández
none Details | Review
Update patch to current cvs (35.02 KB, patch)
2004-10-29 15:07 UTC, David Sedeño Fernández
none Details | Review
updated to CVS (34.86 KB, patch)
2005-02-01 17:31 UTC, Kjartan Maraas
none Details | Review
Some little updates (36.83 KB, patch)
2005-02-01 22:13 UTC, David Sedeño Fernández
accepted-commit_now Details | Review

Description Mark Finlay 2002-12-30 13:26:46 UTC
Package: control-center
Severity: normal
Version: GNOME2.1.5 cvs
Synopsis: icon themes install into ~/.themes instead of ~/.icons
Bugzilla-Product: control-center
Bugzilla-Component: theme-manager
Description:
Icon themes should be installed to ~/.icons but they are installed into
~/.themes when you use the "Install theme" button. 

I've written a patch that fixes the problem. It is very simple in that
it just
duplicates the code used to install into ~/.themes and changes it
to install into ~/.icons. It would be more ideal to just put in 3 or 4
if statements
but my coding skills are too limited to work that out.

Anyway, I'm going to post the patch. If no-one can come up with a better
one
it's better than nothing for 2.2. From the users' point of view it works
:)




------- Bug moved to this database by unknown@bugzilla.gnome.org 2002-12-30 08:26 -------

Reassigning to the default owner of the component, control-center-maint@bugzilla.gnome.org.

Comment 1 Mark Finlay 2002-12-30 13:32:15 UTC
Created attachment 13279 [details] [review]
simple patch
Comment 2 Mark Finlay 2002-12-30 14:05:51 UTC
Note: drag and drop still installs to .themes
Comment 3 Mark Finlay 2002-12-30 14:59:11 UTC
I think that it would be a much better solution to pass a variable
to gnome_theme_installer_run to tell it whether it is installing
into .themes or .icons 

Hopefully someone with better coding skill than me will get to looking
at this. I cannot remember how to pass variables.

I was looking at fixing the drag and drop problem and it make much more
sense to do it all properly from the beginning, otherwise the code
is going to get really dirty.
Comment 4 Andrew Sobala 2002-12-30 22:14:53 UTC
pri=urgent, we need to do this right for 2.2.0
Comment 5 Mark Finlay 2003-01-10 19:27:56 UTC
To Quote Seth:
"Making sure jrb is aware there is a patch for this..."
Comment 6 Andrew Sobala 2003-02-13 18:30:55 UTC
Presumably this patch is still applicable, Mark?
Comment 7 Mark Finlay 2003-02-13 18:37:54 UTC
I'll check it against HEAD to see if it still applies. But as
I said, it only fixes half the problem and isn't really very
nicely done.
Comment 8 Andrew Sobala 2003-03-01 11:05:05 UTC
Apparently it does still apply
Comment 9 Andrew Sobala 2003-03-01 11:05:52 UTC
*** Bug 107189 has been marked as a duplicate of this bug. ***
Comment 10 Mike Hearn 2003-04-30 22:24:42 UTC
This should be retargetted for next gnome stable release.

It's too bad this one got through to redhat 9, we are getting a lot of
questions on IRC and linuxquestions.org about why this feature does't
seem to work.
Comment 11 Mark Finlay 2003-06-01 15:35:23 UTC
*** Bug 113781 has been marked as a duplicate of this bug. ***
Comment 12 Mark Finlay 2003-06-01 17:14:26 UTC
Created attachment 17042 [details] [review]
Shiny new patch
Comment 13 Mark Finlay 2003-06-01 17:18:42 UTC
Ok, In the last 6 months my coding skills have improved a bit.
That patch does it the "right way" AFAICT.

The only problem is that since I made my first patch one thing has
changed: When you dnd a file you are dragging it onto the notebook
widget instead of onto the list inside the notebook. This makes it
difficult if not impossible to determine if you dnd'd an icon
theme.

So that patch only fixes the install button on the icon tab, but even
that is worth doing.
Comment 14 Mark Finlay 2003-06-07 17:50:42 UTC
I haven't had time to look at it, but if there is a way to
find out what tab a notebook is showing then it should be
possible to fix dnd too. Will look into it.
Comment 15 Andrew Sobala 2003-06-28 11:17:11 UTC
*** Bug 116176 has been marked as a duplicate of this bug. ***
Comment 16 Andrew Sobala 2003-07-01 22:11:24 UTC
*** Bug 116392 has been marked as a duplicate of this bug. ***
Comment 17 Kjartan Maraas 2003-07-09 13:12:08 UTC
This needs to be looked at soon.
Comment 18 Mark Finlay 2003-11-28 15:46:16 UTC
By Now my patch is pretty much useless so I'm removing the PATCH keyword.
Comment 19 Andrew Sobala 2003-12-13 12:42:12 UTC
Can we *please* get this fixed by 2.6?
Comment 20 Andrew Sobala 2003-12-13 12:42:44 UTC
*** Bug 129220 has been marked as a duplicate of this bug. ***
Comment 21 Alex Duggan 2003-12-18 22:08:43 UTC
I'm working on this one.  I'm also working on an intelligently
detecting what type of theme is in a tarball and installing it to the
correct place.  I'm also going to try to add some checks to report an
error if it's a gtk-engine or some other unknown tarball the user is
trying to install.
Comment 22 Michiel Sikkes 2004-03-11 15:35:00 UTC
Is anyone still working on this? Or otherwise I'm going to try and
write a patch which does the following things which checks what kind
of theme it is by looking into the index.theme file. (Are there
already parsers for these kind of files?)
Comment 23 Tim Herold 2004-04-08 11:14:07 UTC
*** Bug 139459 has been marked as a duplicate of this bug. ***
Comment 24 David Sedeño Fernández 2004-07-01 22:15:51 UTC
Created attachment 29144 [details] [review]
Initial proposed patch

This patch try to solve some bugs ( #97177, #121427 and others). The idea is to
have a more  intelligent and user friendly theme installer. 

Inform to the user if the file is not in a supported format, if it not a theme
and if the theme have installed corrected.

This patch it's a initial work. Needs to cleanup and support more theme
formats, but I'd like some feedback about it.
Comment 25 David Sedeño Fernández 2004-07-03 18:56:49 UTC
Created attachment 29187 [details] [review]
New install procedure

More work in the patch. Support gtk, metacity, metatheme and icons themes.
Informs the user about the success or failure of the installation. 

Btw, the icon_theme var passed to the gnome_theme_installer_run doesn't do
anything but I keep it in this patch.
Comment 26 David Sedeño Fernández 2004-07-13 18:42:05 UTC
Adding the PATCH keyword
Comment 27 David Sedeño Fernández 2004-07-16 16:33:07 UTC
*** Bug 145083 has been marked as a duplicate of this bug. ***
Comment 28 David Sedeño Fernández 2004-07-19 15:29:17 UTC
*** Bug 147842 has been marked as a duplicate of this bug. ***
Comment 29 Matthew Lenz 2004-07-21 17:09:14 UTC
Why don't all themes (wm, icon, gtk) just install in .themes in the first place?
Comment 30 David Sedeño Fernández 2004-07-21 17:27:39 UTC
Did you mean that install in .themes in the first extract and if it a icon theme
move to .icons and if it's not a theme remove it? maybe it's better so there are
more possibilities that the theme goes to .themes finally but I think it's more
clear to install (extract) to a temp dir and find what type of theme it is, then
move to the correct place.
Comment 31 Rodney Dawes 2004-07-21 17:35:14 UTC
I think they should just go into ~/.themes/Name/icons/. This would definately
solve this issue, and make it easier for artists to distribute desktop themes.
But that's just me. I have a patch to the theme spec that changes this among
other things that I need to clean up and re-submit.
Comment 32 David Sedeño Fernández 2004-07-22 17:15:50 UTC
If the theme spec change to .themes, the problem is solved. Will be this change
in time for 2.8 ? I plan to do more work on the patch and I will be great to
known if it will be useful :)
Comment 33 Andrew Sobala 2004-07-22 17:23:53 UTC
Of course, you can't just change the theme spec; you'd have to add the directory
as being somewhere that's OK to keep icon themes but older systems will still
have them installed in .icons.
Comment 34 David Sedeño Fernández 2004-07-24 15:50:28 UTC
Created attachment 29852 [details] [review]
Cleaning up the patch

This patch clean some unneeded vars and callbacks:

gnome_theme_installer_run: unneeded icon_theme var.
theme-properties.glade: Do not needed "Install" button in the details dialog
tabs ( See bug #122970)
gnome-theme-details.c: Removed callbacks for the three "Install" button in the
details dialog tabs.
Comment 35 David Sedeño Fernández 2004-07-24 15:53:56 UTC
Opps, the bug reference in the attachmet comment it's #107286. Sorry.
Also the patch fix this bug's also:

#121427 : Error control it's performed now and informs the user.
#97177  : The patch correct this also, informing the user if the file it's not
supported 
#114553 : Recommend syntax in this patch to extract files.
Comment 36 Jonathan Blandford 2004-07-30 21:07:35 UTC
Some comments on the patch:

1) We really need to escape the filename we pass to the command line.  Do that
with g_shell_quote()
2) we should pass in absolute paths for commands ('/usr/bin/tar') and test for
their existence.
3) untar the tarball in a temporary dot directory in ~/themes/ rather than
/tmp/.  This saves us from having it be on a different filesytem (or a ram disk,
or a place with limited disk space...).  Also, we don't have to worry about file
permissions then.
4) Check to see if its a compilable module (eg, configure{,.in,.ac} exists). 
Give a special warning dialog in that case.
Comment 37 David Sedeño Fernández 2004-07-31 18:08:38 UTC
Created attachment 30115 [details] [review]
Update patch 

Update patch with the comment of jrb and some fixed. 

The absolute path are /bin/gzip /bin/tar (in my distro there are not
/usr/bin/tar) and /usr/bin/bzip2.
Comment 38 David Sedeño Fernández 2004-08-02 21:40:05 UTC
Created attachment 30161 [details] [review]
Free the memory from g_shell_quote
Comment 39 David Sedeño Fernández 2004-10-29 15:07:45 UTC
Created attachment 33207 [details] [review]
Update patch to current cvs
Comment 40 Luis Villa 2004-12-08 17:33:43 UTC
*** Bug 97177 has been marked as a duplicate of this bug. ***
Comment 41 Luis Villa 2004-12-08 17:35:18 UTC
Jonathan, Jody, can we get this patch in, please?! Putting on the 2.10 milestone.
Comment 42 Luis Villa 2004-12-09 04:46:07 UTC
Fixing gnome version. Just got bitten by this again, too.
Comment 43 Kjartan Maraas 2005-01-06 13:58:54 UTC
*** Bug 97177 has been marked as a duplicate of this bug. ***
Comment 44 Jody Goldberg 2005-02-01 14:23:20 UTC
Comment on attachment 33207 [details] [review]
Update patch to current cvs

I don't usually comment on theme manager bugs, but this has been sitting here
for a long time.  Let's get it in for 2.10.
Comment 45 Kjartan Maraas 2005-02-01 17:31:02 UTC
Tried applying this but got rejects. Attaching a new try. Could someone take a
look at that one and see if it still does what the original tried to do? I'm a
bit afraid that we changed stuff around since this was made.
Comment 46 Kjartan Maraas 2005-02-01 17:31:43 UTC
Created attachment 36830 [details] [review]
updated to CVS
Comment 47 Kjartan Maraas 2005-02-01 17:32:23 UTC
Comment on attachment 33207 [details] [review]
Update patch to current cvs

Please take another look at the newer patch.
Comment 48 Kjartan Maraas 2005-02-01 17:33:01 UTC
Forgot to mention that just gnome-theme-installer.c had rejects and thus needs
most attention.
Comment 49 David Sedeño Fernández 2005-02-01 22:13:18 UTC
Created attachment 36846 [details] [review]
Some little updates

Only 2 updates: 

- Support tgz extension 
- Inform the user if the file it's not a tar.gz (or tgz) or tar.bz2.
- Add a Changelog entry

Ok to commit please ? :)
Comment 50 Kjartan Maraas 2005-02-01 22:28:18 UTC
Comment on attachment 36846 [details] [review]
Some little updates

Ok, go ahead.
Comment 51 David Sedeño Fernández 2005-02-01 22:34:52 UTC
Comment on attachment 36846 [details] [review]
Some little updates

Committed into HEAD. Thanks you all.
Comment 52 Kjartan Maraas 2005-02-01 22:42:01 UTC
Just a quick note to say that I had some problems when testing this patch
- installed a new theme
- created a custom theme based on this
- it didn't show up in the list after closing the dialog

Could be a different bug though.
Comment 53 David Sedeño Fernández 2005-02-01 22:56:07 UTC
I can't reproduce the bug. Also, I think it can be another bug, because the
patch doesn't touch the part of save a custom theme. 
Comment 54 Dennis Cranston 2005-02-02 07:07:16 UTC
I don't know if its related, but gnome-theme-manager hangs immediately after
installing a theme.

$ gdb gnome-theme-manager
GNU gdb Red Hat Linux (6.1post-1.20040607.43rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db lib
rary "/lib/tls/libthread_db.so.1".

(gdb) run
Starting program: /gnome/install/bin/gnome-theme-manager
[Thread debugging using libthread_db enabled]
[New Thread -1208096544 (LWP 22195)]
Detaching after fork from child process 22198.

(gnome-theme-manager:22198): Gtk-WARNING **: Theme directory scalable/emblems of
 theme Flat-Blue has no size field

[New Thread 13470640 (LWP 22199)]
Detaching after fork from child process 22200.
Detaching after fork from child process 22203.
*** glibc detected *** double free or corruption (fasttop): 0x08da3628 ***

Program received signal SIGABRT, Aborted.

Thread NaN (LWP 22195)

  • #0 _dl_sysinfo_int80
    from /lib/ld-linux.so.2
  • #1 raise
    from /lib/tls/libc.so.6
  • #2 abort
    from /lib/tls/libc.so.6
  • #3 __libc_message
    from /lib/tls/libc.so.6
  • #4 _int_free
    from /lib/tls/libc.so.6
  • #5 free
    from /lib/tls/libc.so.6
  • #6 IA__g_free
    at gmem.c line 187
  • #7 top_theme_dir_changed
    at gnome-theme-info.c line 954
  • #8 actually_dispatch_callback
    at gnome-vfs-monitor.c line 271
  • #9 g_idle_dispatch
    at gmain.c line 3821
  • #10 IA__g_main_context_dispatch
    at gmain.c line 1947
  • #11 g_main_context_iterate
    at gmain.c line 2578
  • #12 IA__g_main_loop_run
    at gmain.c line 2782
  • #13 IA__gtk_main
    at gtkmain.c line 963
  • #14 main
    at gnome-theme-manager.c line 1481

Comment 55 Kjartan Maraas 2005-02-02 08:36:21 UTC
I'm starting to think that the whole hash table memory management part of
gnome-theme-info.c is broken. The docs say that both keys and values have to be
there for the lifetime of the hash table, and therefore keys and values should
be copied into the hash table.

- result of g_hash_table_lookup() is freed in several places
- add_data_to_hash_by_name() g_strdup()s when it does g_hash_table_insert()
  but still the key is g_strdup()ed again when calling add_data_to_hash_by_name()
  in some cases
- it just feels very wrong? :)
Comment 56 Kjartan Maraas 2005-02-02 08:40:39 UTC
Dennis, I guess you could try to remove the g_free (monitor_data); call at line
954 in gnome-theme-info.c and see if that helps. You are using CVS, right? I'll
commit what I have locally so you can test that first maybe.
Comment 57 Jody Goldberg 2005-02-02 15:18:05 UTC
kmaraas : Does valgrind indicate any problems ?  There's nothing that mandates
the lifecycle of the value in a hashtable.  The data structure does not actually
reference it, only the application.  The key needs to exist as long as the entry
is there.

It does look like add_data_to_hash_by_name is leaking the name
Comment 58 Alex Duggan 2005-02-02 19:49:50 UTC
*** Bug 165807 has been marked as a duplicate of this bug. ***
Comment 59 Kjartan Maraas 2005-02-02 20:11:13 UTC
Jody, valgrind doesn't show up anything special, but I was sufficiently confused
by the inconsitencies in memory management in there that I wasn't sure what was
up. I'm thinking of going back to square one and adding small incremental "known
to be right" fixes until we get to the bottom of this. So, removing the strdup
from the calls to add_data_to_hash_by_name is one thing. The other is to not
free data that is already freed by the GDestroyNotify function when those are
specified. Let's see if this makes the other things more obvious.
Comment 60 Dennis Cranston 2005-02-02 21:52:05 UTC
Kjartan,  I am using CVS.  I updated gnome-control-center, today.  It has your
latest change to gnome-theme-info.c.  It fixed the crash that I reported above.
Comment 61 Alex Duggan 2005-02-04 04:13:18 UTC
I'm still seeing this crash with latest cvs.  I've been seeing this for a few
months now.

[aldug@edison ~]$ gdb gnome-theme-manager
GNU gdb Red Hat Linux (6.1post-1.20040607.43rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".

(gdb) run
Starting program: /opt/gnome28/bin/gnome-theme-manager
[Thread debugging using libthread_db enabled]
[New Thread -1208097088 (LWP 7943)]
Detaching after fork from child process 7958.

Program received signal SIGSEGV, Segmentation fault.

Thread NaN (LWP 7943)

  • #0 IA__g_str_hash
    at gstring.c line 77
  • #1 IA__g_hash_table_lookup
    at ghash.c line 193
  • #2 top_theme_dir_changed
    at gnome-theme-info.c line 949
  • #3 actually_dispatch_callback
    at gnome-vfs-monitor.c line 271
  • #4 g_idle_dispatch
    at gmain.c line 3821
  • #5 IA__g_main_context_dispatch
    at gmain.c line 1947
  • #6 g_main_context_iterate
    at gmain.c line 2578
  • #7 IA__g_main_loop_run
    at gmain.c line 2782
  • #8 IA__gtk_main
    at gtkmain.c line 963
  • #9 main
    at gnome-theme-manager.c line 1481

Comment 62 Alex Duggan 2005-02-04 04:16:11 UTC
It seems to die if a theme in $prefix/share/themes does not have an index.theme,
file, a metacity-1, etc
Comment 63 Kjartan Maraas 2005-02-04 10:03:03 UTC
Alex, do you have gnome-vfs from CVS too? The most critical fix for the theme
manager was fixing a call there to not return NULL ever.
Comment 64 Kjartan Maraas 2005-02-10 00:29:53 UTC
So, this should all be working now with this patch, and the cleanup I did after
this was commited. Please test and see if the following works:

- installing new themes
- having the newly installed themes show up in the details dialog immediately
- customizing themes
- changing between themes

It would be nice if we could close this one now.
Comment 65 Vincent Noel 2005-02-16 15:07:38 UTC
Sorry, but it still does not work for me.
I tried to install a metacity theme by dragging the package on the theme manager
(on the "details" page). There was definitely some reshuffling of the theme
list, but the theme did not appear in the list before a restart.
Comment 66 Luis Villa 2005-02-28 04:34:39 UTC
This seems to work reliably for me with 2.9.91. Vincent, can you retest? I'm
going to close for now...
Comment 67 Sergej Kotliar 2005-08-04 22:21:10 UTC
*** Bug 312579 has been marked as a duplicate of this bug. ***