mate-desktop / caja

Caja, the file manager for the MATE desktop
https://mate-desktop.org/
Other
263 stars 144 forks source link

Caja cannot run in Xephyr/pyvirtualdisplay, even with explicitly set display #886

Open sdaau opened 6 years ago

sdaau commented 6 years ago

Expected behaviour

When I run caja from a pyvirtualdisplay script, it should run in the Xephyr virtual display window.

Actual behaviour

When I run caja from a pyvirtualdisplay script, it runs outside of the Xephyr virtual display window, even with --display option explicitly set to a value other than the default - that is, it runs still in the main desktop (DISPLAY=:0)

Steps to reproduce the behaviour

Run the following script, after installing prerequisites for pyvirtualdisplay (see https://github.com/ponty/PyVirtualDisplay):

from easyprocess import EasyProcess
#~ from pyvirtualdisplay import Display
from pyvirtualdisplay.smartdisplay import SmartDisplay
import time
import os

if __name__ == "__main__":
  SmartDisplay(visible=1, size=(320, 240)).start()
  #~ Display(visible=1, size=(320, 240)).start()
  #EasyProcess('startx').start()
  #EasyProcess('gnome-calculator').start()
  #~ time.sleep(2)
  thisdisplay = os.environ['DISPLAY']
  print("display is: "+thisdisplay)
  mycmd='caja --display='+thisdisplay+' --no-desktop /tmp'
  print(mycmd)
  EasyProcess(mycmd).start()

When ran, the script prints:

display is: :1001
caja --display=:1001 --no-desktop /tmp

... and the Xephyr window remains black/empty, while Caja starts in the normal desktop. Note that mostly all other applications (like gnome-calculator or nautilus) just need the command name in EasyProcess(...).start(), and they automatically start in the pyvirtualdisplay Xephyr window.

MATE general version

$ caja --version
MATE caja 1.8.2

Package version

$ apt-show-versions -r mate-desktop
libmate-desktop-2-17:amd64/trusty 1.8.2+dfsg1-2~trusty1 uptodate
mate-desktop:amd64/trusty 1.8.2+dfsg1-2~trusty1 uptodate
mate-desktop-common:all/trusty 1.8.2+dfsg1-2~trusty1 uptodate
mate-desktop-environment-core:all/trusty 1.8.0+9~trusty1 uptodate
ubuntu-mate-desktop:amd64/trusty 1.119~trusty1.3 uptodate

Linux Distribution

$ cat /etc/issue
Ubuntu 14.04.5 LTS \n \l

Link to downstream report of your Distribution

sdaau commented 6 years ago

OK, I just made another test - logged off from Mate desktop, changed to Gnome3 as the main desktop and logged in again, ran the pyvirtualdisplay script again - and now caja does load inside the Xephyr window (and I cannot recall exactly, but I think also now nautilus failed to load inside the Xephyr window, and instantiated outside).

So, there is likely some problem of running the/(a Gnome) file manager in Xephyr, if it already handles the entire desktop - regardless of which (Gnome) file manager it is (caja or nautilus)