Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to be notified when a user is using my application and locks their computer.

 
Andy Gertjejansen
Greenhorn
Posts: 16
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am building an application that needs to do some operations when a user locks their computers. How can I be notified of that? is there a system wide event or something I can catch? BTW I know how to do this on a windows OS but not Linux so just need to know about linux.

Thanks homies,
Andy
 
Rob Spoor
Sheriff
Pie
Posts: 20511
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this is available, and that's a big if, you would need JNI to get that event. I would first check MSDN to see if there is such an event.
 
Andy Gertjejansen
Greenhorn
Posts: 16
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, I found a way to catch it on Windows systems which is but this application will need to catch the lock/unlock on Linux systems because the main user of this application works on a Linux system so I haven't been able to find anything but thanks for the reply.

Does any one know how to catch or be notified when a user locks there computer on a Linux system? it is a Java application .

Thanks partner,
Andy
 
Rob Spoor
Sheriff
Pie
Posts: 20511
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is not one single way to lock the computer on Linux. KDE probably does it differently from GNOME, which does it differently from Enlightenment, which does it differently from Blackbox. If I recall correctly, the latter doesn't even do it itself, it needs an external program for it.
 
Andy Gertjejansen
Greenhorn
Posts: 16
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ahh, I suppose. The client uses Ubuntu I don't suppose that helps? He locks his computer ctrl + alt + L, but if the application does not have focus I cannot catch that. I will just have to do some more digging. Thanks for your help.
 
Rob Spoor
Sheriff
Pie
Posts: 20511
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ubuntu uses GNOME by default but I believe users can still switch to KDE. (If not I guess they will need Kubuntu for that.)
 
Andy Gertjejansen
Greenhorn
Posts: 16
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interesting. I appreciate the help man.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic