Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
Welcome to SE :) Plase have a look at meta.stackexchange.com/a/3021/180072 – XTL Dec 13 '12 at 7:51

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.

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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