Discussion:
Getting rid of "Cannot open display" message
(too old to reply)
Amit Dor-Shifer
2009-05-05 16:08:56 UTC
Permalink
Hi all.

I'm using ssh to execute a command on a server. When the remote server
has an X server running, I get a/m message written to standard error.

amit0 ~ # ssh localhost echo bla
Cannot open display "default display"
Cannot open display "default display"
bla

Appending the '-x' parameter, as suggested, doesn't seem to help:

amit0 ~ # ssh -x localhost echo bla
Cannot open display "default display"
Cannot open display "default display"
bla


I want to disable whatever's causing this message. I don't need X
running over the connection.

How do I get rid of this message?

ssh version:
amit0 ~ # ssh -V
OpenSSH_5.2p1, OpenSSL 0.9.8k 25 Mar 2009

10x,
Amit
Weeden Jr, Robert(GE Infra, Aviation, US)
2009-05-05 17:49:16 UTC
Permalink
"-X" capitalize it.

-----Original Message-----
From: ***@securityfocus.com [mailto:***@securityfocus.com]
On Behalf Of Amit Dor-Shifer
Sent: Tuesday, May 05, 2009 1:56 AM
To: ***@securityfocus.com
Subject: Getting rid of "Cannot open display" message

Hi all.

I'm using ssh to execute a command on a server. When the remote server
has an X server running, I get a/m message written to standard error.

amit0 ~ # ssh localhost echo bla
Cannot open display "default display"
Cannot open display "default display"
bla

Appending the '-x' parameter, as suggested, doesn't seem to help:

amit0 ~ # ssh -x localhost echo bla
Cannot open display "default display"
Cannot open display "default display"
bla


I want to disable whatever's causing this message. I don't need X
running over the connection.=20

How do I get rid of this message?

ssh version:
amit0 ~ # ssh -V
OpenSSH_5.2p1, OpenSSL 0.9.8k 25 Mar 2009

10x,
Amit
Robert Hajime Lanning
2009-05-05 17:53:22 UTC
Permalink
look into your ~/.profile and /etc/profile.
You might be running an X client.
Post by Amit Dor-Shifer
Hi all.
I'm using ssh to execute a command on a server. When the remote server
has an X server running, I get a/m message written to standard error.
amit0 ~ # ssh localhost echo bla
Cannot open display "default display"
Cannot open display "default display"
bla
amit0 ~ # ssh -x localhost echo bla
Cannot open display "default display"
Cannot open display "default display"
bla
I want to disable whatever's causing this message. I don't need X
running over the connection.
How do I get rid of this message?
amit0 ~ # ssh -V
OpenSSH_5.2p1, OpenSSL 0.9.8k 25 Mar 2009
10x,
Amit
--
And, did Galoka think the Ulus were too ugly to save?
-Centauri
Dan Nelson
2009-05-05 17:55:58 UTC
Permalink
Post by Amit Dor-Shifer
Hi all.
I'm using ssh to execute a command on a server. When the remote server
has an X server running, I get a/m message written to standard error.
amit0 ~ # ssh localhost echo bla
Cannot open display "default display"
Cannot open display "default display"
bla
amit0 ~ # ssh -x localhost echo bla
Cannot open display "default display"
Cannot open display "default display"
bla
You must have something in one of your shell's startup scripts that is
trying to access an X display. Adding a "set -x" at the top of your scripts
will force each line to be printed as it is run, which should help you track
down the offending commands.
--
Dan Nelson
***@allantgroup.com
Loading...