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 10-18-2003, 04:02 AM   #1
Trinity22
Member
 
Registered: Jul 2003
Location: oregon coast
Distribution: Fedora Core 3
Posts: 280

Rep: Reputation: 30
Is there a deskcam program for linux?


I used to run a deskcam in windows and I was wondering if anyone knew of a similar application for linux. Just something that takes a cap of your site and then uploads it. Someone also told me about a way you could set your linux box up to do that.

Anyone know some info about this?

Thanks,
Trinity
 
Old 10-18-2003, 05:09 AM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
You need to upload this to another computer?

If not (or even if so, but it would be harder) it seems to me you could write a simple script to do this.

Ok, well, I just wrote a little script that takes a screenie of your desktop, logs into an ftp server with your username and passwd, then uploads the screenie...

If this is what you are looking for then let me know and I'll post it up.

Last edited by bulliver; 10-18-2003 at 06:22 AM.
 
Old 10-18-2003, 10:11 AM   #3
Trinity22
Member
 
Registered: Jul 2003
Location: oregon coast
Distribution: Fedora Core 3
Posts: 280

Original Poster
Rep: Reputation: 30
that's exactly what I'm looking for. I'm just not smart enough in the programming, oh heck, any computer area to do something like that.

trinity
 
Old 10-18-2003, 05:50 PM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Ok. You will need a couple things installed. Number one: ImageMagick...for the command-line screenshot capture app "import"...and lftp which is a good command line ftp client which can be scripted. I suppose you could use plain old 'ftp' in a pinch, but I haven't tested it so you're on your own with that one.

Anyway,
you need to create two files. One is your lftp commands. I suggest naming it something like "~/.deskcam_upload" so it is out of your way. It would be like this:
Code:
open -u your_username,your_password ftp.your_ftp_server.com
put screenshot.png
quit
You would of course replace the relevant fields with your personal info (username, passwd, and ftp server). The first line just opens a connection to your server. The second line 'put's the screenshot into the home directory of your ftp server. There are many ways to customize what happens here, for instance: adding "-oremotefile" will name the uploaded file "remotefile", and adding "-O sub/directory/" will put the image in "sub/directory/". I direct you to man lftp for more info, specifically the 'put' command.

If all you want to do is put the file in the root of your server though...the default will work fine.

Now you need the actual script:
Code:
#!/bin/bash

#takes a screenshot. Name "screenshot.png" whatever you want
import -window root ~/screenshot.png

# now start lftp, and use the commands specified in "~/.deskcam_upload"
lftp -f ~/.deskcam_upload

# uncomment this if you want the screenie in your home directory deleted
# after uploading it...
#rm ~/screenshot.png

# this is just fluff but it will be emailed to you from the cron job:
echo "Screen shot uploaded"
# that's it!
This will take a screenshot of whatever is on your screen at the time it is run, so pay some mind to that. The import command takes different options as well, so check out the docs for ImageMagick if this is not what you want .
You can name this script anything you want, just make sure it is executable: "chmod +x scriptname.sh". Now, just set it up to be a daily cron task, and you're golden.

Last edited by bulliver; 10-18-2003 at 05:52 PM.
 
  


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
Is there a program for Linux that does this? signmeuptoo Linux - General 4 10-16-2005 02:30 AM
sms program and database in linux web program in windows.. does not see each other.. keikun_naruchan Programming 0 07-06-2005 02:40 AM
program in c with linux jyothi Linux - Newbie 1 07-14-2004 03:39 AM
A Linux dist that will run Linux under Windows like a program caderyn Linux - Distributions 4 05-24-2004 07:43 PM
Brand New to Linux, intermediate Programmer, want to program for linux destop apps albertrosa Programming 4 12-08-2003 08:49 AM


All times are GMT -5. The time now is 10:23 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