1

trying to associate .bluej files with bluej.

so i rightclick a bluej file ->properties ->open with and here is the problem. it says:

"Select an application to open "pacjage.bluej" and other files of type "plain text document""

this means that also .txt files are opened with bluej. Which of course dont work.

is there a way around this?

Jman
  • 33
  • 1
  • 1
  • 6

1 Answers1

1

You need a new mimetype for bluej files. Start a simple test to see why:

$ mimetype pacjage.bluej
pacjage.bluej: text/plain

Therefore create a new mime type

  1. Create a new configuration via

    nano ~/.local/share/mime/packages/bluej.xml

  2. Add the configuration below

    <?xml version="1.0" encoding="UTF-8"?>
    <mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
      <mime-type type="text/bluej">
        <comment>bluej file</comment>
        <glob pattern="*.bluej"/>
        <glob pattern="*.BLUEJ"/>
      </mime-type>
    </mime-info>
    
  3. Update the mime database

    update-mime-database ~/.local/share/mime
    
  4. Check the mimetype of your bluej file once again

    $ mimetype pacjage.bluej
    pacjage.bluej: text/bluej

For a system-wide configuration use the configuration file

/usr/share/mime/packages/bluej.xml

and update with

sudo update-mime-database /usr/share/mime
A.B.
  • 92,125