change default guest keyboard layout

Asked by Elias K Gardner on 2008-10-25

I use the dvorak keyboard layout, it is set as the system default. I use the keyboard indicator applet to switch to qwerty when someone else uses my computer. When I start a guest session the default keyboard layout is set to dvorak this is useless for virtually anyone who I lend the computer to. Also any person I let use the guest session will likely have no idea how to change the layout especially because the keyboard indicator is not on the panel by default.

So is there a way to change the default keyboard layout of a guest session?

Can you customize the default guest session?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu lightdm Edit question
Assignee:
Gunnar Hjalmarsson Edit question
Solved by:
Gunnar Hjalmarsson
Solved:
2011-11-05
Last query:
2011-11-05
Last reply:
2011-11-05

This question was reopened

Launchpad Janitor (janitor) said : #1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Elias K Gardner (zorkerz) said : #2

please unexpire me Lauchpad Janitor says question #48970.

This question has not been answered and im still looking for a solution. Thanks.

Launchpad Janitor (janitor) said : #3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Elias K Gardner (zorkerz) said : #4

again I would still love a solution to this if i ever find one elsewhere I will post it here.

Launchpad Janitor (janitor) said : #5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Elias K Gardner (zorkerz) said : #6

I have not had time to investigate this but would still like to know how to have the guess session start with a different default keyboard layout than I use.

David D Lowe (flimm) said : #7

Open /usr/share/gdm/guest-session/guest-session-setup.sh as root:

sudo gedit /usr/share/gdm/guest-session/guest-session-setup.sh

Find the following lines:

su guest <<EOF
gconftool --set --type bool /apps/gnome_settings_daemon/screensaver/start_screensaver False
gconftool --set --type bool /apps/gnome_settings_daemon/plugins/screensaver/active False
EOF

Before the second EOF, add this line:

gconftool --set --type list --list-type string /desktop/gnome/peripherals/keyboard/kbd/layouts [us,us"`echo "\tdvorak"`"]

This will make the default layout US Qwerty, with US Dvorak as a secondary keyboard.

Hope it works!

Elias K Gardner (zorkerz) said : #8

Thanks David D Lowe, that solved my question.

David D Lowe (flimm) said : #9

Slight mistake there, that line should be:

gconftool --set --type list --list-type string /desktop/gnome/peripherals/keyboard/kbd/layouts [us,us"`echo -e "\t"`"dvorak"]

Elias K Gardner (zorkerz) said : #10

/usr/share/gdm/guest-session/guest-session-setup.sh

I can't find this script anymore. Might there be a new way to change the default guess session keyboard layout?

Elias K Gardner (zorkerz) said : #11

sorry BTW the script is gone in Ubuntu 11.10.

Gunnar Hjalmarsson (gunnarhj) said : #12

gdm-guest-session is moved to Universe, but it needs work before it can work with GDM3 which is an alternative display manager in 11.10. OTOH, the default display manager LightDM includes similar functionality.

For Ubuntu versions before 11.10 there is a tutorial about how to customize gdm-guest-session: http://ubuntuforums.org/showthread.php?t=1566078
The attached tarball "guest-session-prefs" includes an example of how the keyboard layout can be set.

Elias K Gardner (zorkerz) said : #13

I'm not familiar with gdm-guest-session. Are you saying there is no way to change the default guest session in 11.10?

Gunnar Hjalmarsson (gunnarhj) said : #14

Suppose you mean default keyboard layout for guests...

gdm-guest-session is available to download, but there are two buts:
- It only works with GDM - default display manager is LightDM.
- gdm-guest-session still does not work with GDM3, which is the GDM version for 11.10.
So as regards GDM, somebody must fix gdm-guest-session.

LightDM includes a guest session feature. I don't know anything about possible customization possibilities there.

So what I say is that I'm not aware of any way to control the default guest keyboard layout in 11.10.

Launchpad Janitor (janitor) said : #15

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Elias K Gardner (zorkerz) said : #16

Still not answered for ubuntu 11.10.

Best Gunnar Hjalmarsson (gunnarhj) said : #17

The tutorial http://ubuntuforums.org/showthread.php?t=1566078 now includes a tarball for Ubuntu 11.10. If you install it, you'll find guidance in /etc/guest-session/prefs.sh about setting the default guest kb layout.

Elias K Gardner (zorkerz) said : #18

Thanks Gunnar Hjalmarsson, that solved my question.

Gunnar Hjalmarsson (gunnarhj) said : #19

You're welcome. Thank _you_ for nudging me to update the tutorial. ;-)