How to toggle between laptop / external monitor? (Solved)

Booting, installing, newbie
Message
Author
nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

How to toggle between laptop / external monitor? (Solved)

#1 Post by nooby »

Jemimah's pet for Wary and Racy worked well on Lupu528-004 too.
So thanks for making it and thanks for telling me and not giving up on me :)

old text

Sure I can do it manually on the Netbook's own keyboard
but to get rid of the noise from fan I have placed it on a shelf behind a screen
and I risk everything going down to the floor due to cramp space.

So to do the Fn+F6 on CLI, Terminal, Console, rxvt ? would be super!

I need to find out what number that key combination are or something?
How do I ask the terminal to tell and what command do I use to later
make use of that number it reveals? Would that be a unique number
for each computer or is it same all over the market?
Last edited by nooby on Fri 17 Feb 2012, 09:43, edited 2 times in total.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#2 Post by nooby »

May I kindly ask for help with this one?
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: How do I execute Fn+F6 on CLI, Terminal, Console, rxvt ?

#3 Post by L18L »

nooby wrote: So to do the Fn+F6 on CLI, Terminal, Console, rxvt ?
F6 is a key on my keyboard.
But what is Fn :?:
And what is Fn+F6 :?:

:cry:

User avatar
mahaju
Posts: 487
Joined: Mon 11 Oct 2010, 07:11
Location: between the keyboard and the chair

#4 Post by mahaju »

Fn key in laptop

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#5 Post by nooby »

Yes the I should have explained that part. Sorry.

Full key keyboards have very many keys.
So when they have a very small one then
they let same key do many "Functions" so
you have a blue color or a green or something
that says Fn and then you hold that one down
and then press say F6 key in the most upper row.

That press makes the screen go black on my small Netbook.

Now I want to know what "number" is it I should use for
to send same signals through the CLI, Terminal, Console
or Urxvt whatever name it has to send same instruction
to shut down the screen on the Netbook but not on the external screen.

Sure I can stand up from the chair and lean over and reach hand inside
the shelf and try to see where these small keys are and use index finger
and thumb and wish me good luck by accident hit the right combination

But I risk that the external screen hit the floor when I try to get out of the
cramped place on the shelf. I live in a very small room so I had to
build the computer shack as a compact living mess :)

Three computers, three external screens and two DVD recorders and one
VHS and a Mixer board and three external keyboards and three mouses
and so on. Loudspearkers and so on. It is like finding a needle in a haystack to hit the right key combo.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#6 Post by trapster »

In a console, try this:

Code: Select all

xset dpms force off
or
Try This
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#7 Post by nooby »

Haha that one was effective but sadly worked on both screens.
Sure it turned the internal screen off but also the external and
when I hit Esc to turn it on then it turned the internal one on too.

so one need to find the Fn +F6 number and only send that one.

Thanks for a good try though. Much appreciated.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#8 Post by Aitch »

nooby
maybe something like:
xrandr --output VGA --mode 1024x768
or

Code: Select all

xrandr | grep VGA | grep " connected " | egrep '16.0x|19.0x'
to turn it off

Code: Select all

xrandr --auto
just a thought...?

Aitch :)

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#9 Post by amigo »

Run 'xev', then press the desired key combination and xev will show you what code it is.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#10 Post by nooby »

Amigo,

I did not know how to apply that command.
Am I supposed to write xev and then do the Fn+F6 and then
hit enter or am I supposed to first do the xev and then hit enter
and then do Fn+F6?

I tested both. none of them gave an answer that I understand.

one of them gave this

KeymapNotify event, serial 28, synthetic NO, window 0x0,
keys: 40 0 0 0 16 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

KeyRelease event, serial 33, synthetic NO, window 0x2600001,
root 0x6d, subw 0x0, time 8813727, (584,282), root:(864,609),
state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
" XLookupString gives 1 bytes: (0d) "
XFilterEvent returns: False

ClientMessage event, serial 39, synthetic YES, window 0x2600001,
message_type 0x10f (WM_PROTOCOLS), format 32, message 0x10d (WM_DELETE_WINDOW)
sh-4.1#

So maybe this is the answer?

keycode 36 (keysym 0xff0d, Return), So what am I suppose to do
to send that command using the terminal then?

Aitch you may be right but I understand too little to dare do such complicated things. What in that code only affect the internal screen
and not the external screen.
I use Google Search on Puppy Forum
not an ideal solution though

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#11 Post by nooby »

Ubuntu has this text
#

We are going to set up these keys. Open a terminal and type:

xev

#

Then press a multimedia key. If you are lucky it already has a keysym boundto it, so the output of xev for that key will be something like this:

KeyRelease event, serial 28, synthetic NO, window 0x3200001,
root 0xb7, subw 0x0, time 137010761, (693,138), root:(705,256),
state 0x10, keycode 136 (keysym 0x1008ff27, XF86Forward), same_screen YES,
XLookupString gives 0 bytes:

# The third row is the one of interest: it says that you have a keycode for that key (136) as well as keysym (XF86Forward). If you have a keysym then you can use that string to represent your key and use gnome keybindings or metacity keybindings to bind the relevant action to it. (See below).
#

But probably, you will find that the key does not have any keysym assigned to it, like this:

KeyRelease event, serial 28, synthetic NO, window 0x3200001,
root 0xb7, subw 0x0, time 137355697, (401,146), root:(413,264),
state 0x10, keycode 136 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:

# In this case you have to assign your keysym to the relevant keycode (136) (it does not match the kernel keycode for that keys, but it does not matter, it is by design).
So that is in line with what amigo told me.

So what am I expected to do in the terminal to exec or what ever command to use to send that code to the linux OS?
from here
https://help.ubuntu.com/community/MultimediaKeys
I use Google Search on Puppy Forum
not an ideal solution though


User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#13 Post by Semme »

Nooby, try the grandr pkg- an xrandr gui. It may help simplify Aitchs`response..

Then again, maybe just dump: xrandr -q so we can see what's connected.

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#14 Post by Aitch »

grandr gui for racy/wary, by jemimah

http://murga-linux.com/puppy/viewtopic.php?t=74692

manpages

http://www.manpagez.com/man/1/xrandr/

nooby guide [well almost nooby....newbie :wink:

http://www.phoronix.com/scan.php?page=a ... =927&num=1

Aitch :)

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#15 Post by nooby »

Thanks seems way above my capacity to grasp.
Surprising this is so difficult? I give up on it.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#16 Post by Semme »

Unsolvable? Don't be a quitter now, we're :wink: almost there.

What are we dealing with Nooby.. a laptop with an external monitor? Which one is it you wanna toggle?

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#17 Post by nooby »

The internal screen should be off and the external should be on.

No fiddling with screen size or such unless that program you guys
refers to always do this so one have to adjust it.

So you are optimistic that you can solve it? They say that Optimists
have fun while the Pessimist even fail to enjoy the fun because us
pessimists know that the fun would not last long :)

The Pet Jemimah made for Saluki would not work for Lupu would it?
Not same kernel or how it is set up? Obviously there is not simple
or plain way to do it so I don't feel optimistic. I doubt it can be solved?

The texts linked to where too difficult to read. And using a Pet that
I have no idea what it does is very scary. I maybe would do it if I make
a test version of Lupu by copying the savefile and then only use the test
version of the savefile and then install the pet you refer to.
hm maybe I just to that now so it is over with :)
I use Google Search on Puppy Forum
not an ideal solution though

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#18 Post by nooby »

I should be an Happy Optimist instead of being a
Whining Pessimist. You guys got it right. Grandr did work.

I only had no idea what it could do. I got misled by the 1024x768 thing.
I did not see the off thing. It worked well. So my friendliest apology for
being difficult.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#19 Post by Semme »

Nooby- the above here mean you're satisfied? You have it working with an assigned key combo?

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#20 Post by Aitch »

nooby wrote:So you are optimistic that you can solve it? They say that Optimists have fun while the Pessimist even fail to enjoy the fun because us pessimists know that the fun would not last long
:lol: :lol:

I heard it that while pessimists are busy worrying themselves that they might have fun, optimists are enjoying it, knowing that the pain of failure doesn't last long....and is a lesson to learn from

Just perspectives, nooby....the only thing you change is your mind!

Glad you got it sorted...at least I think you did....?

Aitch :)

Post Reply