Linux Mint Lisa LXDE 恢复桌面默认右键菜单 

刚接触LXDE界面,感觉很清新。这种简洁、朴素的UI很是让我喜欢。

由于LXDE默认使用的openbox 窗口管理器,一次在设置桌面喜好的时候,不知道勾选了什么。导致桌面上的右键菜单变成了openbox的右键菜单了。

很是不习惯。特别是需要在桌面上建立个空白文档什么的。

在PCManFM(LXDE 默认的文件管理器)里是正常的。

通过仔细的查找,终于在“桌面偏好设置”里面找到了该选项。

或者在终端里运行:“pcmanfm --desktop-pref” 即可。

对比图见下:
使用openbox菜单:


使用系统默认菜单:


怎么样?是不是恢复了? :)

注:本文在撰写时,参考了以下文章:
http://forums.linuxmint.com/viewtopic.p ... mp;t=98427
[ ] ( 1797 次浏览 ) 永久链接 ( 3 / 2258 )
解决GNU/Linux 下 adobe flash player 乱码 

前两天刚安装好Linux Mint Lisa LXDE,今天打算去acfun.tv 看一些搞笑视频,结果发现一个很杯具的问题,那就是我浏览器的flash player 里面的中文字体全部变成方块了~

这个问题,我记得我以前解决过一次,那是我还在用Ubuntu的时候,看CNZZ 后台flash报表遇到的。

由于年代久远,实在是记不起来了,好像是字体的问题。

于是,果断谷歌。

网络上给出的答案基本就是删除位于 /etc/fonts/conf.d/ 下的 49-sansserif.conf 软链接文件。


sharl@sharl-laptop /etc/fonts/conf.d $ ls -lah | grep 49
lrwxrwxrwx 1 root root 31 2012-03-28 21:45 49-sansserif.conf -> ../conf.avail/49-sansserif.conf


可是,很遗憾的是,没鸟用。我试了。

真是坑爹阿,无奈只好再次搜索下~ 最后在launchpad 找到了关于这个问题的bug提交。

参见:https://bugs.launchpad.net/ubuntu/+source/flashplugin-nonfree/+bug/207198

我察,adobe f*ck you~

launchpad 里面给出了一些比较有用的解决方案,应该说是比较靠谱的~

即:
编辑zh-cn 对应的字体映射配置文件,69-language-selector-zh-cn.conf

sharl@sharl-laptop /etc/fonts/conf.d $ ls -lah | grep cn
lrwxrwxrwx 1 root root 53 2012-03-22 22:15 69-language-selector-zh-cn.conf -> /etc/fonts/conf.avail/69-language-selector-zh-cn.conf


把文泉驿的中文字体的优先级放到该列表的最上方,压过其他坑爹的字体。
修改后如下:

sharl@sharl-laptop /etc/fonts/conf.d $ cat 69-language-selector-zh-cn.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

<match target="pattern">
<test qual="any" name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>WenQuanYi Micro Hei</string>
<string>WenQuanYi Micro Hei Mono</string>
<string>DejaVu Serif</string>
<string>Bitstream Vera Serif</string>
<string>HYSong</string>
<string>AR PL UMing CN</string>
<string>AR PL UMing HK</string>
<string>AR PL ShanHeiSun Uni</string>
<string>AR PL New Sung</string>
<string>AR PL UKai CN</string>
<string>AR PL ZenKai Uni</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>WenQuanYi Micro Hei</string>
<string>WenQuanYi Micro Hei Mono</string>
<string>DejaVu Sans</string>
<string>Bitstream Vera Sans</string>
<string>Droid Sans Fallback</string>
<string>HYSong</string>
<string>AR PL UMing CN</string>
<string>AR PL UMing HK</string>
<string>AR PL ShanHeiSun Uni</string>
<string>AR PL New Sung</string>
<string>AR PL UKai CN</string>
<string>AR PL ZenKai Uni</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>WenQuanYi Micro Hei</string>
<string>WenQuanYi Micro Hei Mono</string>
<string>DejaVu Sans Mono</string>
<string>Bitstream Vera Sans Mono</string>
<string>Droid Sans Fallback</string>
<string>HYSong</string>
<string>AR PL UMing CN</string>
<string>AR PL UMing HK</string>
<string>AR PL ShanHeiSun Uni</string>
<string>AR PL New Sung</string>
<string>AR PL UKai CN</string>
<string>AR PL ZenKai Uni</string>
</edit>
</match>

</fontconfig>


保存之后,再重启浏览器,flash player 果然不乱码了~

查看下字体:

sharl@sharl-laptop /etc/fonts/conf.d $ fc-match -a | grep Wen
wqy-microhei.ttc: "WenQuanYi Micro Hei" "Regular"
wqy-microhei.ttc: "WenQuanYi Micro Hei Mono" "Regular"

应该是正常了。

最后我想说两点:
1.Adobe Flash Player 真烂~
2.国内不负责任的转载伤不起

注:本文在撰写的时候参考了一下文章:
http://forum.ubuntu.org.cn/viewtopic.ph ... 5#p1865165
[ ] ( 2232 次浏览 ) 永久链接 ( 3.1 / 2685 )
升级安装 php 5.4.0 和 nginx 1.1.17 

阳光明媚的下午,闲来无事。正好想起上周nginx 发布了一个修复内存泄漏的漏洞,再加上php 的5.4正好也正式发布了。于是,便打算升级跟进。

下载源码:
16 wget http://cn2.php.net/distributions/php-5.4.0.tar.bz2
17 wget http://nginx.org/download/nginx-1.1.17.tar.gz

删除久档:
[root@PowerPC pub]# rm php*
rm:是否删除 一般文件 “php-5.4.0RC4.tar.bz2”? y
rm:是否删除 一般文件 “php-5.4.0.tar.bz2”? n
rm:是否删除 一般文件 “phpinfo.php”? n
[root@PowerPC pub]# rm nginx*
rm:是否删除 一般文件 “nginx-1.1.11.tar.gz”? y
rm:是否删除 一般文件 “nginx-1.1.17.tar.gz”? n

停掉服务器,删除旧版本程序文件,顺便备份下配置文件。

先是php,解压源码包,进入目录:
我的configure:
[root@PowerPC php-5.4.0]# ./configure \
> --prefix=/usr/local/php \
> --exec-prefix=/usr/local \
> --sysconfdir=/etc/sysconfig/php \
> --localstatedir=/var \
> --disable-cli \
> --enable-embed=shared \
> --enable-fpm \
> --with-fpm-user=http \
> --with-fpm-group=web \
> --with-config-file-path=/etc/sysconfig/php \
> --with-config-file-scan-dir=/etc/sysconfig/php \
> --enable-sigchild \
> --disable-ipv6 \
> --with-pcre-regex \
> --with-zlib \
> --with-bz2 \
> --enable-calendar \
> --with-curl \
> --enable-dba=shared \
> --enable-exif \
> --enable-ftp \
> --with-gd \
> --with-mhash \
> --enable-intl \
> --enable-mbstring \
> --with-mcrypt \
> --with-mysql=/usr/local/mysql \
> --with-mysql-sock=/tmp/mysql.sock \
> --with-mysqli=/usr/local/bin/mysql_config \
> --disable-pdo \
> --with-libedit \
> --enable-soap \
> --enable-sockets \
> --enable-wddx \
> --with-xmlrpc \
> --with-xsl \
> --enable-zip \
> --without-pear

检查依赖,无问题。make 编译。时间较长,差点死机~
Linux mint 真是不给力阿~

完成后,make install 安装。
紧接着,恢复配置文件。

查看版本号:
[root@PowerPC php-5.4.0]# php-fpm -v
PHP 5.4.0 (fpm-fcgi) (built: Mar 24 2012 17:40:55)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

然后是nginx,解压,进入目录:
我的configure:
[root@PowerPC nginx-1.1.17]# ./configure \
> --prefix=/usr/local/nginx \
> --sbin-path=/usr/local/sbin/nginx \
> --conf-path=/etc/sysconfig/nginx/nginx.conf \
> --error-log-path=/var/log/nginx/error.log \
> --pid-path=/var/run/nginx.pid \
> --lock-path=/var/run/nginx.lock \
> --user=http \
> --group=web \
> --with-select_module \
> --with-poll_module \
> --with-http_image_filter_module \
> --with-http_dav_module \
> --with-http_flv_module \
> --with-http_mp4_module \
> --with-http_gzip_static_module \
> --without-http_geo_module \
> --without-http_rewrite_module \
> --without-http_proxy_module \
> --without-http_fastcgi_module \
> --without-http_uwsgi_module \
> --without-http_scgi_module \
> --http-log-path=/var/log/nginx/access.log \
> --http-client-body-temp-path=/tmp/nginx/request \
> --without-mail_pop3_module \
> --without-mail_imap_module \
> --without-mail_smtp_module \
> --with-pcre

检查依赖,通过。给出编译概况:
Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ md5: using system crypto library
+ sha1: using system crypto library
+ using system zlib library

nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/sbin/nginx"
nginx configuration prefix: "/etc/sysconfig/nginx"
nginx configuration file: "/etc/sysconfig/nginx/nginx.conf"
nginx pid file: "/var/run/nginx.pid"
nginx error log file: "/var/log/nginx/error.log"
nginx http access log file: "/var/log/nginx/access.log"
nginx http client request body temporary files: "/tmp/nginx/request"

确认无误,开始编译安装。
make && make install

最后恢复下配置文件,OK了。

查看版本号:
[root@PowerPC nginx-1.1.17]# nginx -v
nginx version: nginx/1.1.17

恩,看起来,一切都很顺利。

重新启动服务,网站正常。至此,升级成功。
[ ] ( 3266 次浏览 ) 永久链接 ( 3 / 2450 )
Ubuntu下修改VirtulBox 介质的BIOS信息 

我一直坚持使用GNU/Linux系统,不过偶尔也需要用到一些windows-only 的软件,如QQ.所以我有一台基于VBOX的虚拟Windows XP SP2 HP OEM系统。

不过,今天登陆进去后发现被自动注销了,因为我的30天的免费试用已经到期了。怎么办?

正版序列号,我自然是没有。由于是OEM版,只能改虚拟系统的BIOS里的厂商信息了。

因为虚拟机一切都是虚拟的,主板也不例外。

这里就得使用vbox自带的编辑器VBoxManage了。

光盘系统是HP 的 OEM版,所以只要把主板制造商改成“Hewlett-Packard”即可。

动手:


54 VBoxManage setextradata "XP" "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVendor" "Hewlett-Packard"
55 VBoxManage setextradata "XP" "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor" "Hewlett-Packard"


两步,即可。

再次启动虚拟系统,果然被识别成为正版了。
[ ] ( 4870 次浏览 ) 永久链接 ( 3.1 / 2448 )
升级安装 Lighttpd 1.4.30 和 MySQL 5.6.4 

前段时间,Lighttpd 发布了最新的1.4.30版本,修复早些时候的http_auth_mod 的漏洞,虽然对我影响不大,不过还是决定升级了~
之后,MySQL团队也发布了5.6.x 分支的第七个里程碑版本,考虑到我之前编译的5.6.3由于启用了全部的storage engine,导致服务开启后,内存占用过大,故而也打算果断升级。

正好看到PHP和nginx 也发布了新版本,于是便捎带升级一下。

下载对应的源码包:

28 wget http://nginx.org/download/nginx-1.1.11.tar.gz
29 wget http://download.lighttpd.net/lighttpd/r ... 30.tar.bz2
30 wget http://mirrors.dedipower.com/www.mysql. ... -m7.tar.gz
40 wget http://downloads.php.net/stas/php-5.4.0RC4.tar.bz2


别忘了删除旧的版本文件:
[root@PowerPC pub]# rm nginx*
rm:是否删除 一般文件 “nginx-1.1.10.tar.gz”? y
rm:是否删除 一般文件 “nginx-1.1.11.tar.gz”? n
[root@PowerPC pub]# rm lighttp*
rm:是否删除 一般文件 “lighttpd-1.4.29.tar.bz2”? y
rm:是否删除 一般文件 “lighttpd-1.4.30.tar.bz2”? n
[root@PowerPC pub]# rm mysql*
rm:是否删除 一般文件 “mysql-5.6.3-m6.tar.gz”? y
rm:是否删除 一般文件 “mysql-5.6.4-m7.tar.gz”? n
[root@PowerPC pub]# rm php*
rm:是否删除 一般文件 “php-5.4.0beta2.tar.bz2”? y
rm:是否删除 一般文件 “php-5.4.0RC4.tar.bz2”? n
rm:是否删除 一般文件 “phpinfo.php”? n

首先MySQL,解压,进入目录:
我的cmake的configure:
[root@PowerPC mysql-5.6.4-m7]# cmake . \
> -DCMAKE_BUILD_TYPE:STRING=Release \
> -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/mysql \
> -DCMAKE_USE_RELATIVE_PATHS:BOOL=ON \
> -DCOMMUNITY_BUILD:BOOL=ON \
> -DDISABLE_SHARED:BOOL=OFF \
> -DENABLED_PROFILING:BOOL=ON \
> -DENABLE_DOWNLOADS:BOOL=OFF \
> -DINNODB_COMPILER_HINTS:BOOL=OFF \
> -DINSTALL_BINDIR:STRING=../bin \
> -DINSTALL_DOCDIR:STRING=docs \
> -DINSTALL_DOCREADMEDIR:STRING=docs \
> -DINSTALL_INCLUDEDIR:STRING=include \
> -DINSTALL_INFODIR:STRING=docs \
> -DINSTALL_LAYOUT:STRING=STANDALONE \
> -DINSTALL_LIBDIR:STRING=lib \
> -DINSTALL_MANDIR:STRING=man \
> -DINSTALL_MYSQLDATADIR:STRING=data \
> -DINSTALL_MYSQLSHAREDIR:STRING=share \
> -DINSTALL_MYSQLTESTDIR:STRING=mysql-test \
> -DINSTALL_PLUGINDIR:STRING=lib/plugin \
> -DINSTALL_PLUGINTESTDIR:STRING=lib/plugin \
> -DINSTALL_SBINDIR:STRING=../sbin \
> -DINSTALL_SCRIPTDIR:STRING=scripts \
> -DINSTALL_SHAREDIR:STRING=share \
> -DINSTALL_SQLBENCHDIR:STRING=bench \
> -DINSTALL_SUPPORTFILESDIR:STRING=support-files \
> -DMANUFACTURER:STRING='Built from Source by Sharl' \
> -DMYSQL_DATADIR:PATH=/var/mysql \
> -DMYSQL_MAINTAINER_MODE:BOOL=OFF \
> -DOPTIMIZER_TRACE:BOOL=ON \
> -DSYSCONFDIR:PATH=/etc/sysconfig/mysql \
> -DWITHOUT_SERVER:BOOL=OFF \
> -DWITH_ARCHIVE_STORAGE_ENGINE:BOOL=OFF \
> -DWITH_BLACKHOLE_STORAGE_ENGINE:BOOL=OFF \
> -DWITH_DEBUG:BOOL=OFF \
> -DWITH_EMBEDDED_SERVER:BOOL=OFF \
> -DWITH_EXTRA_CHARSETS:STRING=all \
> -DWITH_FEDERATED_STORAGE_ENGINE:BOOL=OFF \
> -DWITH_INNOBASE_STORAGE_ENGINE:BOOL=ON \
> -DWITH_LIBEDIT:BOOL=ON \
> -DWITH_LIBWRAP:BOOL=ON \
> -DWITH_PARTITION_STORAGE_ENGINE:BOOL=OFF \
> -DWITH_PERFSCHEMA_STORAGE_ENGINE:BOOL=OFF \
> -DWITH_READLINE:BOOL=OFF \
> -DWITH_SSL:STRING=no \
> -DWITH_UNIT_TESTS:BOOL=OFF \
> -DWITH_ZLIB:STRING=bundled

检查依赖,没有问题。运行 make 开始编译,之后make install 安装。

完了之后,由于我删除了之前所有的数据库文件,首先运行 scripts 目录下的mysql_install_db 初始化数据库。

初始化好了后,由于MySQL 5.6.x 默认使用InnoDB 作为默认数据引擎。编辑my.cnf 配置文件,加入"ignore-builtin-innodb" 以禁用掉innodb 数据引擎.
再加上
"default-storage-engine=MyISAM" 和 "default_tmp_storage_engine=MyISAM" 把默认存储引擎改成MyISAM.

保存。这样的话就可以启动mysqld 了。内存占用也还可以接受,InnoDB 伤不起~

紧接着,运行mysql_secure_installation 设置root密码,删除测试表,刷新权限表等等~

再然后就可以导入之前备份的数据库SQL文件了。

登陆mysql终端,查看数据库列表:

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| bbpress |
| lighttpd |
| mysql |
| performance_schema |
| phpbb |
| typecho |
| vsftpd |
+--------------------+
8 rows in set (0.01 sec)


一切OK.

查看引擎列表:

mysql> mysql> show engines;
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| CSV | YES | CSV storage engine | NO | NO | NO |
| InnoDB | YES | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |(忽略后,应该不显示)
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| MyISAM | DEFAULT | MyISAM storage engine | NO | NO | NO |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
5 rows in set (0.00 sec)


之后再对对应的库、表重新授权下,就完了。
注:以上操作参考了一下文档
http://dev.mysql.com/doc/refman/5.6/en/ ... tin-innodb
http://dev.mysql.com/doc/refman/5.6/en/ ... gines.html

接下来是PHP,解压,进入目录
我的configure:
[root@PowerPC php-5.4.0RC4]# ./configure \
> --prefix=/usr/local/php \
> --exec-prefix=/usr/local \
> --sysconfdir=/etc/sysconfig/php \
> --localstatedir=/var \
> --disable-cli \
> --enable-fpm \
> --with-fpm-user=http \
> --with-fpm-group=web \
> --with-config-file-path=/etc/sysconfig/php/php.ini \
> --with-config-file-scan-dir=/etc/sysconfig/php \
> --enable-sigchild \
> --disable-ipv6 \
> --with-zlib \
> --with-bz2 \
> --enable-calendar \
> --with-curl \
> --enable-dba=shared \
> --enable-exif \
> --enable-ftp \
> --with-gd \
> --enable-gd-native-ttf \
> --with-mhash \
> --enable-mbstring \
> --with-mcrypt \
> --with-mysql=/usr/local/mysql \
> --with-mysql-sock=/tmp/mysql.sock \
> --with-mysqli=/usr/local/mysql/bin/mysql_config \
> --disable-pdo \
> --with-libedit \
> --enable-soap \
> --enable-sockets \
> --enable-wddx \
> --with-xmlrpc \
> --enable-zip \
> --without-pear

检查依赖,无问题。然后 make && make install 编译安装。
恢复下备份好的配置文件php.ini 和 php-fpm.conf 即可。

然后就是nginx,解压,进入目录
[root@PowerPC nginx-1.1.11]# ./configure \
> --prefix=/usr/local/nginx \
> --sbin-path=/usr/local/sbin/nginx \
> --conf-path=/etc/sysconfig/nginx/nginx.conf \
> --error-log-path=/var/log/nginx/error.log \
> --pid-path=/var/run/nginx.pid \
> --lock-path=/var/run/nginx.lock \
> --user=http \
> --group=web \
> --with-select_module \
> --with-poll_module \
> --with-http_image_filter_module \
> --with-http_dav_module \
> --with-http_flv_module \
> --with-http_mp4_module \
> --with-http_gzip_static_module \
> --without-http_fastcgi_module \
> --without-http_uwsgi_module \
> --without-http_scgi_module \
> --http-log-path=/var/log/nginx/access.log \
> --http-client-body-temp-path=/tmp/nginx/request \
> --http-proxy-temp-path=/tmp/nginx/proxy \
> --without-mail_pop3_module \
> --without-mail_imap_module \
> --without-mail_smtp_module \
> --with-pcre

检查依赖,一切顺利。编译工具给出了配置概况如下:

Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ md5: using system crypto library
+ sha1: using system crypto library
+ using system zlib library

nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/sbin/nginx"
nginx configuration prefix: "/etc/sysconfig/nginx"
nginx configuration file: "/etc/sysconfig/nginx/nginx.conf"
nginx pid file: "/var/run/nginx.pid"
nginx error log file: "/var/log/nginx/error.log"
nginx http access log file: "/var/log/nginx/access.log"
nginx http client request body temporary files: "/tmp/nginx/request"
nginx http proxy temporary files: "/tmp/nginx/proxy"


确认正确后,开始编译安装.make && make install.
好了后,也是恢复下配置文件,为了保险,最好再测试下配置文件。

最后是lighttpd,解压,进入目录
我的configure:
[root@PowerPC lighttpd-1.4.30]# ./configure \
> --prefix=/usr/local/lighttpd \
> --exec-prefix=/usr/local \
> --sysconfdir=/etc/sysconfig/lighttpd \
> --localstatedir=/var \
> --disable-lfs \
> --disable-ipv6 \
> --with-mysql=/usr/local/mysql/bin/mysql_config \
> --with-attr \
> --with-pcre \
> --with-zlib \
> --with-bzip2

检查依赖,完全满足。同样,编译工具也给出了配置概况如下:

Plugins:

enabled:
mod_access
mod_accesslog
mod_alias
mod_auth
mod_cgi
mod_compress
mod_dirlisting
mod_evhost
mod_expire
mod_extforward
mod_fastcgi
mod_flv_streaming
mod_indexfile
mod_mysql_vhost
mod_proxy
mod_redirect
mod_rewrite
mod_rrdtool
mod_scgi
mod_secdownload
mod_setenv
mod_simple_vhost
mod_ssi
mod_staticfile
mod_status
mod_trigger_b4_dl
mod_userdir
mod_usertrack
mod_webdav
disabled:
mod_cml
mod_magnet

Features:

enabled:
auth-crypt
compress-bzip2
compress-deflate
compress-gzip
regex-conditionals
disabled:
auth-ldap
large-files
network-ipv6
network-openssl
stat-cache-fam
storage-gdbm
storage-memcache
webdav-locks
webdav-properties


确认OK后,编译、安装. make && make install.
还有,恢复下之前的配置文件。再测试下,没问题。

所有一切完成后,就可以重新启动所有的服务了。至此服务器升级到此完成。
还有一点要注意的是,一旦MySQL重新安装后,基于MySQL验证的pam_mysql 模块必须重新编译一次。
[ ] ( 2084 次浏览 ) 永久链接 ( 3.1 / 2568 )

<< <上一页 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 下一页> >>