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

Linux specific forum
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

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

Post 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
User avatar
Kuron
Addict
Addict
Posts: 1387
Joined: Sat Oct 17, 2009 10:51 pm
Location: Nashville

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

Post by Kuron »

This should get a sticky!
Little John
Addict
Addict
Posts: 3976
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

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

Post 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
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups
User avatar
ts-soft
Always Here
Always Here
Posts: 5758
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

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

Post 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
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

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

Post by srod »

Nice.

Thanks for that.
I may look like a mule, but I'm not a complete ass.
User avatar
ts-soft
Always Here
Always Here
Posts: 5758
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

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

Post 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!
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

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

Post by Trond »

The purebasic.desktop is to register PB as application:
That is a good tip. :)
Post Reply