The best terminal emulator

I haven't investigated if there is a solution, but one feature I don't like about x11/xterm is that it swallows up certain keybindings. For example, try running ports-mgmt/poudriere inside x11/rxvt-unicode and hitting C-t and you will see status information. (BTW, lots of other commands have this as well, e.g. cp, dd). Hitting C-t for the same commands running inside x11/xterm shows nothing.
 
I haven't investigated if there is a solution, but one feature I don't like about x11/xterm is that it swallows up certain keybindings. For example, try running ports-mgmt/poudriere inside x11/rxvt-unicode and hitting C-t and you will see status information. (BTW, lots of other commands have this as well, e.g. cp, dd). Hitting C-t for the same commands running inside x11/xterm shows nothing.
That's not true. It works just fine in xterm.
 
That's not true. It works just fine in xterm.
I cleared out my xterm customizations and even restarted Xorg, but it still didn't work for me. Then I switched my window manager to twm and it does work. I did say I hadn't investigated. :-/ Now I'm curious about the interaction between my window manager and xterm that causes the problem and why it works with urxvt.
 
Best drop-down terminal emulator wrapper (it uses x11/xterm or x11/rxvt-unicode)
is x11/yeahconsole IMHO!
Снимок экрана от 2016-11-29 23-37-05.png

also x11/stjerm is nice x11-toolkits/vte based drop-down term.


And like a standalone term, IMO x11/xterm is the best!
BTW, I don't care what teminal emulator I'm using, if I'm using sysutils/tmux terminal multiplexer,
because it is superb with every term, even on ttyv.
AZSRKkl.png


here is my ~/.Xdefaults (yeahconsole, stjerm, xterm, urxvt settings and some others options.)
Code:
! Xft --------------------------------------------------
Xft.dpi:			96
Xft.autohint:			1
Xft.antialias:			1
Xft.hinting:			1
Xft.hintstyle:			hintslight
Xft.rgba:			rgb
Xft.lcdfilter:			lcddefault


! XTerm --------------------------------------------------
XTerm*locale:				UTF-8
XTerm.cursorblink:			false
XTerm*popOnBell:			true
XTerm*termName:				xterm-256color
XTerm*loginShell:			true
XTerm*faceName:				Fixed
XTerm*faceSize:				10
XTerm*foreground:			#ffffff
XTerm*background:			#292B2B
XTerm*cursorColor:			#215D9C
XTerm*vt100*geometry:			80x25
XTerm*saveLines:			15000
XTerm*utf8:				1
XTerm*utf8Title:			1
XTerm*eightBitInput:			true
XTerm*rightScrollBar:			true
XTerm*scrollBar:			true
XTerm*scrollKey:			true
XTerm*multiScroll:			true
XTerm*cursorBlink:			true
XTerm*scrollTtyOutput:			false
XTerm*selectToClipboard:		true
XTerm*.disallowedWindowOps:		20,21,SetXprop
XTerm*charClass:			33:48,36-47:48,58-59:48,61:48,63-64:48,95:48,126:48
XTerm*VT100.translations:		#override <Btn1Up>: select-end(PRIMARY, CLIPBOARD, CUT_BUFFER0)


! URxvt --------------------------------------------------
URxvt*termName:				rxvt-unicode-256color
URxvt*loginShell:			true
URxvt.font:				xft:Fixed:size=10
URxvt*background: 			#292B2B
URxvt.foreground:			#ffffff
URxvt.borderColor:			#292B2B
URxvt.cursorColor:			#215D9C
URxvt.cursorBlink:			true
URxvt.colorUL:				#4682B4
URxvt.geometry:				93x27
URxvt.saveLines:			15000
URxvt.fading:				30
URxvt.letterSpace:			0
URxvt.internalBorder:			1
URxvt.externalBorder:			0
URxvt*cutchars:				"'"/\.,()<>{}@;:*'"'
URxvt*tripleclickwords:			true
URxvt*skipBuiltinGlyphs:		false
URxvt*jumpScroll:			true
URxvt.scrollTtyOutput:			false
URxvt.scrollTtyKeypress:		true
URxvt*scrollWithBuffer:			true
URxvt.scrollBar:			true
URxvt.scrollBar_right:			true
URxvt.scrollBar_floating:		false
! scrollbar style: rxvt, plain, next, xterm
URxvt.scrollstyle:			next
URxvt.thickness:			13
URxvt*scrollColor:			#ADADAD
! disable ctrl+shift key binding
URxvt.iso14755:				false
! ------------------------------ URxvt perls (selection-to-clipboard,tabbed)
URxvt.perl-ext-common:			selection-popup
!URxvt.tabbed.tabbar-fg:			8
!URxvt.tabbed.tabbar-bg:			0
!URxvt.tabbed.tab-fg:			12
!URxvt.tabbed.tab-bg:			0

! YeahConsole -------------------------------------------
yeahconsole*term:		urxvtcd
yeahconsole.font:		xft:Fixed:size=10
yeahconsole*background:		#292B2B
yeahconsole.fading:		30
yeahconsole*screenWidth:	1302
yeahconsole*consoleHeight:	30
yeahconsole*scrollBar:		false
!yeahconsole*xOffset:		0
yeahconsole*restart:		0
yeahconsole*aniDelay:		30
yeahconsole*stepSize:		3
! resize bar
yeahconsole*handleWidth:	3
yeahconsole*handleColor:	#1D1F1F
! /usr/local/include/X11/keysymdef.h
yeahconsole*toggleKey:		None+F1
yeahconsole*keyFull:		Win+F11
yeahconsole*keyBigger:		Win+equal
yeahconsole*keySmaller:		Win+minus

! Stjerm --------------------------------------------------
!stjerm.shell:				/usr/local/bin/zsh
stjerm.emulation:			xterm
stjerm.lines:				15000
stjerm.font:				Fixed 10
stjerm.key:				f1
stjerm.background:			#1D1F1F
stjerm.foreground:			#FFFFFF
stjerm.cursorColor:			#215D9C
stjerm.height:				400
stjerm.border:				thin
stjerm.width:				95%
stjerm.opacity:				85
stjerm.showtab:				one
stjerm.scroll:				false
stjerm.scrollbar:			none
stjerm.autohide:			false
stjerm.tablabel:			#
stjerm.tabpos:				top
stjerm.tabfill:				false
stjerm.allowreorder:			true
stjerm.cursorBlink:			true
stjerm.cursorType:			block
stjerm.allowbold:			true

! XScreenSaver -------------------------------------------
! {hostname,username,password} text
xscreensaver.Dialog.foreground:			#fff
xscreensaver.Dialog.background:			#111111
xscreensaver.Dialog.topShadowColor:		#000
xscreensaver.Dialog.bottomShadowColor:		#000
xscreensaver.Dialog.Button.foreground:		#FFF
xscreensaver.Dialog.Button.background:		#0D0D0D
! username/password input box and date text colour !!
xscreensaver.Dialog.text.foreground:		#FFF
xscreensaver.Dialog.text.background:		#0D0D0D
xscreensaver.Dialog.internalBorderWidth:	0
xscreensaver.Dialog.borderWidth:		0
xscreensaver.Dialog.shadowThickness:		1
xscreensaver.passwd.thermometer.foreground:	#FF0000
xscreensaver.passwd.thermometer.background:	#ffffff
xscreensaver.passwd.thermometer.width:		15
!xscreensaver.dateFormat:			%I:%M%P %a %b %d, %Y
xscreensaver.dateFormat:			%H:%M, %A %d %b


! Color scheme --------------------------------------------------
! BLACK
*.color0:				#0A0A0A
*.color8:				#292B2B
! RED
*.color1:				#cb1b17
*.color9:				#E61F1A
! GREEN
*.color2:				#28cc54
*.color10:				#2bd93f
! YELLOW
*.color3:				#ea8837
*.color11:				#f1c936
! BLUE
*.color4:				#0F49C6
*.color12:				#005fff
! MAGENTA
*.color5:				#7b70a3
*.color13:				#9A8CCC
! CYAN
*.color6:				#00BFBF
*.color14:				#C5F0F0
! WHITE
*.color7:				#FADEC1
*.color15:				#f8f7fb
You should execute
% xrdb -merge ~/.Xdefaults to make it work (x11/xrdb is required), add it to your startup script (e.g. ~/.xinitrc).
(F1 key is a yeahconsole hotkey).


To make yeahconsole transparent (x11-wm/transset and x11/xwininfo are required), create /usr/local/bin/yeahconsole-trans:
Code:
#!/bin/sh

# start yeahconsole
yeahconsole &

# wait a little until all the windows are created
sleep 1

# get yeahconsole window id
id=$(xwininfo -root -tree | grep yeahconsole -B 2 | head -1 | perl -p -e 's/^ *(0x.*?) .*$/$1/g')

# make it transparent
transset -i "$id" [b]0.8[/b]
enter
% sudo chmod +x /usr/local/bin/yeahconsole-trans
and start it with yeahconsole-trans.

(Alternatively, create ~/.local/bin/yeahconsole-trans and add "~/.local/bin/" to your $PATH variable
$ PATH=${PATH}:~/.local/bin; export PATH or % setenv PATH $PATH\:/home/user/.local/bin)
 
Last edited by a moderator:
I have actually not tried it oddly enough, especially since I posted that particular link, lol. For some reason I didn't think it was in ports but your reference clearly shows it is. I'll give it a shot, no harm in trying.
 
Dear Sevendogs, there are so many ports. New things and ancient ports which might have been forgotten. Therefore I often dig in the ports tree when somebody posts something of interest as you have done. My favourite tool is ports-mgmt/psearch. I guess I might try the x11/sterm in near future as well.
 
I do the same thing. If I want to try a port, I will research on https://www.freshports.org/. A lot of gems in there, you just have to find them. It is a little sad to me that some of the best applications I have used are no longer maintained. I was interested in being a maintainer but don't have the coding skill.
 
Have you tried x11/sterm already? If yes, what is your impression?
So I tried x11-sterm and it's fine I guess. I am getting errors from my shell "tcsh" about not having /etc/termcap and something about using a dumb terminal. All else works fine: copy/paste for example. It doesn't have anything that wows me but it worked fine. Again I am not a terminal power user so someone who is would probably have a different opinion.
 
I am getting errors from my shell "tcsh" about not having /etc/termcap and something about using a dumb terminal.
For this I found two possible countermeasures. Simple and working by adding this to ~/.cshrc if this matches to your shell.
Code:
setenv  TERM xterm
The hard and not yet working 100% way:
  1. Install devel/ncurses to get /usr/local/bin/tic
  2. Append the x11/sterm related config to /usr/share/misc/termcap by tic -C -t st.info >> termcap. tic can already generate the hashed file but this does not work.
  3. Generate the hashed file by cap_mkdb termcap in the termcap directory.
With the hard method something is missing because colored list output does not work and the keys F10 and may be higher are not configured. The termcap entries are limited to 1023bytes or so which is exceeded by the entries in st.info. On the other hand the termcap entries related to other terminals are not really shorter. There is still a lot of stuff to learn for me.
 
The simple fix works like a charm, plus I did some tweaking with the config.def.h file and got the fonts, colors, hinting, etc that I like in a terminal. I like it so far. Thanks for the tips.
 
Dear Sevendogs, thank you for the pointer to x11/sterm. I did almost no tweaking beside the font size. The F10 key works now going the hard way. Currently I am going through the termcap entries of x11/xterm and x11/sterm. Many are similar, some of x11/xterm are likely Linux related or history since they do not appear in terminfo(5). I am sure I will find out the difference with respect to LSCOLOR. I can work with the simple fix, too. Thank you again for the idea.
 
You are welcome - the author of x11/sterm is the same author of the window manager x11-wm/dwm so the configuration is done the same way: change the values in the application's config.def.h file and re-compile. It took me a bit to get the fonts and colors for the fonts correct but the author has a reference on how to do this in the config.def.h file so it was easy. I always set my terminal to have green font on black, just my preference, and my aging eyes prefer a larger font as well :)
 
Update: I applied the "scrollback" patch to x11/sterm and although it only scrolls by pressing "shift+page up/down", I am getting used to it. I do like the author's philosophy of minimalism and small, efficient code so I am sticking with this terminal. So far so good!
 
The hard and not yet working 100% way:
  1. Install devel/ncurses to get /usr/local/bin/tic
  2. Append the x11/sterm related config to /usr/share/misc/termcap by tic -C -t st.info >> termcap. tic can already generate the hashed file but this does not work.
  3. Generate the hashed file by cap_mkdb termcap in the termcap directory.
With the hard method something is missing because colored list output does not work and the keys F10 and may be higher are not configured. The termcap entries are limited to 1023bytes or so which is exceeded by the entries in st.info. On the other hand the termcap entries related to other terminals are not really shorter. There is still a lot of stuff to learn for me.
Also it is posible to change the default x11/sterm $TERM value, to get rid of /etc/termcap errors:
# cd /usr/ports/x11/sterm/
# make clean
# make fetch extract patch
Edit /usr/ports/x11/sterm/work/st-0.7/config.def.h, change the 66 line
Code:
/* default TERM value */
static char termname[] = "[b]st-256color[/b]";
to
Code:
static char termname[] = "[b]xterm-256color[/b]";
then run # make configure build deinstall install clean


PS: IMHO /x11/evilvte is better than x11/sterm, it is also lightweight
and can be configured before building via configuration file, but unfortunately
evilvte's resize function doesn't work fine with my x11-wm/windowmaker window manager…
 
Last edited by a moderator:
Back
Top