LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-18-2007, 03:17 PM   #1
1veedo
Member
 
Registered: Dec 2004
Location: WV, USA
Distribution: Gentoo, Debian
Posts: 186

Rep: Reputation: 34
ssh -x on a mac osx to a Linux computer


Macs are mostly unix I assume. I can ssh into my computer from a mac computer but when I use the -x tag I cant run graphical programs. The problem on Linux is solved with xhost + but I cant figure out how to configure this for macs.

I found this website,
http://developer.apple.com/opensourc...unningx11.html

I did "Enabling Network Connections in X11" but couldn't find X11 preferences. You don't need X11 preferences though. The next section (an alternative method) says to use xhost but xhost isn't on the computer I'm using.

Last edited by 1veedo; 09-18-2007 at 03:20 PM.
 
Old 09-18-2007, 04:37 PM   #2
otoomet
Member
 
Registered: Oct 2004
Location: Tartu, Århus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 619

Rep: Reputation: 45
ssh -X enables X forwarding.
ssh -x disables it (default on many systems).
Do you have X11 server installed and running on your mac?

best,
Ott
 
Old 09-18-2007, 09:27 PM   #3
1veedo
Member
 
Registered: Dec 2004
Location: WV, USA
Distribution: Gentoo, Debian
Posts: 186

Original Poster
Rep: Reputation: 34
I thought macs ran the x server by default? The mac(s) that I'm using aren't mine; they're university computers but I want to ssh -X from them to my computer.

Btw I'm pretty sure I actually was using lower case x so I'll see what's up tomorrow.
 
Old 09-19-2007, 08:38 AM   #4
trashbird1240
Member
 
Registered: Sep 2006
Location: Durham, NC
Distribution: Slackware, Ubuntu (yes, both)
Posts: 463

Rep: Reputation: 31
When I ssh'd from a colleague's Mac, I was surprised to find X
forwarding already working with just a straight ssh command, no
options.

Joel
 
Old 09-19-2007, 08:49 AM   #5
otoomet
Member
 
Registered: Oct 2004
Location: Tartu, Århus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 619

Rep: Reputation: 45
It is determined in /etc/ssh/ssh_config (ubuntu gutsy). You can probably create you personal config file too.

Mac and X server -- I don't know. I have heard that OSX has this option, but whether it is installed by default, no idea. But is should be trivial to set it up if it isn't yet.

Best,
Ott
 
Old 09-19-2007, 09:25 AM   #6
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
So you want to ssh from the mac to your own Linux, and have some graphical apps you launch over the ssh connection pop up in your Mac?

Yes, Macs are indeed somewhat "Unix machines"..I do use Macs occasionally, but never X11 forwarding on them. Nevertheless, here's how the procedure usually goes (note that the Linux machine, sshd server, needs to have an X server up and running):

1) in your Linux machine make sure sshd is running (so you can ssh to it). Make sure that /etc/ssh/sshd_config has
Code:
X11Forwarding yes
That line must be uncommented (if it is commented, like it usually is by default) and the possible 'no' changed to 'yes'. After this sshd needs to be restarted. Something like
Code:
/etc/init.d/sshd restart
depending on the Linux distribution.

2) Now that the ssh server lets you use X11 forwarding, connect to it and tell the client to enable X11 forwarding also. Some clients may have X11 forwarding enabled by default, others maybe not. Make sure you're using the right options; on the ssh that's used on Linux operating systems, it's (with capital X)
Code:
ssh -X username@machine.ip.address.here
after this try running a simple app:
Code:
xclock
if an ugly clock pops up on your Mac, it's working -- if not, then you need to go trough the configurations once more (check that your client really enabled X11 forwarding, and that your server lets you use it). Some security configurations may restrict access to X server (but in that case it's up to you to make enough holes to the rules to let you use it), but on normal installations that's not the case. You can probably try to read
Code:
man ssh
on your Mac to see if it's got some information about what ssh program it's using and if it's the -X option (in capitals) that enables X11 forwarding. You could also first test the X11 forwarding with a Windows machine using PuTTY (it's settings have a checkbox to enable X11 forwarding) or just another Linux machine (with ssh -X). If you get it working from a Windows/Linux machine first, then you'll know it's the Mac - or if no machine works, you know it's not necessarily the Mac that's doing nasty things

Last edited by b0uncer; 09-19-2007 at 09:27 AM.
 
Old 09-19-2007, 05:22 PM   #7
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Manjaro
Posts: 963

Rep: Reputation: 36
AFAIK macs do not normally run an X11 server as they use their own propiraty windowing system however tehyu can run an X11 server in the background to run X programes,

(its in tehre somwhere in system prefs)
my housemate had KDE running fine on his mac!
(was trying to get beryl working too!)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mac OSX-Like Linux? Launchpad_72 Linux - Newbie 30 02-12-2018 08:32 AM
Mac Osx Dock On Linux?? dj9928 Linux - Software 9 05-11-2008 04:04 AM
Running MAC OSX apps on Linux Deelk Linux - General 5 05-08-2006 08:04 AM
mac osx app on linux? slinky2004 Linux - Software 5 02-07-2006 01:47 AM
Mac Osx Like Linux For Newbie ?? my-unix-dream Linux - Newbie 2 04-17-2005 03:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration