We help IT Professionals succeed at work.

system call to run screensaver

urif
urif asked
on
Hi!

a while ago i wrote a program from windoze to run the screen saver from the command line, also this program set password protected to true.

2 years ago i moved to linux (thank god there's linux) and i've been learning to progran in this new environment.

i need to write something similar to my lock program, i'ven been searching for the right system call to use but so far nothing, what i need is to be able to run my app from the command line, this app calls a system call (or whatever function) and turn the screensaver on and lock the screen with the screensaver's password.

all this in c/c++

any ideas?

thx a lot!

cheers
Comment
Watch Question

BRONZE EXPERT

Commented:
this program already exists: xlock

Author

Commented:
do you have the source, so i can look into it?
i'm trying to figure how to do it, even if it exists

thx
Commented:
You can use xlock from your 'C/C++' program

system("xlock");

Note also there are several of these programs with a lot of different animations e.g. xscreenlock xscreensaver xlockmore

This site clames to have a very simple screen saver with source. I looked its about 1 page (Hope it works)
http://www.ishiboo.com/~nirva/Projects/xl/

Author

Commented:
whi this is not the answer i was looking it helped a lot so here're the points to you , thx!

Explore More ContentExplore courses, solutions, and other research materials related to this topic.