I have an Arch Linux with i3wm now. When I need to start my i3, I just type startx, because in config file I have exec i3;. When I need to run some another graphical environment, such as Gnome, I edit my xinitrc. Some graphical environments create after installing their own start-file (some not), such as startdde for Deepin. How could I create or configure new xinitrc for several desktops envs?

P.S I love logging from terminal first, so just don't want to install some login gui manager


Just put exec "$@" at the end of your xinitrc, and then execute

startx /path/to/xinitrc <wm> <wm-args>

from a tty.

startx interprets its first string argument as the client (/path/to/xinitrc, note that it has to be an absolute path), and rest of the arguments are passed to that client (wm and wm-args), which are execed by the xinitrc.

Note that startx is just an example script and you are encouraged to create another one according to your needs. The above mentioned setup should meet the requirements mentioned in the question though.

  • So I can simply make some alias'es with wm I would like to use. Thanks – Dmytro O May 24 '17 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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