You are not logged in.

#1 2014-11-16 13:15:05

Cromulent
Member
From: United Kingdom
Registered: 2011-08-28
Posts: 52
Website

Setting setxkbmap on login to XFCE

So I was having a problem with the keyboard layout in XFCE being wrong and found that the correct command to use was:

setxkbmap gb

and that worked well. It is just that when I reboot the machine the setting is lost. In the keyboard Arch wiki article it says to add setxkbmap gb to .xinitrc in order to make sure it persists across reboots but that doesn't seem to be doing the trick. Any hints on where I should put that line so it stays set?

The article in question is this one:
https://wiki.archlinux.org/index.php/Ke … _setxkbmap

Last edited by Cromulent (2014-11-16 13:15:51)

Offline

#2 2014-11-16 13:44:25

MK13
Member
From: Germany
Registered: 2014-04-12
Posts: 80

Re: Setting setxkbmap on login to XFCE

You could use xinit

EDIT: Whoops, didn't read your post carefully...
Could you post your xinitrc?

Last edited by MK13 (2014-11-16 13:45:31)

Offline

#3 2014-11-16 15:15:54

Cromulent
Member
From: United Kingdom
Registered: 2011-08-28
Posts: 52
Website

Re: Setting setxkbmap on login to XFCE

Sure.

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

# exec gnome-session
# exec startkde
exec startxfce4
# ...or the Window Manager of your choice

dropboxd
setxkbmap gb

Offline

#4 2014-11-16 15:20:29

thiagowfx
Member
Registered: 2013-07-09
Posts: 586

Re: Setting setxkbmap on login to XFCE

You could make this setting persistent across reboots (therefore, not including it in your .xinitrc), by:

localectl set-x11-keymap gb

Localectl is part of systemd.

Offline

#5 2014-11-16 15:21:34

Brother Root
Member
Registered: 2014-11-09
Posts: 43

Re: Setting setxkbmap on login to XFCE

Try:

dropboxd
setxkbmap gb

# exec gnome-session
# exec startkde
exec startxfce4
# ...or the Window Manager of your choice

In short,

exec startxfce4

should be the last line, not the first.

Offline

#6 2014-11-16 15:27:38

Cromulent
Member
From: United Kingdom
Registered: 2011-08-28
Posts: 52
Website

Re: Setting setxkbmap on login to XFCE

Ah, thank you both.

thiagowfx wrote:

You could make this setting persistent across reboots (therefore, not including it in your .xinitrc), by:

localectl set-x11-keymap gb

Localectl is part of systemd.

I assume that means localectl is system wide then? The man page seems to say so. In that case that sounds like the best option. Not having to faff around with the .xinitrc file for new users is a big plus.

Offline

#7 2014-11-16 16:51:33

thiagowfx
Member
Registered: 2013-07-09
Posts: 586

Re: Setting setxkbmap on login to XFCE

Cromulent wrote:

I assume that means localectl is system wide then?

Yes: https://wiki.archlinux.org/index.php/Locale

Offline

#8 2014-11-16 20:30:13

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Setting setxkbmap on login to XFCE

Brother Root wrote:
exec startxfce4

should be the last line, not the first.

This: https://wiki.archlinux.org/index.php/Xinit (read the first note).

Offline

Board footer

Powered by FluxBB