I want to run the command HTOP
, nethogs
, and a bunch of other commands each in its own terminal tab as Ubuntu starts. I always have to manually start a terminal and type the same commands over and over. To be clear I want to:
- Open One terminal with multiple tabs on startup
- In each of these terminal tabs run a different command automatically
$ vim ~/.config/autostart/Apps.desktop
#!bin/bash
gnome-terminal --tab Htop -e htop --tab Nethogs -e nethogs --maximize
is that the correct format ? !wine will open a wine command with others, atleast thats how it does now in the terminal. It does not seem to work. Well it will work if you run the program as the root in the terminal. But it will not run after the boot takes place.
A bit late response but this is what works for me on Ubuntu 16.04
Modifiy sudoers. You will need to go to root mode.
Inside you will make an exception for your script:
Then make a script for nethogs and other apps that need sudo permission separately:
As far as I know Htop doesn't need sudo permissions so you can proceed without doing this for Htop.
Go to dash and type in startup applications, click on it, and click add new. Under the command of the startup app type in:
It will open what is inside the script and needs sudo permissions without asking for a password. You will also want to add in which profile it should open so you can edit the terminal to stay open after executing, for apps like Htop and Nethogs.
Then make the same startup app for Htop.
To edit the terminal, click on it, go to preferences, and then to profiles, add new and name it, click edit and then you'll know what to do.