1a0ac
![]() |
|
|
|
|
|||||||
| General General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Greetings,
Can anyone help with this; I need to change my standard US layout to support Serbian (Latin only would suffice) letters. Does anyone know how can i do that, and how to switch back and forth between the two without restarting the system. Much obliged. |
|
#2
|
||||
|
||||
|
I use: setxkbmap(1) Comes with Xorg.
To switch to my native lang I run $ setxkbmap lvBe aware, that If you switch to lang, that doesn't have latin characters, then you won't be able to type setxkbmap again to switch back... I eliminated this problem by making custom fvwm menu for language switching. Also to switch languages faster, I assigned fvwm key bindings to switch between latvian and russian languages
|
|
#3
|
||||
|
||||
|
Hi,
Just for your informations, I used to ask here about thai keyboard layout switching too. But I forgot where it is now. Please have a look at hal and fdi for keywords. Another way is using xorg.conf. Also I got suggestion from this forum. I have attched my xorg.conf for switching from thai to english with this post too. Sorry, I can not attach file but here it is Code:
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0"
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
ModulePath "/usr/local/lib/xorg/modules"
FontPath "/usr/local/lib/X11/fonts/misc/"
FontPath "/usr/local/lib/X11/fonts/TTF/"
FontPath "/usr/local/lib/X11/fonts/OTF"
FontPath "/usr/local/lib/X11/fonts/Thai/"
FontPath "/usr/local/lib/X11/fonts/local/"
FontPath "/usr/local/lib/X11/fonts/util/"
FontPath "/usr/local/lib/X11/fonts/bitstream-vera/"
FontPath "/usr/local/lib/X11/fonts/texcm-ttf/"
FontPath "/usr/local/lib/X11/fonts/Type1/"
FontPath "/usr/local/lib/X11/fonts/100dpi/"
FontPath "/usr/local/lib/X11/fonts/75dpi/"
FontPath "/usr/local/lib/X11/fonts/TrueType/"
FontPath "/usr/local/lib/X11/fonts/webfonts/"
FontPath "/usr/local/lib/X11/fonts/urwfonts-ttf/"
FontPath "/usr/local/lib/X11/fonts/URW/"
FontPath "/usr/local/share/fonts/amspsfont/type1/"
FontPath "/usr/local/share/fonts/cmpsfont/type1/"
FontPath "unix/:7101"
EndSection
Section "Module"
Load "extmod"
Load "record"
Load "dbe"
Load "glx"
Load "dri"
Load "dri2"
Load "freetype"
Load "type1"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
# Option "XkbRules" "xorg"
# Option "XkbModel" "pc105"
# Option "XkbLayout" "us,th"
# Option "XkbOptions" "grp:ctrl_shift_toggle"
###
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us,th"
Option "XkbVariant" "tis"
Option "XkbOptions" "grp:alt_shift_toggle"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/sysmouse"
Option "ZAxisMapping" "4 5 6 7"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Monitor"
Identifier "Monitor1"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
### [arg]: arg optional
#Option "NoAccel" # [<bool>]
#Option "SWcursor" # [<bool>]
#Option "ColorKey" # <i>
#Option "CacheLines" # <i>
#Option "Dac6Bit" # [<bool>]
#Option "DRI" # [<bool>]
#Option "NoDDC" # [<bool>]
#Option "ShowCache" # [<bool>]
#Option "XvMCSurfaces" # <i>
#Option "PageFlip" # [<bool>]
Identifier "Card0"
Driver "intel"
VendorName "Intel Corporation"
BoardName "82852/855GM Integrated Graphics Device"
BusID "PCI:0:2:0"
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
### [arg]: arg optional
#Option "NoAccel" # [<bool>]
#Option "SWcursor" # [<bool>]
#Option "ColorKey" # <i>
#Option "CacheLines" # <i>
#Option "Dac6Bit" # [<bool>]
#Option "DRI" # [<bool>]
#Option "NoDDC" # [<bool>]
#Option "ShowCache" # [<bool>]
#Option "XvMCSurfaces" # <i>
#Option "PageFlip" # [<bool>]
Identifier "Card1"
Driver "intel"
VendorName "Intel Corporation"
BoardName "82852/855GM Integrated Graphics Device"
BusID "PCI:0:2:1"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen1"
Device "Card1"
Monitor "Monitor1"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <deviceinfo version="0.2"> <device> <match key="info.capabilities" contains="input.keyboard"> <merge key="input.x11_options.XkbModel" type="string">pc105</merge> <merge key="input.x11_options.XkbLayout" type="string">us,th</merge> <merge key="input.x11_options.XkbOptions" type="string">grp:alt_shift_toggle</merge> <!-- <append key="input.x11_options.XkbOptions" type="string">terminate:ctrl_alt_bksp</append> --> </match> </device> </deviceinfo>
__________________
best regards, jotawski http://makham.blogspot.com FreeBSD for thai Last edited by jotawski; December 2nd, 2010 at 05:34. Reason: can not attch file and add fdi file |
|
#4
|
|||
|
|||
|
I finally got to try this (was stuck on win machine for a few days)...
$ setxkbmap rs Which gives me ?????? no matter what i type. After little bit of search i found that i need to do something with sr_YU.ISO8859-2 in order to see those letters. I see those files in /usr/local/share/nls, /usr/local/lib/X11/fonts/..., etc. What do i do with it, and how I do it in most painless way so I can revert back to US keymap without restarting Xorg? Thanks again |
|
#5
|
|||
|
|||
|
Where are you trying?
The application must support the fonts. If I open Leafpad, for example, I'm able to type the Serbian alphabet: Code:
љњертзуиопшђасдфгхјклчћжџцвбнм Quote:
% setxkbmap usBut that would be quite difficult with your current keymap hehe. So, like killasmurf86 already said, you add both to your window manager's root menu.
__________________
May the source be with you! |
| The Following User Says Thank You to Beastie For This Useful Post: | ||
bbzz (December 7th, 2010) | ||
|
#6
|
||||
|
||||
|
try sr_YU.UTF-8
Everyone and everything should use Unicode by Now... even stupid Windows (Don't know if it actually supports uft-8) |
| The Following User Says Thank You to graudeejs For This Useful Post: | ||
bbzz (December 7th, 2010) | ||
|
#7
|
|||
|
|||
|
Hi!
See, that's the thing, I probably don't have fonts installed. I see squares instead of those letter you typed i this Opera browser ![]() So how do I go about installing those fonts? Seems that's the culprit of the problem. |
|
#8
|
|||
|
|||
|
Where do I input that exactly?
|
|
#9
|
||||
|
||||
|
Depends on your desktop environment.... for light-width desktop It's easy
add to your ~/.xinitrc Code:
LANG="lv_LV.UTF-8" LC_ALL="lv_LV.UTF-8" LC_COLLATE="lv_LV.UTF-8" LC_CTYPE="lv_LV.UTF-8" LC_MESSAGES="lv_LV.UTF-8" LC_MONETARY="lv_LV.UTF-8" LC_NUMERIC="lv_LV.UTF-8" LC_TIME="lv_LV.UTF-8" export LANG LC_COLLATE LC_CTYPE LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME XDG_CONFIG_HOME LC_ALL About fonts. I install these (pasted part of my desktop metaport) Code:
RUN_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/local/unifont.ttf:${PORTSDIR}/x11-fonts/gnu-unifont-ttf
RUN_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/junicode:${PORTSDIR}/x11-fonts/junicode
RUN_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/terminus-font:${PORTSDIR}/x11-fonts/terminus-font
RUN_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/Droid:${PORTSDIR}/x11-fonts/droid-fonts-ttf
RUN_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/ecofont:${PORTSDIR}/x11-fonts/ecofont
RUN_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/code2001:${PORTSDIR}/x11-fonts/code2001
RUN_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/dejavu:${PORTSDIR}/x11-fonts/dejavu
RUN_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/freefont-ttf:${PORTSDIR}/x11-fonts/freefont-ttf
RUN_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/gentium:${PORTSDIR}/x11-fonts/gentium
RUN_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/Khmer:${PORTSDIR}/x11-fonts/khmeros
RUN_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/lfpfonts-fix:${PORTSDIR}/x11-fonts/lfpfonts-fix
RUN_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/lfpfonts-var:${PORTSDIR}/x11-fonts/lfpfonts-var
RUN_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/mgopen:${PORTSDIR}/x11-fonts/mgopen
RUN_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/mozilla:${PORTSDIR}/x11-fonts/mozilla-fonts
# restricted fonts
RUN_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/webfonts:${PORTSDIR}/x11-fonts/webfonts
|
|
#10
|
|||
|
|||
|
Nevermind! Got it.
Still no luck with Latin letters. What Beastie typed are cyrilic. |
|
#11
|
||||
|
||||
|
Probably most important fonts are junicode, webfonts, gnu-unifont-ttf
|
|
#12
|
|||
|
|||
|
Quote:
I simply want to be able to type Serbian Latin when I work in, say OpenOffice. When I'm done I want to switch back to US. Don't want to localize my whole system. Sorry, should've been more precise. |
|
#13
|
||||
|
||||
|
You can set environment before starting OOO (you can write small sh wrapper script)
UTF-8 is still a way to go |
|
#14
|
|||
|
|||
|
For the latinica maybe the easiest way is to setup a "compose" key by adding setxkbmap -option compose:rwin (before the WM of course) to ~/.xinitrc. This will set the right "Windows" key as a "compose" key. E.g.:
Code:
rwin > - > D = Đ rwin > v > z = ž
__________________
May the source be with you! |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| usb keyboard stalls on a lock key due to no PS/2 keyboard | jims | Peripheral Hardware | 2 | March 17th, 2010 13:43 |
| [Solved] Changing date without changing time. | caesius | General | 6 | February 8th, 2010 16:30 |
| [Solved] Keyboard layout indicator | copypaiste | Other Window Managers | 4 | January 22nd, 2010 09:16 |
| [Solved] Keyboard layout problem | phreud | X.Org | 3 | December 3rd, 2009 00:17 |
| Keyboard layout problems | Dinchamion | X.Org | 6 | November 25th, 2009 13:27 |