LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Sneaking an application under X11 (https://www.linuxquestions.org/questions/linux-software-2/sneaking-an-application-under-x11-445152/)

kav 05-15-2006 07:21 PM

Sneaking an application under X11
 
There are certain programs that behave very differently when run from the console and a terminal within X. For this example I'll use the most obvious, emacs. Everyone probably knows what emacs looks like from the console so I won't waste your time, but when run from a terminal in X I get a whole new window with a graphical interface on a white background(yuck). Now I'm not saying that's bad, some people who use this computer dont want me changing their stuff.

What I want to know is how do I trick an application into running like it's only in a console and not run like it usually does when run in a window manager. I'm looking for a non emacs specific answer because I would like to know how to do this for other programs too.

I'm running Debian unstable x86 with fluxbox as the window manager with eterm terminals in case the answer would be specific to any part of my environment. This has been bugging me for a while and I haven't found so much as a clue as to how to do it and any insight would be appreciated.

ataraxia 05-15-2006 09:35 PM

Unset the DISPLAY environment variable from the terminal you want to run the app from.

Many such apps provide a switch for this behavior anyway (for Emacs, it's -nox).

kav 05-15-2006 11:03 PM

That is exactly what I wanted to know, thank you. How do I reset DISPLAY without opening up another terminal?
# DISPLAY=:0.0 didn't do it.

cs-cam 05-16-2006 02:32 AM

Code:

DISPLAY=false emacs
Maybe?

Hosiah 05-20-2006 11:04 AM

"emacs -nw" will start Emacs in a terminal and it will behave in your terminal just like it was running in a console. Screen shot here. (In a post I *desperately* need to re-do...)

As for "non-Emacs-specific", I don't know, but there aren't any programs that I can think of *besides* Emacs that have different flavors for terminal and X11. The Emacs that you're getting in X11 is in reality "XEmacs".


All times are GMT -5. The time now is 03:13 AM.