Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 18 Sep 2014, 14:03
All times are UTC - 4
 Forum index » House Training » Bugs ( Submit bugs )
xorgwizard - resets keyboard settings
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
naena

Joined: 14 Mar 2011
Posts: 46

PostPosted: Thu 18 Jul 2013, 11:29    Post subject:  xorgwizard - resets keyboard settings
Subject description: xorgwizard removes mouse/keyboard settings
 

This is about version 5.6.1 (may be all versions).

When I run xorgwizard, it resets the xorg.conf file destroying my keyboard settings. Perhaps the wizard should offer the user an option to retain keyboard settings?

DETAILS:
I use two keymaps, one for English and one for romanized Singhala. Both use the same familiar US key layout.

In order to switch between the two maps, I set up the combination Ctrl-Shift by using the mouse/keyboard wizard. This matches what Windows XP does by default. Since Puppy does not have a floating keyboard selector to visually indicate which keymap is currently active, I set the scroll-lock lamp to come on when Singhala is on. Beautiful!

There are three things you need to do to add a new keymap:
1. Write the keyboard program -- very simple and straightforward
Add it to your country page here:
/etc/X11/xkb/symbols/pc
2. Register the keymap as a Variant under your country here:
/etc/X11/xkb/rules/base.lst
3. Run mouse/keyboard wizard to setup the way you want to switch
between keymaps. The wizard modifies the
Section "InputDevice" - Identifier "Keyboard0"
in the following page:
/etc/X11/xorg.conf

I wrote an instruction page for other users that like to use simple romanized Singhala as opposed to the 'UNICODE Sinhala' atrocity:
http://ahangama.com/apiapi/singhala/linuxkb-e.php <-- English
http://ahangama.com/apiapi/singhala/linuxkb-s.php <-- Singhala

My clueless friends would be terribly confused if they suddenly lose the Singhala keymap. (I am trying gingerly to bring these people from Windows to Puppy).

This is kind of a semi-bug, I think, don't you?

naena.
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4231
Location: Gatineau (Qc), Canada

PostPosted: Thu 18 Jul 2013, 13:04    Post subject:  

Hello, naena.

About a keyboard flag, you may want to consult : http://puppylinux.org/wikka/fbxkb
You might have to add/provide a miniature copy of the flag of your country in the proper folder.

As to X.org being fussy about preserving keymap codes at next boot, you may want to
try putting a little script in ~/Startup, such as
/usr/bin/setxkbmap [2 letter code for your country/language]

For ex., in some Puppies, I have to use
Code:
#!/bin/sh
# vieux clavier canadien-français # (Legacy French-Canadian keyboard)
/usr/bin/setxkbmap qc

to make my favorite keyboard "stick" from boot to boot.

I hope this helps.

Best regards.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Thu 18 Jul 2013, 13:10    Post subject:  

In a way I think so too .

Nevertheless there is the possibility to add a setxkbmap line like

setxkbmap -rules xorg -model pc102 -layout us,de -variant "" -option grp:rwin_toggle,lv3:ralt_switch

into /root/.xinitrc
, which I had done for my preferences .

Easier than to patch several if/grep/grep -v/cp -f/then blocks in xorgwizard for such occurrence .

For a keyboard indicator , you might look/search for fbxkb [url] http://murga-linux.com/puppy/viewtopic.php?t=39298[/url] in the additional software section .

[ Christian was faster this time ]

_________________
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal Razz
Back to top
View user's profile Send private message Visit poster's website 
musher0


Joined: 04 Jan 2009
Posts: 4231
Location: Gatineau (Qc), Canada

PostPosted: Thu 18 Jul 2013, 15:02    Post subject:  

Karl Godt wrote:
(...)
[ Christian was faster this time ]

Laughing That's really funny!

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
naena

Joined: 14 Mar 2011
Posts: 46

PostPosted: Mon 22 Jul 2013, 00:08    Post subject: Thank you both wizards!
Subject description: I need to digest the info
 

Thank you guys. You have given enough information to mull over. I think both are equally good alternatives.

musher0, I read the readme.txt inside the /startup folder you suggested. It says this:
''Note, if you want to execute something at bootup and prior to X desktop
loading, edit /etc/rc.d/rc.local."

Don't I have to set the keymap before X desktop loads? (I am a Linux newbie and cannot be trusted for my judgments).

Your script seems to set the default keymap to the French Canadian one. In my case, I want to keep US English as the default and let the user use the hot key Ctrl-Shift to switch from it to the romanized Singhala one and back.

Karl's mention of /root/.xinitrc is a lucky discovery for me because I was wondering how to choose a background image depending on the screen resolutions 8x6 and 16x9.

The setting Karl writes in that file is similar to what I have in the xorg.conf file:

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc102"
Option "XkbLayout" "us,lk" #xkeymap0
Option "XkbVariant" "la,si"
Option "XkbOptions" "grp:ctrl_shift_toggle,grp_led:scroll"
EndSection

Karl's script says:
setxkbmap -rules xorg -model pc102 -layout us,de -variant "" -option grp:rwin_toggle,lv3:ralt_switch

I need to experiment with this.

Thanks immensely to both of you.

naena
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4231
Location: Gatineau (Qc), Canada

PostPosted: Mon 22 Jul 2013, 01:56    Post subject: Re: Thank you both wizards!
Subject description: I need to digest the info
 

naena wrote:
Thank you guys. You have given enough information to mull over. I think both are equally good alternatives.

musher0, I read the readme.txt inside the /startup folder you suggested. It says this:
''Note, if you want to execute something at bootup and prior to X desktop
loading, edit /etc/rc.d/rc.local."

Don't I have to set the keymap before X desktop loads? (I am a Linux newbie and cannot be trusted for my judgments).

Your script seems to set the default keymap to the French Canadian one. In my case, I want to keep US English as the default and let the user use the hot key Ctrl-Shift to switch from it to the romanized Singhala one and back.
(...)

Thanks immensely to both of you.

naena


Hi, naena.

Thanks for the thanks! Smile

I do not know your language, so I could not be more precise. My post was intended more to point you in a direction than to provide a definitive solution.

As to putting the script in ~/Startup, it is common practice for us Francophones not using fr_FR ("French-from-France" azerty keyboard). It does change the keyboard "on the fly", so to speak. I know it works, but I cannot explain the "mechanics" of it.

I must add that I also have the parameter " pkeys=cf " in the initial start line for the Puppy. pkeys installs the " cf " variant of my keyboard for me to use in the initial console, and the " setxkbmap qc " script takes over once I get to X.org.

You could probably develop this little script into a switch based on a "signal" file in /tmp. For example...

Supposing you start with "en", and then want to change to romanized Singhala (this is just a very rough draft):

Code:
#!/bin/sh
# ~/Startup/lang-switch.sh
# Purpose: two-languages switch
####
# When you start you have no "signal" file, so...
if [ ! -f /tmp/lang-signal ];then
echo en > /tmp/lang-signal
setxkbmap en &
# supposing you always start with English;
# you could start with your language as well
fi

####
# Some code needed here for whenever you re-start with xwin
####

# To change keyboards:
if [ "`grep en /tmp/lang-signal`" ];then
setxkbmap [language code for romanized Singhala] &
echo [language code for romanized Singhala] > /tmp/lang-signal
else
setxkbmap en &
echo en > /tmp/lang-signal
fi


You would access this script through an icon you have put on the desktop.
You click on the icon when you want to change languages. Also, you could have a hot key (perhaps Ctrl-Shift+another character) linked to that icon.

How it works:
grep reads the signal file. If it reads "English" (en), it loads the other language. And vice-versa.

This is a suggestion only, written from imagination! It has NOT been TESTED in the real world and probably contains errors! But I hope it brings a little progress! Smile

Best regards.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Bugs ( Submit bugs )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0760s ][ Queries: 11 (0.0081s) ][ GZIP on ]