Over a million developers have joined DZone.

Choose Profile Before Launching GNOME Terminal Emulator

·
This is a small sheel scripts that uses zenity to show a dialog that lets you choose the profile you want to use before launching a GNOME terminal window. 


#!/bin/sh

#################################################
# Simple zenity script to display a dialog from #
# which to choose the profile you want for a    #
# GNOME terminal you want to run.               #
# (C) 2007 - Antonio Ognio   #
# License: GPL                                  #
#################################################

PROFILES=`gconftool-2 --all-dirs /apps/gnome-terminal/profiles`
LIST=""
for p in $PROFILES; do
  p=`basename $p`
  LIST="$LIST FALSE $p "
done
choosen=`zenity  --title "GNOME Terminal" --window-icon /usr/share/icons/gnome/scalable/apps/gnome-terminal.svg --text "Choose one from available profiles:" --list  --radiolist  --column "" --column "Profiles" $LIST`
gnome-terminal --window-with-profile=$choosen &

Topics:

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}