We have Debian 8.5 with LXDE 0.7.2

I need for all users to configure two keyboard layouts - en + ru, and switching between them by ctrl + shift. To do this, I put the following line in the / etc / xdg / lxsession / LXDE / autostart file:

@setxkbmap -option grp:switch,grp:ctrl_shift_toggle us,ru 

I reboot, and I don’t get any keyboard switching settings: there is only one English language, switching to the ctrl + shift keys does not work. Launched LXTerminal, and executed the same command from the user. Switching earned. That is, for some reason, the configuration command did not work or did not work at that moment.

Then I tried to add the following command to the same file:

 @echo "Hello" > /tmp/hello.txt 

Reboot, I go to LXDE, and the file /tmp/hello.txt did not appear.

From here I conclude that autorun commands do not work at all.

Question 1: how to make autorun commands for all users in LXDE?

Question 2: how to configure keyboard layouts in LXDE using simpler means? Albeit for each user, but visually. In the setup panel there is an addition of layouts, but this action is inactive:

http://i.piccy.info/i9/2f0faf32be959b1d1685e5ea49291b2c/1467290104/69464/1047131/keyboard_lxde_01.png

And how to make active is not clear.

  • create a file in /etc/X11/Xsession.d/ . the number at the beginning of the name helps to arrange the call order Start the file name with 99 , then an arbitrary name. these files are executed (more precisely, they are connected with the source command) on behalf of the user launching the x-session. - aleksandr barakin pm
  • @echo "Hello"> /tmp/hello.txt - perhaps the shell syntax is not supported there. replace it with the script call @/путь/к/скрипту , and in it write echo "Hello" > /tmp/hello.txt , and add the executable bits: chmod +x /путь/к/скрипту - aleksandr barakin

1 answer 1

The utility for switching layouts is a widget for lxpanel. She does not use tray. Do not forget to transfer control layouts to the utility when it is configured (in the upper-right corner of its GUI, as I recall). I myself used LXDE for a long time.

  • The question was about the global setting for all users at once. - aleksandr barakin
  • In theory (not verified), you can copy the necessary config (lxpanel stores data in configs) in / etc / skel /. Then it will be used as a standard for all new users - handicraftsman