This script uses gtkdialog to provide a profile selection when launching Chrome.

Simply copy/paste this script to your your preferred location, typically ~/Chrome. Then when it runs you can create a new profile (just enter a name) or select one of the existing ones.

This script requires gtkdialog 0.7.20 or newer.

#!/bin/bash

cd $(dirname $(readlink -f $0))

list=$(
    for f in *
    do
        if [ -d $f ]
        then
            echo "<item>$f</item>"
        fi
    done
)


export MAIN_DIALOG="
<window decorated=\"true\" icon-name=\"chromium-browser\" resizable=\"false\" title=\"Chromium Launcher\" window_position=\"2\">
<vbox>
<frame chrome>
<text>
    <label>Select the Profile Directory</label>
</text>
</frame>
<hbox>
    <combobox><variable>CHROME_PROFILE</variable>$list</combobox>
</hbox>
<hbox>
    <button>
        <label>Launch</label>
        <action>chromium --user-data-dir=$CHROME_PROFILE >/dev/null 2>&1 &</action>
        <action>EXIT:done</action>
    </button>
</hbox>
</vbox>
</window>
"

gtkdialog \
    --center \
    --program=MAIN_DIALOG \
    >/dev/null

See Also

comments powered by Disqus