Results 1 to 7 of 7

Thread: shutting down as user

  1. #1
    Join Date
    May 2006
    Location
    Pune,India
    Posts
    63
    Thanks
    7
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default shutting down as user

    I'm building an application in which there is a button to shutdown the system.
    I'm using suse 10.0 , which doesn't allow to shutdown (poweroff command) the system in user mode.
    So how can I shutdown machin as normal user when shutdown button clicked.

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

    Default Re: shutting down as user

    If you use KDE you can take advantage of the dcop interface.

  3. #3
    Join Date
    May 2006
    Location
    Pune,India
    Posts
    63
    Thanks
    7
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: shutting down as user

    How I can use dcop interface.

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

    Default Re: shutting down as user

    If you don't want to have KDE dependencies, then just call a program called "dcop" and pass it appropriate parametres. You can use kdcop to find proper object, method and params. The method you're looking for is called "logout" and resides in "ksmserver" object.

  5. #5
    Join Date
    May 2006
    Location
    Pune,India
    Posts
    63
    Thanks
    7
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: shutting down as user

    Pls give link dcop documentation.

  6. #6
    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: shutting down as user

    J-P Nurmi

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

    Default Re: shutting down as user

    dcop --help should be sufficient as well.

Similar Threads

  1. Detecting user inaction
    By jrideout in forum Qt Programming
    Replies: 5
    Last Post: 10th December 2010, 07:37
  2. Replies: 1
    Last Post: 24th June 2006, 11:10
  3. Discard user input events in QEventLoop.
    By Ben.Hines in forum Qt Programming
    Replies: 2
    Last Post: 17th April 2006, 20:49
  4. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.