본문 바로가기

VLC

CentOS 6.2 에 VLC 만 띄워서 Play하기

1. /etc/inittab 에서 콘솔모드로 변경

 id:5:initdefault:   --> id:3:initdefault 로 변경


2. Auto Login 환경 설정 (사용자명 : vlcplayer)
    /etc/init/start-ttys.conf 변경

#

# This service starts the configured number of gettys.


start on stopped rc RUNLEVEL=[2345]


env ACTIVE_CONSOLES=/dev/tty[1-6]

env X_TTY=/dev/tty1

env TTY_AUTO_LOGIN=/dev/tty1

env AUTO_LOGIN_USER=vlcplayer

task

script

. /etc/sysconfig/init

for tty in $(echo $ACTIVE_CONSOLES) ; do

[ "$RUNLEVEL" = "5" -a "$tty" = "$X_TTY" ] && continue

                if [ "$TTY_AUTO_LOGIN" = "$tty" ]

  then

initctl start tty-auto-login AUTO_LOGIN_USER=$AUTO_LOGIN_USER TTY=$tty

else

initctl start tty TTY=$tty

fi

done

end script


   
     /etc/init/tty-auto-login.conf 생성

# tty - getty

#

# This service maintains a getty on the specified device.


stop on runlevel[S016]


respawn

instance $TTY

instance $AUTO_LOGIN_USER

exec /sbin/mingetty --autologin=$AUTO_LOGIN_USER $TTY

 
3.  사용자 HOME 디렉토리에 .xinitrc 생성 (또는 변경)

#!/bin/sh
vlc -f rtmp://211.252.37.49:1660/live/gtv1.sdp 

 
4. root 에서 해당 사용자 (예를 들면 사용자ID : vlcplayer ) 권한 변경

usermod -G audio -a vlcplayer


5.  사용자 HOME 디렉토리의 .bash_profile 맨 뒤에 다음 사항 추가

xinit (또는 startx)

 
6. reboot