I want to write code or a script to lock the PC when my C++ program receives a specific command from Ethernet.
Is there any way to show the Login screen from the command line? I want to lock the screen from a c++ code. Actually I want to do something like Ctrl + Alt + L programmatically (from a c++ code). Thanks
Edit: I found the way. For those who want to know, as Lubuntu uses LXDE desktop, it has some methods to do thing like it. The command for locking the screen is lxlock.
qdbusviewer
and a way to call the functions programmatically in C++. – gertvdijk Jan 19 '13 at 12:48