Difference between revisions of "Proper ~/.xinitrc File"

Marked this version for translation
m (added languages and translate tags)
(Marked this version for translation)
 
Line 2: Line 2:
__TOC__
__TOC__
<translate>
<translate>
<!--T:1-->
This page is a short version of the [https://wiki.archlinux.org/index.php/Xinitrc original Arch Wiki page]. For more information, look there.
This page is a short version of the [https://wiki.archlinux.org/index.php/Xinitrc original Arch Wiki page]. For more information, look there.


<!--T:2-->
'''It is only for advanced users, who know how to fix broken systems and know their way around the terminal.'''
'''It is only for advanced users, who know how to fix broken systems and know their way around the terminal.'''




=General Information=
=General Information= <!--T:3-->


<!--T:4-->
The <code>~/.xinitrc</code> file in your home directory is executed by the command <code>startx</code>. In general, it is used to start your [https://wiki.manjaro.org/index.php?title=Install_Desktop_Environments Desktop Environment].
The <code>~/.xinitrc</code> file in your home directory is executed by the command <code>startx</code>. In general, it is used to start your [https://wiki.manjaro.org/index.php?title=Install_Desktop_Environments Desktop Environment].


<!--T:5-->
Usually, your [https://wiki.manjaro.org/index.php?title=Install_Display_Managers Display/Login Manager]calls <code>startx</code>, but you can also start it manually when needed.
Usually, your [https://wiki.manjaro.org/index.php?title=Install_Display_Managers Display/Login Manager]calls <code>startx</code>, but you can also start it manually when needed.


=~/.xinitrc File=
=~/.xinitrc File= <!--T:6-->


<!--T:7-->
The <code>~/.xinitrc</code> file is located in your home directory and it is a hidden file. Here is an example of a default <code>~/.xinitrc</code> file:
The <code>~/.xinitrc</code> file is located in your home directory and it is a hidden file. Here is an example of a default <code>~/.xinitrc</code> file:


  #!/bin/sh
  <!--T:8-->
#!/bin/sh
  #
  #
  # ~/.xinitrc
  # ~/.xinitrc
Line 56: Line 62:
  # exec startdde      # deepin-session
  # exec startdde      # deepin-session


<!--T:9-->
'''Remove the <code>#</code> symbol at the beginning of the code line belonging to your Desktop Environment''' (beginning with <code># exec</code>) and save the <code>~/.xinitrc</code> file.
'''Remove the <code>#</code> symbol at the beginning of the code line belonging to your Desktop Environment''' (beginning with <code># exec</code>) and save the <code>~/.xinitrc</code> file.


=Troubleshooting=
=Troubleshooting= <!--T:10-->


<!--T:11-->
If you are using the Net Edition of Manjaro or a Community Edition, it can happen that the your <code>~/.xinitrc</code> file is missing parts or contains wrong code.  
If you are using the Net Edition of Manjaro or a Community Edition, it can happen that the your <code>~/.xinitrc</code> file is missing parts or contains wrong code.  
In this case, your system will show error messages and it will refuse to boot your Desktop Environment. It is even possible that your system is caught in a loop, in which it constantly keeps trying to execute <code>startx</code>.  
In this case, your system will show error messages and it will refuse to boot your Desktop Environment. It is even possible that your system is caught in a loop, in which it constantly keeps trying to execute <code>startx</code>.  


<!--T:12-->
If this happens, get a tty by pressing <code>CTRL + ALT + F2</code> (or any other funktion key - try all function keys from <code>F1</code> to <code>F7</code>).
If this happens, get a tty by pressing <code>CTRL + ALT + F2</code> (or any other funktion key - try all function keys from <code>F1</code> to <code>F7</code>).
When you have a tty, you can log into your system, [[Install Display Managers]] or edit your <code>~/.xinitrc</code> file using  <code>nano</code> or <code>vim</code> (this might has to be installed before you can use it).
When you have a tty, you can log into your system, [[Install Display Managers]] or edit your <code>~/.xinitrc</code> file using  <code>nano</code> or <code>vim</code> (this might has to be installed before you can use it).