can a keypress activate the screensaver? [SOLVED]

Booting, installing, newbie
Message
Author
Shep
Posts: 878
Joined: Sat 08 Nov 2008, 07:55
Location: Australia

can a keypress activate the screensaver? [SOLVED]

#1 Post by Shep »

Can the screensaver be activated by a keypress to blank the screen immediately?

I asked this in the Wary thread, but it mustn't be sufficiently technical to prompt anyone to answer. :?

Wary doesn't have a MENU entry for the screensaver. I think older puppies did.
Last edited by Shep on Wed 13 Jul 2011, 14:32, edited 1 time in total.

User avatar
r1tz
Posts: 162
Joined: Thu 09 Sep 2010, 05:19
Location: In #puppylinux (IRC)

#2 Post by r1tz »

I'm sure screensaver isn't too hard.

But Im not sure what screen saver wary uses, so i cant help you there.
Instead, let me suggest this:

You could keybind this command to a key
xlock -mode blank
But thats not screensaver you need to key in your password instead of just moving your mouse.

If might be better than a screensaver depending on what you want this keybind for...


Do you use openbox or jwm or icewm or...?

Shep
Posts: 878
Joined: Sat 08 Nov 2008, 07:55
Location: Australia

#3 Post by Shep »

I don't need to lock the screen, just want it to go black immediately.
r1tz wrote:Do you use openbox or jwm or icewm or...?
JWM

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

Re: can a keypress activate the screensaver ?

#4 Post by rjbrewer »

Shep wrote:Can the screensaver be activated by a keypress to blank the screen immediately?

I asked this in the Wary thread, but it mustn't be sufficiently technical to prompt anyone to answer. :?

Wary doesn't have a MENU entry for the screensaver. I think older puppies did.
Screensaver in Wary:

Desktop--pupx set properties of x.

Inspiron 700m, Pent.M 1.6Ghz, 1Gb ram.
Msi Wind U100, N270 1.6>2.0Ghz, 1.5Gb ram.
Eeepc 8g 701, 900Mhz, 1Gb ram.
Full installs

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#5 Post by Béèm »

Shep, do you mean you want to go to suspend mode?
The title of your post indicates screensaver.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

Shep
Posts: 878
Joined: Sat 08 Nov 2008, 07:55
Location: Australia

#6 Post by Shep »

I'd like to make the screen go blank with the press of a key, in addition to it going blank after 10 mins of inactivity. I don't want to suspend processing.

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#7 Post by Béèm »

So calling the screensaver with a blank image, prepared in advance.
I am not sure however if the back-light is cut-off.

Maybe acpitool has an option for this.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#8 Post by Dougal »

You probably want to create a JWM keybinding to run the xlock command.
For example, Alt+Esc (this goes in ~/.jwm/jwmrc-personal):

Code: Select all

<Key mask="A" key="Esc">xlock `cat /root/.config/Xlock/xlockscreenparams`</Key>
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

Shep
Posts: 878
Joined: Sat 08 Nov 2008, 07:55
Location: Australia

#9 Post by Shep »

Dougal wrote:You probably want to create a JWM keybinding to run the xlock command.
For example, Alt+Esc (this goes in ~/.jwm/jwmrc-personal):

Code: Select all

<Key mask="A" key="Esc">xlock `cat /root/.config/Xlock/xlockscreenparams`</Key>
That file doesn't exist, at the moment. Your Xlock suggestion might be ideal, because I would use its option to not mess with passwords:

Code: Select all

+/-nolock
  The nolock option causes xlock to only draw the patterns and not lock the display. A key press or a mouse click will terminate the screen saver. 
I just want to blank the computer screen so I can more easily view the tv screen over the top of it.

Bruce B

#10 Post by Bruce B »

Shep,

I think I had a little problem along activating a screen blank with a key press. I think I worked around it with a script and sleep for a split fraction of a second.

Bruce

~

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#11 Post by Dougal »

Shep wrote:
Dougal wrote:You probably want to create a JWM keybinding to run the xlock command.
For example, Alt+Esc (this goes in ~/.jwm/jwmrc-personal):

Code: Select all

<Key mask="A" key="Esc">xlock `cat /root/.config/Xlock/xlockscreenparams`</Key>
That file doesn't exist, at the moment.
That's strange... if JWM is used that file should exist since it's what the configuration utility changes (and has some default settings).
You should look in ~/.jwmrc for Include lines like:

Code: Select all

 <Include>/root/.jwm/jwmrc-personal</Include>
which should tell you where it is... (you could just add the keybinding to jwmrc, but it will disappear when it gets regenerated)
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

Shep
Posts: 878
Joined: Sat 08 Nov 2008, 07:55
Location: Australia

#12 Post by Shep »

Dougal wrote:That's strange... if JWM is used that file should exist since it's what the configuration utility changes (and has some default settings).
You should look in ~/.jwmrc for Include lines like:

Code: Select all

 <Include>/root/.jwm/jwmrc-personal</Include>
There is no /root/.jwmrc
The only files in /root/.jwm are jwm_colors jwmrc-personal jwmrc-personal2 jwmrc-theme themes
There are no hidden files. The two personal files seem identical.

Code: Select all

# find / -name 'xlockscreenparams'
#
When I put your alt esc idea into one of the personal files, it doesn't fire off xlock. When in a console the ALT-ESC combo produces:

Code: Select all

display all 1493 possibilities? (y or n)
Last edited by Shep on Sun 10 Jul 2011, 15:26, edited 1 time in total.

Shep
Posts: 878
Joined: Sat 08 Nov 2008, 07:55
Location: Australia

#13 Post by Shep »

To specify a control key, do I use "C"? Is shift "S"?
What about the windows key, how do I specify it?

User avatar
r1tz
Posts: 162
Joined: Thu 09 Sep 2010, 05:19
Location: In #puppylinux (IRC)

#14 Post by r1tz »

For the windows key, it should be mod4

so you can use the number 4 like:
<Key mask="4"

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#15 Post by Dougal »

Shep wrote:
Dougal wrote:That's strange... if JWM is used that file should exist since it's what the configuration utility changes (and has some default settings).
You should look in ~/.jwmrc for Include lines like:

Code: Select all

 <Include>/root/.jwm/jwmrc-personal</Include>
There is no /root/.jwmrc
The only files in /root/.jwm are jwm_colors jwmrc-personal jwmrc-personal2 jwmrc-theme themes
There are no hidden files. The two personal files seem identical.
Well, the "personal" files are what I mentioned in the first place: that's where you add the new keybinding.
If there's no /root/.jwmrc then you must not be using JWM...

Code: Select all

# find / -name 'xlockscreenparams'
#
When I put your alt esc idea into one of the personal files, it doesn't fire off xlock. When in a console the ALT-ESC combo produces:

Code: Select all

display all 1493 possibilities? (y or n)
The xlockscreenparams file is created when you configure xlock... I just looked at Barry's xlock_gui package and it still seems to use it.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

Shep
Posts: 878
Joined: Sat 08 Nov 2008, 07:55
Location: Australia

#16 Post by Shep »

Now, this is looking promising: in file etc/xdg/templates/_root_.jwmrc we read:

Code: Select all

<!-- IMPORTANT, ONLY EDIT /etc/xdg/templates/_root_.jwmrc -->
 <!-- jwm menu for puppy Linux -->
I edited it by adding a new entry, and restarted JWM but the new entry had no effect.

What's weird is that if I change an already defined key combination, then that works, but if I add a new entry, it doesn't work.

For example, here are some already defined entries:

Code: Select all

   <Key mask="A" key="Tab">next</Key>
    <Key mask="A" key="F4">close</Key>
    <Key mask="A" key="#">desktop#</Key>
    <Key mask="A" key="F1">root:3</Key>
    <Key mask="A" key="F2">window</Key>
If I alter this so that alt-F4 now performs "next" then that works and it does perform the next function. But if I add a 6 th entry to this block, viz.

Code: Select all

    <Key mask="A" key="F3">close</Key>
then alt-F3 is not recognised as a defined combination.

Any more suggestions?

At the foot of the file, it has the includes:

Code: Select all

 <Include>/root/.jwm/jwmrc-theme</Include>
 <Include>/root/.jwm/jwmrc-personal</Include>

Doglover

#17 Post by Doglover »

Why not add a tray button for the screensaver like dpup485 has.

Line 10 of my .jmrc-tray

<TrayButton popup="Activate Screensaver" icon="xscreensaver.xpm">exec:xscrun</TrayButton>

User avatar
dru5k1
Posts: 72
Joined: Mon 12 Apr 2010, 01:15

#18 Post by dru5k1 »

I know this might be beside the point (I've not read your whole post - just the title, and had to ask myself the same question) but "if" you are using a stock standard late puppy, why don't you just first set a password for your screensaver [lock-desktop icon] and then right-click and edit - adding the shortcut button F8, or CTRL-ALT-H as I just did?

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#19 Post by Dougal »

Shep wrote:Now, this is looking promising: in file etc/xdg/templates/_root_.jwmrc we read:

Code: Select all

<!-- IMPORTANT, ONLY EDIT /etc/xdg/templates/_root_.jwmrc -->
 <!-- jwm menu for puppy Linux -->
I edited it by adding a new entry, and restarted JWM but the new entry had no effect.
That's just the template used for generating ~/.jwmrc -- you need to run fixmenus to regenerate it...
What's weird is that if I change an already defined key combination, then that works, but if I add a new entry, it doesn't work.

For example, here are some already defined entries:

Code: Select all

   <Key mask="A" key="Tab">next</Key>
    <Key mask="A" key="F4">close</Key>
    <Key mask="A" key="#">desktop#</Key>
    <Key mask="A" key="F1">root:3</Key>
    <Key mask="A" key="F2">window</Key>
If I alter this so that alt-F4 now performs "next" then that works and it does perform the next function. But if I add a 6 th entry to this block, viz.

Code: Select all

    <Key mask="A" key="F3">close</Key>
then alt-F3 is not recognised as a defined combination.
That doesn't seem to make sense... unless you regenerate the menu it should not have any effect and even if you do, I can't see why it will behave that way unless:
- Your F3 isn't working or not mapped (for some reason) -- or defined differently in /root/.jwm/jwmrc-personal (note that this file is where you are supposed to add all your changes -- it comes after the other definitions and will override them if you bind the same key twice).
- Maybe there's something wrong with the fixmenus script and it ignores the line with F3? I can't imagine why, though.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

Shep
Posts: 878
Joined: Sat 08 Nov 2008, 07:55
Location: Australia

#20 Post by Shep »

Okay, now that I know about fixmenus I am bound to make some progress. :)

Furthermore, the crucial missing files have made an appearance. :) :)

Code: Select all

# find / -name '.jwmrc'
/root/.jwmrc

Code: Select all

# find / -name 'xlockscreenparams'
/root/.config/Xlock/xlockscreenparams

Post Reply