I created a video tutorial on how to add a new mime type in Ubuntu. The reason for this is that we want pb files to open in PureBasic. We can get this easily by right clicking on a pb file setting the open with application, however, this affects other plain text files as well. To prevent this we create a separate mime type for pb files. Now, plain text and .pb files will be separate in Nautilus.
http://www.youtube.com/watch?v=1olY5Qzmbk8
YT: Open pb files in PB without affecting plain text files
Re: YT: Open pb files in PB without affecting plain text fil
This should get a sticky!
Best wishes to the PB community. Thank you for the memories. 
-
- Addict
- Posts: 4789
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: YT: Open pb files in PB without affecting plain text fil
For exactly the same reason, learning how to create a MIME type for PureBasic on Ubuntu was on my ToDo list. Your video is very helpful, thanks a lot!
Regards, Little John
Regards, Little John
Re: YT: Open pb files in PB without affecting plain text fil
So that it is complete: type in a terminal:
greetings
Thomas
paste the following in the editor:sudo gedit /usr/share/applications/purebasic.desktop
replace the name thomas with your name :roll: and save itpurebasic.desktop wrote:[Desktop Entry]
Version=1.0
Type=Application
Encoding=UTF-8
Name=PureBasic
Name[de]=PureBasic
Comment=
Comment[de]=
GenericName=IDE
GenericName[de]=IDE
Exec=/home/thomas/purebasic/compilers/purebasic %f
Icon=/home/thomas/purebasic/logo.png
StartupNotify=true
Terminal=false
MimeType=text/purebasic
Categories=GTK;GNOME;Application;Development;
greetings
Thomas
Re: YT: Open pb files in PB without affecting plain text fil
Nice.
Thanks for that.
Thanks for that.
I may look like a mule, but I'm not a complete ass.
Re: YT: Open pb files in PB without affecting plain text fil
The purebasic.desktop is to register PB as application:

and make a entry in menu of ubuntu.
The best is to make first my tip and then the tip by trond to work!

and make a entry in menu of ubuntu.
The best is to make first my tip and then the tip by trond to work!
Re: YT: Open pb files in PB without affecting plain text fil
That is a good tip.The purebasic.desktop is to register PB as application:
