HOWTO: Enable the FN-F4 key (LCD/VGA switch)

Discussions about Linux installation and configuration on Samsung laptops
User avatar
voria
Administrator
Administrator
Posts: 1383
Joined: 12 Feb 2009, 18:08
Location: Italy
Contact:

RE: [NC10] How to enable the FN-F4 key (LCD/VGA switch)

Post by voria »

'dajs' pid='1881' dateline='1251995056' wrote: First of all Thanks for alle the great scripts.

I am using Xubuntu. Anyone know which commands I need to enter in the XFCE keyboard bindings to switch between VGA and the netbook?

ARandR works fine, and I can switch too, but they keyboard binding does not work since its XFCE.

Nothing too important but if someone has an idea plz tell me.

Thanks.
When binding the screen layouts to a key through arandr, the command used to switch them is added to gconf. You can find it by launching 'gconf-editor' and moving to '/apps/metacity/keybinding_commands/'.
Last edited by voria on 04 Sep 2009, 12:09, edited 1 time in total.
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!
dajs
Newbie
Newbie
Posts: 2
Joined: 03 Sep 2009, 17:15

RE: [NC10] How to enable the FN-F4 key (LCD/VGA switch)

Post by dajs »

'voRia' pid='1888' dateline='1252062496' wrote:
When binding the screen layouts to a key through arandr, the command used to switch them is added to gconf. You can find it by launching 'gconf-editor' and moving to '/apps/metacity/keybinding_commands/'.
Thank You!
I found it and it works perfectly :)
tkoorn
Newbie
Newbie
Posts: 9
Joined: 23 Apr 2009, 16:35

Re: HOWTO: Enable the FN-F4 key (LCD/VGA switch)

Post by tkoorn »

Is there a way to do this in KDE?

I can assign scripts to buttons I think, but I can't seem to find a way to cycle through them like in Gnome.
User avatar
voria
Administrator
Administrator
Posts: 1383
Joined: 12 Feb 2009, 18:08
Location: Italy
Contact:

Re: HOWTO: Enable the FN-F4 key (LCD/VGA switch)

Post by voria »

Not checked yet, sorry.
I think it should be easy enough to do, though.
I'll let you know as soon as I have a spare time to test it. ;)
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!
tkoorn
Newbie
Newbie
Posts: 9
Joined: 23 Apr 2009, 16:35

Re: HOWTO: Enable the FN-F4 key (LCD/VGA switch)

Post by tkoorn »

Thanks, I have been trying myself with limited succes. If I do manage it I'll post it ofcourse.
User avatar
voria
Administrator
Administrator
Posts: 1383
Joined: 12 Feb 2009, 18:08
Location: Italy
Contact:

Re: HOWTO: Enable the FN-F4 key (LCD/VGA switch)

Post by voria »

I've added a new script to the 'samsung-scripts' package, binded by default to Fn-F4.
This script takes care of cycling screen layouts created with arandr, it works with ubuntu and kubuntu.
I've updated the instructions in the main post of this thread.
Some more informations about the new script can be found in the scripts thread.
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!
tkoorn
Newbie
Newbie
Posts: 9
Joined: 23 Apr 2009, 16:35

Re: HOWTO: Enable the FN-F4 key (LCD/VGA switch)

Post by tkoorn »

Thank you very much.
mblinov71
Newbie
Newbie
Posts: 2
Joined: 19 Jul 2010, 19:29

Re: HOWTO: Enable the FN-F4 key (LCD/VGA switch)

Post by mblinov71 »

Hi
Just wonder if that script for switching layouts in kubuntu is still supported.
I could not find "samsung-scripts" in the repository, so I assume it's now "samsung-tools".
But I could not find any scripts in there that look like they might be doing the job.
And Fn-F4 does not do anything either.
I have samsung-tools v. 1.1.1.
I have arandr installed and don't have any of the compiz packages.
User avatar
voria
Administrator
Administrator
Posts: 1383
Joined: 12 Feb 2009, 18:08
Location: Italy
Contact:

Re: HOWTO: Enable the FN-F4 key (LCD/VGA switch)

Post by voria »

On kubuntu, just use krandrtray.
If you want, you can bind it to Fn-F4, so you can launch it using the hotkey.
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!
mblinov71
Newbie
Newbie
Posts: 2
Joined: 19 Jul 2010, 19:29

Re: HOWTO: Enable the FN-F4 key (LCD/VGA switch)

Post by mblinov71 »

Yes, I guess I can launch krandrtray with a hotkey,
but krandrtray doesn't seem to be able to save screen layouts like arandr,
neither can it switch between them with a hotkey.

So I'd still prefer to use arandr and a script that cycles through layouts.
In fact, I wrote one myself already. But it looks like your script is more advanced
(judging by the description in your earlier posts).
So I wonder if you still have it somewhere.
(If you don't then no problem, I can upload mine for the time being).
mikebl71
Newbie
Newbie
Posts: 22
Joined: 03 Oct 2010, 20:17

Re: HOWTO: Enable the FN-F4 key (LCD/VGA switch)

Post by mikebl71 »

I found the switchscreenlayout.sh script (attached) in the samsung-scripts package in the repository. But this package is only enabled for karmic. Could you please add this script to samsung-tools as well so that it is available for lucid+ users as well ?
mikebl71
Newbie
Newbie
Posts: 22
Joined: 03 Oct 2010, 20:17

Re: HOWTO: Enable the FN-F4 key (LCD/VGA switch)

Post by mikebl71 »

Ok, so the following works for me on kubuntu (maverick).

1) Download the switchscreenlayout.zip from the previous post.

2) Unzip the script to eg $HOME/bin
unzip switchscreenlayout.zip -d $HOME/bin/

3) Open "System Settings" / "Shortcuts and Gestures" / "Custom Shortcuts"

4) Click "Edit / "New" / "Global Shortcut" / "Command/URL"

5) Type in name "SwitchScreenLayout"

6) In Trigger tab, click "Shortcut: None" and press Fn-F4 (in my case, it appears as "Display")

7) In Action tab, navigate to your Home / bin / switchscreenlayout.sh

8) Apply

That's it. When you click Fn-F4 for the first time, it should launch ARandR (assuming you have it installed), so that you can create your layouts and save them as described in detail in the first post of this thread. After that, Fn-F4 should flick through your saved layouts.
micha
Newbie
Newbie
Posts: 17
Joined: 19 Sep 2009, 13:14

Re: HOWTO: Enable the FN-F4 key (LCD/VGA switch)

Post by micha »

voRia wrote:This howto explains how to enable the Fn-F4 hotkey.

IMPORTANT NOTE before starting: Ubuntu Karmic suffers a bug which prevent the VGA out to work correctly when compiz is enabled. So, make sure it's disabled when you want to use the VGA out (there is a convenient script in the 'samsung-scripts' package, binded to <ctrl><shift><alt>m by default, for switching compiz/metacity windows managers).
What's about Natty (11.04) with Unity? Unity needs Compiz, I can't disable it! How I can make Fn+F4 work with Ubuntu 11.04?

Thanks for help,

Micha
Post Reply