General :: Ubuntu - Wmctrl Cannot Open Display When Session Initiated Via Ssh+screen

Sep 20, 2010

I'm using wmctrl on an Ubuntu machine to manage windows from a script, that I run inside a (gnu) screen.

If I start the screen session from the local machine, wmctrl works fine, including if I completely close the terminal window and issue the wmctrl commands when connecting to the screen remotely via ssh.
Conversely, if I connect remotely with ssh and start a screen, wmctrl doesn't work (returns "Cannot open display") even if I attach that screen session locally from the Ubuntu Terminal.

I guess there is some hidden screen parameter that doesn't get set in a way that allows accessing the display when it's launched remotely -- any ideas what it is and how to modify it from within a remote ssh-screen session so that that the script can access the windows?

View 1 Replies


ADVERTISEMENT

General :: Use Command Line And Wmctrl To Make A Window Larger Than The Screen To Get A Huge Screenshot?

Jan 24, 2011

I use a program which makes a large image which I have to scroll to view. The program has no way to save the image, and I have no access to the source to modify it. The only way I have to get the image from the program is by screenshot. My goal is to save the full size image without having to piece together individual screenshots. I'm using this script to try taking a screenshot:

#!/bin/bash
window=$(wmctrl -l | grep "Program$" | awk '{print $1}')
wmctrl -v -i -r $window -e '0,0,0,6030,5828'
wmctrl -i -a $window
import -window $window ~/Desktop/screenshot.png

This uses wmctrl to get the window id ($window) for a window named "Program". It then tries to resize the window to the desired dimensions. It uses imagemagick (import) to save a screenshot.png on the user's Desktop. All of this works except the resize step. I can resize the window using wmctrl -r -e, but sizes greater than the screen size don't work. I'm using Ubuntu 10.04 and the Gnome Desktop. I run two monitors, but I've tried this with one of them disabled. Is there a way to resize the window larger than my screen to get a huge screenshot?

Part II: I tried using xrandr to set up screen panning, so as to have a bigger desktop than my monitor. xrandr --output LVDS --panning 2600x2500 This command makes the laptop screen pan over a 2600x2500 size desktop, even though it can only show 1440x900 at one time. To turn off the panning, I can use a similar command to set total size and with zeroes for the panning section. This gives me back my original laptop display behavior. xrandr --fb 1440x900 --output LVDS --panning 0x0 This is all done with xrandr, and does not require any Xorg.conf changes (my Ubuntu system doesn't even have an Xorg.conf).

My video card seems to only allow about 6.5 million pixels, even though the maximum dimensions are 8192x8192. That maximum seems to be the maximum for either dimension, but there is a limit to how many pixels can be drawn, which is the width multiplied by the height. Once I did the screen resize, I tried my script again and got a screenshot. The screenshot however is totally scrambled. I'm not sure if it's unable to take a screenshot of an off-screen window or if it is unable to handle the large dimensions of the window. With the panning display, the window should think it is visible, and the window manager should think it is on-screen. So there is a pixel buffer somewhere with those pixels in it, so there should be a way to get a screenshot.

View 1 Replies View Related

General :: Get An "cannot Open Display" Error Foe Gnome-session?

Dec 13, 2010

When I open startx it works fine bur I get an "cannot open display" error foe gnome-session. I already tried export DISPLAY=:0. ANY suggestions?

View 4 Replies View Related

SUSE :: Failing To Load The Gnome Session - GTK Warning - Cannot Open Display

Apr 27, 2010

I am using SLES 10 SP3(x86_64). I was trying to install gtk/wxwidget through yast.

After that i rebooted my system, now system is failing to load in GUI mode.

If i can give the log of last few lines are as follows

Then it asks for login, only shell is available for me. How to login to gui mode..

I tried using the command gnome-session it gives error (gnome-session: 4101): Gtk-Warning **: cannot open display:

Also i tried using init 5, but again it prompts the my servername.

View 1 Replies View Related

Software :: Way To Configure Screen / When Session Is Resumed It Inherits DISPLAY?

Jun 22, 2011

At work, we have a linux machine which is shared among the members of my team. Each of us runs an XServer on our desktop, which allows us to launch XClients (xterm, debuggers, etc) on the linux machine.We all are using X11 forwarding feature with SSH. I personally run all shell sessions behind screen because I like to be able to detach if needed. We've seen issues when the $DISPLAY variable gets crossed between different users. Let me outline a series of events:

1. user1 logs in and $DISPLAY = localhost:10.0
2. user1 launches a screen
3. user1 loses connection to linux machine (eg. desktop reboot)
4. user2 logs in and $DISPLAY = localhost:10.0
5. user1 logs in and $DISPLAY = localhost:11.0
6. user1 resumes screen from previous login, but in this screen $DISPLAY=localhost:10.0.
7. user1's X apps get displayed on user2's desktop!

I assume someone must of encountered this before. Are there any known solutions? Is there a way to configure screen, so that when a session is resumed it inherits the $DISPLAY?

View 1 Replies View Related

Software :: Using 'at' To Open A 'screen' Session?

Mar 8, 2011

when I type:

Code:

After the command has run (verified with atq) I cannot attach to screen using "screen -r" and ps shows screen is not running:

Code:

why the 'at' command can't start screen in the background for me to attach to later?

Noticed screen is actually returning "Must be connected to a terminal." to logs. Does 'at' not provide a terminal?

View 5 Replies View Related

OpenSUSE Install :: Cannot Open ConsoleKit Session: Unable To Open Session

Apr 11, 2010

The following message comes up when I boot up: Logging in user Warning: Cannot open ConsoleKit session: Unable to open session: Launch helper exited with unknown return code 0. When I press OK, the system completes the start up and everything looks normal. But when I try to connect to internet, I get the following message:

KNetworkManager cannot start because the installation is misconfigured. System DBUS policy does not allow it to provide user settings; contact your system administrator or distribution. KNetworkManager will not start automatically in future. If I reboot the system, I logg in successfully. So far the problem has appeared approximately upon every second time I boot up. Rebooting the system seems to take care of it.

Don't know what info is of interest. I'm using

Opensuse 11.2
KDE 4.4.2 (Factory)
After upgrade from 4.4.1 to 4.4.2 it worked fine for a week or so.

View 9 Replies View Related

Slackware :: 13.1 Beta1 - Cannot Open ConsoleKit Session - Unable To Open Session

May 13, 2010

I do a clean install of slackware64 13.1 beta1 with KDE and switch default runlevel to 4 in /etc/inittab.

I try to login in kdm, I always come back to the login....

I try this with default runlevel 3 and an .xinitrc with "ck-launch-session startkde" .. works without problems, so I switch back to default runlevel 4, now i can login and only get the error "Cannot open ConsoleKit session: Unable to open session..."

Here are some logs

syslog

Code:

Code:

View 2 Replies View Related

Ubuntu Servers :: Bash Script To Open 1 Screen Session With Multiple Windows?

Jul 28, 2010

I am trying to write a bash script to open 1 screen session with multiple windows... each one running a different service. Is this possible? I tried several things, and I can start up multiple sessions really easy.. but not 1 session with multiple windows...

I want this so I can attach to that session and quickly move between the different windows.

View 4 Replies View Related

General :: X11 Forwarding - Error: Can't Open Display: <ip Of Display>

Jun 28, 2011

I have the following scenario that doesn't seem to work normally. I have a windows 7 pc from which I am using putty to connect to my other linux servers (all running redhat 5 and 6). So here is the scenario that works and one that does not work. And I'm trying to figure out the one that does not work. Scenario that works:

From windows 7 (putty) I ssh into Linux_Server_1.
echo $DISPLAY
localhost:10.0

I run xclock and I see it pop up on my windows 7 pc. I am using xming on windows 7 to help me populate the display from linux to windows. One that does not work:

From windows 7 (putty) I ssh into Linux_Server_1. Then from Linux_Server_1 I ssh into Linux_Server_2.
echo $DISPLAY
<no output>

I try to setup $DISPLAY with localhost:10.0 or 0.0 or even my windows 7 pc ip address:0.0 ....etc Then when I try to run xclock I doesn't work.

I get these error messages: Error: Can't open display: <ip of display>

Also as a side note all our Linux servers are sitting on one subnet. My pc is sitting on another subnet. I use vpn to connect to the subnet where the servers sit from my pc.

View 4 Replies View Related

General :: How To Display Console Messages In Ssh Session?

Mar 2, 2011

I have logged as e.g. user1 via ssh into my machine. Then I perform `su -` to switch to root user and I don't see debug messages which are normally displayed when I log as root via system console.How to display console messages in ssh session ?

View 1 Replies View Related

General :: Minimizing Windows From CLI (wmctrl Not Working)?

Sep 19, 2010

I'm trying to minimize windows from the CLI (not tied to Gnome/KDE). wmctrl mentions it can set a `hidden' option for windows but this doesn't seem to work. Also found this: [URL]

View 2 Replies View Related

General :: Display The Source Machine During A Remote X Session In The Title Bar?

Aug 8, 2011

In the past, when I open a gvim session on a remote machine, the title bar of gvim would show the machine name in brackets. I am not sure if this was done by the remote gvim itself, or the local window manager. In the past I have used gnome2, although I am currently using unity (and finding it rather frustrating). Is there some setting I can change to always force remote windows to display the source machine?

View 1 Replies View Related

General :: Command Line To Open A Second Telnet Session ?

Mar 15, 2010

On my ubuntu 9.10 pc i am not running a GUI.

Every thing is run from command line.

How do i start a second telnet session from command line.

Plus can i have 4 telnet session open and move from one to the next and back again.

View 5 Replies View Related

General :: FreeNX Can Access The Session That Open Locally On The Server

Sep 24, 2009

I just tried FreeNX. I work great. I am thinking about uninstalling the vino/vnc on my machine.

However, I'd like to know if FreeNX can access the session that open locally on the server. I tried session 0 and 1, none of them can access the local session.

For default vnc, the connection will let you access the local session on the server. Can FreeNX do that?

View 2 Replies View Related

Server :: Squid - Cannot Open Session Manager - Cannot Open Network Socket

Jan 27, 2010

I have configured a squid proxy; it's running, but there was a problem: it does not provide service to client side.

The error was: "could not connect to session manager" "cannot open the network socket"

View 1 Replies View Related

General :: Open A Second Shell Session That Will Remember The User, Machine, And Directory

Sep 21, 2010

I'm ssh'ed into a machine and logged in as a different user. Is it possible to open a few new windows that will still be ssh'ed into that same machine, still logged in as that user?

View 2 Replies View Related

General :: Run A Second Command In Same Screen Session?

May 5, 2011

I'm starting the first command in screen like this: screen -d -m -S testen -t lalala watch df -h Now I have a screen session running in background and I can reconnect at a later time. But how can I run a second command (in a new window) in the same screen session?

View 1 Replies View Related

General :: Way To Automatically Unlock Screen For VNC Session

Sep 17, 2010

I'm connecting via ssh to an Ubuntu server that has a physical display attached.I'd like the physical display of the server to remain locked while I'm connected remotely.Is this possible? How? Also, is there a way to automatically unlock the screen for the VNC session, which is made from localhost via an ssh tunnel?

View 1 Replies View Related

General :: Auto-reconnecting SSH Connections With A Specific 'screen' Session

Sep 13, 2010

I typically have several terminal windows each of which is connected via ssh to a remote server. In each window I work using the gnu screen program, to ensure persistence of the interactive processes in case of a disconnection.

Currently, whenever the ssh connection drops (such as when I put my client computer to sleep overnight) I have to manually and tediously restart the ssh session inside each window, and then in each window tediously resume the specific screen session (e.g. "screen -r 3453" in one window, "screen -r 3462" in the other etc.)

Is there an elegant way to automate this? Specifically:

reconnect the ssh session if it drops, as soon as an Internet connection is detected run the specific screen instance for the terminal window as soon as ssh reconnects

View 2 Replies View Related

General :: Can't Open Display - Localhost - 0.0

Dec 1, 2010

Im using the Redhat 5, when m trying to connect from X-start it showing error:

Can't open display: localhost:0.0

Where as /etc/ssh/sshd_config settings are correct

Also ssh is running
$DISPLAY is set to localhost
still it is not started any x-service

View 2 Replies View Related

General :: Can't Open Display Localhost:0.0?

Mar 31, 2011

I'm trying to connect to my linux server but I'm having some major problems. The server had OEL 5 installed and my local pc is running Windows XP. I'm using PuTTy to connect to the server with Xming running on my loacl machine. I login as root and run the following command - export DISPLAY={ipaddress}:0.0I then run xclock and get the following error - Xlib: connection to "{ipaddress}:0.0" refused by serverXlib: No protocol specifiedError: Can't open display: {ipaddress}:0.0The strange thing is that on my bosses pc (who has got almost the exact same setup ie. PuTTy & Xming) is works perfectly.

View 2 Replies View Related

General :: Xset: Unable To Open Display

Oct 30, 2010

I tried to log on to a remote computer using ssh, but I got an error:

xset: unable to open display

View 4 Replies View Related

General :: Xwd: Unable To Open Display 'localhost:15.0'

Jul 5, 2011

I'm SSH'ed in to my Ubuntu 11.04 machine and trying to take a screen shot of a virtual display where I'm running (hopefully) Firefox. I get the error

Code:
selenium@selenium:~$ xwd -display localhost:15.0 -out ~/desk.xwd -root
xwd: unable to open display 'localhost:15.0'

I know that I have displayed the right display variable because in an earlier script that runs at system bootup I have

Code:
export DISPLAY=localhost:15.0
/usr/bin/Xvfb :15 -ac -screen 0 1024x768x16 &

View 1 Replies View Related

General :: Error: Can't Open Display: Hostnmae:0.0

Feb 17, 2010

I have installed RHEL 4.6. But X server is not running. Wen i executed xclock Error: Can't open display: hostnmae:0.0

View 4 Replies View Related

General :: /usr/bin/xterm Xt Error - Can't Open Display - %s

Oct 25, 2010

/usr/bin/xterm Xt error: Can't open display: %s

I tried to connect to remote server ,which is installed Centos 5.4 x86, through Xmanager on windows 7, and got this error.

Quote:

/usr/bin/xterm Xt error: Can't open display: %s

At the remote server, I turned on firewall and after this I got the above-mentioned error message.
I do this accrding to instruction on remote server.

Quote:

2. Firewall (TCP/UDP Ports) Configuration
Open UDP port 177 from the PC to the remote host direction.
Open incoming TCP ports 6000~6010 from the remote host to your PC.
After adding these ports "/etc/sysconfig/iptable" as the enoder mentioned, /etc/init.d/iptables restart

3. Reboot the remote host and start Xmanager <- I could not restart remote server.

View 14 Replies View Related

Ubuntu :: Wmctrl Oddity On Dual Monitors

May 19, 2011

I have dual monitors (both 1600x1200) and X is set to span them. I prefer to set my Eclipse window to 3200x1100. However, when I use VNC to connect to my desktop, I'd have to pan around a lot, so I use wmctrl via a script to resize Eclipse (and Chrome, etc.) to better fit my smaller VNC viewport.

When I return to my dual-monitor desktop, I want to resize/move my windows again. But wmctrl does not work correctly. If I do

Code:

(from a script), then instead of putting the window at 0,0 and width 3200, the window appears on the second monitor (i.e. at 1600,0) with width 1600. So I must manually resize it which is more difficult.

Am I using wmctrl correctly? Is it not wmctrl's problem but my window manager? I'm using compiz in Ubuntu 10.10.

View 1 Replies View Related

General :: Got Login Screen - But After Logging Shows Error As - Your Session Only Last Less Than10 Seconds

Nov 1, 2010

I have centos 5.3 i got the login screen but after logging shows error as-- your session only last less than 10 seconds . if you have not logged out yourself tyhis could mean that there is some installation problem or that you may out of disk space .try logging with one of fail session.

views details:

There is lot of space in hardisk and tmp.

View 1 Replies View Related

General :: Locale Or Run Level - Cannot Open Display Message

Jan 13, 2010

I try to change locale for a program to run my native language with root. I don't know what I made, but can't open gui programs from konsole with root account.

It appear this error:

Code:

When type locale, it appear:

Code:

Yesterday I make run level 4 to skip typing startx in console, and login directly to KDE.

View 7 Replies View Related

General :: Maximum Number Of Clients ReachedThunar: Cannot Open Display

Jul 4, 2011

I with one problem to open files on terminal. By example, I open the thunar on terminal, see the error:

gustavo@universe /media/montagem $ thunar
(process:7902): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
Maximum number of clients reachedThunar: Cannot open display:
gustavo@universe /media/montagem $ ^C

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved