xrandr from remote through ssh?
I just tried to deactivate the VGA connection on my laptop remotely and received this result:
Code:
$ export DISPLAY=:0 |
Try using the following:
Code:
export DISPLAY=:0.0 |
Code:
$ export DISPLAY=:0.0 |
The :0.0 display is local to my desktop. The :10.0 display is for my laptop. My laptop is the ssh client.
Code:
xrandr -display :0.0 -q |
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 Code:
export DISPLAY=:0.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. |
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 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? |
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.
See my last post, edited while you were posting. |
Perhaps I was confusing... what I typed looks confusing to me.
Do this: Press Ctrl+Alt+F1 to access login screen of tty1 login type xrandr -d :0.0 -q it works right? It works on my desktop. It isn't working on my laptop... something has changed and I don't understand what it is. |
Is an X server running on the laptop?
Did you log in with ssh to the laptop before running "xrand -d :0.0 -q" and "xrand -d :0.1 -q". Do you have physical access to the laptop? does the LCD screen work? If you want to disable the VGA port on the laptop, why not just unplug it? |
Quote:
Code:
/usr/bin/Xorg :0 -br -verbose -audit 0 -novtswitch -auth /var/run/gdm3/auth-for-Debian-gdm-ROqYBW/database -nolisten tcp vt8 Quote:
Quote:
Quote:
|
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. |
All times are GMT -5. The time now is 06:14 AM. |