You are not logged in.

#1 2013-05-28 14:28:32

manouchk
Member
Registered: 2008-07-29
Posts: 306

[almost solved] Compose key in cinnamon

I'm having dificulties gettin the right controle key to act automatically as the compose key in cinnamon.

I can get the compose manually by running:

setxkbmap -option compose:rctrl

To get this automatically, I tried this configuration with no success:

[manu@new-host ~]$ more /etc/X11/xorg.conf.d/10-keyboard-terminate.conf 
Section "InputClass"
	Identifier	"Keyboard Terminate"
	MatchIsKeyboard	"yes"
	MatchDevicePath	"/dev/input/event*"
	Option		"XkbLayout"	"fr"
	Option		"XkbVariant"	"latin9"
        Option          "XkbOptions" "compose:rctrl"
EndSection

I also tried the setxkbmap command in xinitrc but it also don't work and did not find any thing referring to compose key in keyboard configuration in cinnamon.

[manu@new-host ~]$ more .xinitrc 
exec=cinnamon

exec setxkbmap -option compose:rctrl
exec xterm

I also observed that xterm is not launch so that would mean that .xinitrc is not used?

Last edited by manouchk (2013-07-06 22:53:51)

Offline

#2 2013-05-28 15:25:42

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,784

Re: [almost solved] Compose key in cinnamon

manouchk wrote:

I also observed that xterm is not launch so that would mean that .xinitrc is not used?

That depends on how you are starting Cinnamon.  Are you starting it with startx or with a login manager?

Some login managers invoke .xinitrc (Slim, for example)  Others do not.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2013-05-30 10:19:46

manouchk
Member
Registered: 2008-07-29
Posts: 306

Re: [almost solved] Compose key in cinnamon

In fact, I'm using gdm and I also tried to put the setxkbmap command in ~/.xprofile as wiki seems to indicate that gdm would invoke this file (https://wiki.archlinux.org/index.php/GDM) but it did not make the compose key work.

$ more ~/.xprofile
xmodmap -e "pointer=1 2 3 6 7 4 5"
xsetroot -solid black
setxkbmap -option compose:rctrl

Maybe I could try another desktop environment and see if it is related to cinnamon?

Last edited by manouchk (2013-05-30 10:20:57)

Offline

#4 2013-05-30 13:07:36

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,784

Re: [almost solved] Compose key in cinnamon

I don't believe that gdm sources ~/.xinitrc

I think gdm will require you to create a .desktop file in ~/.config/autostart


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2013-06-05 23:36:28

manouchk
Member
Registered: 2008-07-29
Posts: 306

Re: [almost solved] Compose key in cinnamon

Thank you for the suggestion! The gdm wiki probably should maybe be corrected as it suggests that one could use .X as we can see on the wiki:

The arguments passed to the X server by ~/.xinitrc (such as those of xmodmap and xsetroot) can also be added through xprofile:

~/.xprofile

#!/bin/sh

#
# ~/.xprofile
#
# Executed by gdm at login
#

xmodmap -e "pointer=1 2 3 6 7 4 5" # set mouse buttons up correctly
xsetroot -solid black              # sets the background to black
Let try if the .desktop file works better here!
In order to make my first .desktop file manually, I just need a bit more than that is on the Desktop entries wiki https://wiki.archlinux.org/index.php/Desktop_Entries#More_resources so that I made small improvements pointing to the recognized desktop entries.

$ more ~/.config/autostart/compose.desktop
[Desktop Entry]
Type=Application                          # Indicates the type as listed above
Name=setxkbmap                            # The name of the application
Exec=setxkbmap -option compose:rctrl      # The executable of the application.

I'm trying right now!

Offline

#6 2013-06-05 23:38:42

manouchk
Member
Registered: 2008-07-29
Posts: 306

Re: [almost solved] Compose key in cinnamon

It did not work either!

Offline

#7 2013-06-14 12:02:04

manouchk
Member
Registered: 2008-07-29
Posts: 306

Re: [almost solved] Compose key in cinnamon

last attempt which also did not work!

crontab -l
*/1 * * * *  setxkbmap -option compose:rctrl

I really still have too to do it manually! Worst thing.

Offline

#8 2013-06-22 06:48:24

OlaffTheGreat
Member
Registered: 2013-06-03
Posts: 107

Re: [almost solved] Compose key in cinnamon

Hi
I do also have issues regarding setxkbmap within cinnamon. I think the issue concerns a different point than this thread, if needed I'll open one.
The need is a qwerty basis swapping with azerty by alt ground key with french locales loaded as default, but keyboard asked to be qwerty by default. Plus, japanese and chinese writing set with uim (which works just fine)
It is set in /usr/local/bin/keyboard:

setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll us,fr-latin9

But, its behavior is strange:
- It does not launch automaticaly, even if I set it in start> preferences> autostart applications
- once launched, it does not keep on, I have to launch it again after each use.
- the flag doesn't change in systray, even if asked: grp_led:scroll us,fr-latin9

The conf works wonder in lxde.


Lenovo Thinkpad x230 i5-3320M 2.6GHz 250GB SSD (M4) 16GB
SSD | SeaBIOS | GPT | BTRFS | OpenRC | Xfce4 | Zsh | Tmux | Spacemacs
* "Aware Newbie" *
Ibus IM for language script support (e.g. 日本語 - 中文)

Offline

#9 2013-06-27 17:51:56

manouchk
Member
Registered: 2008-07-29
Posts: 306

Re: [almost solved] Compose key in cinnamon

Each time I log in Cinnamon, I have to run the setxkbmap command to make it work. It could the same annoying problem! I'm getting crazy with this stupid problem. I really don't get it!

Offline

#10 2013-06-27 19:52:52

OlaffTheGreat
Member
Registered: 2013-06-03
Posts: 107

Re: [almost solved] Compose key in cinnamon

It seems cinnamon mess up with setxkbmap.
I fixed the problem by removing my script, and set up keys with the gui tool in preferences.
Now it works correctly.


Lenovo Thinkpad x230 i5-3320M 2.6GHz 250GB SSD (M4) 16GB
SSD | SeaBIOS | GPT | BTRFS | OpenRC | Xfce4 | Zsh | Tmux | Spacemacs
* "Aware Newbie" *
Ibus IM for language script support (e.g. 日本語 - 中文)

Offline

#11 2013-06-28 13:40:06

manouchk
Member
Registered: 2008-07-29
Posts: 306

Re: [almost solved] Compose key in cinnamon

WHere did you find something about compose key? I've tried Preferences> keyboard but I can't see any configuration for compose key. What did you do where did you find this kind of options?

Offline

#12 2013-06-28 13:57:43

OlaffTheGreat
Member
Registered: 2013-06-03
Posts: 107

Re: [almost solved] Compose key in cinnamon

I don't have a cinnamon right now in front of me, but it's easy to find in keyboard settings. Otherwise search within regions and languages.
Becarefull, I found setxkbmap bugs when I set up myself. I guess cinnamon uses a setxkbmap file as well and they are in conflict. Ok, it's a guess only and I'd rather find out exactly.
Anyhow, without it works well.

Or you can use xbindkeys, the perfect tool to simplify your life Vs. headaches with setxkbmap and xmodmap files. But it doesn't solve the setxkbmap issue.


Lenovo Thinkpad x230 i5-3320M 2.6GHz 250GB SSD (M4) 16GB
SSD | SeaBIOS | GPT | BTRFS | OpenRC | Xfce4 | Zsh | Tmux | Spacemacs
* "Aware Newbie" *
Ibus IM for language script support (e.g. 日本語 - 中文)

Offline

#13 2013-06-28 14:32:09

manouchk
Member
Registered: 2008-07-29
Posts: 306

Re: [almost solved] Compose key in cinnamon

I'm trying Xbindkeys, it may be even better for me. I have a french azerty keyboards and I need to do some accentuation for Brazilian Portuguese!

In fact I principally need to configure ã (complicated here with compose, I could make it simpler, but I have to learn how to work with xbindkeys). I also have to define á ó and maybe some few other things. Not shure.

Offline

#14 2013-06-28 14:56:45

OlaffTheGreat
Member
Registered: 2013-06-03
Posts: 107

Re: [almost solved] Compose key in cinnamon

xbinkeys is perfect to modify a setting in the details (I managed cap-lock key this way).

Now, to set the whole keyboard, following GUI Icons :
start menu > Preferences > Regions & Languages
select "layout" tabs
clic on the '+' sign in bottom left area
select portuguese/brazilian

And you're good


Lenovo Thinkpad x230 i5-3320M 2.6GHz 250GB SSD (M4) 16GB
SSD | SeaBIOS | GPT | BTRFS | OpenRC | Xfce4 | Zsh | Tmux | Spacemacs
* "Aware Newbie" *
Ibus IM for language script support (e.g. 日本語 - 中文)

Offline

#15 2013-06-28 21:43:40

manouchk
Member
Registered: 2008-07-29
Posts: 306

Re: [almost solved] Compose key in cinnamon

my keyboard is not brasilian in fact but I'm thinking in buying a kit of stikers in order to switch this keyboard into a brazilian one. I have a french keyboard (azerty). With a US keyboard, I could use the international US that allows accentations easily but there no international french keyboard yet...

Offline

#16 2013-06-29 17:57:14

OlaffTheGreat
Member
Registered: 2013-06-03
Posts: 107

Re: [almost solved] Compose key in cinnamon

Do your problem solved ? If so, you might add a "[solved]" to the topic.

In my case, I use a qwerty keyboard on a us english layout.
I switch to azerty (for french) by pressing altgr key by a setxkbmap settings.
I use also uim to type japanese, chinese and arabic.
The japanese settings use qwerty configuration,
chinese and arabic use their specifics.

I do have the use to type both qwety and azerty.
For the arabic (above all), when I loose the position of a key, I use a virtual keyboard,
or a .png pict I made from a spreadsheet, displaying the characters on a keyboard.

At the beginning I thought getting stickers too, now I'm ok.
For others users, or to allow foreigners friends using my machine,
I could (did in a business I had) use other keyboards with different settings. (the business was a internet café).

Another very interesting tool would be a laser keyboard, projecting the keys on a plane surface.
I never saw one yet for real, but some exhibition are stimulating !
This way you may display any keymap you want !


Lenovo Thinkpad x230 i5-3320M 2.6GHz 250GB SSD (M4) 16GB
SSD | SeaBIOS | GPT | BTRFS | OpenRC | Xfce4 | Zsh | Tmux | Spacemacs
* "Aware Newbie" *
Ibus IM for language script support (e.g. 日本語 - 中文)

Offline

#17 2013-06-30 14:10:01

manouchk
Member
Registered: 2008-07-29
Posts: 306

Re: [almost solved] Compose key in cinnamon

I did not solve the problem yet. I'm still setting the compose key manually! I'm waiting maybe for a simple solution. Maybe I could think of switching desktop. Cinnamon is maybe be not the best choice. I don't know. The problem is just annoying, I'm still on cinnamon, because I "only" have to problems, the setxkbmap problem and the slowlyness of nemo when first launch (about 10 seconds when on my computer, chromium or firefox would last about 1 second or less...)

I don't need gui right now, that would be a slower solution for me than running manually setkxbmap.

I'd like maybe to try to do a costumized map that would allow me to do some special carater easily like ã á ó. I would just need that but I don't know yet how to do that. I have to make some research for that! It does not look like it will be straight forward for me to do that!!

By the way in Regions & Languages, I don't have any "layout" tab here and I don't think that I want to use a layout that my keyboard does not show!

Last edited by manouchk (2013-06-30 14:13:06)

Offline

#18 2013-07-06 08:30:16

OlaffTheGreat
Member
Registered: 2013-06-03
Posts: 107

Re: [almost solved] Compose key in cinnamon

Hi,
The simplest solution is by the gui tools from the cinnamon's environment. It works.
I switch my friend's conf in french to provide to you the path :
menu > Préférences > Paramètres système > Pays et Langues
here three tabs : Langue - Format - Agencements
You go to "Agencement"
Left bottom corner, there's a + sign. Clic on it and select a layer (e.g. portuguese), then you clic on "Ajouter"
Then, you clic on the button in the right bottom corner "Options"
3rd line from the bottom "Touches modifiant la disposition du clavier"
clic on it to unwrap the menu, and select the one you prefere
e.g. the 3rd: "Alt. droite (si enfoncé)" -> means swap the layer with keep holding the altgr key.

With cinnamon, remove any setxkbmap config you created cause they are in conflict with the cinnamon's ones.

You'll have same issues with any desktop environment. I run lxde and fluxbox where are use on both setxkbmap settings and work just fine.

Customizing keys is a good idea to finalize an allready setup layout. But considere using already built conf to avoid loose your time and energy on it.
The portugese layout allow all the keys you mention : ã á ó. And there are many different options already built you can try.


Lenovo Thinkpad x230 i5-3320M 2.6GHz 250GB SSD (M4) 16GB
SSD | SeaBIOS | GPT | BTRFS | OpenRC | Xfce4 | Zsh | Tmux | Spacemacs
* "Aware Newbie" *
Ibus IM for language script support (e.g. 日本語 - 中文)

Offline

#19 2013-07-06 22:20:55

manouchk
Member
Registered: 2008-07-29
Posts: 306

Re: [almost solved] Compose key in cinnamon

Portuguese layout is great but as my real keyboard is French, I think I will keep a French layout. I found the compose key option. I think the compose key option appeared after installing cinnamon-control-center (not shure).

It means that what I asked is solved. I just would like to have a faster shortcut for ã. For example, I could use Compose+a+é instead of Compose+a+Alt Gr é (~) which correspond to 4 keys with a French keyboard which is very low and "ã" are very common in Portuguese.

Offline

#20 2013-07-06 22:48:46

OlaffTheGreat
Member
Registered: 2013-06-03
Posts: 107

Re: [almost solved] Compose key in cinnamon

My own setting allow me to switch on a french azerty by 2 separate ways, both set up with a setxkbmap :

setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll us,fr-latin9

One way, I trigger the layout by keep pressing the right alt key (alrgr on a french keyboard). A flag is activating as long as I hold the key on.

The other way is by pressing the both shift keys, which switch to an azerty constantly. It means I have the right alt key free to reach 3rd level -or more- for each keys, by combination of alt-shift-ctrl.

I modified the layout to make fit my needs a latin-9 layout, to have norsc keys as natural as french keys.
I also modified the funtion of caplock for the use of japanese and chinese characters, but related more with uim.
These last modifications had been done with  xbindkeys program.

To simplify your system, you can look for options in the portuguese layout, see if one of them is more natural in its use, then if necessary to have just one key or two to tune. It is exactly what I did with my own configuration. Look for the nearest layout from my needs.

Compose keys are not related to the environment, but to the locales you added in /etc/locale.gen.


Lenovo Thinkpad x230 i5-3320M 2.6GHz 250GB SSD (M4) 16GB
SSD | SeaBIOS | GPT | BTRFS | OpenRC | Xfce4 | Zsh | Tmux | Spacemacs
* "Aware Newbie" *
Ibus IM for language script support (e.g. 日本語 - 中文)

Offline

Board footer

Powered by FluxBB