Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Evolution 2 and convenient opening of attachments
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
msfroh
n00b
n00b


Joined: 12 Nov 2004
Posts: 5

PostPosted: Fri Nov 12, 2004 4:34 pm    Post subject: Evolution 2 and convenient opening of attachments Reply with quote

I recently upgraded from Evolution 1.4 to Evolution 2.0.2, as 2.0.2 became the default within Portage. Unfortunately, I seem to have lost the ability to easily open the Microsoft Word documents which my coworkers send as attachments. Previously, I could click on the little attachment down-arrow, and select "Open in OpenOffice.org". Now, the only option I have is "Save As..."

I suspected that this has something to do with my gnome-vfs settings, but both /usr/share/mime-info/gnome-vfs.{mime|keys}, and /usr/share/application-registry/gnome-vfs.applications seem to have entries which would apparently make the association between MS Word documents and OpenOffice.

Any suggestions on how to regain this ability so I don't have to downgrade to Evolution 1.4 would be greatly appreciated.
Back to top
View user's profile Send private message
Sotol
Apprentice
Apprentice


Joined: 09 Apr 2004
Posts: 192

PostPosted: Fri Nov 12, 2004 9:56 pm    Post subject: Reply with quote

Within Nautilus, right click on any .doc file and choose Properties. Then choose the 'open with' tab and add the program you wanna use. That should also add it to Evolution.
Back to top
View user's profile Send private message
kenthepostman
Apprentice
Apprentice


Joined: 02 Jul 2004
Posts: 245
Location: Stanford, CA

PostPosted: Fri Nov 12, 2004 10:49 pm    Post subject: Reply with quote

I use KDE with evolution 2.0.2 so I don't use nautilus. Is there anyway other way I can fix the same problem?
Back to top
View user's profile Send private message
Sotol
Apprentice
Apprentice


Joined: 09 Apr 2004
Posts: 192

PostPosted: Fri Nov 12, 2004 11:38 pm    Post subject: Reply with quote

You could try to edit ~/.local/share/applications/mimeinfo.cache
although I don't know if this is a safe way to do it. It works over
here though.
Back to top
View user's profile Send private message
kenthepostman
Apprentice
Apprentice


Joined: 02 Jul 2004
Posts: 245
Location: Stanford, CA

PostPosted: Sat Nov 13, 2004 12:09 am    Post subject: Reply with quote

I have the directories but that file does not exist. Can you post the portion of one and I'll give it a try?
Back to top
View user's profile Send private message
Sotol
Apprentice
Apprentice


Joined: 09 Apr 2004
Posts: 192

PostPosted: Sat Nov 13, 2004 1:04 am    Post subject: Reply with quote

Ok I open .doc apps in Evo with abiword. There a file in ~/.local/share/applications/ called abiword-2.2.desktop that looks like this.
Code:

[Desktop Entry]
Encoding=UTF-8
Name=abiword-2.2
MimeType=application/vnd.ms-word;
Exec=abiword-2.2
Type=Application
Terminal=false
NoDisplay=true


Then there's a line in ~/.local/share/applications/mimeinfo.cache that looks like this

Code:

application/vnd.ms-word=abiword-2.2.desktop


I tried renaming all the abiword-2.2 stuff to kwrite, and it worked. So hopefully it'll work for you.
Back to top
View user's profile Send private message
kenthepostman
Apprentice
Apprentice


Joined: 02 Jul 2004
Posts: 245
Location: Stanford, CA

PostPosted: Sat Nov 13, 2004 3:22 am    Post subject: Reply with quote

I tried creating the same basic thing for an excel file using open office and I had no luck. Thanks for all the help, I'm going to keep looking around to see if I can find a solution to the problem. Gnome 2.8 and evolution 2.0 were just unmasked so I'm sure other people who have the problem will be looking for solutions.
Back to top
View user's profile Send private message
kenthepostman
Apprentice
Apprentice


Joined: 02 Jul 2004
Posts: 245
Location: Stanford, CA

PostPosted: Sat Nov 13, 2004 3:50 am    Post subject: Reply with quote

Actually, it did work. I found the copy of the system wide configuration for Mime types. It turns out I was just missing the line

Code:

[MIME Cache]

in the file mimeinfo.cache. Thanks for all the help. At least I'll have support for opening the most basic attachments without having to save them. Thanks.
Back to top
View user's profile Send private message
Sotol
Apprentice
Apprentice


Joined: 09 Apr 2004
Posts: 192

PostPosted: Sat Nov 13, 2004 4:11 am    Post subject: Reply with quote

Oops, posting the [MIME Cache] line probably woulda helped. Glad you found the answer.
Back to top
View user's profile Send private message
msfroh
n00b
n00b


Joined: 12 Nov 2004
Posts: 5

PostPosted: Mon Nov 15, 2004 12:54 am    Post subject: Reply with quote

Thanks for the discussion and replies! This was a big help. To describe in a single post exactly what was needed to get this working system-wide (since I use neither Nautilus, nor the GNOME desktop):

First, I created a file called /usr/share/applications/openoffice.desktop, containing
Code:
[Desktop Entry]
Encoding=UTF-8
Name=OpenOffice.org
MimeType=application/vnd.msword;application/vnd.ms-excel;application/msword;
Exec=ooffice
Type=Application
Terminal=false
NoDisplay=true

(I noticed similar .desktop files for various other applications. Would it be worthwhile to add the installation of an openoffice.desktop file to the OpenOffice ebuild?)

Next, I created the following /usr/share/applications/mimeinfo.cache file:
Code:
[MIME Cache]
application/msword=openoffice.desktop
application/vnd.msword=openoffice.desktop
application/vnd.ms-excel=openoffice.desktop


It seems that the specification for associating MIME types with applications in this fashion is part of the Freedesktop project. Complete specifications are available here.
Reading more info there, and following up with some more Googling, I discovered that you can do the following:

1. Create the above openoffice.desktop file.
2. Emerge dev-utils/desktop-file-utils (assuming you don't have it).
3. Execute update-desktop-database as root.

This will create appropriate entries in mimeinfo.cache to establish default associations for all MIME types listed in /usr/share/applications/*.desktop.
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Sun Nov 21, 2004 9:35 pm    Post subject: pdf attachment Reply with quote

Following this pattern, to add pdf association copy one of the xpdf.desktop file to:
/usr/share/applications

you can find one with: locate xpdf.desktop
/home/joseph/.kde3.3/.kde3.2/share/apps/kicker/xpdf.desktop

run as root:
update-desktop-database
Back to top
View user's profile Send private message
rogeroberholtzer
n00b
n00b


Joined: 07 Jan 2003
Posts: 43
Location: Stockholm, Sweden

PostPosted: Mon Nov 22, 2004 7:24 pm    Post subject: missing mimeinfo.cache Reply with quote

Why don't I have a mimeinfo.cache file in either the global or my user directory? There are assorted .desktop files.

BTW, I run KDE. But I have enough GNOME installed for evolution. Maybe there is some GNOME package that has this that I do not have installed?
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Mon Nov 22, 2004 7:30 pm    Post subject: Re: missing mimeinfo.cache Reply with quote

rogeroberholtzer wrote:
Why don't I have a mimeinfo.cache file in either the global or my user directory? There are assorted .desktop files.

BTW, I run KDE. But I have enough GNOME installed for evolution. Maybe there is some GNOME package that has this that I do not have installed?


I didn't have one either. I've created both file:
mimeinfo.cache and openoffice.desktop and copy setting from posting above to openoffice.desktop.
Back to top
View user's profile Send private message
rogeroberholtzer
n00b
n00b


Joined: 07 Jan 2003
Posts: 43
Location: Stockholm, Sweden

PostPosted: Mon Nov 22, 2004 7:55 pm    Post subject: Reply with quote

In fact, an earlier post in the thread suggested emerging desktop-file-utils, which contains the command. It makes this file. As the file can contain hundreds of lines, this is a time saver. When I first read the thread, I was not looking for that bit of info, so I passed over it...

What I am trying to sort out is where I shoud invest my time in getting mime types and applications set up. I do not want to add non-kde apps to the /usr/kde tree as that does not survive new kde versions. Is /usr/share the way to go? So that GNOME, KDE and, I would hope, most all interested apps will find mime info? I bet there is real documentation to cover this. Time to explore.
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Mon Nov 22, 2004 8:03 pm    Post subject: Reply with quote

I was under impression that only mimeinfo.cache is updated automatically, but not the xxxx.desktop files in that folder. There are there but I think KDE changed their setting somehow so after upgrade Evolution couldn't find them as for example xpdf.desktop I just copied from a different folder.
The only problem I had was with evolution attachments, but now the all work (it means I can open them directly from email).
Back to top
View user's profile Send private message
tecknojunky
Veteran
Veteran


Joined: 19 Oct 2002
Posts: 1937
Location: Montréal

PostPosted: Mon Dec 13, 2004 6:33 pm    Post subject: Reply with quote

So this serves nothing in terms of adding OpenOffice mime support. You're still requiered to create those by hand.
_________________
(7 of 9) Installing star-trek/species-8.4.7.2::talax.
Back to top
View user's profile Send private message
rogeroberholtzer
n00b
n00b


Joined: 07 Jan 2003
Posts: 43
Location: Stockholm, Sweden

PostPosted: Wed Dec 15, 2004 10:11 pm    Post subject: Really? Reply with quote

But knowing the command may save some poor soul from having to make the mimeinfo.cache file from hand. And it can be hundreds of lines. So, it is relevant info to the topic of adding mime info that describes OpenOffice files. JMHO.
Back to top
View user's profile Send private message
meowsqueak
Veteran
Veteran


Joined: 26 Aug 2003
Posts: 1549
Location: New Zealand

PostPosted: Tue Mar 01, 2005 8:10 pm    Post subject: Reply with quote

So if you're using neither Gnome nor KDE, what do you do? I'd rather change a file in ~ than in /usr/share (since a user might not have access to those files).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum