How do I change a folder icon from a script?

View: New views
4 Messages — Rating Filter:   Alert me  

How do I change a folder icon from a script?

by Perl Whore :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In nautilus, I can go into properties and change the icon of a folder
to a custom one. Can the same be done from the commandline or is it
possible with DBus? If so, how?

I want to use it in a script.

Also how do I check if it has an icon set already?

Thanks
--
nautilus-list mailing list
nautilus-list@...
http://mail.gnome.org/mailman/listinfo/nautilus-list

Re: How do I change a folder icon from a script?

by Marcus Carlson-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Perl Whore skrev:
> In nautilus, I can go into properties and change the icon of a folder
> to a custom one. Can the same be done from the commandline or is it
> possible with DBus? If so, how?
>
>  
In gvfs 2.28 you can use gvfs-info and gvfs-set-attribute to get and set
any metadata.
To get the custom icon value;
# gvfs-info -a metadata::custom-icon myfolder

To set a custom icon
# gvfs-set-attribute myfolder metadata::custom-icon
file:///usr/share/pixmaps/gnome-spider.png

Marcus
> I want to use it in a script.
>
> Also how do I check if it has an icon set already?
>
> Thanks
>  

--
nautilus-list mailing list
nautilus-list@...
http://mail.gnome.org/mailman/listinfo/nautilus-list

Re: How do I change a folder icon from a script?

by Perl Whore :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for the info. Any other way of doing it?

I have gnome 2.26.3 and my gvfs version is 1.2.3. I was hoping to be
able to do this without having to compile anything from source.

I'm using Fedora 11.

Thanks

On Sat, Oct 10, 2009 at 4:48 PM, Marcus Carlson <nautilus@...> wrote:

> Perl Whore skrev:
>>
>> In nautilus, I can go into properties and change the icon of a folder
>> to a custom one. Can the same be done from the commandline or is it
>> possible with DBus? If so, how?
>>
>>
>
> In gvfs 2.28 you can use gvfs-info and gvfs-set-attribute to get and set any
> metadata.
> To get the custom icon value;
> # gvfs-info -a metadata::custom-icon myfolder
>
> To set a custom icon
> # gvfs-set-attribute myfolder metadata::custom-icon
> file:///usr/share/pixmaps/gnome-spider.png
>
> Marcus
>>
>> I want to use it in a script.
>>
>> Also how do I check if it has an icon set already?
>>
>> Thanks
>>
>
>
--
nautilus-list mailing list
nautilus-list@...
http://mail.gnome.org/mailman/listinfo/nautilus-list

Re: How do I change a folder icon from a script?

by Perl Whore :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It says the latest version of gvfs is 1.4

On Sat, Oct 10, 2009 at 5:33 PM, Perl Whore <whoreperl@...> wrote:

> Thanks for the info. Any other way of doing it?
>
> I have gnome 2.26.3 and my gvfs version is 1.2.3. I was hoping to be
> able to do this without having to compile anything from source.
>
> I'm using Fedora 11.
>
> Thanks
>
> On Sat, Oct 10, 2009 at 4:48 PM, Marcus Carlson <nautilus@...> wrote:
>> Perl Whore skrev:
>>>
>>> In nautilus, I can go into properties and change the icon of a folder
>>> to a custom one. Can the same be done from the commandline or is it
>>> possible with DBus? If so, how?
>>>
>>>
>>
>> In gvfs 2.28 you can use gvfs-info and gvfs-set-attribute to get and set any
>> metadata.
>> To get the custom icon value;
>> # gvfs-info -a metadata::custom-icon myfolder
>>
>> To set a custom icon
>> # gvfs-set-attribute myfolder metadata::custom-icon
>> file:///usr/share/pixmaps/gnome-spider.png
>>
>> Marcus
>>>
>>> I want to use it in a script.
>>>
>>> Also how do I check if it has an icon set already?
>>>
>>> Thanks
>>>
>>
>>
>
--
nautilus-list mailing list
nautilus-list@...
http://mail.gnome.org/mailman/listinfo/nautilus-list