LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-13-2008, 06:35 PM   #1
imoracle
LQ Newbie
 
Registered: Nov 2008
Posts: 3

Rep: Reputation: 0
Some insight on whats going wrong [Not a coding problem, but concept problem]


Hello All,

Well being from non-CSE background does hamper me many times and here it is again.

I am simply trying to write a script, which will take screenshots of the websites gives as input parameter to it.

Well the algorithm is simple:
1. Open site on your browser
2. Take a screenshot
3. Save the screenshot

Now I tried this on my local Ubuntu (running using VMWare) and here is what i tried:

Code:
sleep 10; xwd -root | convert - screenshot.jpg
and it gives me a screenshot of the screen. (I open up my browse while it was in sleep for 10 seconds).

Now I wanted this to be reproduced on my VPS (Debian, text only with no monitor/screen). So i went and tried, xwd which was not installed on by default.

So I installed the xbase-clients package. But now when I try to run xwd, it says :

Code:
xwd:  unable to open display ''
Now I am unable to understand what's wrong. I typed

Code:
startx
and it hung my shell.

Can someone kindly guide me through this? Is it really not possible to do this on my VPS, which I was doing with ease on my Ubuntu box.

Regards,
Imoracle
 
Old 11-13-2008, 06:45 PM   #2
johnson_steve
Senior Member
 
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152

Rep: Reputation: 46
Quote:
Originally Posted by imoracle View Post
I typed

Code:
startx
Prob didn't hang the shell. did it maybe start X in that shell (spit out a bunch of garbage and then apear unresponsive?) how do you plan on opening the web browser and going to another page when there is no monitor?
 
Old 11-13-2008, 07:13 PM   #3
imoracle
LQ Newbie
 
Registered: Nov 2008
Posts: 3

Original Poster
Rep: Reputation: 0
yeah here is where the problem comes......I prepared script on my local ubuntu box and then tried to move to my VPS. But now I suddenly realize that i dont have a monitor to take a screenshot from.

I am not sure how can I achieve this or how do others achieve this.

Any pointers will be highly appreciated.

Imoracle
 
Old 11-13-2008, 11:58 PM   #4
johnson_steve
Senior Member
 
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152

Rep: Reputation: 46
Well I'd still like to help but I don't realy understand what your doing here. You are trying to take a screenshot of what a web page looks like on a headless computer. why?
 
Old 11-14-2008, 12:41 AM   #5
imoracle
LQ Newbie
 
Registered: Nov 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Actually I am making a service where people will submit there blog url's and I will show them to the world. But instead of simply showing the blog name, post title and post snippet I also want to have a snapshot of the post page.

Now problem is: User comes and submit his blog/site etc etc. How do I take snapshot of his submitted article. Hence I thought of the above steps to achieve this, which seemed to be working fine on my local ubuntu but not on my VPS (Debian).

I have only shell access to my VPS.

So this is the problem in short. Another problem is that I simply don't want to have the thumbnails by using some third party tool etc, in the process I also want to learn the methodology used by some sites to generate them.

Regards,
Imoracle
 
Old 11-14-2008, 12:49 AM   #6
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
A better alternative would be to fetch the contents with a 'wget' script. Now all you need to find is a tool to render the html to an image file like png.
 
  


Reply

Tags
xserver


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
Accelrys - Insight II-startup problem bcramer Linux - Newbie 1 04-26-2007 02:02 PM
VPN Tunnel + Proxy Security Question (Concept not config problem) E-Oreo Linux - Networking 1 03-09-2007 12:08 PM
Problem with HTML coding bigalexe Programming 1 10-06-2006 02:26 AM
Javascript coding problem Hockeyfan Programming 1 02-01-2006 08:23 AM
Problem with Insight II - version GLIBC_2.2 not defined in file libc.so.6... belga Linux - Software 3 08-18-2004 02:01 PM


All times are GMT -5. The time now is 02:58 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration