2

I know i can set the title of Xterm using something like:

xterm -xrm 'XTerm.vt100.allowTitleOps: false' -T windowname

Is it possible to create this like a GUI, so Windowname is a prompt BOX. i.e. i click on Icon That when opens prompts me for a TEXT box window (GUI Not Terminal). I can then name the window prior to opening.

I can achieve this from a Bash script, But is it possible for a GUI method. I work in a DE alot of the time and always launching multiple terminals. To be able to type a name prior to the Terminal box appearing is the solution am after.

#!/bin/bash

# This is a test program to set a name to Xterm per run

echo "Hello, "$USER".  This script is a test the set name in Xterm."

echo -n "Enter the title for your window and press [ENTER]: "
read name
echo

xterm -xrm 'XTerm.vt100.allowTitleOps: false' -T $name
1
  • Why does allowTitleOps: false enable being able to set the title? It looks like it should do the opposite! Commented Mar 29, 2020 at 21:03

1 Answer 1

1

i found a nice little tool called Zenity This allows calling a GUI prompt box.

a Bash Script would look like the following:

#!/bin/bash

# This is a test program to set a name to Xterm per run

echo "Hello, "$USER".  This script is a test the set name in Xterm."

XtermName=$(zenity --entry --text="Window Name")

xterm -xrm 'XTerm.vt100.allowTitleOps: false' -T $XtermName

The last 2 lines are only important.

Creating a Variable to populate (User Input)

XtermName=$   

Created the GUI Input Box

zenity --entry --text="Window Name" 

Loads Xterm setting a title, the Title is varable $XtermName

xterm -xrm 'XTerm.vt100.allowTitleOps: false' -T $XtermName 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.