From Mageia wiki
Jump to: navigation, search

Introduction

This page describes how to configure autostart with the MATE desktop environment in Mageia Linux. "autostart" enables starting programs automatically at login.

For example: starting a terminal, a monitoring program, a web browser


Benefits

Using autostart can save time especially if you tend to manually start the same few programs after logging in. It is easy to script what you need started and much faster than doing so manually. It is also possible to place and size program windows in required workspaces (for multi-space DEs).


Other DEs

The autostart method described here has also been tested in LXDE and XFCE. The default number of workstaces in XFCE is 2. The example MATE_initrc script (below) assumes 4 workspaces. This is easy to increase in XFCE.

It has also been tested in MATE on Kali linux.


Preparation

The autostart configuration consists of two parts:

  1. Configuration file in ${HOME}/.config/autostart/
  2. A script to position, size, and launch the programs you wish to start on login

This page gives examples of both.

Install pre-requisites

The example autostart script shown here uses wmctrl to switch between workspaces.

Logs recorded in ${HOME}/logs/MATE_initrc_log also revealed:

Gtk-Message: 00:37:25.405: Failed to load module "canberra-gtk-module"

"canberra-gtk-module" is found in rpm: lib64canberra-gtk0

Neither of these are installed by default in Mageia 7.

Install with:

urpmi wmctrl lib64canberra-gtk0


Example:

[user@localhost ~]$ /bin/sudo urpmi wmctrl lib64canberra-gtk0
[sudo] password for user: 


    www.mirrorservice.org::mageia.org/pub/mageia/distrib/7/x86_64/media/core/release/lib64canberra-gtk0-0.30-12.mga7.x86_64.rpm
    www.mirrorservice.org::mageia.org/pub/mageia/distrib/7/x86_64/media/core/release/wmctrl-1.07-13.mga7.x86_64.rpm                                                                           
installing wmctrl-1.07-13.mga7.x86_64.rpm lib64canberra-gtk0-0.30-12.mga7.x86_64.rpm from /var/cache/urpmi/rpms                                                                               
Preparing...                     ##############################################################################
      1/2: lib64canberra-gtk0    ##############################################################################
      2/2: wmctrl                ##############################################################################

Configuration in ${HOME}/.config/autostart/

Note that files in this directory to be used for autostart need to be named with a suffix of .desktop.

Example:

[mpb@localhost ~]$ nl -ba /home/mpb/.config/autostart/MATE_autostart.desktop 
     1	[Desktop Entry]
     2	Name=MATE_autostart
     3	Comment=MATE_autostart: invokes script to start programs at login to MATE
     4	Exec=/home/mpb/bin/MATE_initrc
     5	Icon=mate-desktop
     6	Terminal=false
     7	Type=Application
     8	StartupNotify=true
     9	X-GNOME-Autostart-enabled=true

NB The Exec on line 4 (above) refers to the script that is used to launch programs on login. In this case, it is a script in /home/mpb/bin/MATE_initrc. This will need to be modified for your own choice.


Autostart script

Since the script is run invisibly to the user, it is useful to log script activity. This can help with debugging or adapting to specific environments and requirements.

The example script MATE_initrc (see Appendix-1) logs to ${HOME}/logs/MATE_initrc_log.

MATE_initrc example in Appendix-1 does the following with a brief pause on each different workspace as programs are started:

  1. open multi-tabbed mate-terminal and gkrellm (monitor display) in workspace 1
  2. Launch google-chrome-stable in workspace 3
  3. Launch Firefox in workspace 4
  4. Returns to workspace 1


Modify MATE_initrc for your needs

Review your local copy of MATE_initrc (see Appendix-1).

Since this is for your own login configuration it is appropriate to keep this in ${HOME}/bin/MATE_initrc.

Things to consider changing are marked with a #LOCAL tag:


The setting of ${default_notify}

Find the following line:

default_notify=Your.email@wherever.org    # set to email to be notified of errors #LOCAL

Should be modified to be the email address you would like any failure log report from MATE_initrc to be sent to.


Section which autostarts programs

The section which sets workspaces, geometries and sizes of programs to be auto started. You may wish to choose different programs or workstation placement, geometries, sizes.

NB when running this on a slow or older computer you probably need to increase the pause time before switching to aother workspaces.

Example:

# Now start the programs we wish to have autostarted on login ---------------------------
#
#LOCAL modify this section as needed to autostart which programs are useful to you

pause=3     # time to pause between switching workspaces for startups  #LOCAL

doit "wmctrl -s 0  # switch to workspace 1"

# notify user that MATE_autostart has commenced
doit "zenity --notification --title MATE_autostart --text='MATE_autostart commenced'"
doit "zenity --notification --title MATE_autostart --text='MATE_autostart workspace 1'"

# start multi-tabbed mate terminal
doit "/usr/bin/mate-terminal --geometry=191x84+146+30 --tab --tab --tab --tab --tab --tab --tab &"


# start up gkrellm
doit "/usr/bin/gkrellm --geometry +1800+30 &"
doit "sleep ${pause}      # pause for mate-terminal and gkrellm to start up"


doit "wmctrl -s 2  # switch to workspace 3"
doit "zenity --notification --title MATE_autostart --text='MATE_autostart workspace 3'"

doit "/usr/bin/google-chrome-stable %U &"
doit "sleep ${pause}      # pause for google-chrome-stable to start up"
doit "wmctrl -i -r $(wmctrl -lp | grep "Google Chrome" | awk '{print $1}') -e 0,150,30,1756,980 # position and resize Google Chrome"
doit "sleep ${pause}      # pause to let user see reposition and resize of Firefox"


doit "wmctrl -s 3  # switch to workspace 4"
doit "zenity --notification --title MATE_autostart --text='MATE_autostart workspace 4'"

doit "~/Downloads/firefox/firefox&"
doit "sleep ${pause}      # pause to let Firefox start up"
doit "wmctrl -i -r $(wmctrl -lp | grep "Mozilla Firefox"| awk '{print $1}') -e 0,150,30,1756,1024    # position and resize Mozilla Firefox"
doit "sleep ${pause}      # pause to let user see reposition and resize of Firefox"


doit "wmctrl -s 0  # switch to workspace 1 - return to workspace with mate-teminal and gkrellm"
doit "zenity --notification --title MATE_autostart --text='MATE_autostart workspace 1'"

doit "sleep ${pause}"     # optional: leaves "completed notification on screen a little longer

# notify user that MATE_autostart has completed
doit "zenity --notification --title MATE_autostart --text='MATE_autostart completed'"

# tidying up and ending ------------------------------------------------------------------

Appendix-1: Autostart script example MATE_initrc

#!/usr/bin/bash

# Name          MATE_initrc
		version=11
# Purpose       Script to be run automatically on login to start up useful programs in MATE desktop
# Usage         Normally invoked at login to MATE desktop via: ${HOME}/.config/autostart/MATE_autostart.desktop
#
# Author        paul[dot]blackburn[at]gmail[dot]com
# Written       2020_03_03
# Wikipage	https://wiki.mageia.org/en/Configuring_autostart_with_MATE_in_Mageia
# Updated       Sun 14 Jun 11:23:10 BST 2020 

# Updates:
# 2020_06_14    Added: "--disable-gpu --disable-software-rasterizer" to Chrome start command
#		this removes lots of errors that appear in the MATE_initrc log related
#		to Chrome trying to use the GPU. Example:
#			"ERROR:viz_main_impl.cc(159)] Exiting GPU process due to errors during initialization"
# 2020_03_30	different Chrome and Firefox geometries for Kali and Mageia
# 2020_03_30    ported to Kali: changed "#!/bin/sh" to "#!/usr/bin/bash"
#               because on Kali, /bin/sh links to dash while on Mageia it links to bash
# 2020_03_22    version set at top to make it easier to find
# 2020_03_12    redo position/resize for Chrome and Firefox
# 2020_03_09	bugfix the "cat << \#\#EEOOFF" line - evaluation of ${HOME} via sed
# 2020_03_09	Now reposition and resize Firefox
# 2020_03_08    Added zenity notification on each switch of workspace
# 2020_03_08	Now renaming previous log to <date>_log
# 2020_03_07    Added zenity notifications at start and end of program start section

# Example of ${HOME}/.config/autostart/MATE_autostart.desktop follows

# cat << \#\#EEOOFF | tail -9 | sed -e "s/^................//" -e "s,\${HOME},${HOME}," > ${HOME}/.config/autostart/MATE_autostart.desktop
## [user@localhost ~]$ nl .config/autostart/MATE_autostart.desktop | sed -e "s/^./## &/"
##      1       [Desktop Entry]
##      2       Name=MATE_autostart
##      3       Comment=MATE_autostart.desktop: invokes script to start programs at login to MATE
##      4       Exec=${HOME}/bin/MATE_initrc
##      5       Icon=mate-desktop
##      6       Terminal=false
##      7       Type=Application
##      8       StartupNotify=false
##      9       X-GNOME-Autostart-enabled=true
##EEOOFF

#  To create file MATE_autostart.desktop from the above:
#  a) First time: ensure you have .config/autostart/ => mkdir ${HOME}/.config/autostart
#  b) Copy from the "cat" (not including the leading "#") to "##EEOOFF"
#     and paste to your shell to create MATE_autostart.desktop.
#  c) Verify line 4 "Exec" is set to your correct ${HOME}.
#     Not literally "${HOME}" but something like: /home/user/bin/MATE_initrc

#LOCAL		localizations: search for "#LOCAL" (below) and modify for your own needs:
#		  default_notify=Your.email@wherever.org    # set to email to be notified of errors
#		Note: on older, slower systems may need to increase the pause time "pause=2"

# Disable       To disable autostart: delete (or move) ~/.config/autostart/MATE_autostart.desktop
#               example: mv ~/.config/autostart/MATE_autostart.desktop ~/
#
# Re-enable     To re-enable, just move the MATE_autostart.desktop file back to ~/.config/autostart/
#               example: mv ~/MATE_autostart.desktop ~/.config/autostart/
#
# References:
#               https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s07.html
#               https://askubuntu.com/questions/598195/how-to-add-a-script-to-startup-applications-from-the-command-line


# functions -------------------------------------------------------------

usage() {

        cat <<eeooff
${cmd} runs commands needed on login and starting MATE desktop

${cmd} is normally run at login via ${HOME}/.config/autostart/MATE_autostart.desktop
Please report bugs/suggestions/comments to: ${default_notify}
eeooff

}

fatal() {
        echo "${cmd} fatal: ${1}" >&2
        exit 1
}

error() {
        echo "${cmd} error: ${1}" >&2
}

warning() {
        echo "${cmd} warning: ${1}" >&2
}

tstamp() {
        echo $(date +%Y_%m_%d_at_%H:%M:%S) ${cmd}: ${1}
}

doit() {
        tstamp "${1}"
        eval ${1}

        retcode=$?
        if [ ${retcode} != 0 ]; then
                error "\$?=${retcode}"
        fi
}

elapsed_time () {
        start=${1}
        end=${2}

#       echo debug: elapsed_time ${start} ${end}
        unset x
        unset y

        if [ ${start} = ${end} ]; then
                echo -n "zero seconds"
        fi

        let elapsed_seconds=${end}-${start}
        let days=${elapsed_seconds}/86400
        let days_sec=${days}*86400

        let x=${elapsed_seconds}-${days_sec}
        let hours=${x}/3600
        let hours_sec=${hours}*3600
       
        let x=${days_sec}+${hours_sec}
        let y=${elapsed_seconds}-${x}
        let mins=${y}/60
        let mins_sec=${mins}*60

        let x=${days_sec}+${hours_sec}+${mins_sec}
        let secs=${elapsed_seconds}-${x}

        if [ ${days} != 0 ]; then
                if [ ${days} = 1 ]; then
                        echo -n "1 day "
                else
                        echo -n "${days} days "
                fi
        fi

        if [ ${hours} != 0 ]; then
                if [ ${hours} = 1 ]; then
                        echo -n "1 hour "
                else
                        echo -n "${hours} hours "
                fi
        fi


        if [ ${mins} != 0 ]; then
                if [ ${mins} = 1 ]; then
                        echo -n "1 minute "
                else
                        echo -n "${mins} minutes "
                fi
        fi

        if [ ${secs} != 0 ]; then
                if [ ${secs} = 1 ]; then
                        echo -n "1 second "
                else
                        echo -n "${secs} seconds"
                fi
        fi

        echo
}

trap_cleanup () {                # tidy up on receipt of signal (ctrl-C, etc)
        tstamp "trap_cleanup commenced"

        doit "rm ${lockfile}"

        epoch_now=$(date +%s)
        tstamp "total duration $(elapsed_time ${start_epoch} ${epoch_now})"

        tstamp "trap_cleanup completed"
        exit 1
}

# end functions section

# set initial values ----------------------------------------------------------------------

cmd=$(basename $0)
cmdline="${cmd} $*"
logdir=~/logs
log=${logdir}/${cmd}_log

lockfile=/tmp/${cmd}_lockfile
tempfile=/tmp/${cmd}_tempfile_$$

# Configure the following for your needs: #LOCAL

default_notify=Your.email@wherever.org    # set to email to be notified of errors #LOCAL


# main starts here ------------------------------------------------------------------------

start_epoch=$(date +%s)

# set interrupt signal trap routine

for signal in 1 2 3 15; do
trap "echo \"interrupted by signal ${signal}\"; trap_cleanup; exit 1" ${signal}
done

case "${1}" in
        -? | -help | -usage | --?| --help | --usage )
                usage
                exit
                ;;
esac

mkdir -p ${logdir} 2>/dev/null          # make sure we have a $logdir

#echo "stdout and stderr now being written to ${log}+"
exec 4>&2
exec 3>&1
exec 1>${log}+
exec 2>&1

tstamp "commenced $(dirname ${0})/${cmd} version ${version} on $(date '+%a %d %h %y')"


# sanity checking starts here

tstamp "Check we are running on Linux"
os=$(uname)

if [ "${os}" != "Linux" ]; then
        fatal "This is ${os} but we want Linux! Bye-bye!"
else
        tstamp "Good news: this is Linux and we are happy penguins! :-)"
fi

tstamp "Check for machine type: only supported on x86"
machine=$(uname -m)
case ${machine} in
        i386 | i486 | i586 | i686 | x86_64 )
                tstamp "Good! Supported machine type: ${machine}"
                ;;
        * )
                warning "Hmm? Unknown machine type: ${machine}"
                ;;
esac
#tstamp "Test for Linux distribution type"

distro="unknown"
file=/etc/redhat-release
if [ -s ${file} ]; then
        distro="RedHat"
fi

file=/etc/SuSE-release
if [ -s ${file} ]; then
        distro="SuSE"
fi

file=/etc/mandrake-release
if [ -s ${file} ]; then
        distro="Mandrake"
fi

file=/etc/mandriva-release
if [ -s ${file} ]; then
        distro="Mandriva"
fi

file=/etc/mageia-release
if [ -s ${file} ]; then
        distro="Mageia"
fi

file=/etc/debian_version
if [ -s ${file} ]; then
        distro="Debian"
fi

file=/etc/slackware-version
if [ -s ${file} ]; then
        distro="Slackware"
fi

file=/etc/turbolinux-version
if [ -s ${file} ]; then
        distro="TurboLinux"
fi


#tstamp "Test for Linux distribution version"
case ${distro} in
        RedHat )        distro_version=$(cat /etc/redhat-release)
                        ;;
        SuSE )          distro_version=$(cat /etc/SuSE-release)
                        ;;
        Mandrake )      distro_version=$(cat /etc/mandrake-release)
                        ;;
        Mandriva )      distro_version=$(cat /etc/mandriva-release)
                        ;;
        Mageia )        distro_version=$(cat /etc/mageia-release)
                        ;;
        Debian )        distro_version=$(cat /etc/debian_version)
                        ;;
        Slackware )     distro_version=$(cat /etc/slackware-version)
                        ;;
        TurboLinux )    distro_version=$(cat /etc/turbolinux-version)
                        ;;
        * )             distro_version="unknown"
                        ;;
esac

tstamp "Distribution is: ${distro_version}"


# crack command line arguments
while [ ! -z "${1}" ]; do
        case ${1} in
                -notify )
                        shift
                        if [ -z "${1}" ]; then
                                fatal "missing notify email address"
                        else
                                notify=${1}
                        fi
                        ;;
                -notify*)
                        notify=$(echo ${1} | cut -c8-)
                        ;;
                -help | -? | -usage )
                        usage
                        exit
                        ;;
                *)
                        warning "unknown command line argument: ${1}"
                        usage
                        exit 1
                        ;;
        esac
        shift
done

if [ -z "${notify}" ]; then
        notify=${default_notify}
fi

# If we reached here then it is likely we can complete a normal run
# but we need to switch the logfile.
# Start by renaming an existing previous log by adding a date prefix

if [ -s ${log} ]; then
	old_log=$(dirname ${log})/$(date +%Y_%m_%d_at_%H:%M:%S)_$(basename ${log})
	doit "mv -f ${log} ${old_log}    # rename previous log to <date>_log "
fi
doit "mv ${log}+ ${log}    # log cycling"

# end of (most) sanity checking ---------------------------------------


failed="false"

#LOCAL - If you change the programs started in the autostart section then you need to also update "command_list=" below
tstamp "Checking if we have the commands we need"
command_list="mate-terminal gkrellm /usr/bin/google-chrome-stable ${HOME}/Downloads/firefox/firefox wmctrl zenity"

for command in ${command_list}; do
#       tstamp "checking we have ${command} command"
        which ${command} 2>&1 > /dev/null
        if [ $? = 0 ]; then
                tstamp "Good, we have ${command}: $(${command} --version)"
        else
                warning "missing command: ${command}"
                warning "Please install ${command} and try again"
                failed="true"
        fi
done

# At this point, "failed" may have been set to true but we will just do what we can (not exit here)

if [ ${failed} = "true" ]; then
	tstamp "Fail detected but attempting to continue"
fi

# Now start the programs we wish to have autostarted on login ---------------------------
#
#LOCAL modify this section as needed to autostart which programs are useful to you

pause=3     # time to pause between switching workspaces for startups  #LOCAL

doit "wmctrl -s 0  # switch to workspace 1"

# notify user that MATE_autostart has commenced
doit "zenity --notification --title MATE_autostart --text='MATE_autostart commenced'"

# window geometries by distro (with MATE)
case $(echo ${distro_version} | awk '{print $1}') in
        Mageia )
		mate_terminal_geo="191x84+146+30"
		gkrellm_geo="+1800+30"
		chrome_geo="0,150,30,1756,980"
		firefox_geo="0,150,30,1756,1024"
                ;;
        kali-rolling )
		mate_terminal_geo="154x42+146+30"
		gkrellm_geo="+1714+30"
		chrome_geo="0,150,30,1766,1020"
		firefox_geo="0,160,30,1752,990"
                ;;
#LOCAL other distro's geo settings may be added here

        * )  # undefined distro, wild guessing:
		mate_terminal_geo="191x84+146+30"
		gkrellm_geo="+1800+30"
		chrome_geo="0,150,30,1756,980"
		firefox_geo="0,150,30,1756,1024"
                ;;
esac

doit "zenity --notification --title MATE_autostart --text='MATE_autostart workspace 1'"

# start multi-tabbed mate terminal
doit "/usr/bin/mate-terminal --geometry=${mate_terminal_geo} --tab --tab --tab --tab --tab --tab --tab &"

# start up gkrellm
doit "/usr/bin/gkrellm --geometry ${gkrellm_geo} &"
doit "sleep ${pause}      # pause for mate-terminal and gkrellm to start up"

doit "wmctrl -s 2  # switch to workspace 3"
doit "zenity --notification --title MATE_autostart --text='MATE_autostart workspace 3'"

# start up Chrome
doit "/usr/bin/google-chrome-stable %U --disable-gpu --disable-software-rasterizer&"
doit "sleep ${pause}      # pause for google-chrome-stable to start up"
doit "wmctrl -i -r $(wmctrl -lp | grep "Google Chrome" | awk '{print $1}') -e ${chrome_geo} 	# position and resize Google Chrome"
doit "sleep ${pause}      # pause to let user see reposition and resize of Chrome"


doit "wmctrl -s 3  # switch to workspace 4"
doit "zenity --notification --title MATE_autostart --text='MATE_autostart workspace 4'"

# start up Firefox
doit "~/Downloads/firefox/firefox&"
doit "sleep ${pause}      # pause to let Firefox start up"
doit "wmctrl -i -r $(wmctrl -lp | grep "Mozilla Firefox"| awk '{print $1}') -e ${firefox_geo}	# position and resize Mozilla Firefox"
doit "sleep ${pause}      # pause to let user see reposition and resize of Firefox"


doit "wmctrl -s 0  # switch to workspace 1 - return to workspace with mate-teminal and gkrellm"
doit "zenity --notification --title MATE_autostart --text='MATE_autostart workspace 1'"

doit "sleep ${pause}"     # optional: leaves "completed notification on screen a little longer

# notify user that MATE_autostart has completed
doit "zenity --notification --title MATE_autostart --text='MATE_autostart completed'"

# tidying up and ending ------------------------------------------------------------------

end_epoch=$(date +%s)

tstamp "total duration $(elapsed_time ${start_epoch} ${end_epoch})"
tstamp "completed"

# Switch stdout and stderr back to report results ONLY if something failed

if [ "${failed}" = "true" ]; then
        exec 1>&3
        exec 2>&4
        < ${log} mail -s "${cmd} on $(hostname)" ${notify}
fi

Appendix-2: example logfile from MATE_initrc

Here is an example of the logfile written when the MATE_initrc script (example above) is run.

Note that if any of the prorgams that are autostarted this way output error messages they will be captured here.

This can be useful to review and research any bugs or issues revealed when programs are auto started. In the example below, error messages about FontService from Google Chrome are captured.

2020_06_14_at_11:48:44 MATE_initrc: commenced /home/mpb/bin/MATE_initrc version 11 on Sun 14 Jun 20
2020_06_14_at_11:48:44 MATE_initrc: Check we are running on Linux
2020_06_14_at_11:48:44 MATE_initrc: Good news: this is Linux and we are happy penguins! :-)
2020_06_14_at_11:48:44 MATE_initrc: Check for machine type: only supported on x86
2020_06_14_at_11:48:44 MATE_initrc: Good! Supported machine type: x86_64
2020_06_14_at_11:48:44 MATE_initrc: Distribution is: Mageia release 7 (Official) for x86_64
2020_06_14_at_11:48:44 MATE_initrc: mv -f /home/mpb/logs/MATE_initrc_log /home/mpb/logs/2020_06_14_at_11:48:44_MATE_initrc_log # rename previous log to <date>_log
2020_06_14_at_11:48:44 MATE_initrc: mv /home/mpb/logs/MATE_initrc_log+ /home/mpb/logs/MATE_initrc_log # log cycling
2020_06_14_at_11:48:44 MATE_initrc: Checking if we have the commands we need
2020_06_14_at_11:48:44 MATE_initrc: Good, we have mate-terminal: MATE Terminal 1.22.1
2020_06_14_at_11:48:44 MATE_initrc: Good, we have gkrellm: gkrellm 2.3.10
2020_06_14_at_11:48:45 MATE_initrc: Good, we have /usr/bin/google-chrome-stable: Google Chrome 83.0.4103.97
2020_06_14_at_11:48:45 MATE_initrc: Good, we have /home/mpb/Downloads/firefox/firefox: Mozilla Firefox 77.0.1
2020_06_14_at_11:48:45 MATE_initrc: Good, we have wmctrl: 1.07
2020_06_14_at_11:48:45 MATE_initrc: Good, we have zenity: 3.32.0
2020_06_14_at_11:48:45 MATE_initrc: wmctrl -s 0 # switch to workspace 1
2020_06_14_at_11:48:45 MATE_initrc: zenity --notification --title MATE_autostart --text='MATE_autostart commenced'
2020_06_14_at_11:48:45 MATE_initrc: zenity --notification --title MATE_autostart --text='MATE_autostart workspace 1'
2020_06_14_at_11:48:46 MATE_initrc: /usr/bin/mate-terminal --geometry=191x84+146+30 --tab --tab --tab --tab --tab --tab --tab &
2020_06_14_at_11:48:46 MATE_initrc: /usr/bin/gkrellm --geometry +1800+30 &
2020_06_14_at_11:48:46 MATE_initrc: sleep 3 # pause for mate-terminal and gkrellm to start up
2020_06_14_at_11:49:03 MATE_initrc: wmctrl -s 2 # switch to workspace 3
2020_06_14_at_11:49:03 MATE_initrc: zenity --notification --title MATE_autostart --text='MATE_autostart workspace 3'
2020_06_14_at_11:49:03 MATE_initrc: /usr/bin/google-chrome-stable %U --disable-gpu --disable-software-rasterizer&
2020_06_14_at_11:49:03 MATE_initrc: sleep 3 # pause for google-chrome-stable to start up
2020_06_14_at_11:49:06 MATE_initrc: wmctrl -i -r 0x02e00001 -e 0,150,30,1756,980 # position and resize Google Chrome
2020_06_14_at_11:49:06 MATE_initrc: sleep 3 # pause to let user see reposition and resize of Chrome
2020_06_14_at_11:49:09 MATE_initrc: wmctrl -s 3 # switch to workspace 4
2020_06_14_at_11:49:09 MATE_initrc: zenity --notification --title MATE_autostart --text='MATE_autostart workspace 4'
2020_06_14_at_11:49:09 MATE_initrc: ~/Downloads/firefox/firefox&
2020_06_14_at_11:49:09 MATE_initrc: sleep 3 # pause to let Firefox start up
2020_06_14_at_11:49:12 MATE_initrc: wmctrl -i -r 0x03c00003 -e 0,150,30,1756,1024 # position and resize Mozilla Firefox
2020_06_14_at_11:49:12 MATE_initrc: sleep 3 # pause to let user see reposition and resize of Firefox
2020_06_14_at_11:49:15 MATE_initrc: wmctrl -s 0 # switch to workspace 1 - return to workspace with mate-teminal and gkrellm
2020_06_14_at_11:49:15 MATE_initrc: zenity --notification --title MATE_autostart --text='MATE_autostart workspace 1'
2020_06_14_at_11:49:15 MATE_initrc: sleep 3
2020_06_14_at_11:49:18 MATE_initrc: zenity --notification --title MATE_autostart --text='MATE_autostart completed'
2020_06_14_at_11:49:19 MATE_initrc: total duration 35 seconds
2020_06_14_at_11:49:19 MATE_initrc: completed