Results 1 to 10 of 10

Thread: detecting Idle Activity ?

  1. #1
    Join Date
    Mar 2006
    Posts
    172
    Thanks
    30
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question detecting Idle Activity ?

    w.r.t X11

    I wish to detect an idle-activity...(i.e The system is idle for sometime viz 2 mins) and launch a 'filler' program of my choice <-- how do I detect such an event?

    Also, when the user resumes after sometime (more than 2mins) I wish to display his login Id and ask for his password...removing the 'filler' program only when the password is correct? <-- Can I achieve this via Qt4??

    Thanks

    Nupul

  2. #2
    Join Date
    Jan 2006
    Location
    Catalonia
    Posts
    266
    Thanks
    44
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: detecting Idle Activity ?

    You have to use a QTimer, activating or stopping it when you need.

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: detecting Idle Activity ?

    J-P Nurmi

  4. The following user says thank you to jpn for this useful post:

    nupul (3rd April 2006)

  5. #4
    Join Date
    Mar 2006
    Posts
    172
    Thanks
    30
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Red face Re: detecting Idle Activity ?

    well the detecting idle-activity answer is found, but what about the latter part of my query...that is equally important for me!!!

    Thanks

    Nupul

  6. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: detecting Idle Activity ?

    As (almost) always, the answer is "it depends". Using Qt only? No. You have to at least use pam or some other interface to system authorisation mechanisms. If you have specific problems, ask specific questions. For general problems you're likely to hear "it depends" (or not hear anything at all) quite often.

  7. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: detecting Idle Activity ?

    What password and id? Do you mean those you use to log into the OS? If yes, then why do you want to reinvent the wheel? Just configure your system properly.

  8. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: detecting Idle Activity ?

    Quote Originally Posted by jacek
    What password and id? Do you mean those you use to log into the OS? If yes, then why do you want to reinvent the wheel? Just configure your system properly.
    He is making a window manager as his project (academic, I guess), so he wants to reimplement KDE in a weekend

  9. #8
    Join Date
    Mar 2006
    Posts
    172
    Thanks
    30
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Exclamation Re: detecting Idle Activity ?

    Quote Originally Posted by jacek
    What password and id? Do you mean those you use to log into the OS? If
    yes, then why do you want to reinvent the wheel? Just configure your
    system properly.
    Yes, the one to log into the OS...I don't wish to reinvent the wheel, i just didn't know about what else i needed to use...wysota in his previous reply told me to use some other interface to system authorisation mechanisms...That's the main thing i wanted to clarify...that Qt alone will not suffice. --- should have clarified this earlier...sorry for that.

    Quote Originally Posted by wysota
    He is making a window manager as his project (academic, I guess)
    Correction...I am implementing a Desktop manager, capable of working with any window manager.

    Academic=True;

    ...so he wants to reimplement KDE in a weekend
    [I]Ghosh, I wish...

    As for providing a 'screen locking mechanism' like KDE, I feel it quite apt for any desktop manager to have one...and thus am trying to implement the same...

    I planned to emulate the MAC GUI, but the time constraint forced me to keep it simple till it's submission...I will be modifying it to the desired level after mastering Qt till a good extent!

    As KDE is developed with Qt, It helps me gain a better understanding of the toolkit, thus helping me realise what i need to and don't need to implement (i.e go to the level of Xlib) for my project...for that the online KDE-source-code reference, Qt doc and you guys @ Qtcentre have been monumental in clarifying my doubts...and helping me better understand my mistakes etc.

    Thanks!!!!!!!!!!!!!!!!!!!!!!!



    Nupul.

  10. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: detecting Idle Activity ?

    Quote Originally Posted by nupul
    Correction...I am implementing a Desktop manager, capable of working with any window manager.
    And how do you understand the difference between the two?

  11. #10
    Join Date
    Mar 2006
    Posts
    172
    Thanks
    30
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Post Re: detecting Idle Activity ?

    Quote Originally Posted by wysota
    And how do you understand the difference between the two?
    Well a window manager (WM) lays out the policy of HOW the windows are to displayed on the screen, the decoration of the window frame, the title bar and the layout of the control buttons viz. maximise, minimize etc.

    eg. In window maker, you don't have a maximize button...only a close (top right) and minimize (top left).

    Thus a WM just allocates the screen resource as requested by the app.

    Now you know that there are a plethora of WMs available...each with its own styles etc...(eg: you can set the background in window maker, but can't do that in kwin or metacity) A desktop manager (DM) is a layer on top of the WM. It's job is to make the user interface look consistent...irrespective of the underlying window manager

    The following are a part of any DM:

    1. panel/taskbar
    2. file manager
    3. the desktop screen
    4. Themes
    5. Control panel interface

    Themes may lead to ambiguity...as in if a WM also supports themes and the DM themes are also set...which one should be applied??

    The rest are all apps which can be invoked individually....but...why should one...when a DM provides for the same.

    KDE uses Kwin as its underlying WM...if you have fvwm the on the prompt type:
    $: fvwm --replace
    to see how fvwm handles the windows or kill the existing wm and pipe it with some other to see how KDE works with different WMs and how they (WMs) manage the windows set forth by KDE

    $: kill <pid of kwin>|metacity ....or any WM that you have
    or start X in failsafe and do the following:
    $: wmaker & (or $: kwin & to start kwin...will surely be present on system!)
    $: kde &
    to see start kde with wmaker as it's underlying base..

    You could do the changes in 'startkde' file but the above experimentation helps you easily understand the difference.

    Nupul

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.