Code::Blocks
July 29, 2010, 06:07:51 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Code::Blocks Logo Elections closed! And the winner is... otaco!
 
   Home   Help Search Login Register  :: WebsiteWiki  
Pages: [1]
  Send this topic  |  Print  
Author Topic: BUG: [Linux/GNOME] "Cannot open os.cbp"  (Read 523 times)
Urxae
Regular
***
Posts: 377



« on: December 29, 2006, 09:22:56 pm »

[Berlios seems to be down (except for the svn subdomain) so I'm posting it here]

If I double-click a .cbp file in Nautilus, I get the following message:
Quote
Cannot open os.cbp

The filename "os.cbp" indicates that this file is of type "Code::Blocks Project". The contents of the file indicate that the file is of type "XML document". If you open this file, the file might present a security risk to your system.

Do not open the file unless you created the file yourself, or received the file from a trusted source. To open the file, rename the file to the correct extension for "XML document", then open the file normally. Alternatively, use the Open With menu to choose a specific application for the file.

So basically it's refusing to let Code::Blocks open a .cbp file because it's also an XML file.  Sad

Fortunately, the fix is pretty simple. Apply this patch to trunk/src/setup/mime/codeblocks.xml:
Code:
--- codeblocks.xml.old 2006-12-29 20:24:53.000000000 +0100
+++ /usr/share/mime/packages/codeblocks.xml 2006-12-29 20:23:43.000000000 +0100
@@ -3,9 +3,11 @@
   <mime-type type="application/x-codeblocks">
     <comment>Code::Blocks Project</comment>
     <glob pattern="*.cbp"/>
+    <sub-class-of type="application/xml"/>
   </mime-type>
   <mime-type type="application/x-codeblocks-workspace">
     <comment>Code::Blocks Workspace</comment>
     <glob pattern="*.workspace"/>
+    <sub-class-of type="application/xml"/>
   </mime-type>
 </mime-info>

(And then
Code:
sudo update-mime-database /usr/share/mime && killall nautilus
to make sure it's using the new data, if you want to use it right away)

I'm using "svn build rev 3357 (2006-12-07 14:24:20) gcc 4.1.2 Linux/unicode" (Specifically, the Ubuntu Edgy build posted in this thread, IIRC)
I know this is a bit old, but it looks like the relevant file in SVN hasn't been touched since February, so I'm pretty sure this hasn't been fixed yet...
Logged
mandrav
Project Leader
Administrator
Lives here!
*****
Posts: 4253



WWW
« Reply #1 on: December 29, 2006, 10:38:50 pm »

Thanks for the tip Urxae Smile
(and welcome back - we haven't seen you around for almost a year Wink).
Logged

Be patient!
This bug will be fixed soon...
killerbot
Global Moderator
Lives here!
*****
Posts: 3883


« Reply #2 on: December 29, 2006, 11:29:52 pm »

committed this change, thanks
Logged
Urxae
Regular
***
Posts: 377



« Reply #3 on: December 30, 2006, 12:12:01 am »

Thanks for the tip Urxae Smile
(and welcome back - we haven't seen you around for almost a year Wink).

And you still remember me? Razz (Has it really been that long? Yep, Jan 25)

I still use C::B (I've added the nightlies RSS feed to Thunderbird). But I've since switched from C++ to D, so now it hurts to look at C++ code Razz.

committed this change, thanks

Just as fast as I remember Smile.

Though having the solution gift-wrapped probably made a difference in that department Laughing
Logged
Pages: [1]
  Send this topic  |  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!