LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-12-2006, 08:57 PM   #1
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Rep: Reputation: 85
unable to open X server


Code:
chris@ubuntu-desktop:~$ w
 20:33:56 up 16:10,  2 users,  load average: 3.78, 3.21, 2.32
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
chris :0       -                05:30   ?xdm?  19:39m  1.40s x-session-manag
chris   pts/0    :0.0             00:25    0.00s  0.21s  0.00s w
chris@ubuntu-desktop:~$ import -root window picture.jpg
import: unable to open X server `'.
chris@ubuntu-desktop:~$ DISPLAY=:0
chris@ubuntu-desktop:~$ import -root window picture.jpg
import: unable to open X server `'.
chris@ubuntu-desktop:~$ DISPLAY=:0.0
chris@ubuntu-desktop:~$ import -root window picture.jpg
import: unable to open X server `'.
chris@ubuntu-desktop:~$
How can I get this to work?
 
Old 08-12-2006, 09:08 PM   #2
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
why don't you simply type
Code:
import picture.jpg
and then draw the window size you want for the screenshot with the mouse?
 
Old 08-13-2006, 12:18 AM   #3
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Original Poster
Rep: Reputation: 85
Because I am using import through ssh, and now I am probably not going to get an answer because you already replied.
 
Old 08-13-2006, 12:28 AM   #4
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Original Poster
Rep: Reputation: 85
I know it can work. I got it to work before.
 
Old 08-13-2006, 12:33 AM   #5
Penguin of Wonder
Senior Member
 
Registered: Sep 2005
Location: West Virginia
Distribution: Gentoo
Posts: 1,249

Rep: Reputation: 45
Quote:
Originally Posted by fakie_flip
and now I am probably not going to get an answer because you already replied.
Be grateful buddy, he did try to help you.
 
Old 08-13-2006, 12:53 AM   #6
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Original Poster
Rep: Reputation: 85
okay thanks for trying
 
Old 08-13-2006, 02:02 AM   #7
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,398
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
fakie:

What X server were you expecting the import command to operate on? It sounds like you are attached, via ssh, to a host running an X server, and want to grab a screen/window on that host's X server. Correct?

If yes, you will have to a least specifiy the X server. This is most easily done with the DISPLAY environment variable. In bash, do
Code:
export DISPLAY=localhost:0
Or whatever the IP and server number of the X server you want to grab from.

If you want to run the import command on Host B, while running the X server on Host A, and having ssh'd to Host B, then the easiest way to get the DISPLAY variable set correctly is to use
Code:
ssh -X
to make your ssh connection.

--- rod.

Last edited by theNbomr; 08-13-2006 at 02:03 AM.
 
Old 08-13-2006, 02:48 AM   #8
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Original Poster
Rep: Reputation: 85
that is what it was. i was forgetting to use export. i dont really know what i am doing. all i know is it works. before i was typing this command.

DISPLAY=:0

then i tried

export DISPLAY=:0

and now i can take screen shots of a different computer through ssh.
 
Old 08-13-2006, 03:03 AM   #9
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Original Poster
Rep: Reputation: 85
do you have any idea why i get 6 pictures from this command?

ubuntu@ubuntu:~$ import -window root `date`.jpg
ubuntu@ubuntu:~$ ls
2006-0.jpg 2006-2.jpg 2006-4.jpg
2006-1.jpg 2006-3.jpg 2006-5.jpg pic.jpg
ubuntu@ubuntu:~$
 
Old 08-13-2006, 03:27 AM   #10
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,398
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
I can only guess that the date command outputs six strings in its reply. Perhaps you really mean
Code:
import -window root "`date`.jpg"
--- rod.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Open-Xchange Server Wins 'Best Open Source Solution' Award at LinuxWorld Conference & Expo in Boston LXer Syndicated Linux News 0 04-10-2006 09:33 AM
LXer: Open-Xchange Server Wins “Best Open Source Solution” Award At LinuxWorld Conference & Expo in Boston LXer Syndicated Linux News 0 04-07-2006 12:33 AM
how to open files from a network server from open office or any apps reycapoy Linux - Software 4 01-26-2006 07:00 PM
Unable to access my ssh server and ftp server from the Internet, but smtp works foxone Linux - Networking 1 05-28-2004 05:17 PM
Volume control is unable to run correctly. Unable to open audio device '/dev/mixer'. sevenreams Slackware 1 05-16-2003 07:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration