Enrico Zini: terminal-emulators
Quest for a terminal emulator
The requirements
I need a terminal emulator. This is a checklist of the features that I need:
).
Missing
- Foreground colour:
#aaaaaa. - Background colour: black.
- "Linux console" colour palette.
- Font: Monospace-10.
Alt+Fnnto directly switch to one of the first 12 terminals, like in the Linux console.F11to toggle fullscreen.Alt+'+',Alt+'-',Alt+'0'to control font sizes.- All other keybindings disabled, so that terminal programs are free to use them.
- I occasionally need to switch to black-on-white for presentations.
- Tabs.
- When I open a new tab it needs to contain a shell opened inside the same
directory of the last tab I was in. The way I normally start working is
something like:
cd workdir; x-terminal-emulator -e vim todolistand then I start opening new tabs. - I need -e to work. In fact, I need the terminal to work as
x-terminal-emulator -e cmd args... - I need to conveniently pick a URL in a terminal and open it in Chromium, and
not any other browser. Even better, open it in
x-www-browser
https urls with Firefox, although the preferred
browser was Chromium. There seemed to be no way to control it: I looked for
firefox or iceweasel in all gconf and dconf settings and found nothing.
The browser issue was fixed by accident when I used Xfce4's settings
application to change the browser from Chromium to Firefox and then back to
Chromium.
update, thanks to Mathieu Parent, Josh Triplett, Peter De Wachter, Julien
Cristau, and Charles Plessy:
It is also possible to restore the "new tab opened inside the same
directory of the last tab I was in" behaviour,
by enabling "run command as a login shell" so that /etc/profile.d/vte.sh is
run (thanks Mathieu Parent for the link).
That in turn spawned extra cleanup work in my
.bashrc/.bash_profile/.profile setup, which has been randomly evolving
since even before my first Debian "buzz" system. I found that it was setting
PROMPT_COMMAND to something else to set the terminal title, conflicting with
what vte.sh wants to do.
With regards to loading /etc/profile.d/vte.sh by default, Peter De Watcher
sent pointers to relevant bugs:
here,
here, and
here.
An alternative strategy is to work using the prompt rather than
PROMPT_COMMAND; an example is in Josh Triplett's .bashrc from
git://joshtriplett.org/git/home.
Josh Triplett also said:
To fix the browser launched for URLs, you either need to use a desktop environment following GNOME's mechanism for setting the default browser, or editAll my issues with gnome-terminal are now gone and I'm only too happy to go back to it. rxvt-unicode-256color~/.local/share/applications/mimeapps.listand make surex-scheme-handler/http,x-scheme-handler/https, andx-scheme-handler/ftpare set to your preferred browser's desktop file basename under[Added Associations].
urxvt took some work. This is where I got with configuration:
URxvt.font: xft:Monospace-10:antialias=true
URxvt.foreground: #aaaaaa
URxvt.background: black
URxvt.scrollBar_right: true
URxvt.cursorBlink: true
URxvt.perl-ext-common: default,matcher,tabbedex
URxvt.url-launcher: /usr/bin/x-www-browser
URxvt.matcher.button: 1
URxvt.perl-lib: /home/enrico/.urxvt/perl
URxvt.color0: black
URxvt.color1: #aa0000
URxvt.color2: #00aa00umask
URxvt.color3: #aa5500
URxvt.color4: #0000aa
URxvt.color5: #aa00aa
URxvt.color6: #00aaaa
URxvt.color7: #aaaaaa
URxvt.color8: #555555
URxvt.color9: #ff5555
URxvt.color10: #55ff55
URxvt.color11: #ffff55
URxvt.color12: #5555ff
URxvt.color13: #ff55ff
URxvt.color14: #55ffff
URxvt.color15: #ffffff
I got all of the tab behaviour that I need by
"customizing" the tab script (yuck
github
).
Missing
- Bold fonts only work if I set
TERM=rxvt - The implementation for opening a new tab in the directory of the current tab is rather fragile.
- Resizing the terminal window causes an annoying flicker
.config/sakura/sakura.conf and these bits help:
colorset1_fore=rgb(170,170,170)
colorset1_back=rgb(0,0,0)
colorset1_opacity=99
colorset2_fore=rgb(0,0,0)
colorset2_back=rgb(254,254,254)
colorset2_opacity=99
font=Monospace 10
show_always_first_tab=No
scrollbar=false
fullscreen_key=F11
palette=linux
Missing
Alt+Fnnto directly switch to one of the first 12 terminals, like in the Linux console. Sakura hardcodes using numbers for switching, and only allows to change the modifier.Alt+'+',Alt+'-',Alt+'0'to control font sizes.- Tabs are huge and take way too much screen space.
.config/lxterminal/lxterminal.conf and this is relevant
to me:
[general]
fontname=DejaVu Sans Mono 10
fgcolor=#aaaaaaaaaaaa
disallowbold=false
cursorblinks=true
tabpos=top
hidescrollbar=false
hidemenubar=true
hideclosebutton=true
disablef10=true
disablealt=true
Also, to open a url directly you control+click it.
Missing
Alt+Fnnto directly switch to one of the first 12 terminals, like in the Linux console.F11to toggle fullscreen.Alt+'+',Alt+'-',Alt+'0'to control font sizes.- I occasionally need to switch to black-on-white for presentations: this is inconvenient, as it requires to set foreground and background separately each time.
.config/terminator/config and this is relevant to me:
[global_config]
use_custom_url_handler = True
custom_url_handler = x-www-browser
inactive_color_offset = 1.0
[keybindings]
close_term = None
close_window = None
copy = None
cycle_next = None
cycle_prev = None
go_down = None
go_next = None
go_prev = None
go_up = None
group_all = None
group_tab = None
hide_window = None
move_tab_left = None
move_tab_right = None
new_tab = None
new_terminator = None
new_window = None
next_tab = None
paste = None
prev_tab = None
reset_clear = None
reset = None
resize_down = None
resize_left = None
resize_right = None
resize_up = None
rotate_ccw = None
rotate_cw = None
scaled_zoom = None
search = None
split_horiz = None
split_vert = None
switch_to_tab_1 = <Alt>F1
switch_to_tab_2 = <Alt>F2
switch_to_tab_3 = <Alt>F3
switch_to_tab_4 = <Alt>F4
switch_to_tab_5 = <Alt>F5
switch_to_tab_6 = <Alt>F6
switch_to_tab_7 = <Alt>F7
switch_to_tab_8 = <Alt>F8
switch_to_tab_9 = <Alt>F9
switch_to_tab_10 = <Alt>F10
toggle_scrollbar = None
toggle_zoom = None
ungroup_all = None
ungroup_tab = None
[profiles]
<span class="createlink">default</span>
palette = "#000000:#aa0000:#00aa00:#aa5500:#0000aa:#aa00aa:#00aaaa:#aaaaaa:#555555:#ff5555:#55ff55:#ffff55:#5555ff:#ff55ff:#55ffff:#ffffff"
copy_on_selection = True
icon_bell = False
background_image = None
show_titlebar = False
Missing
- I need -e to work. In fact, I need the terminal to work as
x-terminal-emulator -e cmd args.... #734655 but should be fixed soon - New windows start with the title bar visible, even if I configured it not to show. It disappears as soon as the window gets focused, causing the terminal contents to resize. It is just a glitch, but oh so annoying!
.config/xfce4/terminal, and this is relevant to me:
terminalrc:
[Configuration]
FontName=Monospace 10
MiscAlwaysShowTabs=FALSE
MiscBell=FALSE
MiscBordersDefault=TRUE
MiscCursorBlinks=FALSE
MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK
MiscDefaultGeometry=80x24
MiscInheritGeometry=FALSE
MiscMenubarDefault=FALSE
MiscMouseAutohide=FALSE
MiscToolbarDefault=FALSE
MiscConfirmClose=TRUE
MiscCycleTabs=TRUE
MiscTabCloseButtons=TRUE
MiscTabCloseMiddleClick=TRUE
MiscTabPosition=GTK_POS_TOP
MiscHighlightUrls=TRUE
ShortcutsNoMenukey=TRUE
ShortcutsNoMnemonics=TRUE
ColorForeground=#aaaaaaaaaaaa
accels.scm:
(gtk_accel_path "<Actions>/terminal-window/goto-tab-1" "<Alt>F1")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-2" "<Alt>F2")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-3" "<Alt>F3")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-4" "<Alt>F4")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-5" "<Alt>F5")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-6" "<Alt>F6")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-7" "<Alt>F7")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-8" "<Alt>F8")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-9" "<Alt>F9")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-10" "<Alt>F10")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-11" "<Alt>F11")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-12" "<Alt>F12")
update: Yves-Alexis Perez points out that to disable the F1 for help in the
terminal, you need to remove the accelerator. I tried
this and
this
and didn't have success, but I confess I did not dig too much into it.
Although xfce4-terminal -e does not work as I expect, xfce4-terminal
registers a wrapper for x-terminal-emulator that does the right thing with
respect to -e (also thanks Yves-Alexis Perez).
Missing
Alt+'+',Alt+'-',Alt+'0'to control font sizes.- All other keybindings disabled, so that terminal programs are free to use them. I could not find a way to disable F1 for help.
- I occasionally need to switch to black-on-white for presentations. I can
switch to a "Black on white" preset, but there is no "Gray on black" to
switch back to. I can switch back to "White on black", but then I need to
manually set the text colour to
#aaaaaa. update: Yves-Alexis Perez found that you can add presets to.local/share/colorthemestaking examples from/usr/share/xfce4/terminal/colorschemes; next time I consider switching to xfce4-terminal I'll try that.
.config/roxterm.sourceforge.net/ split in several files
corresponding to profiles. This is a reasonable starting point for me:
Profiles/Default:
[roxterm profile]
colour_scheme=Default
disable_menu_access=1
disable_menu_shortcuts=1
disable_tab_menu_shortcuts=0
tab_close_btn=0
hide_menubar=1
always_show_tabs=0
Colours/Default:
[roxterm colour scheme]
0=#000000000000
1=#aaaa00000000
2=#0000aaaa0000
3=#aaaa55550000
4=#00000000aaaa
5=#aaaa0000aaaa
6=#0000aaaaaaaa
7=#aaaaaaaaaaaa
8=#555555555555
9=#ffff55555555
10=#5555ffff5555
11=#ffffffff5555
12=#55555555ffff
13=#ffff5555ffff
14=#5555ffffffff
15=#ffffffffffff
palette_size=16
foreground=#aaaaaaaaaaaa
background=#000000000000
cursor=#cccccccccccc
bold=
dim=
Shortcuts/Default:
[roxterm shortcuts scheme]
File/New Window=
File/New Tab=
File/Close Window=
File/Close Tab=
Tabs/Previous Tab=
Tabs/Next Tab=
Edit/Copy=
Edit/Paste=
View/Zoom In=<Control>plus
View/Zoom Out=<Control>minus
View/Normal Size=<Control>0
View/Full Screen=F11
View/Scroll Up One Line=
View/Scroll Down One Line=
Help/Help=
Edit/Copy & Paste=
Search/Find...=
Search/Find Next=
Search/Find Previous=
File/New Window With Profile/Default=
File/New Tab With Profile/Default=
Tabs/Select_Tab_0=<Alt>F1
Tabs/Select_Tab_1=<Alt>F2
Tabs/Select_Tab_2=<Alt>F3
Tabs/Select_Tab_3=<Alt>F4
Tabs/Select_Tab_4=<Alt>F5
Tabs/Select_Tab_5=<Alt>F6
Tabs/Select_Tab_6=<Alt>F7
Tabs/Select_Tab_7=<Alt>F8
Tabs/Select_Tab_8=<Alt>F9
Tabs/Select_Tab_9=<Alt>F9
Tabs/Select_Tab_10=<Alt>F10
Tabs/Select_Tab_11=<Alt>F11
Tabs/Select_Tab_12=<Alt>F12
Global:
[roxterm options]
edit_shortcuts=0
prefer_dark_theme=1
colour_scheme=Default
warn_close=1
Missing
Nothing of my initial requirements seems to be missing, really, so I'm sticking
to it for a while to see what happens.
The first itch to scratch is that when the menubar is hidden, the popup menu
becomes the entire menubar contents, which does not fit the general use case
to have a contextual menu with the most common shortcuts. I'll just declare it
useless and get myself used to some new hotkey for starting a new terminal.
update: after fixing my issues with gnome-terminal I've switched back to
gnome-terminal: its interface feels less clunky as I'm already used to it.
Other references
Guillem Jover made a similar analysis in 2009, it can be found
here.
Thomas Koch mentioned that termit should be able to do all I need, and is
scriptable in Lua. I like the sound of that, and it's definitely one I should
look next time I find myself shopping for terminal emulators.






I was back at my parents' over Christmas, like usual. Before I got back my Dad had mentioned they'd been having ADSL stability issues. Previously I'd noticed some issues with keeping a connection up for more than a couple of days, but it had got so bad he was noticing problems during the day. The eventual resolution isn't going to surprise anyone who's dealt with these things before, but I went through a number of steps to try and improve things.
Firstly, I arranged for a new router to be delivered before I got back. My old
X bitmaps vs OpenGL
Of course, you all know that X started life as a monochrome window
system for the VS100. Back then, bitmaps and rasterops were cool; you
could do all kinds of things simple bit operations. Things changed,
and eventually X bitmaps became useful only off-screen for clip masks,
text and stipples. These days, you ll rarely see anyone using a
bitmap everything we used to use bitmaps for has gone all
alpha-values on us.
In OpenGL, there aren t any bitmaps. About the most bitmap-like
object you ll find is an A8 texture, holding 8 bits of alpha value for
each pixel. There s no way to draw to or texture from anything where
each pixel is represented as a single bit.
So, as Eric goes about improving Glamor, he got a bit stuck with
bitmaps. We could either:

This is my monthly summary of my free software related activities. If you re among the people who 
In the discussions about the setup of the
So, it s 2014 and I still haven t migrated away from WordPress to using something fancy written in Python. But who cares? Life is great and I ve made good progress in lots of other areas :)
I m getting fitter by the day, last year I joined a running club and I now play squash too, which is working so much better than just going to the gym. Also finally making progress with learning how to play guitar, another ancient goal of mine that had slow progress for a while. It helps that I now live on my own and can make noise whenever I want to. I m also going for lessons every Wednesday and have some plans to convert my spare room in to a music room. I ve also gotten into beer brewing. I attended Beerschool via
Good morning all my hungover friends.
New Hy release - sounds like the perfect thing to do while you re waiting for your headaches to go away.
Here s a short-list of the changes (from NEWS) - enjoy!
When
Last time I blogged about my running activities was after DebConf 13
in Switzerland, back in August.
At that time, I just completed two great moutain races in one month
(Mont-Blanc Marathon, then EDF Cenis Tour, one being 42km and 2500m
positive climb and the other one being 50km and 2700m). EDF Cenis Tour
was my best result overall in a trail race, being ranked 40th out of
more than 300 runners and 3rd in my age category (men 50-59).
So, in late August, I was preparing for my "autumn challenge", a
succession of 3 long distance races in a row:
I recently got my self and 



In a
For the fifth year in a row the fearless WebKitGTK+ hackers have gathered in A Coru a to bring GNOME and the web closer. Igalia has organized and hosted it as usual, welcoming a record 30 people to its office. The GNOME foundation has sponsored my trip allowing me to fly the cool 18 seats propeller airplane from Lisbon to A Coru a, which is a nice adventure, and have pulpo a feira for dinner, which I simply love! That in addition to enjoying the company of so many great hackers.


















