Tips & Tricks Blog
Notes, ideas and general comments on anything related to high-tech.

July 30, 2021

Adding borders to terminal windows under Ubuntu 18.04

Filed under: Linux

The new fashion of having borderless windows is quite annoying (struggled with that under both MS Win 10 and Ubuntu).
Here’s the solution for Ubuntu (combined from a couple posts on stack overflow)…

First make “~/.config/gtk-3.0/gtk.css” with the following content:

decoration {
  border: 1px solid gray;
  background: gray;

Second paste this into shell and after that run “reload_gtk_theme”:

function reload_gtk_theme() {
  theme=$(gsettings get org.gnome.desktop.interface gtk-theme)
  gsettings set org.gnome.desktop.interface gtk-theme ''
  sleep 1
  gsettings set org.gnome.desktop.interface gtk-theme $theme

Keyboard Input Problem with nedit under Ubuntu 18.04 in Virtual Box

Filed under: nedit

I had to start using nedit under Ubuntu 18.04.5 in VirtualBox under Win 10 and unfortunately encountered an intermittent problem with the keyboard input stopping to work (see post here:
After trying to use nedit-ng for a bit I decided to switch back and try to solve that keyboard input problem.

The repo with the fix is here:
It solved the problem with the input into the edit windows, but introduced (or maybe they are unrelated) the problem with the dialog boxes.

I haven’t spent much time on the dialog boxes input problem yet. So far my solution was to link nedit statically under Ubuntu 16.04 (see “static-ubuntu16″ build configuration) where it worked flawlessly and run that executables under 18.04. It appears to work, but it has been only a week or so, not enough time to confirm for sure that the dialog boxes problem is gone. The edit windows keyboard input problem though is certainly resolved now.

Building nedit-ng for Ubuntu 18.04

Filed under: nedit

I had to start using nedit under Ubuntu 18.04.5 in VirtualBox under Win 10.
NEdit 5.7 that came with Ubuntu 18.04 and the binary that was perfectly stable under 16.04 (under ESXi) were both getting into state when the keyboard input wasn’t working (but Ctrl+ and functional keys still did).
I decided to give a try.

The build was pretty easy:
cd ~
git clone
sudo apt-get install qt5-default
sudo apt-get install libboost-all-dev
#bison --version (didn't need to install)
#cmake --version (didn't need to install)
sudo apt-get install qttools5-dev
cd nedit-ng/
mkdir build
cd build
cmake ..

The binaries are “nc-ng” and “nedit-ng”. They are a drop-in replacement for “nc” and “nedit”. I actually used a small script to use symlinks for switching between the original nedit and the ng one.

Since ng uses different configuration format you’ll need to import your original nedit config:
./nedit-import ~/.nedit/nedit.rc

Unfortunately there were some little misses that forced me to go back to using the old nedit (see the next post).
The particular thing that I couldn’t adapt to were the fonts and how nedit-ng runs the shell commands.
With ng it was impossible to display as many readable lines of code in the window as it was possible with the old nedit. As for the execution of the shell scripts, I’m using them often, for example, to select something in the code and pop up a window where grep output for that selection would show. The ng did not bring the focus to the new window, also no output showed up till the command finished executing. Also the cursor change indicating that a command is running happened in the window where it was kicked off rater than the window that was receiving the output.
Regardless, it was really exciting to see nedit reborn. I don’t know what’s the magic, but since I started using nedit many years ago no other editor was compelling enough to replace it for me. Hopefully the project is not abandoned and all the little gotchas will eventually be cleaned up.

Home Tips & Tricks Blog
Powered by WordPress