If I run baobab after sudo su -, I see following message on the terminal and baobab does not run.
** (baobab:4596): CRITICAL **: Unable to parse option: Cannot open display:DISPLAY is set to something like ":1" or "localhost:1". I also tried --display= option, but it didn't help.
But If I run xhost + in gnome in the terminal as a user before doing su, the error is not shown and baobab worked without proboem.