Top things need to do after installing openSUSE 13.2

1. Install Microsoft Core Fonts (such as Arial, Times New Roman)

sudo zypper install fetchmsttfonts

2. Install Infinality font rendering.
Some people believe OpenSUSE’s default font rendering is good enough, but I perfer the “Infinality font rendering”. The following is how to enable Infinality in OpenSUSE 13.2.

Add the official namtrac:subpixel Infinality repository for openSUSE 13.2 to your system. This is the one maintained by the actual Infinality developer(s):

http://download.opensuse.org/repositories/home:/namtrac:/subpixel/openSUSE_13.2/

  • Switch system packages to the versions in the namtrac:subpixel repository, and mark for installation any other packages in namtrac:subpixel that aren’t yet installed.
  • If you don’t know how to do above step, Check this link: https://en.opensuse.org/SDB:Vendor_change_update#Using_YaST_2
  • Make sure your desktop environment’s font configuration for subpixel hinting is set to “Use system settings” or something similar. Only if that option does not exist, set it to RGB order with slight hinting.
  • (Optional) Set all desktop fonts to your prefer.
  • Log out and log back in to your desktop.

Read more

How to install Dropbox on KDE

Well, some Linux distributions do have a package named “nautilus-dropbox” or similar thing, but if you are going to install this package on KDE, you need install many dependencies such as “nautilus” even “gnome”…

I don’t want these unnecessary packages because I’m using KDE, so I created a simple shell script to install Dropbox on KDE. Here is how to use my script:

1. Download the installation script from the following gist:

https://gist.github.com/feicun/8049204

2. Extract it, open your terminal (preferably as super user), navigate to where you put the script, set execute permission for the script by the following command:

chmod +x dropbox.sh

3. Execute the shell scrip Read more

Top things need to do after installing openSUSE 13.1

1. Install Microsoft Core Fonts (such as Arial, Times New Roman)

sudo zypper install fetchmsttfonts

 

2. Install Infinality font rendering.
Although opensuse 13.1’s release notes said they have a “new font engine in Freetype 2.5”, but the font rendering still much worse than Ubuntu. That’s why we need Infinality font rendering.

  • Add the official namtrac:subpixel Infinality repository for openSUSE 13.1. This is the one maintained by the actual Infinality developer(s):

    http://download.opensuse.org/repositories/home:/namtrac:/subpixel/openSUSE_13.1/

  • Switch system packages to the versions in the namtrac:subpixel repository, and mark for installation any other packages in namtrac:subpixel that aren’t yet installed.
  • If you don’t know how to do above step, Check this link: https://en.opensuse.org/SDB:Vendor_change_update#Using_YaST_2
  • From the main openSUSE official repository, install the fontconfig-infinality
  • Make sure your desktop environment’s font configuration for subpixel hinting is set to “Use system settings” or something similar. Only if that option does not exist, set it to RGB order with slight hinting.
  • (Optional) Set all desktop fonts to your prefer.
  • Log out and log back in to your desktop.

Read more

用 Autotools 生成 Makefile 文件

Autotools 是一个工具集,可以自动生成 Makefile 文件。Ubuntu 如果没有安装 Autotools ,需要执行 sudo apt-get install autoconf automake 进行安装,其他发行版类似。

在体验 Autotools 之前先创建一个简单的 helloworld 程序:

//helloworld.c
#include 
#include 
int main(void)
{
    double sec;
    struct timeval tv;

    gettimeofday(&tv, NULL);
    sec = tv.tv_sec;
    sec += tv.tv_usec/1000000.0;
    printf ("hello word!\nsec = %e\n", sec);
    return 0;
}

接下来是用 Autotools 为一个简单的程序 helloworld.c 生成 Makefile 文件的过程:

1. 用 autoscan 生成 configure.scan 文件:

进入 helloworld.c 所在的文件夹,执行:

autoscan

这样会得到 configure.scan 文件,这个文件可以修改为 configure.in 。而 configure.in 是 Autoconf 必须的东西,里面包含了一些宏的调用,可以测试系统里存在的和可以使用的包。 Read more

ubuntu Tips

都是小问题,但是有些时候真的很扰人,全记在这里,以后不用再Google了。

1. 去除终端(Terminal)里的报警声
作用是去掉在 Terminal 里有时按 Tab 或者删除键会出现的嘟嘟报警声

sudo apt-get install gconf-editor

gconf-editor

然后依次选择apps –> compiz –> general –> allscreens –> options –>audible bell,去掉 audible bell 上的勾。

2. 增加对 rar 格式的支持

sudo apt-get install rar

3. 解决Ubuntu 10.04开机低分辨率问题
网上有一堆介绍,都是一样的方法,google搜“ubuntu 10.04 开机分辨率”就能找到。需要注意的是,有一句代码应该是

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset video=uvesafb:mode_option=1366x768-24, mtrr=3, scroll=ywrap"

注意括号,应该是那种英文半角的直双引号,不是斜双引号。如果双引号弄错,在“sudo update-grub2”的时候就会得到这个错误提示:“splash: not found”