We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4795

Summary: DBus system bus is optional
Product: SDL Reporter: tamo <ttakah+sdl>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 Keywords: target-2.0.14
Version: HG 2.0   
Hardware: All   
OS: Linux   
Attachments: make system bus optional

Description tamo 2019-09-07 06:41:00 UTC
Created attachment 3957 [details]
make system bus optional

Don't require a system bus in SDL_dbus.c.
SDL uses only a session bus.

For example, if you are on WSL environment, you may have only activated a session bus.
Even on native Linux, you may be on such a system where dbus is not installed and you install it as a user (e.g. to $HOME).

What I did were (on Windows):

0. Install WSL, Ubuntu, and VcXsrv.
1. Run VcXsrv (without native opengl, fwiw).
2. Run "Bash on Ubuntu".
3. Type "export DISPLAY=:0.0" and press ENTER.
4. Type "dbus-run-session bash" and press ENTER.
5. Type "export XMODIFIERS=@im=fcitx" and press ENTER.
6. Type "fcitx -rd &" and press ENTER.
7. Run testime. (in SDL/test)

Without this patch, you cannot use fcitx in this case.
With this patch, you can.
Comment 1 Ryan C. Gordon 2020-03-27 00:28:47 UTC
This patch is now https://hg.libsdl.org/SDL/rev/e3844f61860a, thanks!