How to write Bash script What is the command to open a terminal with two different tabed terminals and execute some commands separately tabs?

Solution 1:

one terminal with two tabs:

gnome-terminal --tab --tab

use the -e switch to execute commands (or scripts):

gnome-terminal --tab -e "command1" --tab -e "command2"

(I don't think there is an easy way of feeding your credentials to skype via the terminal.)
Update: check w4YGcbTeIH's answer, skype allows giving credentials via the command line.

But beware, your credentials would be exposed and this should be avoided.

A script to open skype and chromium-browser would look like the following:

#!/bin/bash

skype --dbpath=<path> &
chromium-browser &

Put this code into myscript.sh and execute chmod +x myscript.sh (in a terminal) to make it executable.

About skype:

  • you can run skype without arguments (skype &) and it will load your default user profile ~/.Skype.
  • run it with --dbpath=<path> where <path> is your actual path of the Skype profile you want skype to load.

To run the script do one of the following:

  • open a terminal and execute ./myscript.sh
  • double click on the script and choose Run in the dialog.

Solution 2:

$ skype -h
Skype 4.0.0.8

Usage: skype [options]
Options:
  --dbpath=<path>       Specify an alternative path to store Skype data files.
                        Default: ~/.Skype
  --resources=<path>    Specify a path where Skype can find its resource files.
                        Default: /usr/share/skype
  --disable-api         Disable Skype Public API.
  --callto <nick>
  skype:<nick>?<action>
                        These commands allow Skype links handling.
  --pipelogin           Command line login. "echo username password | skype --pipelogin"
  --version             Display version information and exit.

echo username password | skype --pipelogin does what you want, but as rosch said : "Also, your credentials would be exposed and this should be avoided." They would be exposed on the history of the shell :

$ echo user pass | skype --pipelogin
[...]
$ history
[...]
 2006  echo user pass | skype --pipelogin
 2007  history
$