On Unix-like operating systems, the xinit command initializes the X Window System.
Normally, you should run startx rather than xinit directly. The xinit program is used to start the X Window System server and a first client program on systems that are not using a display manager, such as xdmor in environments that use multiple window systems.
When the first client exits, xinit will kill the X server and then terminate. If no specific client program is given on the command linexinit will look for a file in the user's home directory called. If no such file exists, xinit will use the following as a default:. If no specific server program is given on the command line, xinit will look for a file in the user's home directory called.
Note that this assumes that there is a program named X in the current search path. The site administrator should, therefore, make a link to the appropriate type of server on the machine, or create a shell script that runs xinit with the appropriate server.
Note, when using a. Failing to do this can make the X server slow to start and exit. For example:. An important point is that programs that are run by. However, the last long-lived program started usually a window manager or terminal emulator should be left in the foreground so that the script won't exit which indicates that the user is done and that xinit should exit. An alternate client or server may be specified on the command line.
The desired client program and its arguments should be given as the first command line arguments to xinit. To specify a particular server command line, append a double dash " -- " to the xinit command line after any client and arguments followed by the desired server command. Otherwise, they are treated as an arguments to be appended to their respective startup lines.
This setting makes it possible to add arguments for example, foreground and background colors without having to retype the whole command line. If an explicit server name is not given and the first argument following the double dash " -- " is a colon followed by a digit, xinit will use that number as the display number instead of zero.
All remaining arguments are appended to the server command line. Start up a server named X and run the user's. Start up a server named Xand append the given arguments to the default xterm command. It ignores. Use the command. Xorg -l -c to start the server and append the arguments -e widgets to the default xterm command. This starts a server named X on display 1 with the arguments -a 2 -t 5. It will then start a remote shell on the machine fasthost in which it will run the command cpupigtelling it to display back on the local workstation.
Below is a sample. Assuming that the window manager has been configured properly, the user then chooses the "Exit" menu item to shut down X.Pages: 1 2 Next. I have a new Arch install and am trying to use i3. When I run startx as root, I am brought to the i3 desktop no problem. When I run startx as a user, however, the X server immediately shuts down with no error. I am able to start xterm and openbox no problem as user.
I noticed a. Could that be part of my problem? The user's. It is located in the user's home directory.
Have you read this? I am starting X by executing startx. It acts like it's going to start and then closes the X session.
If I type sudo startx, I can enter the i3 environment without problem. I think the issue is more with i3 than xorg, as I can start openbox if I alter my.
It's only i3 giving me problems. That may be the issue. Where would I look for the i3 files? Are those the ones in question? I also see an. All right, that must be it. How do I change permissions on the. Seems like I would need to have it in my user's home, no? No silly questions! I installed i3 by running sudo pacman -S i3 and choosing "all" at the prompt. That's probably fine, but you should really update your system every time you install new packages check the news page first!
Good to know about installing new packages!
I just ran an upgrade and it listed nothing to do, so we're good there. Running i3-config-wizard in an openbox session won't work without root permission. Atom topic feed. Arch Linux. Index Rules Search Register Login. You are not logged in. Topics: Active Unanswered. Can't start i3 with xorg I have a new Arch install and am trying to use i3.Login Register Remember me Lost Password?
Linux xinit command
Five Years of Service. Reputation: Currency: 67 NSP. There is also a reason this is called the "Lazy Man's" guide to ricing, and not just "Insidious' guide to ricing". That's because I don't have time to go through all the config files and configure absolutely everything myself. Instead, I save myself time by looking at other configs, taking things I like, and putting them all together to create a semi-original rice. I only took a screenshot of one monitor, however. The other monitor just has a riced firefox.
So, I'll get into the guide. If you're new to ricing, veering off this guide will probably introduce many problems that you will have to solve yourself, but you'll probably learn more about ricing that way.
The xinitrc file?
Ofc, you can use something like xmonad or Awesome which use Haskell or LUA for the WM, but that's more hassle if you're not acquainted with the language.
Because installing a Linux distro is out of the scope of this guide, i'm not going to go over that. PLUS there is already plenty of documentation out there. This allows you to have the sick option of having those wicked gaps everyone loves.
Once you get Linux installed and i3 up and running, you will boot into something totally bland and ugly with a prompt asking you if you would like i3-wizard to generate you a config in your user directory. Make sure to say yes to this.
Step 3: This is the lazy part. If you like a config but someone is using it with a different WM, don't despair. You usually may still be able to take that part of the config.My Workflow With i3 Window Manager
For example, if you like the status bar someone has, you can install that ok it's own in the window manager of your choice. The config files are different, usually. There is some trial-error here.If no specific client program is given on the command line, xinit will look for a file in the user's home directory called. If you are not using the generic. The first line of the startup script should list the shell that it's written in.
For simple scripts the Bourne shell sh should suffice. The first line in your startup script should be:.
Whatever shell you decide to use, the commands you insert in this startup script should be written in that shell's syntax. So, for example, if your script is written in C shell, the commands you insert should be written in C shell syntax.
Think about what programs you want to start. One program you have to start a window manager. You probably want to start at least one xterm window. You may want to start a mailer or a calendar program. Start out with a few programs, you can always add more later. The next thing you need to decide is which program you want to be your controlling process.
The controlling process is a program that, when you exit it, you are out of your entire X session. There are two common programs to use as your controlling process: your window manager or an xterm window. In the start-up script, twm is the controlling process. So, when you exit twm, you exit your X session.
Now list all your programs on separate lines. This way you can have windows from several client programs running simultaneously. The last line should be your controlling process for which you do not add an ampersand. For example, below is the generic. Examining the above script, we see that upon starting xinit, your. Xdefaults file will be read, your root window will be set to solid gray, a clock, two xterms and an xconsole window will be started.
Starting an xconsole window is recommended so you do not have console messages appear on your screen. If you don't start an xconsole, you will have to keep refreshing your screen. The last line is your twm window manager which is run as your controlling process. Therefore when you exit your window manager by selecting Exit from the Twm menuyour X Window system will shut down and you will be returned to your console prompt.
After you have your initial startup session, you may want to set up inital window placements. You can set your window placement with the -geometry -g.The stated goals for i3 include clear documentation, proper multi-monitor support, a tree structure for windows, and different modes like in vim.
An i3 package group is also available. It includes the window manager, a screen locker and two programs which write a status line to i3bar through stdout. Additional packages are available in the Arch User Repository. See Patches for examples.
This is Alt Mod1 by default, with Super Mod4 being a popular alternative. Super is the key usually represented on a keyboard as a Windows icon, or on an Apple keyboard as a Command key. See the i3 reference card and Using i3 for the defaults. See Keyboard bindings to add new shortcuts. Users of non-Qwerty keyboard layouts may wish to circumvent the "configuration wizard" as described below.
If switching between multiple window managers or desktop environments, consider using sxhkd or another environment agnostic program to manage bindings. More information can be found in Keyboard shortcuts Xorg.
This structure branches with horizontal or vertical splits. Containers are tiled by default, but can be set to tabbed or stacking layouts, as well as made floating such as for dialog windows. Floating windows are always on top. See i3 Tree and Containers and the tree data structure for details. As it is an optional dependency dmenu must first be installed before this functionality can be used.
Alternatively, the package j4-dmenu-desktop-git AUR can be used. See Configuring i3 for details. When i3 is first started, it offers to run the configuration wizard i3-config-wizard. It makes two modifications to the default template:. Step 2 is designed to ensure that the four navigation shortcuts, jkl and "semicolon" on a Qwerty keyboard, will be mapped to keysyms which have the same location, e.
Therefore, users of alternate keyboard layouts who want straightforward key bindings, which match the bindings given in tutorials, may prefer to circumvent the "config wizard". Note that a keycode-based configuration is also possible, e. Alternatively, you can use XDG Autostart. The configuration file allows for customization of window decoration colors, but the syntax makes it impractical to create or share themes. There are several projects which make this easier and include a variety of user-contributed themes.
In addition to showing workspace information, i3bar can act as an input for i3status or an alternative, such as those mentioned in the next section. For example:. See the Configuring i3bar for details. Some users may prefer panels such as those provided by conventional Desktop Environments. This can be achieved within i3 by launching the panel application of choice during startup. Not all plugins are defined in the default configuration and some configuration values may be invalid for your system, so they need to be updated accordingly.
See i3status 1 for details. To combine fonts, define a font fallback sequence in your configuration file, separating fonts withlike so:. In accordance with pango syntaxfont size is specified only once, at the end of the comma-separated list of font families. Setting a size for each font would cause all but the last font to be ignored.
The input method will vary between text editors.Login Register Remember me Lost Password? One Year of Service. Reputation: Currency: NSP. Installation guide Arch Linux and i3. In this installation guide, I will be covering the process of the installation of Arch Linux and getting a windows manager running. For this example, I will be using i3 for this process.
As I found out, the Arch wiki wasn't helpful as much. I came across some mistakes just via using the wiki so, I hope this installation guide can help everyone. Before installing Arch Linux, make sure your computer is connected to the internet. Distro i3 Installation Video.
Guide to X11/Starting Sessions
About Startx and xinit. If I'm missing something, let me know via posting here. This post was last modified:PM by MimiE. Seven Years of Service. Currency: 6, NSP. It's good to see you've referenced Rufus to create a bootable USB.
I've used this tool many times, and It hasn't failed to date. A well documented and elaborated guide. Well done. Vespei Registered Platinum.From Wikipedia :. While you can also use xinit to run GUI applications without a window manager, many graphical applications expect an EWMH compliant window manager. Display managers start Xorg for you and generally source xprofile.
Install the xorg-xinit package. If it is present in a user's home directory, startx and xinit execute it. This default xinitrc will start a basic environment with Twmxorg-xclock and Xterm assuming that the necessary packages are installed.
Therefore, to start a different window manager or desktop environment, first create a copy of the default xinitrc in your home directory:. Then edit the file and replace the default programs with desired commands. Remember that lines following a command using exec would be ignored. For example, to start xscreensaver in the background and then start openboxuse the following:.
Otherwise, the script would halt and wait for each program to exit before executing the window manager or desktop environment. Note that some programs should instead not be forked, to avoid race bugs, as is the case of xrdb. Prepending exec will replace the script process with the window manager process, so that X does not exit even if this process forks to the background.
The xserverrc file is a shell script responsible for starting up the X server. In order to maintain an authenticated session with logind and to prevent bypassing the screen locker by switching terminals, Xorg has to be started on the same virtual terminal where the login occurred . See Xserver 1 for a list of all command line options. To quit X, run your window manager's exit function assuming it has one.
If it lacks such functionality, run:. See also signal 7. If the binary takes arguments, they need to be quoted to be recognized as part of the first parameter of startx :. Note that the full path is required.
i3 - improved tiling WM
You can also specify custom options for the xserverrc script by appending them after the double dash -- sign:. See also startx 1.
This article or section needs language, wiki syntax or style improvements.