site  contact  subhomenews

EasyDD color fix in terminal

July 09, 2020 — BarryK

I received an email from Bob, testing EasyDD in Ubuntu. he reports it works great, but when writing to USB-stick, the terminal window has bright-yellow background and light-grey text, making the text very difficult to read.

EasyDD searches for a suitable terminal emulator utility in the host OS, in order of:

  1. VTE terminal builtin to gtkdialog
  2. rxvt
  3. urxvt
  4. xterm
  5. gnome-terminal

For items 1 and 5, the default background and foreground colours are used, that is, no attempt is made to change them in the EasyDD script.

For items 2, 3 and 4, the terminal is executed with the "-bg '#ffff80'" commandline option, which is light-yellow background. The default text colour is used, which in EasyOS is black.

However, in other distros the default text may be some other colour, such as light-grey in Bob's case.

I have now explicitly set the foreground colour to black, with the "-fg '#000000'" commandline option.

The latest EasyDD is here:

https://bkhome.org/files/easydd.gz

If you are new to EasyDD, read about it here:

https://bkhome.org/linux/easydd-write-image-file-to-drive.html

Just an extra note, for gnome-terminal, setting the background and foreground colours on-the-fly, on the commandline execution, isn't possible. Instead, have to jump through hoops:

https://unix.stackexchange.com/questions/133914/set-gnome-terminal-background-text-color-from-bash-script

...yikes! Haven't bothered, just using the defaults.    

Tags: easy