Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

plamadude30k

macrumors newbie
Original poster
May 6, 2008
3
0
In terminals, I'm used to the linux convention of being able to run several windows at once in the background. When I try this on x11 in leopard, nothing happens. I'm relatively experienced with the unix environment/x11 programming, but modding things about the environment itself is my biggest weakness.
In case you don't know what I'm talking about, here's an example:

I'm used to typing:

~> emacs/pico/vim/(insert favorite editor here) [filename] &

and the editor opens the file in a separate window from my terminal, leaving me free to do things in the terminal, and edit the file. In OS X, I haven't gotten this to work. When I try this, all I get is:

~> emacs [filename] &
[1] 11484 (sometimes different numbers)
~>

and nothing else comes up on the screen. I know that there's a way around this and that it's probably stupidly simple, but I haven't figured it out on my own. In any replies, please be specific exactly what steps I should take to ameliorate this problem (e.g. say "edit the .bashrc file in your home directory to say xxxxxx after such and such line" instead of "add xxx to your bash file." Trust me, if I can, I will screw it up, and probably have).
Thanks
 

Trip.Tucker

Guest
Mar 13, 2008
946
1
I'm confused. What are you expecting to see? You are being returned to the prompt. The process has spawned. What is the issue?
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
This would work fine if what you were launching spawned its own windows. gvim, xclock, stuff like that.

If you run a command line app from a terminal, but put it in the background, it will stay there. I'm not familiar with a system by which the shell will launch a new xterm/aterm/etc. window and run the process you told it to background there in the foreground instead.

You can manually run new xterms (X11 starts one automatically) by typing:
xterm &
at the prompt, or just
cmd+N

Then in the new window you could invoke your editor (NOT in the background though, leave off the &).

-Lee
 

plamadude30k

macrumors newbie
Original poster
May 6, 2008
3
0
well, the issue is that I'm returned to the prompt, but it seems that no process has been spawned. The prompt is still there, but no extra windows pop up with the editor/document.
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
well, the issue is that I'm returned to the prompt, but it seems that no process has been spawned. The prompt is still there, but no extra windows pop up with the editor/document.

You would need to be opening something that is graphical, which does start its own window. pico, emacs, vim, etc. are not graphical. They are command line tools. They do not open their own windows. They display in the terminal they are run from.

emacs-X11 or gvim are examples of graphical editors which will open their own windows, so they would be appropriate to invoke in the manner you describe. Command line apps like emacs, vim, or gcc (for another example) should be run from the terminal you wish for them to use for display. As I mentioned above, there are means to get new xterms open to use if you like.

-Lee

P.S. The process HAS been spawned, but it is in the background. If you run:
fg
they will be brought to the foreground in that xterm.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.