I installed Ubuntu 12.04, with texlive-full and texworks. When I double-click a .tex file in Nautilus, it pops up a

Do you want to run "xxxxxxxx.tex", or display it contents?

"xxxxxxxx.tex" is an executable text file.

Run in Terminal     Display       Cancel        Run

If I choose Display, it opens texworks. How can I make it open without seeing the above conversation window?

By the way, is .tex file indeed an executable file?

ADDED Just for the case, my ~/.local/share/applications/mimeapps.list file looks like the following:

[Default Applications]

[Added Associations]

I observe texworks are both up and down. Should I remove one?


This does not happen with all .tex files. In fact, I am currently using Ubuntu 12.04 under Virtual Box with Windows 7 host. I have my Dropbox account synced with the Windows 7 host, and I access files in Dropbox in Ubuntu through Virtual Box's shared folder functionality. (I didn't install Dropbox client in Ubuntu.)

Files in Dropbox are owned by root with group vboxsf. My personal account is in the group vboxsf.

It seems that I have to uncheck the option for "executable", but I have all my .tex files in the Dropbox shared folder. Would there be any workaround?

  • I don't think so, I have an entry in both spots. Just to clarify, this is happening with all .tex files? What program are you creating them in? – jpetersen Jun 13 '12 at 3:21

Uncheck execute permission from .tex file properties, mentioned conversation window won't come again.

You can also change this behaviour globally by opening nautilus (file manager) and go to menu EDIT > PREFERENCES > BEHAVIOUR and under "Executable Text Files" check option "view executable text files when they are opened".

  • I added more details regarding the issue with Dropbox and Virtual Box – Chang Jun 13 '12 at 3:45
  • I have edited my answer according to details you've added. – Umair A. Shahid Jun 13 '12 at 4:02

Right click the .tex file, and choose properties. In the dialog box that opens go to the Open With tab and select texworks as the Default Application.

No .tex is not an executable file, its a type of text file.

How to set default program? Has some more methods, such as Ubuntu Tweak.


Any text file can be considered executable if executable permissions are set. Try removing execute permissions in properties.

This would fix one file although if all your .tex files are doing this then they are being created with the wrong permissions for some reason.

  • texworks is already the default application. I will try Ubuntu Tweak. .... texworks is also the default application seen in Ubuntu Tweak. – Chang Jun 13 '12 at 3:00

I found this workaround:

HowTo Remove Executable Flag from Files in Virtual Box Shared Folder on Linux Guest


However, Umair's answer worked enough for me.

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