[GH-ISSUE #965] GTK 3 theme in Xephyr sandbox? #655

Closed
opened 2026-05-05 06:22:22 -06:00 by gitea-mirror · 11 comments
Owner

Originally created by @laniakea64 on GitHub (Dec 8, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/965

Lubuntu 14.04
firejail 0.9.44.2

My GTK 3 theme is Greybird. When running GTK 3 apps in a firejail x11 sandbox (Xephyr), they use the Raleigh GTK theme. This happens even with --noprofile option.

GTK 2 apps and Qt apps don't have this problem.

How to get the system GTK 3 theme to apply inside the Xephyr sandbox too?

Originally created by @laniakea64 on GitHub (Dec 8, 2016). Original GitHub issue: https://github.com/netblue30/firejail/issues/965 Lubuntu 14.04 firejail 0.9.44.2 My GTK 3 theme is Greybird. When running GTK 3 apps in a firejail x11 sandbox (Xephyr), they use the Raleigh GTK theme. This happens even with `--noprofile` option. GTK 2 apps and Qt apps don't have this problem. How to get the system GTK 3 theme to apply inside the Xephyr sandbox too?
gitea-mirror 2026-05-05 06:22:22 -06:00
Author
Owner

@netblue30 commented on GitHub (Dec 9, 2016):

You need to run a window manager in xephyr, one that supports GTK3 themes. I usually run it with Openbox, but this is a very simple one, without any GTK3 support:

$ firejail --x11=xephyr openbox
<!-- gh-comment-id:266013894 --> @netblue30 commented on GitHub (Dec 9, 2016): You need to run a window manager in xephyr, one that supports GTK3 themes. I usually run it with Openbox, but this is a very simple one, without any GTK3 support: ````` $ firejail --x11=xephyr openbox `````
Author
Owner

@laniakea64 commented on GitHub (Dec 9, 2016):

Thanks, that would explain it. I too use Openbox, both inside the sandbox (run like you show) and outside the sandbox (where it's started by LXDE).

So how does LXDE appear to get GTK 3 support in Openbox?

<!-- gh-comment-id:266026706 --> @laniakea64 commented on GitHub (Dec 9, 2016): Thanks, that would explain it. I too use Openbox, both inside the sandbox (run like you show) and outside the sandbox (where it's started by LXDE). So how does LXDE appear to get GTK 3 support in Openbox?
Author
Owner

@netblue30 commented on GitHub (Dec 10, 2016):

I am also using LXDE outside the sandbox. Try this:

$ firejail --profile=/etc/firejail/openbox.profile --private --x11=xephyr startlxde
<!-- gh-comment-id:266224546 --> @netblue30 commented on GitHub (Dec 10, 2016): I am also using LXDE outside the sandbox. Try this: ````` $ firejail --profile=/etc/firejail/openbox.profile --private --x11=xephyr startlxde `````
Author
Owner

@laniakea64 commented on GitHub (Dec 10, 2016):

I don't seem to have a startlxde command 😕

<!-- gh-comment-id:266236101 --> @laniakea64 commented on GitHub (Dec 10, 2016): I don't seem to have a `startlxde` command :confused:
Author
Owner

@netblue30 commented on GitHub (Dec 11, 2016):

What distro are you using?

I got this working on a Debian stable:

Create a script, shell.sh, and make it executable:

$ cat start.sh
#!/bin/bash

openbox &
pcmanfm --desktop --profile LXDE &
lxpanel --profile LXDE &

$ chmod +x start.sh

and start it in the sandbox:

$ firejail --profile=/etc/firejail/openbox.profile --x11=xephyr ./start.sh

It will start xpehyr and LXDE inside the sandbox, and it will reuse your LXDE configuration

<!-- gh-comment-id:266282583 --> @netblue30 commented on GitHub (Dec 11, 2016): What distro are you using? I got this working on a Debian stable: Create a script, shell.sh, and make it executable: ````` $ cat start.sh #!/bin/bash openbox & pcmanfm --desktop --profile LXDE & lxpanel --profile LXDE & $ chmod +x start.sh ````` and start it in the sandbox: ````` $ firejail --profile=/etc/firejail/openbox.profile --x11=xephyr ./start.sh ````` It will start xpehyr and LXDE inside the sandbox, and it will reuse your LXDE configuration
Author
Owner

@netblue30 commented on GitHub (Dec 11, 2016):

Also, don't use Shutdown/Reboot buttons in Logout menu, in the sandbox instance of LXDE!

<!-- gh-comment-id:266282729 --> @netblue30 commented on GitHub (Dec 11, 2016): Also, don't use Shutdown/Reboot buttons in Logout menu, in the sandbox instance of LXDE!
Author
Owner

@laniakea64 commented on GitHub (Dec 11, 2016):

What distro are you using?

Lubuntu 14.04

Create a script, shell.sh, and make it executable...

Same problem. 🙁

I notice that the icon theme in the sandbox reverts to GNOME. I don't mind that so much though. Is that related to the GTK 3 theme problem?

Also, don't use Shutdown/Reboot buttons in Logout menu, in the sandbox instance of LXDE!

Thanks, that's good advice, I already found out the hard way on the Logout button 😮

<!-- gh-comment-id:266289170 --> @laniakea64 commented on GitHub (Dec 11, 2016): > What distro are you using? Lubuntu 14.04 > Create a script, shell.sh, and make it executable... Same problem. :slightly_frowning_face: I notice that the icon theme in the sandbox reverts to GNOME. I don't mind that so much though. Is that related to the GTK 3 theme problem? > Also, don't use Shutdown/Reboot buttons in Logout menu, in the sandbox instance of LXDE! Thanks, that's good advice, I already found out the hard way on the Logout button :open_mouth:
Author
Owner

@netblue30 commented on GitHub (Dec 13, 2016):

I have no idea how the GTK3 theme is working, probably there is some socket the sandbox disables.

<!-- gh-comment-id:266738366 --> @netblue30 commented on GitHub (Dec 13, 2016): I have no idea how the GTK3 theme is working, probably there is some socket the sandbox disables.
Author
Owner

@laniakea64 commented on GitHub (Dec 14, 2016):

Actually I see the same problems in a Xephyr without firejail. Sorry about this.

<!-- gh-comment-id:267097856 --> @laniakea64 commented on GitHub (Dec 14, 2016): Actually I see the same problems in a Xephyr without firejail. Sorry about this.
Author
Owner

@laniakea64 commented on GitHub (Dec 14, 2016):

... and with that information, problem solved. 😃

GTK themes in the Xephyrs are apparently controlled by KDE's GTK apperance settings. GTK 2 was set to Greybird, but GTK 3 was set to oxygen-gtk.

Fixed the GTK 3 setting and bam, Greybird GTK 3 theme in Xephyr, with and without firejail.

Not going to worry too much about the 'why'. It might have something to do with using Konsole as my terminal emulator. But whatever the reason, it works now.

Thanks netblue30.

<!-- gh-comment-id:267101696 --> @laniakea64 commented on GitHub (Dec 14, 2016): ... and with that information, problem solved. :smiley: GTK themes in the Xephyrs are apparently controlled by KDE's GTK apperance settings. GTK 2 was set to Greybird, but GTK 3 was set to oxygen-gtk. Fixed the GTK 3 setting and bam, Greybird GTK 3 theme in Xephyr, with and without firejail. Not going to worry too much about the 'why'. It might have something to do with using Konsole as my terminal emulator. But whatever the reason, it works now. Thanks netblue30.
Author
Owner

@netblue30 commented on GitHub (Dec 15, 2016):

No problem, you gave me some ideas. From now I'll also move to LXDE inside xephyr, instead of the regular Openbox.

<!-- gh-comment-id:267207756 --> @netblue30 commented on GitHub (Dec 15, 2016): No problem, you gave me some ideas. From now I'll also move to LXDE inside xephyr, instead of the regular Openbox.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#655
No description provided.