I am trying to set meshlab as the default application to open .obj files.

I attempted (as mentioned in here) right click a random obj file -> properties -> Open With -> there is no meshlab to choose from and there is no way I can add meshlab into it.

The weird thing is when I do the same step for .ply file, there actually is an option to choose meshlab to set as the default application.

Now I need to open meshlab first, and drag the obj file in it, which is a lot more hassle than just double clicking the obj file to open it.

What should I do so I can open .obj files with meshlab by default?

  • I think that question you linked has the solution: Install Ubuntu-Tweak, go to Admins, click on File Type Manager, change the default application for .obj files. – wjandrea Sep 7 '16 at 22:26
  • @wjandrea I tried, but there is no file type called OBJ that I can change. – user3667089 Sep 7 '16 at 22:33
  • I think you'll need to create a MIME type, then set the file association. From a quick Google, here's method 1, and method 2 part 1 and part 2. – wjandrea Sep 8 '16 at 16:18
  • 1
    @wjandrea Thanks the third link solves it for me. If you write up an answer I will accept it. – user3667089 Sep 9 '16 at 19:13

First, run mimetype on your file to get the mimetype as follows:

$ mimetype bunny.obj 
bunny.obj: application/x-tgif

Once you've determined the corresponding mimetype, add your application as the default in /usr/share/applications/defaults.list:

$ sudo su
$ echo "application/x-tgif=meshlab.desktop" >> /usr/share/applications/defaults.list

It's important to use two > symbols in the command above, not one. Consider making a backup of /usr/share/applications/defaults.list beforehand as well.

|improve this answer|||||
  • Works perfectly! – user3667089 Jun 28 '18 at 19:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.