Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Automated screenshot script.
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
senectus
Guru
Guru


Joined: 17 Jul 2003
Posts: 534

PostPosted: Wed May 12, 2004 11:53 pm    Post subject: Reply with quote

Got a way to minimize the desktop from the CLI in KDE..

Quote:
dcop kicker $(dcop kicker qt objects | grep ShowDesktop | head -n 1 | sed "s#(# #g" | awk '{ print $1; }') toggle


Thanks to the guys in the KDE-Forums
_________________
2800+XP A7N8X FX6600GT
www.modmeup.net |
Belief is 9/10 of YOUR reality.
Wise man say: A skilled troll is a master baiter.
Back to top
View user's profile Send private message
lbrtuk
l33t
l33t


Joined: 08 May 2003
Posts: 910

PostPosted: Thu May 13, 2004 1:32 am    Post subject: Reply with quote

Surely you don't want to minimise everything, because then you'll just end up with a buch of shots of your backdrop. They'll all be the same. Seeing the different windows are what makes it interesting.
Back to top
View user's profile Send private message
senectus
Guru
Guru


Joined: 17 Jul 2003
Posts: 534

PostPosted: Thu May 13, 2004 3:43 am    Post subject: Reply with quote

Actually that was what I was after..
It doesn't minimize thing that you make sticky (like GKRellm2 for instance)


I don't want non sticky stuff being screen shotted.. I might have been looking at fat Germans in funny clothes.. 8O :? :P
_________________
2800+XP A7N8X FX6600GT
www.modmeup.net |
Belief is 9/10 of YOUR reality.
Wise man say: A skilled troll is a master baiter.
Back to top
View user's profile Send private message
Nate_S
Guru
Guru


Joined: 18 Mar 2004
Posts: 414

PostPosted: Thu May 13, 2004 6:05 am    Post subject: Reply with quote

I think gnome uses xscreensaver, so it already is comprehensive

to the OP: perhaps rename the thread now, to make the search easier on those who might want to do the same
Back to top
View user's profile Send private message
senectus
Guru
Guru


Joined: 17 Jul 2003
Posts: 534

PostPosted: Thu May 13, 2004 6:34 am    Post subject: Reply with quote

Nate_S wrote:
to the OP: perhaps rename the thread now, to make the search easier on those who might want to do the same


Good idea, Done..
_________________
2800+XP A7N8X FX6600GT
www.modmeup.net |
Belief is 9/10 of YOUR reality.
Wise man say: A skilled troll is a master baiter.
Back to top
View user's profile Send private message
lbrtuk
l33t
l33t


Joined: 08 May 2003
Posts: 910

PostPosted: Thu May 13, 2004 1:39 pm    Post subject: Reply with quote

senectus wrote:
I don't want non sticky stuff being screen shotted.. I might have been looking at fat Germans in funny clothes.. 8O :? :P


Aww. You're no fun.
Back to top
View user's profile Send private message
senectus
Guru
Guru


Joined: 17 Jul 2003
Posts: 534

PostPosted: Sun May 16, 2004 12:07 pm    Post subject: Reply with quote

Okies... I made progress.. :-)

Now to learn how to cron job stuff :lol:

Code:
 #!/bin/bash

#this is for xscreensaver - dont know what to do if you're using kde or something else
xscreensaver-command --deactivate

#simple enough
sleep 4

#minimize the screen
dcop kicker $(dcop kicker qt objects | grep ShowDesktop | head -n 1 | sed "s#(# #g" | awk '{ print $1; }') toggle

#or somewhere better to put it
import -window root -quality 90 /home/senectus/screenshots/screenshot.png

#bring it all back..
dcop kicker $(dcop kicker qt objects | grep ShowDesktop | head -n 1 | sed "s#(# #g" | awk '{ print $1; }') toggle

#highly compress png for politeness to dialup users
optipng -o5 /home/senectus/screenshots/screenshot.png

#totally unsecure ftp bit :-P
ftp -pn your.upload.site.com.au <<END_SCRIPT
user Yourusername Yourpassword
binary
cd /screenshot
send screenshot.png
bye
END_SCRIPT


exit 0

_________________
2800+XP A7N8X FX6600GT
www.modmeup.net |
Belief is 9/10 of YOUR reality.
Wise man say: A skilled troll is a master baiter.


Last edited by senectus on Sun May 16, 2004 12:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Sun May 16, 2004 12:26 pm    Post subject: Reply with quote

cron is very easy: crontab -e
the man crontab gives quite a few examples.. You wanted to run the script every day at 3 am?
* 3 * * * /<path to script>/<scriptname>

done..

crontab -e works with vim as editor..


Last edited by BlackEdder on Sun May 16, 2004 12:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
senectus
Guru
Guru


Joined: 17 Jul 2003
Posts: 534

PostPosted: Sun May 16, 2004 12:32 pm    Post subject: Reply with quote

I think I've done it.. (will have to wait till 3 am to see ;-) )

This has been fun :-) I might try and make it a bit neater.. and include commands for other desktops (Gnome, *box etc)... Thanks for your help guys :-D
_________________
2800+XP A7N8X FX6600GT
www.modmeup.net |
Belief is 9/10 of YOUR reality.
Wise man say: A skilled troll is a master baiter.
Back to top
View user's profile Send private message
nilbus
n00b
n00b


Joined: 19 Jan 2004
Posts: 28
Location: North Carolina State University

PostPosted: Mon May 17, 2004 1:14 am    Post subject: Reply with quote

Use SSH keys and scp :) simple
Back to top
View user's profile Send private message
geforce
l33t
l33t


Joined: 29 Dec 2003
Posts: 653
Location: Canada

PostPosted: Thu May 20, 2004 10:46 pm    Post subject: Reply with quote

An alternative way :
Code:

 #!/bin/bash

POSPAR1="$adress"
POSPAR2="$user"
POSPAR3="$pass"

#this is for xscreensaver - dont know what to do if you're using kde or something else
xscreensaver-command --deactivate

#simple enough
sleep 4

#minimize the screen
dcop kicker $(dcop kicker qt objects | grep ShowDesktop | head -n 1 | sed "s#(# #g" | awk '{ print $1; }') toggle

#or somewhere better to put it
#Look at the variable HOME, this script can now be used by any user
import -window root -quality 90 $HOME/screenshots/screenshot.png

#bring it all back..
dcop kicker $(dcop kicker qt objects | grep ShowDesktop | head -n 1 | sed "s#(# #g" | awk '{ print $1; }') toggle

#highly compress png for politeness to dialup users

optipng -o5 $HOME/screenshots/screenshot.png

#totally unsecure ftp bit :-P

ftp -pn $adress
user $user $pass
binary
cd /screenshot
send screenshot.png
bye
END_SCRIPT

exit 0


I'm not a scripter, So it can contain some errors..

You can now start the program as this:
Quote:

./program.sh YouAdress YourUser YourPass


You have no password in clear text in your script

If you want to use crontab:

Hourly:

0 * * * * /anywere/yourscript.sh YourAdress YourUser YourPassword

daily:

0 3 * * * /anywere/yourscript.sh YourAdress YourUser YourPassword

etc...

Get a look to the $HOME Variable, now your program can be used by anyone

No one will think to check you crontab :lol: :roll:
_________________
User #29433
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum