Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Execute simply command at boot [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Thunderfly
n00b
n00b


Joined: 11 Jul 2017
Posts: 25

PostPosted: Thu Jul 13, 2017 12:02 pm    Post subject: Execute simply command at boot [SOLVED] Reply with quote

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
View user's profile Send private message
Shoaloak
n00b
n00b


Joined: 05 Nov 2016
Posts: 48

PostPosted: Thu Jul 13, 2017 12:23 pm    Post subject: Reply with quote

To make it persistent, change it in your selected DE settings.
Or, add the command to your $home/.profile
_________________
Happy hacking.
Back to top
View user's profile Send private message
Thunderfly
n00b
n00b


Joined: 11 Jul 2017
Posts: 25

PostPosted: Thu Jul 13, 2017 12:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Thu Jul 13, 2017 7:21 pm    Post subject: Reply with quote

Put this in the keyboard section of your xorg.conf:
Code:
Option "xkb_options" "lv3:ralt_switch_multikey"
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10589
Location: Somewhere over Atlanta, Georgia

PostPosted: Thu Jul 13, 2017 8:20 pm    Post subject: Re: Execute simply command at boot Reply with quote

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:
  1. The local service is in your default runlevel.
  2. 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
View user's profile Send private message
Syl20
l33t
l33t


Joined: 04 Aug 2005
Posts: 619
Location: France

PostPosted: Mon Jul 17, 2017 7:20 am    Post subject: Reply with quote

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
View user's profile Send private message
Thunderfly
n00b
n00b


Joined: 11 Jul 2017
Posts: 25

PostPosted: Mon Jul 17, 2017 8:20 pm    Post subject: Reply with quote

worked without workaround.

thx for help!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum