I would like to run X11 (so that I can run mplayer from the console) without running lightdm or any other window manager. How do I start just the xserver without running a window manager?

X11 is the only -vo I've been able to get working with mplayer. OMXPlayer doesn't work for my use case. Thank you.

X

That would have been a delightfully short answer, but "body must be at least 30 characters; you entered 1". :)

The X server is really usually called X and you can just start it. You can set the DISPLAY number as an argument along with some other things.

You might want to have some sort of session, though, and still go through xinit or such and start X with startx. You can use .xinitrc or such as a script and simply not start a wm there. You will need a "magic client" as the last command that stays running so X doesn't terminate immediately. In a traditional "failsafe" session, that was an xterm. If you know what to launch and launch once only, it could be that mplayer. Or any UI/wrapper that does the launching for you. When the last ("magic") client in the init script terminates, X terminates.

If all you want to do is play video, you might see if rpi can run mplayer with directfb instead and skip using X11 entirely.

Usually to run a program within x without a desktop you would

startx <path/to/dir/filename.ft>

Personally I've never done this with mplayer, but a large variety of games which require x can be run in this way, upon exiting the program, you will be returned to the command-line.

Perhaps this will work for you or will help someone with a similar issue.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.