First before anything I have installed a Ubuntu 16.10

After I installed it I have a tty1 open. I have installed Xorg and xfwm4 (X Window Manager)

If I do following:

  • tty1: login
  • type: startx
  • tty2: login
  • type: export DISPLAY=:0
  • type: chromium-browser
  • tty1: (Chromium Browser will be there and open)

How can I automate such a thing without doing it manually every time? It should happen after login, but only if user login is happened in TTY1. I don't want reserve the other TTYs.


Do you always start chromium? If yes, you need a running X-Server. So, you may just want to use the desktop environment to auto start chromium. For XFCE (You use XFCE, right?) see:


  • The actual problem is that, because I don't want to use xfce. I want use (super extremely lightweight) way to open browser. Kiosk mode doesn't show the Window bars. I noticed that the .bash_profile executes on login too, but running a 'startx' doesn't allow me to run other commands (from same) shell. So basically this won't work: "startx && chromium-browser" while running startx the console output will stop with executing rest of commands. – Weird E. Nov 30 '16 at 10:46
  • Ah. I see your point. May you try it with xinit? See here: wiki.archlinux.org/index.php/Xinit – Tobias Nov 30 '16 at 10:58
  • On .xinitrc there's "exec xfwm4", but I cannot make it work to start Window Manager and then start Chromium. It starts only the Window Manager. I think that the startx output will break the executing the rest of commands. – Weird E. Nov 30 '16 at 11:02
  • Did you try to add chromium to xinitrc? – Tobias Nov 30 '16 at 11:15
  • Actually yes, but I am not sure did I format it properly. I tried "exec xfwm4 && chromium-browser" after that I also tried "exec xfwm4" and under that a line "exec chromium-browser" – Weird E. Nov 30 '16 at 11:17

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.