首发在LinuxSir.org 地址: http://www.linuxsir.org/bbs/showthread.php?t=315802 以下内容没有在gmplayer等其他mplayer外壳下测试过。 我的系统用的zh_CN.UTF-8环境,如果您用的其他字符编码环境,可能需要做些调整 :ask 一、相关配置文件 1、mplayer自身的配置文件 $HOME/.mplayer/config 文件的内容 代码 # Write your default config options here! #alias mplayer='mplayer -stop-xscreensaver -zoom -vo gl2' unicode=1 slang=zh stop-xscreensaver=1 zoom=1 #if your graphic card support opengl , you can use vo=gl2 vo=xv ao=alsa ontop=1 #good exclude H264 Video codec vf=expand=:::::4/3:2 fs=1 subcp=cp936 #subcp=utf-8 font=SimHei ass=1 ass-styles= $HOME/.mplayer/my.ass # use up style file no need this scale param #ass-font-scale=2.5 2、字幕样式配置 $HOME/.mplayer/my.ass 的字幕格式设置内容如下(这里说明一下为什么用ssa字幕格式设置文件,因为我发现使用了ssa的字幕格式文件设置后,srt和ssa的字幕都可以又mplayer自动进行换行处理。注意,如果你下载的字幕的文件扩展名是ass,不是ssa,请修改为ssa,否则字幕无法加载) 代码 [Script Info] ScriptType:v4.00+ [V4+ Styles] Format: Name , Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding Style: Default , SimHei, 20, &H00FFFFFF, &HF0000000, &H00000000, &HF0000000, 0, 0, 0, 0, 100, 100, 0, 0.00, 1, 1, 0, 2, 30, 30, 10, 1 二、字幕和电影的配合使用说明 1、按照我上面的设置,字幕的字符集必需是gb2312或者gbk。其他字符集的需要将srt字幕文件的编码格式进行转换。 2、如果希望字幕自动加载需要将字幕的文件名和电影的文件名一致,除了扩展名外。 3、经过这样设置后,请直接使用mplayer命令,或者将文件类型的打开方式选择使用mplayer,而不要使用gmplayer,(因为我没有怎么用gmplayer,不知有其他问题没有 三、mplayer 的常用功能的命令 1、音量调整 9=减小 0=增加 2、全屏开关 f 3、退出 <Esc> 或者 q 4、字幕和视频的配合 z 推迟字幕显示 x 加速字幕显示 四、常见媒体播放问题 1、字幕乱码 应该是你没有转换字符集的问题。 常用的转换命令: iconv -fbig5 -tgb2312 xxx.srt > yyy.srt (这个转换有时会因为有些字符转换失败导致无法生成完整的yyy.srt字幕,注意转换后如果有报错,这时需要你修改一下xxx.srt字幕的那个出错的行的相关文字。闲麻烦可以用下面的命令,只不过你看的字体都是繁体就是了。) iconv -fbig5 -tcp936 xxx.srt > yyy.srt 2、字幕不显示 分2种常见情况, 1) 一个是srt字幕用vim打开,发现格式中的“ --> ”和下一行的字幕内容中间多了空行 如下: 代码 1 00:01:14,500 --> 00:01:19,460 片名:情书 2 00:02:57,603 --> 00:03:01,562 今天在百忙之中 a)如果是这个情况,vim可以直接解决,请输入如下命令: 代码 :%g/-->/j 代码 1 00:01:14,500 --> 00:01:19,460 片名:情书 2 00:02:57,603 --> 00:03:01,562 今天在百忙之中 c) 保存退出就ok了。 代码 :w 2)vim打开,发现格式很正常 这时最大的可能就是字幕文件含有大量的"\0"字符。这些字符看不见,但会影响字幕的解析,程序员知道这个"\0"是结束的标志。 怎么删除? 我的一个笨办法: a)用vim打开,输入命令 代码 ggVGy 这样就把所有的有效字幕内容拷贝了 代码 :new c)下面将这些内容贴到新文件中 代码 p d)注意这时需要设置一下字幕文件的编码 代码 :set fileencoding=cp936 e)保存为文件xxx 代码 :w xxx 这时你可以 ls -l 看看两个字幕文件是否大小不一样了。 如果新文件明显小了那么说明你搞定了
看到那些小小的版本升级,那些为了Linux的易用性而不停改进的小功能,每个版本一点一滴的进步,突然有种莫名的感动。一个有钱人,一个在太空遨游过的人,一个说“我要为人类做些事情”的人,用自己的行动,为“开源”社区带来这样优秀的作品。他身边凝聚了一群精英,真的要有钱到这样才能有这样的作为? 然而让我们看看另一位富甲天下的人,一个世界“原”首富,他拥有的财富可以买尽我们眼睛看到的一切,但内心却如此狭隘,而且还教唆所有的中国人如此狭隘? 我们没有钱,我们可能技术不够精湛,但我们不能连自己的双手都不要了,然后张着又臭又大的嘴对那个狭隘的人说──我只会“吃”。难道要让他在10年前在大庭广众下说我们无耻之后,再在背后说我们“可怜”?
摘自:(http://forum.openrays.org/read-htm-tid-4309-fpage-6.html) 1、从c:\windows\fonts\里拷贝一个simsun.ttc到~/.wine/drive_c/windows/fonts/ 2、修改/加入 ~/.wine/system.reg 代码 [System\\CurrentControlSet\\Hardware Profiles\\Current\\Software\\Fonts] "LogPixels"=dword:00000070 这里是改变dialog window buttom的字体大小 3.修改/加入 ~/.wine/windows的dir/win.ini 代码 [Desktop] menufontsize=13 messagefontsize=13 statusfontsize=13 IconTitleSize=13 这边是改变其他字体的大小 另外: 修改~/.wine/system.reg 代码 [Software\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes] 1144897563 "MS Shell Dlg"="SimSun" "MS Shell Dlg 2"="SimSun" 可以解决某些按钮字体的问题 在某些系统中,以上方法都不能解决字体默认为simsun,最后发现,系统最先使用simfang.ttf,所以可以这样做: ln -s SimSun.ttc simfang.ttc 因为simfang.ttc在simfang.ttf前,所以使用了simsun字体
如果是2.2以前的版本则修改 /usr/bin/ooffice 中使用也可以。 代码 --widgets-set = 'gtk' 最近升级OpenOffice到2.2了,发现无法强制使得界面成为gnome风格,google搜了一下,解决方法如下: 只需要在/usr/bin/ooffice 以及其他几个启动脚本(oobase,oodraw,oofromtemplate,oomath,oowriter,oocalc,ooffice,ooimpress,ooweb)中添加 代码 export OOO_FORCE_DESKTOP="gnome" 就可以强制使用gnome风格。 对于我的FVWM窗口,这样显示漂亮多了。
apt的proxy比较简单。在/etc/apt/apt.conf中添加: /etc/apt/apt.conf 代码 APT::Authentication::TrustCDROM "true"; Acquire::http::Proxy "http://username:password@proxy.xxx.xxx/"; Acquire::::Proxy "true"; wget 的proxy 它是借助环境变量 export http_proxy=http://proxy.xx.xx:80 export ftp_proxy=ftp://proxy.xx.xx:21 如果需要认证则需要编写一个文本 ~/.wgetrc 中添加: 代码 proxy-user=username proxy-password=password w3m 的代理上网可以参考使用proxychains工具。 具体配置需要在 /etc/proxychains.conf中进行设置。 /etc/proxychains.conf 代码 # proxychains.conf VER 2.0 # # HTTP, SOCKS4, SOCKS5 tunneling proxifier. # # The option below identifies how the ProxyList is treated. # only one option should be uncommented at time, # otherwise the last appearing option will be accepted # # Dynamic - Each connection will be done via chained proxies # all proxies chained in the order as they appear in the list # at least one proxy must be online to play in chain # (dead proxies are skipped) # otherwise EINTR is returned to the app # # Strict - Each connection will be done via chained proxies # all proxies chained in the order as they appear in the list # all proxies must be online to play in chain # otherwise EINTR is returned to the app # # Random - Each connection will be done via random proxy # (or proxy chain, see chain_len) from the list # this option is good for scans #dynamic_chain #strict_chain random_chain # Make sense only if random_chain # 一定要注意,这个值要和下面定义的 proxy list 的个数一致 chain_len = 1 # Quiet mode (no output) quiet_mode # Write stats about good proxies to proxychains.stats #write_stats #Some timeouts in milliseconds # tcp_read_time_out 15000 tcp_connect_time_out 10000 [ProxyList] # ProxyList format # type host port [user pass] # (values separated by 'tab' or 'blank') # # # Examples: # # socks5 192.168.67.78 1080 lamer secret # http 192.168.89.3 8080 justu hidden # socks4 192.168.1.49 1080 # http 192.168.39.93 8080 # # # proxy types: http, socks4, socks5 # ( auth types supported: "basic"-http "user/pass"-socks ) # #http 10.0.0.5 3128 #http 10.0.0.3 3128 #http 10.0.0.5 3128 #socks5 192.168.1.4 1080 #socks4 10.5.81.143 1080 #http 192.168.203.18 8080 http proxy.xxx.xxx 80 username password 目前没有解决firefox的代理认证方法。
很爽! 它提供界面和服务分离的模式。以前vmware workstation的使用时,关闭窗口意味着关闭虚拟机。而在server的概念中这个窗口只是一个Console。好像连接linux服务器的一个终端而已。关闭它,后台的虚拟机仍然会自动运行。你可以随时再起动console去连接vmware server,看看guest系统的任务做的如何了。 它的暂停guest系统的速度很快,而且恢复也很快。有时可以用于减少内存消耗,先把guest系统暂停。需要的时候再重新运行就保证你在很需要host系统内存使用的时候,guest系统不会和你纠缠 需要注意的地方: 1、对vmware的开机,关机,暂停等操作非常快,而且不会提示你是否要进行这样的操作。注意别误操作了。 2、SnapShot的功能非常强悍。以至于我因为一次误操作。导致guest系统回归了最原始的状态。它的功能是记录你的guest系统的某一时刻。你对guest系统的后续操作会因为你点击回溯一个snapshot点,而全部消失。
有时碰到一些有限制的系统,安装时,需要选用自己需要的最小包集合,但开发时需要的函数相关的信息的manpage不一定有被安装上。 经过详细的检查。发现这些函数的manpages的包名是: manpages-dev 但是单单安装manpges-dev有时你不能从man -k function 中得到你要找的函数。这个和mandb有关。需要重新刷新mandb的索引。使用的命令就是 mandb -c 它会重建一遍mandb的索引。 在Deiban中,除了提供基本的manpages外,还提供了posix的函数manpage。包名:manpages-posix和manpages-posix-dev。 黑客的幽默无处不在。你安装funny-manpages 和 asr-manpages 包。它里面有很多搞笑的名次解释哦。包的说明中则提示“请不要把它当真”
第一部分,设置全局变量 代码 dos charset = utf8 unix charset = utf8 hosts allow = 192.168.115.0/255.255.255.0 第二部分,专门开放一个共享目录。 代码 [Shared Folders] comment = windows mount dir browseable = yes # By default, the home directories are exported read-only. Change next # parameter to 'yes' if you want to be able to write to them. ;writable = yes # File creation mask is set to 0700 for security reasons. If you want to # create files with group=rw permissions, set next parameter to 0775. create mask = 0022 # Directory creation mask is set to 0700 for security reasons. If you want to # create dirs. with group=rw permissions, set next parameter to 0775. directory mask = 0022 path = /home/user/vmware force user = user force group = user read only = No guest ok = Yes
目前是一些零星的收集,不一定完整。 代码 <!-- artificial bold by: firefly 这里开始设置simsun在8~16的大小时,不用AA,而是用点阵字体 --> <match target="font" > <test qual="any" name="family"> <!--string>Tahoma</string--> <string>宋体</string> <string>黑体</string> <string>幼圆</string> <string>隶书</string> </test> <test compare="more_eq" name="pixelsize" qual="any" > <double>8</double> </test> <test compare="less_eq" name="pixelsize" qual="any" > <double>14</double> </test> <edit mode="assign" name="antialias" > <bool>false</bool> </edit> </match> <!-- artificial bold by: firefly--> <match target="font"> <test target="pattern" name="weight" compare="more"> <const>medium</const> </test> <edit name="weight" mode="assign"> <const>bold</const> </edit> </match> <!-- artificial bold by: firefly--> <match target="font"> <test name="family"> <string>宋体</string> </test> <edit name="globaladvance"><bool>false</bool></edit> <edit name="spacing"><const>proportional</const></edit> </match>
这个问题本身是vmware自己的安装脚本中不支持>=2.6.16的内核版本所致。 现在这个问题的网上普遍的解决方法是:到下面这个连接中下载 http://knihovny.cvut.cz/ftp/pub/vmware/ 这样一个文件。这个文件的101部分是版本编号,可能随时改变。 vmware-any-any-update101.tar.gz 解压这个文件,运行 runme.pl文件,按它的提示进行就都OK拉, 经过自己的使用,暂时没有出现什么异常。 |
最新的文章
最后的评论
|