Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3360104
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:57:10+00:00 2026-05-18T02:57:10+00:00

I am switching to GNU emacs for my python and bash scripting. I really

  • 0

I am switching to GNU emacs for my python and bash scripting. I really enjoy this, but I don’t like the X-window portion of emacs. As such, I always use emacs -nw <my_file> to edit my files. However, when I associate my .py and .sh files with emacs, I end up opening emacs in X-window mode when I double-click on them from gnome-nautilus (Ubuntu 10.10).

What I would like to know is: What should I add to my .emacs file in order to use emacs without X-window when I double click on my files? Note: I do want emacs to open a terminal, possibly resize it according to my specifications (already have a .sh script for that), launch itself and open my file.

How should I accomplish that?

Cheers!

EDIT: Thanks for all the answers! I have to give the check to the most complete one, although of course it builds on the preceding ones.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T02:57:11+00:00Added an answer on May 18, 2026 at 2:57 am

    Building on Gareth’s answer:

    To open a file in an existing emacs session if one is running, but open a new one in a terminal if there isn’t one, you can do the following:

    1. Add (server-start) to your .emacs
    2. Create a script run_emacs with the following contents:

      #!/bin/bash
      gnome-terminal -e "emacs -nw $@"
      

      and make it executable.

    3. Set your application to open python and bash files to be emacsclient -a /path/to/run_emacs %F (if you place run_emacs somewhere in your $PATH, you can leave out the /path/to/ bit).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've long been a fan of GNU Emacs' file navigation model. I've been switching
I'm switching my old Dialogs to DialogFragment, but the themes and styles don't seem
Does switching activities in Android start a fresh JVM? It seems like each activity
I am switching from the Django development server to Apache for production. To this
Is it possible to do something like this: #define F(x) \ #ifdef DOUBLE \
After switching to window 7, I can no longer use the external debugger with
I'm considering switching to from PC to Mac but I do Android development. I've
I'm in the process of switching from multiple tabs in iTerm to one GNU
When I debug an app on a device I get this: GNU gdb 6.3.50-20050815
Whenever I build+run my program, it displays all this extra stuff: GNU gdb 6.3.50-20050815

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.