Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
GNOME 3 startup setxkbmap
GNOME 3 startup setxkbmap
I'm trying to execute a custom setxkbmap command upon startup so that I have the correcty layout when logging in.
I have tried placing the command in different files after reading through the man pages for Xsession, Xsession.options, xinitrc etc.
~/.gnomerc
~/.xsession
~/.xinitrc
but to no avail. Anything I'm missing here?
I have tried placing the command in different files after reading through the man pages for Xsession, Xsession.options, xinitrc etc.
~/.gnomerc
~/.xsession
~/.xinitrc
but to no avail. Anything I'm missing here?
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: GNOME 3 startup setxkbmap
GNOME doesn't parse those files.
Try creating a .desktop file in /usr/share/gnome/autostart
By way of an example, here is the one I use(d to use) to start an rxvt-unicode daemon:
EDIT: Actually this is an XY problem...
Use this instead:
https://wiki.debian.org/Keyboard
Try creating a .desktop file in /usr/share/gnome/autostart
By way of an example, here is the one I use(d to use) to start an rxvt-unicode daemon:
Code: Select all
# /usr/share/gnome/autostart/rxvt-unicode-daemon.desktop
[Desktop Entry]
Type=Application
Name=rxvt-unicode-daemon
Exec=urxvtd -q -f -o
Use this instead:
Code: Select all
# dpkg-reconfigure keyboard-configuration
deadbang
Re: GNOME 3 startup setxkbmap
Thanks, it's certainly some variant of the XY-problem. See, I tried to use localectl command, but it didn't list my custom layout. - not sure if it would achieve the same result.
Now in I don't get the new variant listed have included in the
file.
However doing, setxkbmap se -variant <mycustomlayout> is fine. But I want it listed
in those configuration tools.
Now in
Code: Select all
dpkg-reconfigure keyboard-configuration
Code: Select all
/usr/share/X11/xkb/symbols/se
However doing, setxkbmap se -variant <mycustomlayout> is fine. But I want it listed
in those configuration tools.
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: GNOME 3 startup setxkbmap
Have you tried editing /etc/default/keyboard directly?
(As suggested in the Debian wiki page I linked)
(As suggested in the Debian wiki page I linked)
deadbang
Re: GNOME 3 startup setxkbmap
I tried that, but I cannot get my custom layout to be displayed in the list even for the
dpkg-reconfigure script. Also I would assume that /etc/default/keyboard would read the values in
/usr/share/X11/xkb/symbols/se ?
dpkg-reconfigure script. Also I would assume that /etc/default/keyboard would read the values in
/usr/share/X11/xkb/symbols/se ?
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: GNOME 3 startup setxkbmap
OK, make the .desktop file then.
Inelegant and hacky as hell, but it should work.
Is your layout listed in the output of:
Code: Select all
# cat > /usr/share/gnome/autostart/keyboard.desktop << "EOF"
[Desktop Entry]
Type=Application
Name=setxkbmap
Exec=setxkbmap se -variant <your custom layout>
EOF
Is your layout listed in the output of:
Code: Select all
localectl list-keymaps|grep se
deadbang
Re: GNOME 3 startup setxkbmap
Sorry if I wasn't clear about the .desktop. I'd already configured that. But since I want to move away
from any ugly hacks I tried the localectl approach.
First of all, yields an error about
"Couldn't find any console keymaps". So I searched for this error and installed the console-data package, but still same message.
from any ugly hacks I tried the localectl approach.
First of all,
Code: Select all
localectl list-keymaps
"Couldn't find any console keymaps". So I searched for this error and installed the console-data package, but still same message.
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: GNOME 3 startup setxkbmap
Please post error messages verbatim (using code tags) rather than paraphrasing them.hajder wrote:yields an error aboutCode: Select all
localectl list-keymaps
"Couldn't find any console keymaps".
https://bugs.debian.org/cgi-bin/bugrepo ... bug=790955
The `localectl` command just creates a keyboard configuration file in /etc/X11/xorg.conf.d/00-keyboard.conf -- you can create such a file manually.
Code: Select all
# cat > /etc/X11/xorg.conf.d/00-keyboard.conf << "EOF"
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "se"
Option "Xkbvariant" "<your custom layout>"
EndSection
EOF
AFAIUI, `dpkg-reconfigue keyboard-configuration` just edits that file.
deadbang
Re: GNOME 3 startup setxkbmap
1. I didn't have a /etc/X11/xorg.conf.d/ directory, so I created it with that 00-keyboard.conf file. Still not activated upon login.
2. So it seems that ugly-hack is the only thing working?
2. So it seems that ugly-hack is the only thing working?
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: GNOME 3 startup setxkbmap
GNOME must be over-riding it (bad GNOME!).hajder wrote:I created it with that 00-keyboard.conf file. Still not activated upon login.
What is the content of your /etc/default/keyboard?
deadbang
Re: GNOME 3 startup setxkbmap
From terminal, this cmd works➜ ~ cat /etc/default/keyboard
# KEYBOARD CONFIGURATION FILE
# Consult the keyboard(5) manual page.
XKBMODEL="pc105"
XKBLAYOUT="se"
XKBVARIANT="svorak"
XKBOPTIONS=""
BACKSPACE="guess"
➜ ~
setxkbmap se -variant svorak
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: GNOME 3 startup setxkbmap
Well I have no idea why that's not working as it should
Looks like you'll just have to use the dirty hack...
Looks like you'll just have to use the dirty hack...
deadbang
Re: GNOME 3 startup setxkbmap
The same problem on Debian 9. I'm going to try the .desktop solution.hajder wrote:I'm trying to execute a custom setxkbmap command upon startup so that I have the correcty layout when logging in.
I have tried placing the command in different files after reading through the man pages for Xsession, Xsession.options, xinitrc etc.
~/.gnomerc
~/.xsession
~/.xinitrc
but to no avail. Anything I'm missing here?