I'd like to start a tmuxinator session when I login (Gnome on Ubuntu Lucid). I've tried variations of the following but they all execute and close the terminal window. The following have been given to 'Startup Applications'

sleep 10; /usr/bin/gnome-terminal --execute bash -c 'cd /src/thinit;exec bundle exec mux start thinit'
sleep 10; /usr/bin/gnome-terminal --execute bash -c 'cd /src/thinit;bundle exec mux start thinit'
sleep 10; /usr/bin/gnome-terminal --execute bash -c 'cd /src/thinit;exec bundle exec mux start thinit;exec bash'


This is not an answer, but is getting closer. See Hilltop Yodeler's post about 13u11fr09's suggested solution. The reason this question is not answered is that, AFAICT, it opens another shell session rather than the keep the initial shell session open. In the use case described that is fine - show help, then provide a shell prompt. Whereas here the requirement is to continue to use tmux via the initial shell session launched.


Don't know anything about tmuxinator so excuse me if offbase here

Your 'Startup Applicaton' is simply a .desktop, typically stored in ~/config/autostart/

What you may want to try is to simplify the Exec=, a number of ways

A start up delay can be set on a new line in the .desktop, Ex.


Additionally you could have the command run in a terminal with a line


What may also be useful is to consider running your actual command thru a script, then setting the Exec= line to


If your script runs fine then it should work ok in the Startup

  • The issue is: in 2011 a user should easily be able to set a shell prompt to launch on startup, using Ubuntu's UI. No doubt there is lots of black magic that can be used to get the desired result. This is real a quest of the a simple solution/approach that works with Ubuntu's UI tool for launching apps on startup. – hedgehog Nov 24 '11 at 3:09

You have too many execs, and I'm not sure what bundle and thinit are supposed to be, but try this:

sleep 10; /usr/bin/gnome-terminal --working-directory=/src/thinit --execute bundle exec tmux

If you're trying to start the tmux server first, this should work:

sleep 10; /usr/bin/gnome-terminal --working-directory=/src/thinit --execute /bin/bash -c "tmux start; exec bundle exec tmux"
  • bundle exec is one Bundler command. See here[0] [0] gembundler.com/man/bundle.1.html – hedgehog Nov 24 '11 at 2:03
  • I see. And the "start thinit"? Is that supposed to be a particular session? – Kevin Nov 24 '11 at 2:10
  • Anyway, I've updated it with the bundle exec, if it doesn't work, let me know how it's not working. – Kevin Nov 24 '11 at 2:28
  • Apologies for the ambiguity: mux start thinit is one command, run in the Ruby gem "environment" that bundle exec sets up/provides. Will try test your suggestions to night, from memory what this did was execute the command and close the gnome terminal window - my recollection maybe faulty so will try again. – hedgehog Nov 24 '11 at 3:01
  • Perhaps my version of mux is different, but mine doesn't accept an argument to mux start, and mux start starts the server and returns immediately, which would close the terminal. – Kevin Nov 24 '11 at 3:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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