Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

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.

share|improve this answer
    
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. –  John Bensin Mar 16 '13 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. –  TAFKA 'goldilocks' Mar 17 '13 at 10:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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