suspend2 support - Debian

This is a discussion on suspend2 support - Debian ; Does someone know how to integrate suspend2 support in KDE 3.5 on desktop machine? I recently upgraded to 2.6.15(-rc) with that patch and found it nice but hibernating via "sudo hibernate" is not an option here as not all users ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: suspend2 support

  1. suspend2 support


    Does someone know how to integrate suspend2 support in KDE 3.5 on desktop
    machine? I recently upgraded to 2.6.15(-rc) with that patch and found it
    nice but hibernating via "sudo hibernate" is not an option here as not
    all users use Konsole.

    Best way would be 'Hibernate' option in logout window..

    --
    JID: hrw-jabber.org
    Palmtop: Sharp Zaurus C760
    OpenEmbedded/OpenZaurus developer


    --
    To UNSUBSCRIBE, email to debian-kde-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  2. Re: suspend2 support

    Marcin Juszkiewicz wrote:

    >
    > Does someone know how to integrate suspend2 support in KDE 3.5 on desktop
    > machine? I recently upgraded to 2.6.15(-rc) with that patch and found it
    > nice but hibernating via "sudo hibernate" is not an option here as not
    > all users use Konsole.
    >
    > Best way would be 'Hibernate' option in logout window..
    >

    I agree. If you install klaptopdaemon you get a hibernate option on the
    battery monitor icon (at least the ubuntu version), but I like hibernating
    desktop systems, too.
    --
    derek


    --
    To UNSUBSCRIBE, email to debian-kde-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  3. Re: suspend2 support

    Marcin Juszkiewicz wrote:
    > Does someone know how to integrate suspend2 support in KDE 3.5 on desktop
    > machine? I recently upgraded to 2.6.15(-rc) with that patch and found it
    > nice but hibernating via "sudo hibernate" is not an option here as not
    > all users use Konsole.
    >
    > Best way would be 'Hibernate' option in logout window..


    I thought about this a lot (albeit I have switched now to in-kernel suspend
    after long time using suspend2, but that's besides the point, I still use
    hibernate), but IMHO hacking logout window requires C++ patching, and I am
    not able (and willing) to go there. What I did is just to create new item
    in K-menu (with keyboard shortcut) which runs this script:

    #!/bin/sh
    if [ -z $DISPLAY ] ; then exit ; fi

    kdialog --yesnocancel "Suspend to RAM?"
    RESULT=$?
    if [[ $RESULT -eq "0" ]]; then
    sudo -u root /usr/sbin/hibernate -F /etc/hibernate/ram.conf
    fi

    if [[ $RESULT -ne "2" ]]; then
    sudo -u root /usr/sbin/hibernate
    fi

    Certainly that your script will be different (e.g., something about the
    lines of too-well known "Are you sure?" dialog box), but I think it is the
    easiest way to go.

    Matej

    --
    Matej Cepl, http://www.ceplovi.cz/matej/blog/
    GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC

    In those days spirits were brave, the stakes were high, men were
    real men, women were real women and small furry creatures from
    Alpha Centauri were real small furry creatures from Alpha
    Centauri.
    -- Douglas Adams


    --
    To UNSUBSCRIBE, email to debian-kde-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  4. Re: suspend2 support

    Dnia środa, 4 stycznia 2006 15:08, Matej Cepl napisał:

    > I thought about this a lot (albeit I have switched now to in-kernel
    > suspend after long time using suspend2, but that's besides the point, I
    > still use hibernate), but IMHO hacking logout window requires C++
    > patching, and I am not able (and willing) to go there.


    > What I did is just to create new item in K-menu (with keyboard shortcut)
    > which runs this script:


    > Certainly that your script will be different (e.g., something about the
    > lines of too-well known "Are you sure?" dialog box), but I think it is
    > the easiest way to go.


    I probably goes that way too but with small binary which will display
    QMessageBox('are you sure') and will execute 'hibernate'. This way I could
    make it suid so sudo will not be required (think about users which does
    not use Konsole and does not need sudo privileges).

    --
    JID: hrw-jabber.org
    Sharp Zaurus C-760 (OZ 3.5.x)
    OpenEmbedded/OpenZaurus/OPIE developer

    Real programmers don't document.
    If it was hard to write, it should be hard to understand.

  5. Re: suspend2 support

    Marcin Juszkiewicz wrote:

    > Dnia ?roda, 4 stycznia 2006 15:08, Matej Cepl napisa?:
    >
    >> I thought about this a lot (albeit I have switched now to in-kernel
    >> suspend after long time using suspend2, but that's besides the point, I
    >> still use hibernate), but IMHO hacking logout window requires C++
    >> patching, and I am not able (and willing) to go there.


    It depends what you need. I changed the KControl "System Administration /
    Login Manager" shutdown command to be hibernate. Now I have to use either
    the console to issue "halt" or the "Reboot" option (and then power off when
    it tries to restart) if I really want to halt, but I almost never want
    that.

    >> What I did is just to create new item in K-menu (with keyboard shortcut)
    >> which runs this script:

    >
    >> Certainly that your script will be different (e.g., something about the
    >> lines of too-well known "Are you sure?" dialog box), but I think it is
    >> the easiest way to go.

    >
    > I probably goes that way too but with small binary which will display
    > QMessageBox('are you sure') and will execute 'hibernate'. This way I could
    > make it suid so sudo will not be required (think about users which does
    > not use Konsole and does not need sudo privileges).


    You could just give access in /etc/sudoers for all users (or a specific
    group) to use hibernate without a password. Then nobody needs to know that
    sudo's even being used.
    --
    derek


    --
    To UNSUBSCRIBE, email to debian-kde-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  6. Re: suspend2 support

    Marcin Juszkiewicz wrote:
    > QMessageBox('are you sure') and will execute 'hibernate'. This way I could
    > make it suid so sudo will not be required (think about users which does
    > not use Konsole and does not need sudo privileges).


    You don't have to run this script in [ck]onsole. sudo works perfectly well
    without output to stdout.

    Matej

    --
    Matej Cepl, http://www.ceplovi.cz/matej/blog/
    GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC

    He is a self-made man and worships his creator.
    -- John Bright



    --
    To UNSUBSCRIBE, email to debian-kde-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  7. Re: suspend2 support

    On Wednesday 04 January 2006 07:05, Derek Broughton wrote:
    > Marcin Juszkiewicz wrote:
    > > Does someone know how to integrate suspend2 support in KDE 3.5 on
    > > desktop machine? I recently upgraded to 2.6.15(-rc) with that
    > > patch and found it nice but hibernating via "sudo hibernate" is
    > > not an option here as not all users use Konsole.
    > >
    > > Best way would be 'Hibernate' option in logout window..

    >
    > I agree. If you install klaptopdaemon you get a hibernate option
    > on the battery monitor icon (at least the ubuntu version), but I
    > like hibernating desktop systems, too.


    Nice, but ... the right-menu-button option is "Hibernate...",
    which implies that you get another dialog with a chance to
    continue/cancel. In fact, you don't get another dialog, so the
    text really should be simply "Hibernate".


    --
    To UNSUBSCRIBE, email to debian-kde-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  8. Re: suspend2 support

    Bjorn Helgaas wrote:

    > On Wednesday 04 January 2006 07:05, Derek Broughton wrote:
    >> Marcin Juszkiewicz wrote:
    >> > Does someone know how to integrate suspend2 support in KDE 3.5 on
    >> > desktop machine? I recently upgraded to 2.6.15(-rc) with that
    >> > patch and found it nice but hibernating via "sudo hibernate" is
    >> > not an option here as not all users use Konsole.
    >> >
    >> > Best way would be 'Hibernate' option in logout window..

    >>
    >> I agree. If you install klaptopdaemon you get a hibernate option
    >> on the battery monitor icon (at least the ubuntu version), but I
    >> like hibernating desktop systems, too.

    >
    > Nice, but ... the right-menu-button option is "Hibernate...",
    > which implies that you get another dialog with a chance to
    > continue/cancel. In fact, you don't get another dialog, so the
    > text really should be simply "Hibernate".


    I'd never noticed that. You're right.
    --
    derek


    --
    To UNSUBSCRIBE, email to debian-kde-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  9. Re: suspend2 support

    On Thursday 05 January 2006 10:33, Derek Broughton wrote:
    > Bjorn Helgaas wrote:
    > > Nice, but ... the right-menu-button option is "Hibernate...",
    > > which implies that you get another dialog with a chance to
    > > continue/cancel. In fact, you don't get another dialog, so the
    > > text really should be simply "Hibernate".

    >
    > I'd never noticed that. You're right.


    Reported as http://bugs.kde.org/show_bug.cgi?id=119638


    --
    To UNSUBSCRIBE, email to debian-kde-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

+ Reply to Thread