Page 1 of 1

YT: Open pb files in PB without affecting plain text files

Posted: Thu Sep 09, 2010 9:33 pm
by Trond
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

Re: YT: Open pb files in PB without affecting plain text fil

Posted: Fri Sep 10, 2010 6:06 am
by Kuron
This should get a sticky!

Re: YT: Open pb files in PB without affecting plain text fil

Posted: Fri Sep 10, 2010 11:16 am
by Little John
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

Re: YT: Open pb files in PB without affecting plain text fil

Posted: Fri Sep 10, 2010 3:37 pm
by ts-soft
So that it is complete: type in a terminal:
sudo gedit /usr/share/applications/purebasic.desktop
paste the following in the editor:
purebasic.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;
replace the name thomas with your name :roll: and save it

greetings
Thomas

Re: YT: Open pb files in PB without affecting plain text fil

Posted: Fri Sep 10, 2010 6:32 pm
by srod
Nice.

Thanks for that.

Re: YT: Open pb files in PB without affecting plain text fil

Posted: Fri Sep 10, 2010 8:26 pm
by ts-soft
The purebasic.desktop is to register PB as application:
Image

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

Posted: Fri Sep 10, 2010 8:45 pm
by Trond
The purebasic.desktop is to register PB as application:
That is a good tip. :)