Posted 9 months, 2 weeks ago at 11:32 am. 0 comments
因为需要安装 ubuntu amd64 的无线网卡驱动,得到的方法是
sudo apt-get install bcm43xx-fwcutter
但问题在于家里没有网线(先有蛋?还是先有鸡?),只能从其它操作系统无线连接互联网下载后再安装。也就是说,我需要的实实在在的 .deb 文件。研究一会,发现其实就在源中
比如
deb http://cn.archive.ubuntu.com/ubuntu/ feisty universe
deb-src http://cn.archive.ubuntu.com/ubuntu/ feisty universe
那么在
http://cn.archive.ubuntu.com/ubuntu/pool/
中就能找到所有的 .deb 文件。最终我需要的文件就在这里
http://cn.archive.ubuntu.com/ubuntu/pool/universe/b/bcm43xx-fwcutter/
Popularity: 12% [?]
Tags:
deb
Posted 9 months, 2 weeks ago at 11:32 am. 0 comments
totem 中文字幕问题
感谢 Huang Jiahua在源里做好的 xine-fonts-cn,直接在新立得中搜索安装 xine-fonts-cn 即可。甚至都不用配置 ~/.gnome2/totem_config 文件。这样即可解决 totem 支持 .srt 中文字幕的问题。
源里没有的话,直接用 xine-fonts-cn_0.1.2_all.deb 地址下载
注:srt 与 avi 同名,totem 会自动加载字幕;或者,把两个文件一起拖到 totem 窗口中;或者命令行
totem file:///home/ubuntu/av/[地狱神探].Constantine.DVDRip.XviD.CD1-DoNE.avi#subtitle:file:///home/ubuntu/av/[地狱神探].Constantine.DVDRip.XviD.CD1-DoNE.chs.srt
原理如下:
totem 使用的字体在 /usr/share/xine/libxin/fonts 中,而这里没有中文字体,所以字幕乱码或干脆不显示。需要 xine-fontconv 这个软件来制作所需的中文字体。
以下为引用内容:
一:添加源代码源:
sudo gedit /etc/apt/sources.list
增加
deb-src http://archive.ubuntu.com/ubuntu/ breezy main restricted universe multiverse
二:下载源代码,编译出 xine-fontconv :
sudo apt-get update
sudo apt-get source libxine1c2
cd xine-lib-1.0.1/misc/
sudo gcc -o /usr/local/bin/xine-fontconv xine-fontconv.c `freetype-config –cflags –libs`
三:生成中文字体
cd /usr/share/xine/libxine1/fonts
sudo xine-fontconv /usr/share/fonts/zh_CN/TrueType/SIMSUN.TTF simsun gb18030
四:修改totem的配置:
gedit ~/.gnome2/totem_config
找到中间的项目修改为:
subtitles.separate.font:simsun
subtitles.separate.src_encoding:gb18030
五:播放:
totem file:///home/ubuntu/av/[地狱神探].Constantine.DVDRip.XviD.CD1-DoNE.avi#subtitle:file:///home/ubuntu/av/[地狱神探].Constantine.DVDRip.XviD.CD1-DoNE.chs.srt
via http://forum.ubuntu.org.cn/about2760.html
Mplayer 中文字幕
大约这样的命令格式
mplayer 影片名 -sub 字幕名 -subcp cp936 -font 中文字体名
中文字体名,就是类似 /media/hda1/WINDOWS/Fonts/simsun.ttc 这样(我的 windows 在 hda1)。我试验了
-font /usr/share/fonts/X11/misc/wenquanyi_12pt.pcf.gz
但是很卡。所以还是推荐 windows 的那些字体。下面是比较完整的例子
mplayer [肥皂].A.Soap.2006.LIMITED.DVDRip.XviD-MESS.avi -sub [肥皂].A.Soap.2006.LIMITED.DVDRip.XviD-MESS.srt -subcp cp936 -font /media/hda1/WINDOWS/Fonts/simsun.ttc
简写
mplayer *.avi -subcp cp936 -font /media/hda1/WINDOWS/Fonts/simsun.ttc
即可。但还avi和字幕要同名。
以下为引用内容:
mplayer 如果希望默认字体就支持中文
1、修改~/.mplayer/config文件中间的项目为:
font=/usr/share/fonts/zh_CN/TrueType/SIMSUN.TTF
subcp=cp936
2、修改`/.mplayer/gui.conf文件中间的项目为:
sub_auto_load = “yes”
sub_unicode = “yes”
sub_pos = “99″
sub_overlap = “no”
sub_cp = “cp936″
font_factor = “0.750000″
font_name = “/usr/share/fonts/zh_CN/TrueType/SIMSUN.TTF”
font_encoding = “unicode”
参考资料:
totem 观看 avi+src 中文字幕方法
guoshuang2007-11-06+把电影和字幕拖进 Kaffeine 窗口,在设置中 subtiltle 选择编码,中文一般是 gb18030。
Popularity: 27% [?]
Tags:
deb,
font,
gnome,
mplayer,
ubuntu,
vi
Posted 9 months, 2 weeks ago at 11:32 am. 0 comments
一般的编译过程如下
#./configure
#make
#make install
缺点有二:
1.没有卸载办法
2.下次(或者其它电脑)安装又需要编译
最后一步换成 checkinstall 可以生成 .deb,rpm等。比如
sudo checkinstall -D –install=no
-D 生成 .deb 文件
–install=no 编译后不要立刻安装
参考 用 checkinstall 替代 make install
可以用make uninstall
也可以用removepkg来卸载
Popularity: 15% [?]
Tags:
deb,
hp,
install
Posted 9 months, 2 weeks ago at 11:32 am. 0 comments
原文来自 Backup installed packages on ubuntu,蛮有趣的,大约内容如下:
所有通过 synaptic(新立得)、apt-get、aptitude(shell 模式的新立得)安装的软件,都会在
/var/cache/apt/archives
留下 .deb 安装包。备份这些文件就可以很方便的重装或者新装ubuntu。另外,作者还介绍了一个图形化的刻盘工具—APTonCD。
APTonCD is a tool with a graphical interface which allows you to create one or more CDs or DVDs (you choose the type of media) with all of the packages you’ve downloaded via APT-GET or APTITUDE, creating a removable repository that you can use on other computers.One thing you need to remember this will create backup all the packages installed using apt-get,synaptic because these package arcives are stored in /var/cache/apt/archives
APTonCD will also allow you to automatically create media with all of your .deb packages located in one especific repository, so that you can install them into your computers without the need for an internet conection.
Popularity: 25% [?]
Tags:
cat,
deb,
install,
ls,
shell,
ubuntu,
vi
Posted 9 months, 2 weeks ago at 11:32 am. 0 comments
Debian Package of the Day 每天介绍一个 deb 小软件。
Popularity: 9% [?]
Tags:
deb
Posted 9 months, 2 weeks ago at 11:32 am. 0 comments
以前在新利得里,安装过一个 moziila-flash的插件,似乎也能运行flash,但功能不全。下面的方法更好一些。
nspluginwrapper is an Open Source compatibility plugin for Netscape 4 (NPAPI) plugins. That is, it enables you to use plugins on platforms they were not built for. For example, you can use the Adobe Flash plugin on Linux/x86_64, NetBSD and FreeBSD platforms.
nspluginwrapper is distributed under the terms of the GNU General Public License (GPL).
download nspluginwrapper
其实在ubuntuforum.org已经有人解决了。原帖在此:http://ubuntuforums.org/showthread.php?t=341727
这里重新提一下,与原帖稍有不同。
通过nspluginwrapper使64位的firefox调用32位的flash player 9以实现flash显示,这是迄今为止最完美的flash解决方案。
废话完毕。
0
代码:
sudo apt-get install ia32-libs ia32-libs-gtk linux32 lib32asound2
或许你可以冒险少装一个。
1 去nspluginwrapper主页下载rpm自己转或者从附件下载alien装好的deb包并安装。
2 去adobe那下载flash player 9。
3 将libflashplayer.so复制到~/.mozilla/plugins/
4代码:
nspluginwrapper -i ~/.mozilla/plugins/libflashplayer.so
5代码:
nspluginwrapper -l
若返回
代码:
/home/’whoami’/.mozilla/plugins/npwrapper.libflashplayer.so
Original plugin: .mozilla/plugins/libflashplayer.so
Wrapper version string: 0.9.91.2
类似信息,则OK。
运行:nspluginwrapper -l
出现:段错误 (core dumped)
不过还是能用了。
via http://forum.ubuntu.org.cn/viewtopic.php?t=42579
相关日志:
%RELATEDPOSTS%
Popularity: 28% [?]
Tags:
amd64,
deb,
feisty,
flash,
hp,
install,
linux,
ubuntu,
vi
Posted 9 months, 2 weeks ago at 11:32 am. 0 comments
可能是因为从 dapper 升级到 edgy 的原因吧。启动后报告“scim launcher 异常关闭”
在 ubuntu.org.cn 找到这篇文章,说是
sudo im-switch -s scim
im-switch 参数
Input Method Switcher 0.3+debian1.10
“im-switch” configures the input method to be automatically switched based
on the locale (ll_CC) using Debian “update-alternatives” mechanism.
When “im-switch” is invoked from root user, it sets system wide alternatives.
Usage: im-switch [-v][-z ll_CC] -s inputmethodname
to set a specific input method for the language
im-switch [-v][-z ll_CC] -c
to set an input method for the language by menu
im-switch [-v][-z ll_CC] -a
to revert to the default input method for the language
im-switch [-v][-z ll_CC] -l
to list current settings and available input methods for
the language, and also all the available languages
im-switch -h
to show this help
The “ll_CC” argument of -z takes the form “_” and
is used to override the current locale (ISO 639 / ISO 3188) : eg “-z ja_JP”
The use of -v option produces verbose outputs.
guoshuang2007-02-08+还是不行。每次启动仍然报告 crash。
Popularity: 10% [?]
Tags:
deb,
ls,
ubuntu
Posted 9 months, 2 weeks ago at 11:32 am. 0 comments
原文来自 Set Up Ubuntu-Server 6.10 As A Firewall/Gateway For Your Small Business Environment
有意思的文章。学习笔记如下:
安装 SSH
apt-get install openssh-server
编辑网卡配置
Edit /etc/network/interfaces and add the following at the bottom:
参考下面
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.1.1
netmask 255.255.255.0
broadcast 192.168.1.255
network 192.168.1.0
重启
/etc/init.d/networking restart
安装库文件
apt-get install libmd5-perl libnet-ssleay-perl libauthen-pam-perl libio-pty-perl shorewall dnsmasq
安装 webmin
wget http://surfnet.dl.sourceforge.net/sourceforge/webadmin/webmin_1.310_all.deb
“surfnet” is the dutch server. Change that to “heanet”(for Ireland), “belnet”(for Belgium), “mesh” (for Germany) and so on.
dpkg -i webmin_1.310_all.deb
安装 shorewall
cp /usr/share/doc/shorewall/examples/two-interfaces/* /etc/shorewall/
cd /etc/shorewall
gunzip interfaces.gz masq.gz rules.gz policy.gz
登陆 webmin 界面管理 shorewall(http://xxx.xxx.xxx.xxx:10000)
Now open your browser and login to webmin at https://192.168.1.1:10000 as root with your root password and, using webmin’s shorewall module, change the policy’s and rules of your firewall as needed (for now, I only set the policy file to the example as shown, you may copy and paste my policy file for starters, if you don’t like webmin).
Also set in /etc/shorewall.conf the line “IP_FORWARDING=Keep” to “IP_FORWARDING=On” (without quotes) and enable the firewall in /etc/default/shorewall.
My /etc/shorewall/policy now looks like this:
###############################################################################
#SOURCE DEST POLICY LOG LEVEL LIMIT:BURST
#
# Note about policies and logging:
# This file contains an explicit policy for every combination of
# zones defined in this sample. This is solely for the purpose of
# providing more specific messages in the logs. This is not
# necessary for correct operation of the firewall, but greatly
# assists in diagnosing problems.
#
#
# Policies for traffic originating from the local LAN (loc)
#
# If you want to force clients to access the Internet via a proxy server
# on your firewall, change the loc to net policy to REJECT info.
loc net ACCEPT
loc $FW ACCEPT
loc all REJECT info
#
# Policies for traffic originating from the firewall ($FW)
#
# If you want open access to the Internet from your firewall, change the
# $FW to net policy to ACCEPT and remove the ‘info’ LOG LEVEL.
# This may be useful if you run a proxy server on the firewall.
$FW net ACCEPT
$FW loc ACCEPT
$FW all REJECT info
#
# Policies for traffic originating from the Internet zone (net)
#
net $FW DROP info
net loc DROP info
net all DROP info
# THE FOLLOWING POLICY MUST BE LAST
all all REJECT info
#LAST LINE — ADD YOUR ENTRIES ABOVE THIS LINE — DO NOT REMOVE
启动防火墙
/etc/init.d/shorewall start
Popularity: 13% [?]
Tags:
deb,
install,
ls,
ubuntu,
vi
Posted 9 months, 2 weeks ago at 11:32 am. 0 comments
Windows 下的 Debian 安装器。goodbye-microsoft.com,与此同时,ubuntu的windows installer 也在开发中,这下安装 linux 就更加容易了…
BTW:The Windows-based uninstaller is now working(ubuntu)





Popularity: 16% [?]
Tags:
deb,
install,
linux,
screen,
ubuntu
Posted 9 months, 2 weeks ago at 11:32 am. 0 comments
以下为引用内容:
新手重新系统的概率很高,至少我是这样,每次重装系统后都要经过漫长的apt-get install来装回那些我们自己所需要的,但系统安装光盘里又没有的软件,实在是件痛苦的事,特别是对于我这种穷得装不起宽带的打工仔:)
终于,经过无数次的试验,找到了解决办法。
每一次install时系统下载的软件包,包括各个软件所依赖的包都会保存在/var/cache/apt/archives/目录下,选定某一次通过网络安装完自己所常用到的所有软件之后,将该文件夹下的所有文件都复制到一个不常格式化的分区里面,作为以后重装系统时的本地源,可谓省时省心省力。
以下为操作过程,为验证,特意重装一次系统,无语。
一、在自己的根目录下建立一个目录,用于放所有下载的软件包,目录名随自己喜欢,建议新手在自己的根目录下进行以下操作,以避免操作权限问题的困扰。
mkdir ~/ packs
二、复制文件到packs文件夹下,目录依各人情况变化。
sudo cp /var/cache/apt/archives/* ~/packs
三、将建立Packages.gz包,里面记录了packs文件夹下面的软件包信息,包括依赖信息。
dpkg-scanpackages packs /dev/null |gzip > packs/Packages.gz
完成此操作后,将packs文件夹复制到一个不常格式化的分区中,作为长久使用,比如我将它放在一个fat32的分区时面,路径是 /media/hda6/linux/soft/packs
四、加本地源
sudo gedit /etc/apt/sources.list
加入 deb file:///media/hda6/linux/soft/packs/ edgy main ,注意,这里只是我电脑上的路径,请依实际位置修改edgy 是我的ubuntu版本,main也不是固定的,也可以用restricted等,只是在下面第五步中的操作中对应建立的目录结构不同而已,这里只举 main的例子。有兴趣的同仁可以加一个试试,系统的出错提示会有文件夹设置信息。
五、设置packs目录下的目录结构
在packs目录下建立这样的结构
packs/dists/edgy/main/binary-i386/
packs/packs/ #也就是在packs下再建立一个packs
以上这两层的目录用于放置不同类型的包,据我电脑上试验过程中的提示,好像binary-386目录下放的是各种软件的安装包, packs/packs/目录下放的是各个依赖的包以及系统更新的包,基本上是以lib开头的,最保险的办法是把所有包都复制到这两个文件夹下面。
六、设置完成
完成以上设置和文件复制之后,就可以开始正常使用本地的源了和使用网络上的源一样操作。
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install XXX
via 使用本地软件包作为安装源,降低重装系统后下载软件的痛苦指数!
哈,二楼的兄弟,这贴子的完成有你的功劳,在另一贴里你有这样一张回贴
-----------------------------------------------
下载DVD版本,然后把它作为源. 有两种方式.
1. 可以直接放在硬盘上,然后mount到某个目录里,比如: sudo mount -t iso9660 -o loop xxx.iso /mnt
然后修改sources.list,改成 deb file:///mnt edgy main …. 后面和你的原来的格式一样.
2. 刻盘.然后在新立得里面用将CD Rom设置为源
呵呵,刚刚试了一下更简单的办法,完第一个目录结构后,把Packages.gz那个包放在binary-i386文件夹下面,然后把所有的deb包复制到/var/cache/apt/archives/下就可以了。
估计apt-get install的工作原理是这样的,先从Packages.gz包里读取软件列表和包依赖信息,安装某个软件时先扫描本地archieves目录,如果可以找到对应的包,就开始安装,否则从源里下载该包。
其实我实现这些操作的思路很简单啊
1、备份手上已有的软件包
2、建立这些软件列表和依赖信息 packages.gz
3、建立目录结构,可随意在本地源地址后加上 main、 restricted之类的关键字,然后apt-get update,系统会给出出错提示,里面就包含了各个关键字对应的目录结构,
4、添加本地源 deb file:/// dir/dir/dir/…
Popularity: 17% [?]
Tags:
deb,
hp,
install,
linux,
ubuntu,
vi
ad 468x60