Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want when the computer start, a byobu session is started and a command executed in the first window (windows 0), without requiring any user intervention.

It is very important that this doesn't require an actual user to login.

How to do that?

I suppose this byobu will be accessible later to user root (or if possible another user ?)

share|improve this question
add comment

1 Answer

If you want a command to be executed at boot time, you can put it in your crontab with @crontab instead of a time. So run crontab and add a line like

@reboot byobu -S boot-time mycommand

Instead of putting the command on the command line of byobu, you can put it in a Byobu session file.

If you want the session to be executed as root, you can start it from /etc/rc.local instead of root's crontab. Be sure to start it in the background, since the boot isn't complete until /etc/rc.local has finished running.

byobu -S boot-time mycommand &
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.