On Saturday 23 January 2010, Kevin Krammer wrote:
> On Friday, 2010-01-22, roberto wrote:
> > hello
> > i am searching for a command line way to save the kde session,
> > since i'd like to place it into a script along with the command to
> > suspend the pc
> >
> > i've found this command:
> > dcop ksmserver ksmserver saveCurrentSession
> >
> > do you think it is right ?
>
> Yes, that looks right for KDE3, the KDE4 equivalent should be
> qdbus org.kde.ksmserver /KSMServer
> org.kde.KSMServerInterface.saveCurrentSession
Thanks for this! I've long been looking for a way to periodically save
the session state as I've been annoyed by crashes destroying my setup.
So, below is a script I'm now having cron run every 5 minutes.
Michael
#! /bin/sh
. /usr/share/acpi-support/power-funcs
# for getXuser
for x in /tmp/.X11-unix/* ; do
displaynum=`echo $x | sed s,/tmp/.X11-unix/X,,`
getXuser
if [ x"$XAUTHORITY" != x"" ] ; then
export DISPLAY=":$displaynum"
qdbus org.kde.ksmserver
/KSMServer org.kde.KSMServerInterface.saveCurrentSession >
/dev/null
fi
done
exit 0
--
Michael Schuerig
mailto:michael@schuerig.de
http://www.schuerig.de/michael/
--
To UNSUBSCRIBE, email to debian-kde-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
01-23-2010, 06:26 PM
roberto
command line saving session
On Sat, Jan 23, 2010 at 12:58 PM, Kevin Krammer <kevin.krammer@gmx.at> wrote:
> On Friday, 2010-01-22, roberto wrote:
>> hello
>> i am searching for a command line way to save the kde session, since
>> i'd like to place it into a script along with the command to suspend
>> the pc
>>
>> i've found this command:
>> dcop ksmserver ksmserver saveCurrentSession
>>
>> do you think it is right ?
>
> Yes, that looks right for KDE3, the KDE4 equivalent should be
> qdbus org.kde.ksmserver /KSMServer
> org.kde.KSMServerInterface.saveCurrentSession
great, i hold kde 3.5.10
so it should work for me
--
roberto
--
To UNSUBSCRIBE, email to debian-kde-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
01-24-2010, 05:07 AM
Arthur Marsh
command line saving session
Kevin Krammer wrote, on 23/01/10 22:28:
On Friday, 2010-01-22, roberto wrote:
hello
i am searching for a command line way to save the kde session, since
i'd like to place it into a script along with the command to suspend
the pc
i've found this command:
dcop ksmserver ksmserver saveCurrentSession
do you think it is right ?
Yes, that looks right for KDE3, the KDE4 equivalent should be
qdbus org.kde.ksmserver /KSMServer
org.kde.KSMServerInterface.saveCurrentSession
Cheers,
Kevin
Is there a line break or word split somewhere there? I'm not running
kde4 yet but would like to have the command in a workable state for
future reference.
Arthur.
--
To UNSUBSCRIBE, email to debian-kde-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
01-24-2010, 08:21 AM
Michael Schuerig
command line saving session
On Sunday 24 January 2010, Arthur Marsh wrote:
> Kevin Krammer wrote, on 23/01/10 22:28:
> > On Friday, 2010-01-22, roberto wrote:
> >> hello
> >> i am searching for a command line way to save the kde session,
> >> since i'd like to place it into a script along with the command to
> >> suspend the pc
> >>
> >> i've found this command:
> >> dcop ksmserver ksmserver saveCurrentSession
> >>
> >> do you think it is right ?
> >
> > Yes, that looks right for KDE3, the KDE4 equivalent should be
> > qdbus org.kde.ksmserver /KSMServer
> > org.kde.KSMServerInterface.saveCurrentSession
> >
> > Cheers,
> > Kevin
>
> Is there a line break or word split somewhere there? I'm not running
> kde4 yet but would like to have the command in a workable state for
> future reference.