Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

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?

share|improve this question
    
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
    
@JPbuntu I added more details. Thanks! –  FEQ Jun 13 '12 at 3:44
add comment

marked as duplicate by minerz029, Eric Carvalho, BuZZ-dEE, Warren Hill, mikewhatever Jan 29 at 20:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3 Answers

up vote 4 down vote accepted

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

share|improve this answer
    
I added more details regarding the issue with Dropbox and Virtual Box –  FEQ 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
    
It works good! Thanks. –  FEQ Jun 13 '12 at 4:16
add comment

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.

share|improve this answer
    
texworks is already the default application. I will try Ubuntu Tweak. .... texworks is also the default application seen in Ubuntu Tweak. –  FEQ Jun 13 '12 at 3:00
add comment

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.

share|improve this answer
add comment

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