I use a lot of Ubuntu Gnome 16.10 (Linux). Will the new MBP with TouchBar support the function keys? Specifically, are the 'F1' to 'F12' keys compatible with Ubuntu? I practice a lot of programming (Python, MySQL, TensorFlow) and need these keys to work as they normally would.
The Macbook Pro's Touchbar runs software similar to the Apple Watch's WatchOS (I'll call it TouchbarOS), entirely separate from the macOS the computer itself runs on. TouchbarOS automatically switches to standard function keys when the physical keyboard's function key is pressed.
I can only assume TouchbarOS sends the exact same message when a function key is pressed on the Touchbar than when it is pressed on a physical keyboard, so yes, the standard function keys (though almost definitely nothing else the Touchbar does) should work with Ubuntu.
For more on the Touchbar and standard function keys, see this Apple support page.
From personal experience, the touch bar goes black when using an unsupported OS.
I tried installing ubuntu on my 2016 MBP and due to the graphics configuration the grub boot settings needed to be changed. Unfortunately, when I went to press f10 to save the settings, I noticed there was no way to input function key commands. Pressing fn didn't change this. I can only assume that booting into Gnome would be no different.