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

mdjd

macrumors newbie
Original poster
Feb 1, 2003
6
0
Bay Area
newbie here...

Will X11 allow me to get rid of my PC monitor (i.e. let me log into my linux box and run programs as if I was using the keyboard attached to the linux box)?

Thx.
 
Yes, you should be able to run all your Linux GUI apps remotely. I don't think you should get rid of your monitor entirely though. What happens if theres something wrong with you Linux box and you can't connect to it (like let's say you Linux box is having network issues, for example).
 
mdjd:

I've played with Apple's X11 package and it works great, I was able to export things from Linux, although certain hardware accelerated things are not going to work, like OpenGL games.

The only reason that you need a monitor or keyboard for the Linux machine is if the network dies, or you have some sort of other serious issue.
 
thanks for the replies.
so, exactly how do i run the remote linux apps? do i need to download kde for X11? or is that already included in apple's x11? so far i've only been able to find xterm.
 
Originally posted by mdjd
thanks for the replies.
so, exactly how do i run the remote linux apps? do i need to download kde for X11? or is that already included in apple's x11? so far i've only been able to find xterm.

No, you run them from your Linux machine, not your Mac. So you don't really "run" your Linux machine's X11 apps on your mac - it's more like you just display them. Basically, X11 can display the graphics for a remote program, and can also capture remote user input from a mouse or keyboard. So you have to telnet or ssh to your linux machine, then run the software from the command line. But first you have to set your DISPLAY environment variable. So let's say your Mac has an IP address of 192.168.0.100, you'd run something like this from you Linux machine:

export DISPLAY=192.168.0.100:0.0

Once you've done that you can run any software on your Linux machine and it will magically appear on your Mac OS X desktop. So if from your Linux machine you run:

emacs &

You will magically see an emacs window on your Mac! Make sense? X11 is really cool - I've been using it since I was in college more than 10 years ago. Since almost all Linux apps are implemented with X11, you should be able to display them. Also note that the reverse is true - if you run X11 enabled app from your Mac, you can display it on your Linux machine.
 
export DISPLAY=192.168.0.100:0.0
Do not set your display like this if you are using SSH, because this will cause your X11 session to go outside of the SSH channel. It will work but will not be secure. Your SSH server should set up your display variable itself. Sometimes you need to use the -X (or was that -x) when connecting from your Mac.

You also need to use the X11-packaged terminal and not the standard Apple terminal to connect.
 
whoa. i really can't get over how awesome this is. just executed startkde and it seems to work great (running on linux and displayed on the apple cinema display)!
 
Originally posted by ddtlm
Your SSH server should set up your display variable itself. Sometimes you need to use the -X (or was that -x) when connecting from your Mac.
Thanks for the tip. This worked very well (when I ssh'd with -X). Didn't even have to touch the Linux keyboard. :D
 
Yeah, ssh -X hostname
It is great. when I am on a wireless connection and I want to start up a bunch of secure terminal windows I ssh to my desktop at work and then open up some xterms, that way I don't have to open up separate ssh connections for each terminal window. Also, Mozilla on linux rocks when you open it up on your mac.

Forget KDE, stick with the apple aqua X11 window manager. It is hardware accelerated and is fully integrated with the dock.

Try that windows ;-)
 
mdjd:

Your welcome.

peterjhill:

How exactly is any of this better than what various Windows products have been able to do for the past couple years or so?
 
I have used X-win32, and it pales in comparison with running x on a mac. Not to mention that windows does not include an ssh client. I prefer running X on a unix based system. I like having all my /bin apps waiting for me to call upon them.

X-win32 does not integrate with the windows gui at all. I prefer the mac os x X11s integration with my normal operating environment. I like minimizing an app, and it shrinks to the dock.
 
Originally posted by peterjhill
I have used X-win32, and it pales in comparison with running x on a mac. Not to mention that windows does not include an ssh client. I prefer running X on a unix based system. I like having all my /bin apps waiting for me to call upon them.

A good little app for this is PuTTY
 
try eXceed sometime, thats a great app for win32, about the best program of its type I've seen

and I'm with yzedf, Putty is a fantastic telnet/ssh client :)
 
peterjhill:

I have used X-win32, and it pales in comparison with running x on a mac.
Huh? You need to elaborate on how it "pales". I have no idea how you think that.

Not to mention that windows does not include an ssh client.
Is installing one really that hard?

I prefer running X on a unix based system. I like having all my /bin apps waiting for me to call upon them.
Irrelevant for remote sessions.

X-win32 does not integrate with the windows gui at all.
The ones I've used do.

I prefer the mac os x X11s integration with my normal operating environment. I like minimizing an app, and it shrinks to the dock.
Huh? Xwin32 integrates fine into windows, it can be minimized and all that.
 
Believe me, I have used Putty, teraterm ssh, and cygwin. The fact remains, that they all run under windows. I don't want to run an OS that is not POSIX compliant. Windows is annoying. XWin32 is the best thing for running X on a PC, but it is still running on Windows. I like running my window manager on my local host, not on the remote box. Things like sawfish are nice, but they are not aqua.

It comes down to personal preference. I dealt with xwin32 for a year and ran it only when i had to. With Apples X11, I often run mozilla from my remote linux box. It starts up damn fast and runs great.

This is getting pretty offtopic now, so I will return you to your regularly scheduled thread.
 
peterjhill:

Hey I don't like windows either ;) , I just thought I should defend the facts of the matter.
 
Sorry, one of my foibles is being too defensive. Your points are excellent. Xwin32 is probably the best X server for windows. (it is a server right, aren't the client/server backwards to what you would expect) I am also not to fond of gnome, kde, twm, fvwm. They are all okay, but they are not aqua.

What I think apple should do is allow me to "open safari.app" in an ssh session, and have it open a window on my local machine. They could make it so it would only work for machines running jaguar, it seems like it would not be impossible.

Does anyone have a suggestion on where to add
xhost +host
commands so that they execute once per session. I was putting them in my .tcshrc, but I am sure you can understand why that gets annoying. I don't need it to do that every time I open a terminal window. I could make an alias for it, then I could make an alias for "ssh -X" that first executed the xhost + commands, then did the ssh -X.
 
Originally posted by peterjhill
...
Does anyone have a suggestion on where to add xhost +host commands so that they execute once per session. I was putting them in my .tcshrc, but I am sure you can understand why that gets annoying. I don't need it to do that every time I open a terminal window. I could make an alias for it, then I could make an alias for "ssh -X" that first executed the xhost + commands, then did the ssh -X.

Actually if you are using ssh to transport the X11 session, using xhost is not necessary, since the X11 display server will think the session is coming from the local machine.
 
Originally posted by peterjhill
damn, youre right! When will MS incorporate ssh into their command shell? Is it there yet?
For a real good (add free) set of ssh utilities for Windows, check out PuTTY by Simon Tathal.

The programs have a small memory footprint and work well. I suspect anything MS could come up with would be overblown, use excessive memory and rather buggy.
 
Originally posted by Bear

For a real good (add free) set of ssh utilities for Windows, check out PuTTY by Simon Tathal.

The programs have a small memory footprint and work well. I suspect anything MS could come up with would be overblown, use excessive memory and rather buggy.

I like teraterm ssh better, but putty is good. I would like to sshd included with windows. Have it right on the command line. I don't need fancy windows for a terminal app.
 
Originally posted by peterjhill


I like teraterm ssh better, but putty is good. I would like to sshd included with windows. Have it right on the command line. I don't need fancy windows for a terminal app.
PuTTY has a command line version available I think it is called something like PuttyTel.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.