2

I'm using Ubuntu 16.04 and I want to be able to tell which profile is used by a given terminal emulator. Just the name would be enough.

It's trivial to find with GUI : just right click in the terminal window, and the profile in use will be indicated under "Profiles". You can also go Edit -> Profile Preferences -> Profile Name.

I would like to access that information with command line, but can't find how.

0

I have found the following script in https://github.com/helino/current-gnome-terminal-profile/blob/master/current-gnome-terminal-profile.sh:

#!/bin/bash

FNAME="$HOME/.current_gnome_profile"
gnome-terminal --save-config=$FNAME
ENTRY=`grep ProfileID < $FNAME`
rm $FNAME
TERM_PROFILE=${ENTRY#*=}
echo -n "$TERM_PROFILE"
  • 1
    I'm afraid that script won't work on newer versions: "Option "--save-config" is no longer supported in this version of gnome-terminal." – Luk Jan 10 '17 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.