How can I get emacs -nw when I call emacs from a terminal but GUI emacs elsewhere?
Title says pretty much everything. When I call emacs from the terminal, I want to have the terminal-based version of emacs, not have a separate window with the GUI version. However, if I call it using Gnome Do, or from the applications menu, I want to have the GUI version.
Could anyone help me? Thanks in advance EDIT: Another doubt: Is there any difference between typing 'sudo bash' or 'su'? Cheers |
Let me try.
In your ~/.bash_profile put this line Quote:
Quote:
|
I don't have a .bash_profile in my home folder...
As a simple temporary solution I have made a simple script and put it in the /usr/local/sbin folder, the first in the $PATH variable. #!/bin/bash /usr/bin/emacs -nw It works if I just call emacs, but I can't pass any arguments (most importantly the filename). |
Let me try again:
Quote:
|
Thank you for the suggestion, I read the .bashrc file and figured out what to do. I created a .bash_aliases file, as suggested, and put the "alias emacs='emacs -nw'" line on it. It now works perfectly, if I call it from the terminal I get the terminal version and if I call it from pretty much everywhere else, I get the GUI version.
|
All times are GMT -5. The time now is 12:17 PM. |