Run a command on start up, please [duplicate]
This question already has an answer here:
How to run scripts on start up?
9 answers
How to permanently configure keyboard
6 answers
I install Ubuntu on my notebook bought in USA but I'm from Brazil, the problem is, because of the keyboard model, I have to run this command every time I turn on my system:
"setxkbmap -model abnt2 -layout br -variant abnt2"
How can I turn this process automatic, or maybe install a keyboard model. Sorry for bad enlgish.
command-line keyboard keyboard-layout startup
marked as duplicate by George Udosen, user68186, dessert
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Dec 17 '18 at 21:41
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How to run scripts on start up?
9 answers
How to permanently configure keyboard
6 answers
I install Ubuntu on my notebook bought in USA but I'm from Brazil, the problem is, because of the keyboard model, I have to run this command every time I turn on my system:
"setxkbmap -model abnt2 -layout br -variant abnt2"
How can I turn this process automatic, or maybe install a keyboard model. Sorry for bad enlgish.
command-line keyboard keyboard-layout startup
marked as duplicate by George Udosen, user68186, dessert
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Dec 17 '18 at 21:41
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How to run scripts on start up?
9 answers
How to permanently configure keyboard
6 answers
I install Ubuntu on my notebook bought in USA but I'm from Brazil, the problem is, because of the keyboard model, I have to run this command every time I turn on my system:
"setxkbmap -model abnt2 -layout br -variant abnt2"
How can I turn this process automatic, or maybe install a keyboard model. Sorry for bad enlgish.
command-line keyboard keyboard-layout startup
This question already has an answer here:
How to run scripts on start up?
9 answers
How to permanently configure keyboard
6 answers
I install Ubuntu on my notebook bought in USA but I'm from Brazil, the problem is, because of the keyboard model, I have to run this command every time I turn on my system:
"setxkbmap -model abnt2 -layout br -variant abnt2"
How can I turn this process automatic, or maybe install a keyboard model. Sorry for bad enlgish.
This question already has an answer here:
How to run scripts on start up?
9 answers
How to permanently configure keyboard
6 answers
command-line keyboard keyboard-layout startup
command-line keyboard keyboard-layout startup
asked Dec 17 '18 at 20:11
Adriel Santana
1
1
marked as duplicate by George Udosen, user68186, dessert
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Dec 17 '18 at 21:41
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by George Udosen, user68186, dessert
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Dec 17 '18 at 21:41
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Instead of running a command at each startup, you'd better save those settings persistently. Open /etc/default/keyboard for editing and give it this contents:
XKBLAYOUT="br"
BACKSPACE="guess"
XKBVARIANT="abnt2"
XKBMODEL="abnt2"
add a comment |
One way to do this would be to set it up as a systemd service:
Create a
.servicefile, which, once enabled, will be run by systemd upon booting. In a text editor, create a file calledmykeyboard.serviceand include the following (change thepath/to/part with the actual path to your script):
[Unit]
Description=MyKeyboard service
[Service]
ExecStart=setxkbmap -model abnt2 -layout br -variant abnt2
[Install]
WantedBy=multi-user.target
Place your new
.servicefile in the directory/etc/systemd/system/- To run and have it run on boot, you would use
sudo systemctl enable --now mykeyboard
That should do it!
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Instead of running a command at each startup, you'd better save those settings persistently. Open /etc/default/keyboard for editing and give it this contents:
XKBLAYOUT="br"
BACKSPACE="guess"
XKBVARIANT="abnt2"
XKBMODEL="abnt2"
add a comment |
Instead of running a command at each startup, you'd better save those settings persistently. Open /etc/default/keyboard for editing and give it this contents:
XKBLAYOUT="br"
BACKSPACE="guess"
XKBVARIANT="abnt2"
XKBMODEL="abnt2"
add a comment |
Instead of running a command at each startup, you'd better save those settings persistently. Open /etc/default/keyboard for editing and give it this contents:
XKBLAYOUT="br"
BACKSPACE="guess"
XKBVARIANT="abnt2"
XKBMODEL="abnt2"
Instead of running a command at each startup, you'd better save those settings persistently. Open /etc/default/keyboard for editing and give it this contents:
XKBLAYOUT="br"
BACKSPACE="guess"
XKBVARIANT="abnt2"
XKBMODEL="abnt2"
answered Dec 17 '18 at 21:06
Gunnar Hjalmarsson
19.1k23261
19.1k23261
add a comment |
add a comment |
One way to do this would be to set it up as a systemd service:
Create a
.servicefile, which, once enabled, will be run by systemd upon booting. In a text editor, create a file calledmykeyboard.serviceand include the following (change thepath/to/part with the actual path to your script):
[Unit]
Description=MyKeyboard service
[Service]
ExecStart=setxkbmap -model abnt2 -layout br -variant abnt2
[Install]
WantedBy=multi-user.target
Place your new
.servicefile in the directory/etc/systemd/system/- To run and have it run on boot, you would use
sudo systemctl enable --now mykeyboard
That should do it!
add a comment |
One way to do this would be to set it up as a systemd service:
Create a
.servicefile, which, once enabled, will be run by systemd upon booting. In a text editor, create a file calledmykeyboard.serviceand include the following (change thepath/to/part with the actual path to your script):
[Unit]
Description=MyKeyboard service
[Service]
ExecStart=setxkbmap -model abnt2 -layout br -variant abnt2
[Install]
WantedBy=multi-user.target
Place your new
.servicefile in the directory/etc/systemd/system/- To run and have it run on boot, you would use
sudo systemctl enable --now mykeyboard
That should do it!
add a comment |
One way to do this would be to set it up as a systemd service:
Create a
.servicefile, which, once enabled, will be run by systemd upon booting. In a text editor, create a file calledmykeyboard.serviceand include the following (change thepath/to/part with the actual path to your script):
[Unit]
Description=MyKeyboard service
[Service]
ExecStart=setxkbmap -model abnt2 -layout br -variant abnt2
[Install]
WantedBy=multi-user.target
Place your new
.servicefile in the directory/etc/systemd/system/- To run and have it run on boot, you would use
sudo systemctl enable --now mykeyboard
That should do it!
One way to do this would be to set it up as a systemd service:
Create a
.servicefile, which, once enabled, will be run by systemd upon booting. In a text editor, create a file calledmykeyboard.serviceand include the following (change thepath/to/part with the actual path to your script):
[Unit]
Description=MyKeyboard service
[Service]
ExecStart=setxkbmap -model abnt2 -layout br -variant abnt2
[Install]
WantedBy=multi-user.target
Place your new
.servicefile in the directory/etc/systemd/system/- To run and have it run on boot, you would use
sudo systemctl enable --now mykeyboard
That should do it!
edited Dec 17 '18 at 21:12
answered Dec 17 '18 at 20:42
SlidingHorn
766
766
add a comment |
add a comment |