LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How do I run setxkbmap at startup? (https://www.linuxquestions.org/questions/linux-general-1/how-do-i-run-setxkbmap-at-startup-864594/)

lucmove 02-23-2011 01:51 PM

How do I run setxkbmap at startup?
 
I have a problem with my keyboard on Kubuntu 10.10. The specifics of the problem are not really relevant right now. I can fix it by running 'setxkbmap br' on the command line. It's good for the entire session (KDE).

But I often forgot to do that, so I want to have that done automatically. I tried adding it to my .tcshrc file, it didn't work. I tried adding it to /etc/rc.local, it didn't work. Where can I insert that line and have it run automatically? Please note that my login shell is tcsh, not Bash.

corp769 02-23-2011 01:56 PM

Quote:

Originally Posted by lucmove (Post 4268847)
The specifics of the problem are not really relevant right now.

Actually it is. The more output you give us, the better we can help; What is the real problem with your keyboard?

lucmove 02-23-2011 02:05 PM

Quote:

Originally Posted by corp769 (Post 4268851)
Actually it is. The more output you give us, the better we can help; What is the real problem with your keyboard?

The first problem is explained HERE.

The second problem is I configured Yakuake to open a new tab/console/session with the Win+/ (Win and slash) key combination. It doesn't work on my ABNT2 keyboard. Yakuake wants Win+; (Win and semicolon). After the setxkbmap kludge, it works correctly.

Note that those keys are typed correctly in all other applications, including Yakuake, Konsole or Xterm. Just Wine causes me that problem, and Yakuake just doesn't understand the key combination properly, it types the individual characters correctly.

I never had any of these problems in Ubuntu 8.04 and 9.04, or even when I used Slackware 12 years ago. It started after I upgraded to Ubuntu 10.10.

lucmove 02-24-2011 11:23 AM

Quote:

The specifics of the problem are not really relevant right now.
Quote:

Originally Posted by corp769 (Post 4268851)
Actually it is. The more output you give us, the better we can help; What is the real problem with your keyboard?

So, are you going to tell me how exactly the specifics of the problem were relevant? If you hadn't walked in just to say that, my question would still be featured in the Zero Reply Threads section, and I would probably stand a better chance of getting a useful reply.

corp769 02-24-2011 12:13 PM

How about in /etc/csh.login?

And sorry for the late reply, I got really sick man.

DavidMcCann 02-24-2011 12:41 PM

Create a file containing the command — say $HOME/.brkbd
Look in the KDE menu (I can't say where, as I'm a Gnome/Xfce user) for the program to set which programs are run when starting a session, and add your file. Make sure you've set its permissions to enable it to run as a program.

corp769 02-24-2011 12:47 PM

Quote:

Originally Posted by DavidMcCann (Post 4269923)
Create a file containing the command — say $HOME/.brkbd
Look in the KDE menu (I can't say where, as I'm a Gnome/Xfce user) for the program to set which programs are run when starting a session, and add your file. Make sure you've set its permissions to enable it to run as a program.

That too. Good thinking man.

lucmove 02-25-2011 05:08 PM

/etc/csh.login did not work, but DavidMcCann's idea seems to have worked. Funny that the first two attempts at pressing the key shortcut failed, then it worked and seems to be working. I will test it over the weekend with a few reboots and mark the thread as SOLVED if I don't run into any problems. Thank you, you two!

corp769 02-25-2011 05:11 PM

Oh cool, at least it's working now....


All times are GMT -5. The time now is 05:17 PM.