User Tools

Site Tools


linux:xterm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux:xterm [2024-11-19 15:38] – created adminlinux:xterm [2024-11-19 18:45] (current) – added xterm command to list fonts admin
Line 3: Line 3:
 xterm is an underrated terminal emulator for the X Window System. It's powerful, customizable and lightweight. It supports 256 colors and UTF-8. It does not support tabs, but that's something which is actually not really useful, I prefer multiple xterm windows and I also use workspaces extensively because I use the [[https://i3wm.org/|i3]] window manager. xterm is an underrated terminal emulator for the X Window System. It's powerful, customizable and lightweight. It supports 256 colors and UTF-8. It does not support tabs, but that's something which is actually not really useful, I prefer multiple xterm windows and I also use workspaces extensively because I use the [[https://i3wm.org/|i3]] window manager.
  
-Once xterm is started it looks awful, has a tiny font and lacks some features. To enable all of that simply create file ''.Xresources'' in your home directory and paste the following content (change USERNAME on line to your username). The "!" at the beginning of a line marks a comment.+Once xterm is started it looks awful, has a tiny font and lacks some features. To enable all of that simply create file ''.Xresources'' in your home directory and paste the following content (change USERNAME on line to your username). The "!" at the beginning of a line marks a comment.
  
 <code> <code>
Line 11: Line 11:
 *customization: -color *customization: -color
 xterm*termName: xterm-256color xterm*termName: xterm-256color
 +xterm*utf8: 1
  
 #include "/home/USERNAME/.local/share/colorthemes/numix.xres" #include "/home/USERNAME/.local/share/colorthemes/numix.xres"
  
-xterm*faceName: DejaVu Sans Mono+! truetype fonts are supported, you can also disable antialias 
 +xterm*faceName: DejaVu Sans Mono:antialias=true 
 +!xterm*faceName: DejaVu Sans Mono
 xterm*faceSize: 10 xterm*faceSize: 10
 xterm*renderFont: true xterm*renderFont: true
 +
 +! adjust line spacing, 0.9 .. 1.5, default 1.0
 +!XTerm.vt100.scaleHeight: 1.05
  
 ! VT Font Menu: Unreadable ! VT Font Menu: Unreadable
Line 28: Line 34:
 ! VT font menu: Huge ! VT font menu: Huge
 xterm*faceSize5: 14 xterm*faceSize5: 14
 +
 +! bitmap fonts are set like this, iso10646 is an alias for Unicode
 +!xterm*font: -xos4-terminus-medium-*-*-*-18-*-*-*-*-*-iso10646-1
 +! see also output of command "xterm -report-fonts"
  
 ! do not scroll when there is new input e.g. tail -f /var/syslog ! do not scroll when there is new input e.g. tail -f /var/syslog
Line 34: Line 44:
 ! zoom in/out/reset, works on main keyboard (not on numpad) ! zoom in/out/reset, works on main keyboard (not on numpad)
 ! + handy keyboard shortcuts to jump to the beginning/end of buffer ! + handy keyboard shortcuts to jump to the beginning/end of buffer
 +! + Shift+mousebutton on selected text to open in default app
 xterm*vt100.Translations: #override \ xterm*vt100.Translations: #override \
  Ctrl <Key> minus: smaller-vt-font() \n\  Ctrl <Key> minus: smaller-vt-font() \n\
  Ctrl <Key> plus: larger-vt-font() \n\  Ctrl <Key> plus: larger-vt-font() \n\
  Ctrl <Key> 0: set-vt-font(d) \n\  Ctrl <Key> 0: set-vt-font(d) \n\
- Shift <KeyPress> Home:  scroll-to(begin) \n\ + Ctrl <KeyPress> Home:  scroll-to(begin) \n\ 
- Shift <KeyPress> End:   scroll-to(end)+ Ctrl <KeyPress> End:   scroll-to(end) \n\ 
 + Shift <Btn1Up>: exec-formatted("xdg-open '%t'", PRIMARY)  select-start() select-end()
  
 xterm*highlightSelection: true xterm*highlightSelection: true
Line 73: Line 85:
 </code> </code>
  
-And this is the content of ''.local/share/colorthemes/numix.xres''+And this is the content of ''~/.local/share/colorthemes/numix.xres''
  
 <code> <code>
Line 118: Line 130:
 After you have saved both files, run this command (as normal user, not root) After you have saved both files, run this command (as normal user, not root)
 ''xrdb -load .Xresources'' ''xrdb -load .Xresources''
-and that's it! Now every new xterm will look nice and have some useful features enabled. Look at the content of ''.Xresources'', it is self-explanatory.+and that's it! Now every new xterm will look nice and have some useful features enabled. Look at the content of ''.Xresources'', it is self-explanatory. Remember xterm has also 3 pop-up menus which can be accessed by Ctrl+mouse button (left/middle/right). Settings in those menus can be persistently enabled/disabled in the Xresources file.
  
-If you would like to use another color theme I recommend having a look at [[https://terminal.sexy/|Terminal Sexy]], which is a well done web app with support for Xresources color format.+If you would like to use another color theme I recommend having a look at [[https://terminal.sexy/|Terminal Sexy]], which is a well done web app with support for Xresources color format. You can even make xterm transparent with a composite manager.
linux/xterm.1732027092.txt.gz · Last modified: 2024-11-19 15:38 by admin