Skip to content

Not working on gnome with xwayland #118

@llacroix

Description

@llacroix

The thumbnailer config for gnome won't work on xwayland setup without a xvfb-run shipped with the distribution. The other problem is that nautilus seems to call the thumbnailer within a "jail" so folders like XDG_RUNTIME_DIR won't be accessible in the context stl-thumb is executed.

What I did to fix the issue is to have the thumbnailer call a sh script that will create a XDG_RUNTIME_DIR in /tmp then call stl-thumb.

stl-thumbnailer

#!/bin/sh                                                                                                                                                                                                                                     

export XDG_RUNTIME_DIR=/tmp/xdg-runtime
mkdir $XDG_RUNTIME_DIR

wlheadless-run -- stl-thumb -f png -s $1 $2 $3

rm -r $XDG_RUNTIME_DIR

stl-thumb.thumbnailer

[Thumbnailer Entry]
TryExec=stl-thumb
Exec=stl-thumbnailer %s %i %o                                                                                                                                                                                                                 
MimeType=model/3mf;model/stl;model/x.stl-ascii;model/x.stl-binary;application/sla;

obj-thumb.thumbnailer

[Thumbnailer Entry]
TryExec=stl-thumb
Exec=stl-thumbnailer %s %i %o                                                                                                                                                                                                                 
MimeType=model/obj;

Then wlheadless-run is able to start the weston compositor using the defined XDG_RUNTIME_DIR available in the current context.

I think the script could be improved to work with X11 using xvfb-run in that case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions