Permanent and systematic loading of the canadian Keyboard

Non release banter
User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Permanent and systematic loading of the canadian Keyboard

Post#1 by francois » 19 Jul 2011, 13:03

I would like to have the permanent and systematic loading of the canadian Keyboard at each bootup. Even though I set the canadian keyboard for a session, it does not remain from one session to the other. Although I have a save change folder. How do I set this option?
Prendre son temps, profiter de celui qui passe.

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Permanent and systematic loading of the canadian Keyboar

Post#2 by Hamza » 19 Jul 2011, 13:51

Hi,

Please post more informations.
4. Include logs and tell us what commands were executed. What we want the most are: /var/log/dmesg and /var/log/messages. Use pastebin.com for long and multiple files. Jayflood's 'Porteus System Info' tool can be also very helpful - you can launch it from Kmenu/Lxde menu and receive a lot of useful info about your system straight on the desktop. Remember: nobody can help you if they don't know what's wrong, or what you did to get the error you received. Providing this information will greatly aid others in assisting you, and will allow us to diagnose your problem easier and sooner.
NjVFQzY2Rg==

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Permanent and systematic loading of the canadian Keyboar

Post#3 by brokenman » 20 Jul 2011, 03:21

have you used the 'Language Selection Tool?'
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
BlackRider
Black ninja
Black ninja
Posts: 70
Joined: 13 Jul 2011, 11:04
Location: Nowhere
Contact:

Re: Permanent and systematic loading of the canadian Keyboar

Post#4 by BlackRider » 20 Jul 2011, 15:33

I think Porteus lacks of automatic keyboard settings at startup.

The solution adopted by Knoppix should be applied in Porteus if posible. When you start Knoppix, you have the option of adding "lang=es" as a cheatcode. Doing so grants that the keyboard will load itself in and behave well even when Xorg is up.

If the approach taken by Knoppix was adopted, then configuring the keyboard would be as easy as adding a cheatcode in the bootloader's config file.

When you are used to boot in Always Fresh mode, it is really annoying to reconfigure the keyboard with setxkbmap once, and again, and again...

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Permanent and systematic loading of the canadian Keyboar

Post#5 by francois » 20 Jul 2011, 19:51

There was not such a problem with slax. Once you would change the keyboard setting in one session, given that you would use the save change option, it would remember it.

So what was the trick?

Posted after 2 hours 27 minutes:
brokenman wrote:have you used the 'Language Selection Tool?'
Thanks brokenman. I will try that.
Prendre son temps, profiter de celui qui passe.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Permanent and systematic loading of the canadian Keyboar

Post#6 by fanthom » 20 Jul 2011, 19:53

@francois
i have checked it and seems that switching kbd layout settings with left mouse click on the flag in tray and "alt+shift" shortcuts works only temporarily (nothing is saved in changes folder).
to sort out this issue you must call kdb settings applet in kde, set your kdm layout and click "Apply" button. you can launch it from console with "kcmshell4 kcm_keyboard" (kde4) or "kcmshell keyboard_layout" (kde3) command.
for LXDE you have to edit ~/.config/autostart/xkb.desktop manually.

other solution mentioned by brokenman is to use "Language Selection Tool".

@BlackRider
"I think Porteus lacks of automatic keyboard settings at startup."
LST is the solution - pls try it.
Please add [Solved] to your thread title if the solution was found.

User avatar
BlackRider
Black ninja
Black ninja
Posts: 70
Joined: 13 Jul 2011, 11:04
Location: Nowhere
Contact:

Re: Permanent and systematic loading of the canadian Keyboar

Post#7 by BlackRider » 20 Jul 2011, 21:29

LST is the solution - pls try it.
Are you refering to Low Stress Training :D ??

Yeah, Language selection tool could be of some help in USB drives (not tried yet). But what about CDs?

In any other Live distribution I have tried, you could choose your keyboard settings by appending the lang=xx cheatcode and kmap=xx, or at least you had a similar option. Porteus will boot with an unfriendly keyboard anyway . Worse yet, the menu displayed in the bar does not include my language, so I am supposed to know the setxkbmap trick! No many newcomers would know that trick.

Yes, I could use LST, but LST displays a message about downloading stuff. A bad thing, because it asumes:

1 – That you have Linux compatible networking hardware and you have managed to set it up and running. Not true in some cases (my modem is not recognized by default without some tweaking).

2 – That your network is able to download that stuff. True in most cases. Not in mine :wall: . Have you got an idea of how much time it took to load this forum from my house?

LST is nice, but i think the capability of selecting a keyboard from the start prompt is a MUST.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Permanent and systematic loading of the canadian Keyboar

Post#8 by fanthom » 20 Jul 2011, 23:22

@BlackRider
no problem. in Porteus 1.1 i will introduce new cheatcode: "kmap=" which gonna operate in /opt/porteus-scripts/paths (this script sets some variables for GUI).

here is the code:

Code: Select all

KMAP=`egrep -o " kmap=[^[:space:]]+" /proc/cmdline | cut -d= -f2`
[ "$KMAP" = "" ] || setxkbmap $KMAP
(you can try it even now)
btw: LST is still recommended as most complex and efficient solution. some lang files are exported from Porteus ISO and can be downloaded back only by using LST.

@Ahau
pls add description to the new cheatcode in /boot/cheatcodes.txt. here is my draft:
"kmap=
this cheatcode lets you set preferred keyboard layout for KDE/LXDE/other desktop. Full list of supported layouts can be found in /etc/X11/xkb/symbols folder.
Example: 'kmap=ara' parameter will set arabic keyboard layout on start."

Thanks guys.
Please add [Solved] to your thread title if the solution was found.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Permanent and systematic loading of the canadian Keyboar

Post#9 by francois » 21 Jul 2011, 01:09

@BlackRider and Fanthom:
appending the lang=xx cheatcode and kmap=xx ... in menu.lst
is an excellent and widely adopted solution.

I am on kde. I will try one or the other of the propositions.

Thanks.
Prendre son temps, profiter de celui qui passe.

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Permanent and systematic loading of the canadian Keyboar

Post#10 by Hamza » 21 Jul 2011, 09:47

What is your version? arch?

I will write a small script to make a module of keyboard configuration.
NjVFQzY2Rg==

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Permanent and systematic loading canadian Keyboard

Post#11 by francois » 21 Jul 2011, 14:43

Porteus v 1.0 32-bit. To my knowledge there is no such keyboard issue on 64-bit.
Last edited by francois on 28 Aug 2011, 22:31, edited 1 time in total.
Prendre son temps, profiter de celui qui passe.

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Permanent and systematic loading of the canadian Keyboar

Post#12 by Hamza » 21 Jul 2011, 15:35

My script,

Tested and Approved by Me ;)

This tool is compatible with Porteus V1.0 32-bit ONLY

Code: Select all

#!/bin/bash

if [ "`whoami`" = "root" ]; then
ME=/root
else
ME=/home/guest
fi

CFG=$ME/.kde/share/config/kxkbrc

dialog --title "Welcome" --infobox 'Welcome to Porteus Keymap Saver\nHere, you will be able to save your keymap configuration.This tool is compatible with Porteus V1.0 32bit ONLY\n\nBefore to run this script, you must have set your keyboard layouts!! ' 10 70
read
if [ "`uname -m`" == "x86_64" ]; then
dialog --title "Error" --infobox "This tool is compatible with Porteus V1.0 32bit ONLY" 10 70
exit 1
fi

if [ ! -e "$CFG" ]; then
dialog --title "Error" --infobox 'The Keyboard config file does not exist' 5 70
exit 1
fi


TMP=/tmp/pkmap
[ -d "$TMP" ] && rm -Rf $TMP
mkdir $TMP
mkdir $TMP/`whoami`/
mkdir $TMP/`whoami`/.kde/
mkdir $TMP/`whoami`/.kde/share/
mkdir $TMP/`whoami`/.kde/share/config/


if [ "`whoami`" = "root" ]; then
PTH=/tmp/pkmap/root/.kde/share/config/
else
PTH=/tmp/pkmap/home/guest/.kde/share/config/
fi

cp -R $CFG $PTH
dir2xzm /tmp/pkmap $ME/Desktop/my-keyboard-settings.xzm
The module with your keyboard configuration will be saved in your current desktop.

Enjoy!
NjVFQzY2Rg==

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Permanent and systematic loading of the canadian Keyboar

Post#13 by Ahau » 29 Jul 2011, 19:09

@fanthom,

I'll bet you thought I forgot about this :)

Here's a draft for the cheatcodes.txt doc for V1.1:

Code: Select all

kmap=keyboardmap

   ... Specifies the preferred keyboard layout for KDE/LXDE or other
       desktop.  A full list of supported layouts can be found in the
       /etc/X11/xkb/symbols folder.

       Example: 'kmap=ara' will set the arabic keyboard layout at 
       startup.
If this works, I'll put it into the cheatcodes.txt file from V1.0, then submit it as a patch in this thread:

http://porteus.org/forum/viewtopic.php? ... +patch+1.1
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Permanent and systematic loading of the canadian Keyboar

Post#14 by francois » 31 Jul 2011, 02:54

@hamza: thanks for your kindness. You are always there with a solution.

@ahau: you are fast as lightning with your pen or I rather say with your us keyboard. Next bootup of my machine under frugal install save changes will come up to an answer to your suggestion. :twisted: As soon as we get v 1.1 on hands. :roll:

Posted after 1 hour 7 minutes 45 seconds:
fanthom wrote:@francois
...
"kcmshell4 kcm_keyboard" (kde4) or "kcmshell keyboard_layout" (kde3) command.
for LXDE you have to edit ~/.config/autostart/xkb.desktop manually.
...

.
@fanthom: Thanks, this solution of yours, is my preferred one. This olution works quite fine on kde3

I would add, why can't we just adjust it as in the previous versions of porteus? That is thru thru the gui on the keyboard layout.
Prendre son temps, profiter de celui qui passe.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Permanent and systematic loading of the canadian Keyboar

Post#15 by fanthom » 31 Jul 2011, 09:08

why can't we just adjust it as in the previous versions of porteus? That is thru thru the gui on the keyboard layout.
i think i have answered this question already:
"switching kbd layout settings with left mouse click on the flag in tray and "alt+shift" shortcuts works only temporarily (nothing is saved in changes folder). to sort out this issue you must call kdb settings applet in kde, set your kbd layout and click "Apply" button."

i'm pretty convinced that it works the same way in kde-3.5.10 :wink:

cheers
Please add [Solved] to your thread title if the solution was found.

Post Reply