By using something like the following. set olddisplay $env(DISPLAY) set env(DISPLAY) unix:0 Thanks to "Joel Fine" for the answer.