Is there a way to create a detached BYOBU session on system boot?
First off - Thank you Dustin for creating such an amazing wrapper to TMUX. I have used TMUX for years, but this really brings things to the next level.
OK, I am using BYOBU in order to monitor and maintain a bunch of screens related to cryptomining. It's working great so far
Here is a sample window file I am using
new -s mining -c /home/prospector/mining ./run.sh;
renamew -t0 dstm ;
splitw watch -n1 nvidia-smi ;
splitw -t0 tail -f /home/prospector/mining/logs/dstm.log ;
This works great. Now, I want to be able to spawn this at startup. I tried adding a detach keyword from tmux in this file and adding it to a systemd start script, but after a lot of messing around, I just can't figure how to get it to start up
Here is my latest attempt at the systemd script
[Unit]
Description=BYOBU Session with miner
After=network.target default.target
[Service]
Environment=BYOBU_WINDOWS=mining
Environment=HOME=/home/prospector
Environment=TERM=xterm-256color
ExecStart=/bin/bash -c '/usr/bin/byobu'
Type=oneshot
RemainAfterExit=yes
User=prospector
Group=prospector
[Install]
WantedBy=default.target
When this starts up though, I see
Unit miner.service has begun starting up.
Dec 21 09:58:41 prospector bash[1062]: open terminal failed: not a terminal
Dec 21 09:58:41 prospector systemd[1]: miner.service: Main process exited, code=exited, status=1/FAILURE
Dec 21 09:58:41 prospector systemd[1]: Failed to start BYOBU Session with miner.
My next attempt was to try to start a tmux server in detached mode and source my BYOBU file (this actually kind of works), but then when BYOBU starts up later and sees the session, it loads as regular tmux session...and doesn't add the nice BYOBU customization
Thanks to anyone that can assist!
boot screen systemd byobu tmux
add a comment |
First off - Thank you Dustin for creating such an amazing wrapper to TMUX. I have used TMUX for years, but this really brings things to the next level.
OK, I am using BYOBU in order to monitor and maintain a bunch of screens related to cryptomining. It's working great so far
Here is a sample window file I am using
new -s mining -c /home/prospector/mining ./run.sh;
renamew -t0 dstm ;
splitw watch -n1 nvidia-smi ;
splitw -t0 tail -f /home/prospector/mining/logs/dstm.log ;
This works great. Now, I want to be able to spawn this at startup. I tried adding a detach keyword from tmux in this file and adding it to a systemd start script, but after a lot of messing around, I just can't figure how to get it to start up
Here is my latest attempt at the systemd script
[Unit]
Description=BYOBU Session with miner
After=network.target default.target
[Service]
Environment=BYOBU_WINDOWS=mining
Environment=HOME=/home/prospector
Environment=TERM=xterm-256color
ExecStart=/bin/bash -c '/usr/bin/byobu'
Type=oneshot
RemainAfterExit=yes
User=prospector
Group=prospector
[Install]
WantedBy=default.target
When this starts up though, I see
Unit miner.service has begun starting up.
Dec 21 09:58:41 prospector bash[1062]: open terminal failed: not a terminal
Dec 21 09:58:41 prospector systemd[1]: miner.service: Main process exited, code=exited, status=1/FAILURE
Dec 21 09:58:41 prospector systemd[1]: Failed to start BYOBU Session with miner.
My next attempt was to try to start a tmux server in detached mode and source my BYOBU file (this actually kind of works), but then when BYOBU starts up later and sees the session, it loads as regular tmux session...and doesn't add the nice BYOBU customization
Thanks to anyone that can assist!
boot screen systemd byobu tmux
add a comment |
First off - Thank you Dustin for creating such an amazing wrapper to TMUX. I have used TMUX for years, but this really brings things to the next level.
OK, I am using BYOBU in order to monitor and maintain a bunch of screens related to cryptomining. It's working great so far
Here is a sample window file I am using
new -s mining -c /home/prospector/mining ./run.sh;
renamew -t0 dstm ;
splitw watch -n1 nvidia-smi ;
splitw -t0 tail -f /home/prospector/mining/logs/dstm.log ;
This works great. Now, I want to be able to spawn this at startup. I tried adding a detach keyword from tmux in this file and adding it to a systemd start script, but after a lot of messing around, I just can't figure how to get it to start up
Here is my latest attempt at the systemd script
[Unit]
Description=BYOBU Session with miner
After=network.target default.target
[Service]
Environment=BYOBU_WINDOWS=mining
Environment=HOME=/home/prospector
Environment=TERM=xterm-256color
ExecStart=/bin/bash -c '/usr/bin/byobu'
Type=oneshot
RemainAfterExit=yes
User=prospector
Group=prospector
[Install]
WantedBy=default.target
When this starts up though, I see
Unit miner.service has begun starting up.
Dec 21 09:58:41 prospector bash[1062]: open terminal failed: not a terminal
Dec 21 09:58:41 prospector systemd[1]: miner.service: Main process exited, code=exited, status=1/FAILURE
Dec 21 09:58:41 prospector systemd[1]: Failed to start BYOBU Session with miner.
My next attempt was to try to start a tmux server in detached mode and source my BYOBU file (this actually kind of works), but then when BYOBU starts up later and sees the session, it loads as regular tmux session...and doesn't add the nice BYOBU customization
Thanks to anyone that can assist!
boot screen systemd byobu tmux
First off - Thank you Dustin for creating such an amazing wrapper to TMUX. I have used TMUX for years, but this really brings things to the next level.
OK, I am using BYOBU in order to monitor and maintain a bunch of screens related to cryptomining. It's working great so far
Here is a sample window file I am using
new -s mining -c /home/prospector/mining ./run.sh;
renamew -t0 dstm ;
splitw watch -n1 nvidia-smi ;
splitw -t0 tail -f /home/prospector/mining/logs/dstm.log ;
This works great. Now, I want to be able to spawn this at startup. I tried adding a detach keyword from tmux in this file and adding it to a systemd start script, but after a lot of messing around, I just can't figure how to get it to start up
Here is my latest attempt at the systemd script
[Unit]
Description=BYOBU Session with miner
After=network.target default.target
[Service]
Environment=BYOBU_WINDOWS=mining
Environment=HOME=/home/prospector
Environment=TERM=xterm-256color
ExecStart=/bin/bash -c '/usr/bin/byobu'
Type=oneshot
RemainAfterExit=yes
User=prospector
Group=prospector
[Install]
WantedBy=default.target
When this starts up though, I see
Unit miner.service has begun starting up.
Dec 21 09:58:41 prospector bash[1062]: open terminal failed: not a terminal
Dec 21 09:58:41 prospector systemd[1]: miner.service: Main process exited, code=exited, status=1/FAILURE
Dec 21 09:58:41 prospector systemd[1]: Failed to start BYOBU Session with miner.
My next attempt was to try to start a tmux server in detached mode and source my BYOBU file (this actually kind of works), but then when BYOBU starts up later and sees the session, it loads as regular tmux session...and doesn't add the nice BYOBU customization
Thanks to anyone that can assist!
boot screen systemd byobu tmux
boot screen systemd byobu tmux
asked Dec 21 '17 at 15:14
adawalliadawalli
61
61
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You can issue commands to Byobu's backend (tmux or screen) when launching it.
Using screen
byobu-screen -d -m ping google.com
Using tmux
byobu-tmux new-session -d -m ping google.com
# If tmux is default backend
byobu new-session -d -m ping google.com
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f988377%2fis-there-a-way-to-create-a-detached-byobu-session-on-system-boot%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can issue commands to Byobu's backend (tmux or screen) when launching it.
Using screen
byobu-screen -d -m ping google.com
Using tmux
byobu-tmux new-session -d -m ping google.com
# If tmux is default backend
byobu new-session -d -m ping google.com
New contributor
add a comment |
You can issue commands to Byobu's backend (tmux or screen) when launching it.
Using screen
byobu-screen -d -m ping google.com
Using tmux
byobu-tmux new-session -d -m ping google.com
# If tmux is default backend
byobu new-session -d -m ping google.com
New contributor
add a comment |
You can issue commands to Byobu's backend (tmux or screen) when launching it.
Using screen
byobu-screen -d -m ping google.com
Using tmux
byobu-tmux new-session -d -m ping google.com
# If tmux is default backend
byobu new-session -d -m ping google.com
New contributor
You can issue commands to Byobu's backend (tmux or screen) when launching it.
Using screen
byobu-screen -d -m ping google.com
Using tmux
byobu-tmux new-session -d -m ping google.com
# If tmux is default backend
byobu new-session -d -m ping google.com
New contributor
New contributor
answered 10 hours ago
KarolisLKarolisL
11
11
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f988377%2fis-there-a-way-to-create-a-detached-byobu-session-on-system-boot%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown