Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running Ubuntu 12.04. I use zsh as my shell and xmonad as my window manager. I don't use gnome or any other desktop environment.

I'd like to declare some 'startup commands.' By this I mean, after I login and xmonad has started, I would like to run some commands that open my browser and a terminal window. I cannot access the 'Startup Applications' in the gnome menu, nor do I have a .bash_profile to insert these commands in. How can I declare these commands?

share|improve this question

sorry realised i put it n the comment: try using the .xsession file

share|improve this answer
This doesn't appear to work - this seems to run before xmonad is started, not after, thus preventing the applications from running. – David Y. Stephenson Jul 2 '13 at 14:59
Can you check if it is being run? Put something like "echo 'ran' >> ~/test.txt" When you log in it should make a file with the word ran. and that you run xmonad after starting the programs. – namingFailed Jul 2 '13 at 16:02
@DavidY.Stephenson The update your question and post you .xsession Also zsh can source config files - which calls .envrc – bodhi.zazen Jul 2 '13 at 16:20
@namingFailed, You're right, it's not running. Any idea why this would be happening? – David Y. Stephenson Jul 5 '13 at 1:29
@bodhi.zazen, Wouldn't this run the programs every time I open a terminal window? – David Y. Stephenson Jul 5 '13 at 1:29

Your Answer


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.