The third line, "/usr/X11R6/bin/xmodmap -e 'keycode 107 = BackSpace'" (or just "xmodmap -e 'keycode 107 = BackSpace'"), adjusts the keymap. There are many other commands that one could add. On other Unix systems, the command will be different. (Use ulimit -a, or if your shell is not a Bourne shell, use sh -c 'ulimit -a', to see your default limit.) The next command, /usr/bin/mixerctl monitor.master=5,5, sets the sound volume on a OpenBSD or NetBSD system to 5 on both the left and right channels. The first line, "ulimit -Sn 512", is a Bourne shell command to increase the soft limit "-S" on open files "-n" to 512. usr/X11R6/bin/xmodmap -e 'keycode 107 = BackSpace' Here is a more complex example of an ".xinitrc": The "exec" prefix to this command tells the shell that this is the last command, so the shell does not need to wait to run a next command. Normally the shell would wait for KDE to finish, then run the next command. This command does not finish until you logout of KDE. Here is a simple, one-line example of an ".xinitrc":Ī "startkde" command starts the KDE desktop environment. If you fail to understand this, try starting with the examples below. You put in commands like you would type at the Unix shell. xinitrc, but it would fail unless you already started the X server. $ ls -a # list all files, including dotfilesĪn ".xinitrc" is simply a Bourne shell script. $ cd # changes current directory to home directory There are ways to handle invisible files from the shell: Because the filename starts with a dot, the file is normally invisible. xinitrcīefore using "xinit", one needs a file called. $ xinit xterm # passes "xterm" as argument to. If you do not specify a program with a slash, then "xinit" uses your. then you need to add /usr/X11R6/bin to your PATH environment variable. (When browsing your home directory, check "Show Hidden Files" in the View menu.) This will let you use Konqueror to find your ".xinitrc" and Kate to edit it. If you have KDE, you can find your startkde script: You must have a slash / somewhere in the name of the program. The last line fails (even if "xterm" is in your PATH) because xinit assumes that it is an argument, not a program. This will start an X server and the program called "xterm", which you can use to start more X clients. $ xinit $(which xterm) this will NOT work If you broke your ".xinitrc", or do not have one yet, then you can start one. There is no need to remember whether your system calls it ".Xresources" or ".xresources" or ".xrdb" you can simply specify the exact behavior that you want in your "~/.xinitrc". In contrast, the xinit program only starts an X server and runs a ~/.xinitrc script. ) and loads them the files it uses are different on each system, so you might have to read the startx script on your system to understand what it does. The startx script looks for several files ( ~/.Xresources, ~/.Xmodmap. However, if you want to customise your default environment, using xinit might be easier. There is a program startx, which launches X11. Similar programs exist for Microsoft Windows (which is not a Unix platform). In Mac OS X, you start the X11.app program, which is an X server that lets X clients appear on the same desktop as your other Mac programs. For example, Mac OS X has its native Quartz system. Third, some systems are using a graphical environment that is not X11. In this case, when you login, you start using X11 immediately. Second, some Unix consoles have a graphical login prompt! In this case, the system boot scripts have started an X server already a program called the display manager has drawn a graphical user interface that lets you type a username and password. In this case, first login as normal to obtain your Unix shell, then use a xinit or startx command to start the X server and default clients at your shell. What one needs is a way to start the X server plus some default clients such as a window manager.įirst, some Unix consoles give a text-only login prompt. If you only start the X server, you obtain a blank screen. Recall that X11 consists of an X server and several clients.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |