LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   export display from MAC (http://www.linuxquestions.org/questions/linux-newbie-8/export-display-from-mac-879279/)

sanjiv 05-06-2011 09:43 PM

export display from MAC
 
Hi,
I am trying to run matlab on a remote mac through my laptop at home, which is a linux-based. I am not able to export the display. Here are the steps I followed.

1. xhost +remotehost
2. Log into remotehost (i.e., the mac machine)
3. export DISPLAY="192.168.2.2:0.0"
4. matlab

But I get the following message,

"unable to open display 192.168.2.2:0.0"

The reason I typed in that ip address in step 3 was that is the ip listed in the "wlan0" block when I typed "ifconfig -a" on my local linux laptop.

Your help is appreciated, Thanks.

corp769 05-06-2011 11:31 PM

Hello,

Could you give us the full output of ifconfig -a from your machine? Also, could you verify that you are using your wireless interface instead of eth0 or such?

Cheers,

Josh

sanjiv 05-07-2011 10:44 AM

Quote:

Originally Posted by corp769 (Post 4348920)
Hello,

Could you give us the full output of ifconfig -a from your machine? Also, could you verify that you are using your wireless interface instead of eth0 or such?

Cheers,

Josh

Josh, thanks for your reply. I believe I am using my wireless interface as I am not connected via an ethernet cable, if that is what you asked. I am pasting below the output from "ifconfig -a" :

Code:

eth1      Link encap:Ethernet  HWaddr 00:15:58:84:FF:A7 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Base address:0x1840 Memory:fe000000-fe020000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:9616 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9616 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:75327688 (71.8 MiB)  TX bytes:75327688 (71.8 MiB)

wlan0    Link encap:Ethernet  HWaddr 00:13:E8:52:C2:4F 
          inet addr:192.168.2.2  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::213:e8ff:fe52:c24f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:11516 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12062 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9828980 (9.3 MiB)  TX bytes:2177107 (2.0 MiB)

wmaster0  Link encap:UNSPEC  HWaddr 00-13-E8-52-C2-4F-00-00-00-00-00-00-00-00-00-00 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


TB0ne 05-07-2011 11:05 AM

Quote:

Originally Posted by sanjiv (Post 4348872)
Hi,
I am trying to run matlab on a remote mac through my laptop at home, which is a linux-based. I am not able to export the display. Here are the steps I followed.

1. xhost +remotehost
2. Log into remotehost (i.e., the mac machine)
3. export DISPLAY="192.168.2.2:0.0"
4. matlab

But I get the following message, "unable to open display 192.168.2.2:0.0"

The reason I typed in that ip address in step 3 was that is the ip listed in the "wlan0" block when I typed "ifconfig -a" on my local linux laptop.
Your help is appreciated, Thanks.

On your local Linux system, type in "ps -ef | grep -i listen". If you see something like this:
Code:

/usr/bin/Xorg -br :0 vt7 -nolisten tcp -auth /var/lib/xdm/authdir/authfiles/xxxxxx
then your local Linux system isn't accepting incoming connections. No matter what you type, it won't work, and will be rejected. Since all you've told us is "Linux based", you'll have to specify your distro/version, before we can help getting it TO listen. It's usually a well documented thing, though, and easily found via Google, or you can tell us here, and we can try to help.

sanjiv 05-07-2011 01:02 PM

Quote:

Originally Posted by TB0ne (Post 4349266)
On your local Linux system, type in "ps -ef | grep -i listen". If you see something like this:
Code:

/usr/bin/Xorg -br :0 vt7 -nolisten tcp -auth /var/lib/xdm/authdir/authfiles/xxxxxx
then your local Linux system isn't accepting incoming connections. No matter what you type, it won't work, and will be rejected. Since all you've told us is "Linux based", you'll have to specify your distro/version, before we can help getting it TO listen. It's usually a well documented thing, though, and easily found via Google, or you can tell us here, and we can try to help.

Output from "ps -ef|grep -i listen" :

Code:

68        2230  2219  0 09:53 ?        00:00:00 hald-addon-keyboard: listening on /dev/input/event1
68        2231  2219  0 09:53 ?        00:00:00 hald-addon-keyboard: listening on /dev/input/event4
68        2234  2219  0 09:53 ?        00:00:00 hald-addon-keyboard: listening on /dev/input/event5
68        2236  2219  0 09:53 ?        00:00:00 hald-addon-keyboard: listening on /dev/input/event6
68        2257  2219  0 09:53 ?        00:00:00 hald-addon-acpi: listening on acpi kernel interface /proc/acpi/event
root      2442  2438  0 09:53 tty7    00:01:39 /usr/bin/Xorg :0 -br -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7

I tried remote logging into a different machine (a linux machine) and I am able to export display from that machine (view pdf files, etc.) onto my laptop. It is the mac which is giving me problems.

My linux laptop runs on Fedora 7.

arizonagroovejet 05-07-2011 03:19 PM

Perhaps your problem is that the MAC OS X version of Matlab is not built to display it's GUI in X Windows and more generally, that Mac OS X has no X display for you access. Mac OS X does not use X. (Though is does ship with an X implementation, which allows you to ssh in to a Linux box with X forwarding enabled so you can run GUI applications on the Linux machine.)

TB0ne 05-07-2011 03:45 PM

Quote:

Originally Posted by sanjiv (Post 4349348)
Output from "ps -ef|grep -i listen" :

Code:


root      2442  2438  0 09:53 tty7    00:01:39 /usr/bin/Xorg :0 -br -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7

I tried remote logging into a different machine (a linux machine) and I am able to export display from that machine (view pdf files, etc.) onto my laptop. It is the mac which is giving me problems.

My linux laptop runs on Fedora 7.

While I don't doubt you...I've never seen such behavior.

The "-nolisten" will deny ANY requests made to the X server. Unless you remove it, I'd strongly doubt it would work, no matter what you connect to. Fedora 7 is VERY old...the latest is 14. Upgrading wouldn't be a bad idea, when you can. To get the "-nolisten" to go away, edit /etc/gdm/custom.conf, and add DisallowTCP=false to make gdm listen. If you've got iptables running/firewall in place, and you haven't explicitly unblocked port 6000 in iptables, then it's almost certainly blocked. Edit /etc/sysconfig/iptables and add this line immediately before the line that contains --reject-with icmp-host-prohibited.
Code:

-A  RH-Firewall-1-INPUT -p tcp -m tcp --dport 6000 -j ACCEPT


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