Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just tried to deactivate the VGA connection on my laptop remotely and received this result:
Code:
$ export DISPLAY=:0
$ xrandr
No protocol specified
Can't open display :0
$
I'm nearly certain I was able to use xrandr through ssh at some point in the past, but my memory of the exact time line is inadequate. It seems that what I attempted should be possible, does anyone know how to accomplish this? Searching the internet I found the procedure which I expected to work, the one which just failed for me.
I'm not sure what you have demonstrated. I only have one display per host. I can only access the client display by prefixing it with localhost, as in "localhost:12.0".
Code:
xrandr -display :0.0
is the equivalent of
Code:
export DISPLAY=:0.0
xrandr
could you please clarify how you have a display :0.0 and a display of :10.0?
To clarify, I'm not using the laptop in the traditional manner. My desktop is the ssh client, the laptop is serving as a display only with no keyboard or mouse, hence the need to manipulate things remotely.
I feel the "No protocol specified" is the important bit of information, but I don't understand what it means.
Last edited by UnknownUser; 03-17-2011 at 01:38 AM.
The ssh server creates a proxy for X11 connections. This proxy will had a DISPLAY of either :10.0 or :11.0.
For example, my laptop is named qosmio. My desktop is named elite. When I'm at my laptop and enter: "ssh -X elite konsole", a konsole shell is displayed on my laptop. It is running on my desktop (ssh server) and displayed on my laptop (ssh client).
Entering "echo $DISPLAY"
localhost:11.0
The program, konsole, is using localhost:11.0 for the display. The ssh server setup a proxy for my laptop's display on the desktop. It uses a different display.
Now if I enter in the ssh remote terminal:
mplayer video.mpg
the video will display on my laptop. (note: not the audio however)
If I run instead "mplayer -display :0.0 video.mpg" it will be displayed on my desktop's screen.
You are logging remotely into a laptop. The :0.0 display will refer to the laptop's first display. For a dual head interface the VGA port may be the localhost:0.1 display.
After logging in, enter:
xrandr -q :0.0
to display info on the LCD screen.
xrandr -q :0.1
to display info on the VGA screen. I'm not certain if a monitor needs to be connected. If not, a screen may not be setup for it.
If you use
xrandr -display :0.1 --prop
you may be able to see info on the VGA display, including verifying it is the VGA display.
On an HP laptop I once had, I would need to power cycle the laptop, after plugging in my TV, before the SVHS connector would be active. I found this was even true for the SVHS output on my Sony receiver with a Video switch.
Alright, so we are indeed talking about the same thing. As I type this message into firefox using my desktop monitor (on the left) and my desktop keyboard and mouse, firefox is running on my laptop (a much more powerful machine with much much more memory). My laptop is connected to another monitor (on the right).
Usernames and hostnames removed:
Code:
$ ssh -X laptop
password:
Linux 2.6.32-5-amd64 #1 SMP Wed Jan 12 05:14:59 UTC 2011 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
No mail.
Last login: Thu Mar 17 05:19:42 2011 from
$ xrandr -d :0.0 -q
No protocol specified
Can't open display :0.0
$
I think we are all in consensus that this should be working? It isn't working.
Also, maybe worth mentioning is that on the laptop, X is no longer located on Alt+F7, it is now on Alt+F8. The desktop is still running Debian 5.0 (lenny) with X on Alt+F7.
Also, in case anyone was wondering, if I walk over to the laptop and open a terminal window in X I can use xrandr to manipulate display :0.0 without incident. However if I switch to tty1 I get the same errors as when coming in through ssh. From the desktop, if I use Alt+F1 to login through tty1 I can successfully manipulate it's display. Surely this is strange?
Last edited by UnknownUser; 03-17-2011 at 03:42 AM.
Try -d :0.1 if you switched to an external monitor. For example using a Fn key to cycle between displays may effect whether :0.0 or :0.1 exists.
Also check the /var/log/Xorg.0.log file on the laptop. It will tell you with displays are used.
One thing to note. Running firefox starts a wrapper script which may end up running firefox on the local machine if there is already an instance running, i.e. on ssh client. Use the "-no-remote" command line option if you want to run firefox remotely. (seems misnamed to me) I discovered this accidently. Entering "firefox --help" will show you what the command line options are.
Trust me, firefox is running on the laptop, this desktop is a 1Ghz Athlon with 128 Mb of memory, I could tell the difference after waiting 5 minutes for the program to load.
Did you log in with ssh to the laptop before running "xrand -d :0.0 -q" and "xrand -d :0.1 -q".
Yes. I also attempted logging in locally through tty1. It only works from a terminal window within the current X session on the laptop.
Quote:
Originally Posted by jschiwal
Do you have physical access to the laptop? does the LCD screen work?
Yes, it is cracked, but I can use it. See my previous post about switching to tty1.
Quote:
Originally Posted by jschiwal
If you want to disable the VGA port on the laptop, why not just unplug it?
That works, true. This isn't something that I can't work around, but seeing as how this worked in Debian 5.0 and now does not work in Debian 6.0 I'd like to discover why for my sanity's sake.
Power down the laptop, unplug the VGA cable, and power back up. I'm betting that the card won't enable the port if it's unplugged and "xrandr -display :0.1" won't have a result.
Sorry, to have left this thread for so long. Some updates became available, and after installing them the problem disappeared. So, it's unsolved, but solved just the same.
As this was my first hit on google for a similar problem, I'd like to comment in this old thread.
In my case (Gentoo/KDE combination on the remote system) "xrandr -display :0.0 -q" would only work if the user (used for ssh) was actually logged in on the remote machine (i.e. had an active X session). "xrandr" did never work from ssh and always gave "Can't open display".
I don't know if this intended behaviour or can be fixed somehow.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.