# Launch openbox instead of twm with startx



## bugzeo (Jul 11, 2021)

I've installed xorg and openbox. Whenever I launch startx it launches twm, but I want it to launch openbox (or xfce4 if I wish to do so). How can I do it, or it not advisable to change the default configuration?


----------



## SirDice (Jul 11, 2021)

You need to start the correct window manager or desktop environment by using ~/.xinitrc:

```
exec openbox
```
If this file doesn't exist then the default window manager is started (which is TWM).


----------



## bugzeo (Jul 11, 2021)

SirDice said:


> You need to start the correct window manager or desktop environment by using ~/.xinitrc:
> 
> ```
> exec openbox
> ...


I've tried it under Virtualbox but doesn't work, just get a black screen (on ttyv8).


----------



## SirDice (Jul 11, 2021)

Oh, I see it's `openbox-session`:

```
exec openbox-session
```


----------



## bugzeo (Jul 11, 2021)

That did it, thank you very much!


----------

