VserverAndXorg

From Linux-VServer

Revision as of 21:49, 21 October 2011 by Glenn (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Xorg in a vserver

To run Xorg in a vserver you have to have access to the hardware. Usually this means IO access. I will show the important vserver settings to get Xorg running within a vserver:

bloepie:/etc/vservers# cat .defaults/apps/vprocunhide/files 
/proc/net/
-/proc/net/rpc/
/proc/sys/
-/proc/sys/debug/
-/proc/sys/dev/
/proc/sysvipc/
/proc/tty/
/proc/cpuinfo
/proc/crypto
/proc/devices
/proc/execdomains
/proc/filesystems
/proc/interrupts
/proc/iomem
/proc/ioports
/proc/kcore
/proc/kmsg
/proc/ksyms
/proc/loadavg
/proc/locks
/proc/meminfo
/proc/misc
/proc/modules
/proc/pci
/proc/slabinfo
/proc/stat
/proc/swaps
/proc/uptime
-/proc/cmdline
/proc/version
/proc/mtrr
/proc/bus/
bloepie:/etc/vservers# cat shell/bcapabilities 
SYS_RAWIO
IPC_LOCK
IPC_OWNER
SYS_RAWIO
SYS_ADMIN
NET_ADMIN
NET_RAW
MKNOD
bloepie:/etc/vservers# vserver shell enter
c40150-vs0:/# cat /etc/X11/xdm/Xservers 
:0 local /usr/bin/X :0 vt7 -br -novtswitch -sharevts -dpi 100 -nolisten tcp
c40150-vs0:/dev# cd /dev/input/
c40150-vs0:/dev/input# ls -al
total 16
drwxr-xr-x 4 root root    4096 Dec 11 19:32 .
drwxr-xr-x 7 root root    4096 Dec 12 17:47 ..
drwxr-xr-x 2 root root    4096 Dec 11 19:11 by-id
drwxr-xr-x 2 root root    4096 Dec 11 19:11 by-path
crw-rw---- 1 root root 13,  64 Dec 11 19:11 event0
crw-rw---- 1 root root 13,  65 Dec 11 19:11 event1
crw-rw---- 1 root root 13,  66 Dec 11 19:11 event2
crw-rw---- 1 root root 13,  67 Dec 11 19:11 event3
crw-rw---- 1 root root 13,  63 Dec 11 19:11 mice
crw-rw---- 1 root root 13,  32 Dec 11 19:11 mouse0
crw-rw---- 1 root root 13, 128 Dec 11 19:11 ts0
c40150-vs0:/etc/X11# grep input xorg.conf 
        Option          "Device"                "/dev/input/by-id/usb-CHICONY_HP_Basic_USB_Keyboard-event-kbd"
c40150-vs0:/etc/X11# grep mice xorg.conf 
c40150-vs0:/etc/X11# ls -al /dev/mice
crw-rw---- 1 root root 13, 63 Nov 21 13:03 /dev/mice
c40150-vs0:/dev# ls -al tty* 
crw-rw-rw- 1 root root 5, 0 Nov 12 14:12 tty
lrwxrwxrwx 1 root root    4 Nov 21 12:55 tty0 -> tty7
crw-rw---- 2 root root 4, 7 Nov 12 13:25 tty7

i needed also access to /sys to make x start, otherwise it died with "No Device Found" while loading the video driver

Personal tools