Xuefeng's profilePauL 'SPhotosBlogLists Tools Help

Blog


    April 18

    MPlayer 1.0 preview 5 安装及IPv6在线视频支持

    作者: ycflash

    本文基于源代码安装(我喜欢这样的安装方式:P) ,用来看电影和在线IPv6。
    到 http://www.mplayerhq.hu 下载
    MPlayer-1.0pre5.tar.bz2
    neutron-1.5.tar.bz2
    essential-20041107.tar.bz2
    gb2312-kai.tar.bz2 文件,皮肤前端,自己随便选喜欢的下。 为了方便,所有操作均在root下完成。普通用户,到时候自己修改主目录下相关配置, 并修改相应权限即可。

    安装解码器: 假定 mplayer安装目录为 /usr/local/mplayer 解码器在 /usr/local/mplayer/codecs

    开始安装解码器:
    mkdir /usr/local/mplayer
    tar jxvf essential-20041107.tar.bz2
    mv essential-20041107 /usr/local/mplayer/codecs

    安装mplayer主程序:
    tar jxvf MPlayer-1.0pre5.tar.bz2
    cd MPlayer-1.0pre5/
    ./configure --prefix=/usr/local/mplayer --enable-gui --with-codecsdir\
    =/usr/local/mplayer/codecs --with-win32libdir=/usr/local/mplayer/codecs \
    --with-reallibdir=/usr/local/mplayer/codecs --with-xanimlibdir=/usr/local\
    /mplayer/codecs --enable-inet6 --language=zh_CN

    make ; make install
    cd etc/
    mkdir ~/.mplayer
    cp *.conf ~/.mplayer/
    mv ~/.mplayer/sample.conf ~/.mplayer/config

    参数说明:
    --enable-gui 支持图形化前端
    --enable-inet6 加入ipv6支持
    --language=zh_CN 默认界面为中文
    复制配置文件到主目录,方便各用户个性化配置

    安装皮肤: 以neutron为例
    tar jxvf neutron.tar.bz2; mv neutron /usr/local/mplayer/share/mplayer/Skin/default

    安装中文字体支持:
    tar jxvf gb2312-kai.tar.bz2
    cd gb2312-kai/gkai00mp24/
    cp * /usr/local/mplayer/share/mplayer/font/
    正常显示,中文字幕,修改,~/.mplayer/gui.config 21行,sub_unicode = "yes"
    在gmplayer 属性配置中,确保,Subtitile & OSD选项卡: Encodding :None, Unicode subtite 选中,Font选项卡:Encoding: Unicode

    建立软连接,不说了,呵呵。

    至此,安装完毕。在有些系统中,例如看我们学校的ipv6视频时,会报段错误,是解码器的问题。解决办法 : 把 ~/.mplayer/codecs.conf 中,632行,wmv9dmod.dll的9去掉。可以解决(不治本的办法 :) )。

    BTW: ipv6在线观看,最好建立 隧道,方法很简单,http://202.38.99.9 看看就没问题了。
    简要说明:2.4内核可以下载TunnelBroker,编译安装 ./configure ; make ; make install
    要到http://202.38.99.9 注册建立隧道的哟,还需要合法的IPv4 地址。
    加载并激活隧道: modprobe ipv6; tbclient act username password

    测试: mplayer mms://media6.bupt.edu.cn/CCTV-5 , 看到了吧,呵呵!图形化使用 gmplayer启动就可以。
    April 05

    使用ssh来run remote X applications

    Run remote X applications over network using ssh Reply with quote
    This small howto guides you to run remote X applications over network using ssh.

    Introduction
    The X windows system created by X consortium www.X.org

      * It is client/server architecture.
      * X is OS independent and it is a Protocol
      * X protocol works over TCP/IP


    What is X server?
    X-server -> Talks with your hardware (VGA card, mouse, monitor etc) => It provides the screen (or display) and manages the resources. For more info on X Window System and X client-server model and network transparency visit http://en.wikipedia.org/wiki/X_server

    X-Client -> Uses the display/screen provided by X-Server to display GUI/Application. It does not care how mouse or vga card works.

    For example you can run X application from another computer. All you need is to setup correct DISPLAY variable.

    Our demo setup with two computers:
    debian-server
    IP: 192.168.1.1

    Suse-Linux (Laptop)
    IP: 192.168.1.11

    Now you would like to redirect output of laptop to server. Please note that X works on almost all UNIX like operating systems like FreeBSD, HP/UX, Solaris, Linux etc. So the commands remains same for all variant of UNIX OS.

    1) Login to Debian Linux server
    Code:

    xhosts 192.168.1.11

    xhost is server access control program for X server. The xhost program is used to add and delete host names or user names to the list allowed to make connections to the X server. In our example we are allowing host (192.168.1.11) to access server. All communication done using 6000 port.

    2) Login to Suse-Laptop and run program on Debain Linux
    Code:
    export DISPLAY=192.168.1.1:0
    xeyes &


    The output of xeyes will be on debian server and not on the Suse. DISPLAY is variable which point out X server IP-address/hostname to redirect output.

    Secure login over ssh i.e. forward X over ssh
    SSH server has built in support to run X application remotely. Traffic between suse and debian system remains encrypted.

    1) Make sure XForwarding option is on
    Login to debian server, open /etc/ssh/sshd_config using text editor such as vi/vim:
    Code:
    vi /etc/ssh/sshd_config


    2) Setup X11Forwarding to yes
    Code:

    X11Forwarding yes


    3) Save file and restart ssh server
    Code:
    /etc/init.d/ssh restart


    4) Allow laptop to run programs:
    Code:
    xhosts 192.168.1.11


    5) Login from suse computer and start open office writer:
    Code:
    export DISPLAY=192.168.1.1:0
    ssh -X user@192.168.1.1 oowriter
    ssh -X user@192.168.1.1 xeyes


    Replace user with actual user name.

    This is my first small tutorial; please feel to comment back or to add your own stuff to it.

    OR you can use ssh -Y user@hostname