View previous topic :: View next topic |
Author |
Message |
Thunderfly n00b
Joined: 11 Jul 2017 Posts: 25
|
Posted: Thu Jul 13, 2017 12:02 pm Post subject: Execute simply command at boot [SOLVED] |
|
|
I have troubles with my keyboard, AltGr key.
As a workaround i can execute a command manually after system booting.
How can I automate it in Gentoo?
I was trying to create a executeable file with .start extension in /etc/local.d/ but it doesnt work.
The command I need on bootup is simply: Code: | setxkbmap -option lv3:ralt_switch_multikey |
How to get execute during boot?
thx
Last edited by Thunderfly on Tue Jul 18, 2017 10:07 am; edited 1 time in total |
|
Back to top |
|
|
Shoaloak n00b
Joined: 05 Nov 2016 Posts: 48
|
Posted: Thu Jul 13, 2017 12:23 pm Post subject: |
|
|
To make it persistent, change it in your selected DE settings.
Or, add the command to your $home/.profile _________________ Happy hacking. |
|
Back to top |
|
|
Thunderfly n00b
Joined: 11 Jul 2017 Posts: 25
|
Posted: Thu Jul 13, 2017 12:39 pm Post subject: |
|
|
Entry in bash_profile didnt execute the command
Code: | # /etc/skel/.bash_profile
# This file is sourced by bash for login shells. The following line
# runs your .bashrc and is recommended by the bash info pages.
if [[ -f ~/.bashrc ]] ; then
. ~/.bashrc
fi
setxkbmap -option lv3:ralt_switch_multikey
|
|
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Thu Jul 13, 2017 7:21 pm Post subject: |
|
|
Put this in the keyboard section of your xorg.conf:
Code: | Option "xkb_options" "lv3:ralt_switch_multikey" |
|
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10589 Location: Somewhere over Atlanta, Georgia
|
Posted: Thu Jul 13, 2017 8:20 pm Post subject: Re: Execute simply command at boot |
|
|
Thunderfly wrote: | I was trying to create a executeable file with .start extension in /etc/local.d/ but it doesnt work. | This does, in fact, work so long as:- The local service is in your default runlevel.
- Your /etc/local.d/*.{start,stop} files are executable.
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
Syl20 l33t
Joined: 04 Aug 2005 Posts: 619 Location: France
|
Posted: Mon Jul 17, 2017 7:20 am Post subject: |
|
|
Thunderfly wrote: | Code: | # /etc/skel/.bash_profile |
|
The /etc/skel/* files are placed into the home directory of a newly created user. The existing ones aren't updated. So you also need to update your ~/.bash_profile, if not already done.
Depending on your configuration, the xinit script is loaded using bash... or not. /bin/sh is not /bin/bash. So ~/.profile is better than ~/.bash_profile in your case. And ~/.xprofile is even more appropriate, as you only need the setxkbmap tune in X. |
|
Back to top |
|
|
Thunderfly n00b
Joined: 11 Jul 2017 Posts: 25
|
Posted: Mon Jul 17, 2017 8:20 pm Post subject: |
|
|
worked without workaround.
thx for help! |
|
Back to top |
|
|
|