Question about fast user switching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all.  I took advantage of the purchase of a new machine to try out
F9 beta.  I know this isn't the right list for F9 questions, but this
is mostly about fast user switching, which I think has been around
since FC7.

I am the main user of this computer and am logged in all the time.
Occasionally, someone else will use it, so when I'm not sitting at the
computer, I like it to show gdm/kdm (doesn't matter which really,
currently gdm).  In the past, I've changed to an unused VT, logged in,
and started X on :1.  Then when I step away from the computer, I run a
script I wrote (tied to a convenient desktop button and xautolock in
case I forget) that changes to the gdm display.  Here it is:
------
#!/bin/bash

# Fire up the screensaver before switching.  Using "save" instead of
"lock" gives us a grace period to kill the screensaver without a
password, as defined in the control center.
(sleep 5; dcop kdesktop KScreensaverIface save)&

export DISPLAY=:0.0

if [ `fgconsole` -ne 7 ]; then
  sudo sh -c ' sudo chvt 7; sleep 30; sudo xset +dpms; sudo xset dpms
force off; sleep 30; sudo xset dpms force off'
fi
------
It's not perfect in that it assumes gdm is running on vt 7, and this
approach doesn't do anything with device permissions and such.  But it
mostly worked well.  Note also that my script would turn on my
screensaver and turn off the monitor in short order, which I like.

I'm now trying to accomplish the same thing using the "proper" method,
fast user switching.  I'm now using gnome instead of KDE (a story in
itself in F9...), so I do have the user switching applet on my
desktop.  What I'm wondering is:

1. Is there some way I can call fast user switching through a script,
like above?  I'd like to also turn on the screensaver, etc.  Mainly,
I'd like to be able to accomplish the user switch to "Other..." on the
command line using xautolock.

2. This may be more of a test-list question, but when I change to
gdm's vt, DPMS never kicks in.  I added these lines to
gdm/Init/Default:

xset +dpms
xset dpms 15 30 45
xset q > /tmp/xsetq.out

As you can see, I sent the output of "xset q" to a file, and DPMS is
indeed enabled:

DPMS (Energy Star):
  Standby: 15    Suspend: 30    Off: 45
  DPMS is Enabled
  Monitor is On

But it never turns the monitor off.  Does anyone know why this is happening?

Sorry for the long post, and thanks for any insights/suggestions/comments!
Reid


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux