LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 09-20-2017, 10:06 AM   #1
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
terminal emulator types


when setting the terminal emulator inside of a terminal emulator. What I have found is that everyone(?) is getting set to xterm. What are the other ones? Is their other terminal emulator types one can set the terminal emulator to?

I ask because of a (switch) case statement within .bashrc that one can use to change prompts depending on the terminal emulator type.

Code:
	case $TERM in
	
	terminology)
		export PS1="\[\e[34m\]\u\[\e[m\]@\[\e[32m\]\H\[\e[m\]\[\e[35m\]\w\[\e[m\]\\$ "
		;;
	tinyterm)
	    export PS1="\[\e[34m\]\u\[\e[m\]@\V\\$ "
	    ;;	      
	xterm)
	    export PS1="\u@\h\w > "
	      ;;
       	*)
		export PS1="\[\e[34m\]\u\[\e[m\]@\V\\$ "
		;;
	esac
which doesn't do any good if the terminal emulator type is set to xterm. If I comment out the xterm case it will just go to default for whatever terminal I setup within this case statement.

What would be the way to remedy this?
 
Old 09-20-2017, 10:16 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,786

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
terminals have different capabilities (https://www.emtec.com/zoc/terminal-emulator.html). You ought to google first:
https://en.wikipedia.org/wiki/List_o...inal_emulators
https://en.wikipedia.org/wiki/Compar...inal_emulators
https://kb.iu.edu/d/acpy
https://unix.stackexchange.com/quest...ype-am-i-using
 
Old 09-20-2017, 11:31 AM   #3
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,136

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
The expression "terminal emulator" is actually ambiguous. We generally use it to mean a program to give you a CLI from within a GUI (xterm being the X-window default), but it can also mean a program to emulate a mainframe terminal (like the Dec VT series, the nearest modern equivalent being a thin client). Linux programs are multifunctional, which is why SSH works from the terminal emulator.
 
Old 09-20-2017, 12:34 PM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
I did I tried terminal eliminators linux and got the top listings for same. so I came here.
 
Old 09-20-2017, 12:35 PM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by DavidMcCann View Post
The expression "terminal emulator" is actually ambiguous. We generally use it to mean a program to give you a CLI from within a GUI (xterm being the X-window default), but it can also mean a program to emulate a mainframe terminal (like the Dec VT series, the nearest modern equivalent being a thin client). Linux programs are multifunctional, which is why SSH works from the terminal emulator.
yeah I could not think of any key words, I do suppose I could have just posted what are good key words .. instead. thanks
 
Old 09-20-2017, 12:51 PM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
it starts with the terminal emulator\s documentation. read it.
you can test 'echo $TERM' see what you get. maybe it can be influenced.

Quote:
Originally Posted by man urxvt
-tn termname
This option specifies the name of the terminal type to be set in the TERM environment
variable. This terminal type must exist in the termcap(5) database and should have li#
and co# entries; resource termName.
 
Old 09-20-2017, 02:41 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,968

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
never mind.

Last edited by jefro; 09-20-2017 at 02:45 PM.
 
Old 09-20-2017, 04:39 PM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by ondoho View Post
it starts with the terminal emulator\s documentation. read it.
you can test 'echo $TERM' see what you get. maybe it can be influenced.
I did that 'echo $TERM' with the ones I use I get xterm , but i remember getting that case (switch) to work many many days months well a very long time ago with it written like it is, just checking for the terminal 'name', but memory fails me as to why it worked then.
 
Old 09-21-2017, 02:38 AM   #9
!!!
Member
 
Registered: Jan 2017
Location: Fremont, CA, USA
Distribution: Trying any&ALL on old/minimal
Posts: 997

Rep: Reputation: 382Reputation: 382Reputation: 382Reputation: 382
Might something (like /etc or ~/.bashrc, .profile, ...) be setting your $TERM to xterm?
(hunt=grep in them for xterm) p.s. interesting list, fwiw

Just to confirm/clarify:
When you 'manually' run various terminal apps, does echo $TERM always report xterm?
 
Old 09-21-2017, 03:59 AM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,786

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
Quote:
when setting the terminal emulator inside of a terminal emulator.
In general you need not set TERM by hand, but when you start a terminal emulator program it will set it automatically (for you).
 
Old 09-21-2017, 07:16 AM   #11
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by !!! View Post
Might something (like /etc or ~/.bashrc, .profile, ...) be setting your $TERM to xterm?
(hunt=grep in them for xterm) p.s. interesting list, fwiw

Just to confirm/clarify:
When you 'manually' run various terminal apps, does echo $TERM always report xterm?
terminal apps or terminal elums? my terminal elums all came back with xterm, but for some strange reason I distinctly remember being able to do this little change prompt for each term using a switch like I posted. Because the terminals do have a (something type, I forget the term) "class" (?) name attached to them also.

except this one terminal I just installed (the other day prior to posting this) called vinterm when I 'echo $TERM' it returns its name, vinterm. so maybe someone got that right? Because it is the only one working with this switch to change the prompt using the terminal name to identify it.
in its own code,
Code:
./terminal/pty.h:15:    PTY(Options const& options, const string terminal="vinterm");
that maybe why it is using its own name. that is the only place I can see in all of its code that it is actually identifying itself. grep -rwn 'path' -e 'string'
though I do beleive the the use of TERM has its reasons -- xterm being like the pace setter for terminals.

Last edited by BW-userx; 09-21-2017 at 07:53 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
New install Xubuntu 14.04 trying to replace default terminal with Terminator error:Failed to execute default Terminal Emulator bdalzell Ubuntu 2 06-19-2016 04:40 AM
Terminal emulator softwaredownloads Linux - Newbie 3 01-11-2011 01:20 AM
Terminal types rozilla Linux - Newbie 2 10-26-2008 09:15 AM
Terminal Emulator JMJ_coder Linux - General 3 09-26-2007 05:09 PM
What is a terminal Emulator bharathgowda8 Linux - Software 5 09-06-2007 02:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 03:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration