2

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]
text/html=google-chrome.desktop
x-scheme-handler/http=google-chrome.desktop
x-scheme-handler/https=google-chrome.desktop
x-scheme-handler/about=google-chrome.desktop
x-scheme-handler/unknown=google-chrome.desktop
text/x-tex=texworks.desktop
x-scheme-handler/mailto=google-chrome.desktop

[Added Associations]
text/x-tex=texworks.desktop;
text/x-bibtex=jabref.desktop;gedit.desktop;

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


ADDED

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?

1
  • 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, 2012 at 3:21

3 Answers 3

5

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".

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

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.

EDIT:

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.

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

I found this workaround:

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

http://polach.cc/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 .