2

I installed CentOS 6.4 x86 from the minimal installation CD into a qemu/kvm virtual machine and installed the basic X server using:

yum groupinstall "X Window System" "Fonts"

When I run startx as a normal user, however, the virtual machine's screen flickers with a bit of color, no desktop is displayed, and I'm returned to the console. I'm not sure what is relevant from the Xorg.0.log file, but here are the last few lines:

[   417.281] (**) Option "xkb_model" "pc105+inet"
[   417.281] (**) Option "xkb_layout" "us"
[   417.281] (WW) Option "xkb_variant" requires an string value
[   417.281] (WW) Option "XkbVariant" requires an string value
[   417.281] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[   417.325] (II) config/hal: Adding input device Power Button
[   417.325] (II) Using input driver 'evdev' for 'Power Button'
[   417.325] (**) Power Button: always reports core events
[   417.325] (**) evdev: Power Button: Device: "/dev/input/event0"
[   417.325] (--) evdev: Power Button: Vendor 0 Product 0x1
[   417.325] (--) evdev: Power Button: Found keys
[   417.325] (II) evdev: Power Button: Configuring as keyboard
[   417.325] (**) Option "config_info" "hal:/org/freedesktop/Hal/devices/computer_logicaldev_input"
[   417.325] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 8)
[   417.325] (**) Option "xkb_rules" "evdev"
[   417.325] (**) Option "xkb_model" "pc105+inet"
[   417.325] (**) Option "xkb_layout" "us"
[   417.325] (WW) Option "xkb_variant" requires an string value
[   417.325] (WW) Option "XkbVariant" requires an string value
[   417.325] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[   417.330] (II) config/hal: Adding input device Macintosh mouse button emulation
[   417.330] (II) Using input driver 'evdev' for 'Macintosh mouse button emulation'
[   417.330] (**) Macintosh mouse button emulation: always reports core events
[   417.330] (**) evdev: Macintosh mouse button emulation: Device: "/dev/input/event1"
[   417.330] (--) evdev: Macintosh mouse button emulation: Vendor 0x1 Product 0x1
[   417.330] (--) evdev: Macintosh mouse button emulation: Found 3 mouse buttons
[   417.330] (--) evdev: Macintosh mouse button emulation: Found relative axes
[   417.330] (--) evdev: Macintosh mouse button emulation: Found x and y relative axes
[   417.330] (II) evdev: Macintosh mouse button emulation: Configuring as mouse
[   417.330] (**) evdev: Macintosh mouse button emulation: YAxisMapping: buttons 4 and 5
[   417.330] (**) evdev: Macintosh mouse button emulation: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[   417.330] (**) Option "config_info" "hal:/org/freedesktop/Hal/devices/computer_logicaldev_input_0"
[   417.330] (II) XINPUT: Adding extended input device "Macintosh mouse button emulation" (type: MOUSE, id 9)
[   417.331] (II) evdev: Macintosh mouse button emulation: initialized for relative axes.
[   417.331] (**) Macintosh mouse button emulation: (accel) keeping acceleration scheme 1
[   417.331] (**) Macintosh mouse button emulation: (accel) acceleration profile 0
[   417.331] (**) Macintosh mouse button emulation: (accel) acceleration factor: 2.000
[   417.331] (**) Macintosh mouse button emulation: (accel) acceleration threshold: 4
[   417.587] (II) VMWARE(0): VMMOUSE DEVICE_OFF/CLOSE
[   417.609] (II) evdev: Macintosh mouse button emulation: Close
[   417.609] (II) UnloadModule: "evdev"
[   417.609] (II) evdev: Power Button: Close
[   417.609] (II) UnloadModule: "evdev"
[   417.609] (II) evdev: AT Translated Set 2 keyboard: Close
[   417.609] (II) UnloadModule: "evdev"
[   417.609] (II) VMWARE(0): VMMOUSE DEVICE_OFF/CLOSE
[   417.910] (II) VMWARE(0): VMMouseUnInit
[   418.687] Server terminated successfully (0). Closing log file.

I can post the entire log file is necessary. My /etc/pam.d/xserver file looks like this:

auth    required        pam_localuser.so
account required        pam_unix.so

I only want the basic X window system, without Gnome or KDE. What else do I need to do to make the startx command work properly? I've found numerous guides online that ask me to install Gnome or KDE, but is it possible to use the basic X window system without them?

0

1 Answer 1

5

Yes, you can run X without anything else -- sort of, because what will happen is it ends right away, which I think is what is happening here.

To test this, make sure you have xterm installed by trying it from the console. It will of course fail if it is, otherwise you will get "command not found", so you'll have to install it.

Next, create a file a file ~/.Xclients with one line in it:

xterm

On some systems this file may need to be executable or you will end up with a "permission denied" error, so chmod +x .Xclients. This file is executed by the shell, so it follows scripting logic -- startx should now start X such that you'll see ye olde xterm, but if you exit from that, X will end, because there is nothing in the .Xclients script left to execute. Normally you might put something like "mwm" or "startkde" there (or you could put a few apps backgrounded via & except for the last one, which will be what has to remain running, usually that's a window manager or DE).

If that works, then there you are. If not, post the contents of /etc/X11/init/xinitrc. I'm not a CentOS user and sometimes these things vary slightly.

This works the same way for root or unprivileged users.

2
  • I installed xterm, but does the ~/.Xclients file need to be executable? I get an error (/home/jb/.Xclients permission denied) if is isn't. Once I make it executable, startx works and xterm loads. Mar 16, 2013 at 23:41
  • 1
    I didn't think so -- the ones on the fedora 18 laptop I'm using are not, they're 644 and 664. But a quick google of "Xclients executable" turns up various pages saying it does need to be. I can't say that I've taken notice of that previously. Maybe the difference is a subtlety in the global xinitrc -- it's run with "exec $CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients" so if, eg, $SSH_AGENT is defined, then Xclients becomes an argument to it. Anyway, I'll add a little note about the e bit.
    – goldilocks
    Mar 17, 2013 at 10:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .