一套专为 Listen(一个音乐播放及管理软件)而制作的 Tango 图标主题,其安装方法详见 README 文件。
2007年5月7日星期一
How To Empty the Ubuntu Gnome Trash from the Command Line
How To Empty the Ubuntu Gnome Trash from the Command Line
Ubuntu has a trash can/recycle bin feature similar to windows. The difference with Ubuntu is that you can empty the trash from the command line.
Here’s the full trash icon, in the lower right hand corner:
Just open a terminal and type in the following command:
rm -rf ~/.Trash/*
Trash has been taken out!
2007年5月6日星期日
How to Create PDF Documents in Ubuntu
转自ubuntu geek
If you are using OpenOffice it is very easy to create documents there is an option in the File menu ‘Export as PDF’.For other applications, you will need to do the following procedure
We need to install cups-pdf this software is designed to produce PDF files in a heterogeneous network by providing a PDF printer on the central fileserver. It is available under the GPL and is packaged for many different distributions or can be built directly out of the source files.
Install cups-pdf
sudo apt-get install cups-pdf
You need to chnage the following file permissions
sudo chmod +s /usr/lib/cups/backend/cups-pdf
Configure CUPS for the PDF printer.
- Select SYSTEM > ADMINISTRATION > PRINTERS > NEW PRINTER
- Select LOCAL PRINTER
- Use detected printer: PDF PRINTER
- Select Print Driver:
- Manufacturer: Generic
- Model: Postscript Color Printer
- Name: postscript-color-printer-rev3b
- Click APPLY
When printing from any application, select the newly created postscript-color-printer-rev3b printer to generate PDF files.
Output files are stored in your home directory under /PDF subirectory.
To change the default location of the PDF output
Edit the /etc/cups/cups-pdf.conf file
gksudo gedit /etc/cups/cups-pdf.conf
look for
Out ${HOME}/PDF
and change to something like below
Out ${HOME}/my_print_to_pdf_folder
and restart
sudo /etc/init.d/cupsys restart
其实有了OOo,这东西真没什么必要!:)
2007年5月4日星期五
how to fix the error fail to load the desktop after rebooting X-window!
还好,firefox可以打开,于是上网搜了一番。gnome下刷新桌面的方法:
Code:killall nautilus
试了一下,显示:
Code:nautilus: no process killed
看来nautilus这个程序是关键。于是直接运行nautilus,桌面图标马上就显示出来了。
接着Ctrl+C,桌面一闪然后就又一切正常了。看来nautilus还智能的。
顺便提一下, gnome下刷新面板的方法:
Code:killall gnome-panel
Pidgin 2.0.0 final
Pidgin——支持多种协议的即时通讯工具,其 2.0.0 正式版目前已可从 SourceForge 上下载得到。然而,现在还不能从 Pidgin 的官方网站上看到相应的发布消息,也许开发者们正在准备吧。只需要一个软件便可同时登录QQ,MSN,Gtalk已不再是梦想!
编译安装:
- 获取 Pidgin 2.0.0 的源代码。我下载的是 pidgin-2.0.0.tar.bz2。
- 准备编译 Pidgin 所需的依赖:
sudo apt-get build-dep gaim tar jxvf pidgin-2.0.0.tar.bz2cd pidgin-2.0.0/./configure --prefix=/usr,建议在执行此步时使用./configure --help查询需要使用的选项,可根据自己的实际情况选择。makesudo make install
经过以上步骤后,Pidgin 就安装到系统中了。在终端中输入 pidgin 即可执行程序。
howto update and install software after delete /var/cache/apt/archives!
several days ago I was too boring to do anything else, so I delete all the files under /var/cache/apt/archives, because it is said all these files are installed software packages, I thought they are useless. Then here comes a big problem, when I type apt-get install * or apt-get update, the terminal will give the hint that could not open lock file /var/cache/apt/archives/lock - open, and unable to lock the download directory,
I do
sudo mkdir /var/cache/apt/archives
sudo mkdir /var/cache/apt/archives/lock
sudo aptitude update
sudo aptitude upgrade
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install *
E:could not open lock file /var/cache/apt/archives/lock - open(21 is a directory)
E:unable to lock the download directory!
sudo mv /var/cache/apt/archives/lock ~/.
sudo apt-get clean
By the way, the best way to delete the downloaded package is:
sudo apt-get clean
how to fix the Error:opening/initializing the selected video_out (-vo)device
you are getting this: Error opening/initializing the selected video_out (-vo)device error when you run mplayer , open terminal and run this command:
code:
gmplayer -vo x11 -ao ossand play your file. REMEMBER this only applies after installing mplayer and codecs.I find many ubuntuers besides me meet this problem,hope this can help you.
Another question is mplayer can't play a movie file by fullcreen, then you should edit ~/.mplayer/config and just add the line:
zoom=yes
2007年5月3日星期四
Ultimate Ubuntu performance tweaking guide
Lets start first with the kernel:
apt-get install build-essential libncurses-dev kernel-package
cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.tar.bz2
This will download the latest sources available, in my case linux-2.6.20.tar.bz2
cd /usr/src
tar -xjf linux-2.6.20.tar.bz2
cd linux-2.6.20
Now lets apply the Con Kolivas patches, these are patches designed to improve system responsiveness with specific emphasis on the desktop, but suitable to any workload.
wget www.kernel.org/pub/linux/kernel/people/ck/patches/2.6/2.6.20/2.6.20-ck1/patch-2.6.20-ck1.bz2
bzcat patch-2.6.20-ck1.bz2 |patch -p1
Copy the current kernel config and configuring the kernel
cp /boot/config-`uname -r` .config
make menuconfig
In “General Setup” activate:
- Support for paging of anonymous memory (swap)
- Support for prefetching swapped memory
In “Processor type and features“:
- Processor family Choose the model of your processor.
- set Preemption Model to Voluntary Kernel Preemption (Desktop)
- High Memory Support
- off - if you have less than 1 GB of RAM
- 1GB Low Memory Support - if you have 1GB of RAM
- 4GB - if you have more than 1GB of RAM
- set Timer frequency to 1000 Hz
In “Kernel hacking” uncheck “Kernel debugging“.
Now exit and save the configuration.
Making the new kernel package:
make-kpkg -initrd –revision=LinuxMonitor1 kernel_image kernel_headers modules_image
Installing the new kernel
cd ..
dpkg -i *.deb
HDParm
sudo gedit /etc/hdparm.conf
at the bottom add:
/dev/hda {
dma = on
io32_support = 1
}
/dev/cdroms/cdrom0 {
dma = on
interrupt_unmask = on
io32_support = 0
}
Concurrent Booting
Concurrent booting allows Ubuntu to take advantage of dual-core processors, as well as processors that hyperthread or multithread
or what ever the different companies call it now.
sudo gedit /etc/init.d/rc
Look through the file and you will find CONCURRENCY=none.
You must change it to: CONCURRENCY=shell
Prelink
Disclaimer: Prelinking might break your system! Only consider for use if you can risk the chance that your install might mess up. Most of all make sure that it gets to run the whole thing through the first time you prelink. Stopping in the middle can lead to system failure. Prelinking is a powerful device and needs to be used with care.
Prelink is no longer necessary in Feisty. Feisty uses a new linking mechanism called DT_GNU_HASH which dramatically speeds up the linking process without the need for continuously running this prelink program. Again, prelink is NOT useful starting from Feisty
How to enable prelink
1. Activate Ubuntu universe sources
2. Put this command into terminal to install Prelink:
sudo apt-get install prelink
3. Now put this command into the terminal:
sudo gedit /etc/default/prelink
4. Change where it says “PRELINKING=unknown” from unknown to “yes”
5. Adjust the other options if you know what the heck you’re doing. If it looks foreign to you, the defaults work well.
6. To start the first prelink (the longest one!), put this in terminal:
sudo /etc/cron.daily/prelink
Automatic Prelinking After Program Are Installed
One problem with prelinking in that when you install new programs those programs are not prelinked. So to avoid this problem when installing programs with apt-get or synaptic, use the directions below.
1. Put this in terminal:
sudo gedit /etc/apt/apt.conf
2. When the file opens in Gedit, put this line at the end of the file and save (even if the file has no content before you add the line):
DPkg::Post-Invoke {”echo Running prelink, please wait…;/etc/cron.daily/prelink”;}
General Notes About Prelinking
In the future, prelink performs a quick prelink (a less-than-1-minute procedure on most systems) daily, usually at midnight. Every 14 days, or whatever you changed it to be, a full prelink will run.
If you just did a major apt-get upgrade that changed systemwide libraries (i.e. libc6, glibc, major gnome/X libs, etc etc etc) and experience cryptic errors about libs, rerun step 6.
To undo prelink, change step 4 from yes to no, then rerun step 6.
Prelinking will make the binaries it prelinks change, so it’s not appropriate if you have tripwire or another checksum-based IDS system, or if you do incremental or differential backups to save on space.
Services
*Note you might not have all these services on your box.
To enable/disable services go to System -> Administration -> Services
1. acpi-support - leave it on.
2. acpid - The acpi daemon. These two are for power management, quite important for laptop and desktop computers, so leave them on.
3. alsa - If you use alsa sound subsystem, yes leave it on. But if you have the service below, its safe to be off. The default is off when alsa-utils is on.
4. alsa-utils - On my system, this service supercedes the alsa, so I turn off the alsa and turn this on at S level.
5. anacron - A cron subsystem that executes any cron jobs not being executed when the time is on. Most likely you’ve probably turned your computer off when a certain cron job time is ready. For example, updatedb is scheduled at 2am everyday, but at that moment, you computer is off, then if anacron service is on, it will try to catch up that updatedb cron.
6. apmd - If you computer is not that old which can’t even support acpi, then you may try to turn this off.
7. atd - like cron, a job scheduler. I turned it off.
8. binfmt-support - Kernel supports other format of binary files. I left it on.
9. bluez-utiles - I turned it off. I don’t have any bluetooth devices.
10. bootlogd - Leave it on.
11. cron - Leave it on.
12. cupsys - subsystem to manager your printer. I don’t have one so I turned it off, but if you do, just leave it on.
13. dbus - Message bus system. Very important, leave it on.
14. dns-clean - Mainly for cleaning up the dns info when using dial-up connection. I don’t use dial up, so I turn it off.
15. evms - Enterprise Volumn Management system. I turned it off.
16. fetchmail - A mail receving daemon. I turned it off.
17. gdm - The gnome desktop manager. I turned it off anyway since I get use to boot to console first. This is up to you if you want to boot directly to GUI.
18. gdomap - You can turn it off.
19. gpm - Mouse support for console. If you feel you’d better have a mouse on console, go turn it on.
20. halt - Don’t change it.
21. hdparm - tuning harddisk script, should be on.
22. hibernate - If your system support hibernate, leave it on. Otherwise, its useless for you.
23. hotkey-setup - This daemon setup some hotkey mappings for Laptop. Manufacturers supported are: HP, Acer, ASUS, Sony, Dell, and IBM. If you have a laptop in those brands, you can leave it on, otherwise, this might not have any benefits for you.
24. hotplug and hotplug-net - activating hotplug subsystems takes time. I’d consider to turn them off.
25. hplip - HP printing and Image subsystem. I turned it off.
26. ifrename - network interface rename script. Sounds pretty neat but I turned it off. Mainly for managing multiple network interfaces names. Since I have a wireless card and an ethernet card, they all assigned eth0 and ath0 from kernel, so its not really useful for me.
27. ifupdown and ifupdown-clean - Leave it on. They are network interfaces activation scripts for the boot time.
28. inetd or inetd.real - take a look your /etc/inetd.conf file and comment out any services that you don’t need.
29. klogd - Leave it on.
30. laptop-mode - A service to tweak the battery utilization when using laptops. You can leave it on.
31. linux-restricted-modules-common - You need to see if you really have any restricted modules loaded on your system. I’d leave it on.
32. lvm - I don’t use it so I turned it off. Leave it on if you *DO* have lvm.
33. makedev - Leave it on.
34. mdamd - Raid management tool. I don’t use it so I turned it off.
35. mdamd-raid - Raid tool. If you don’t have Raid devices, turn it off.
36. module-init-tools - Load extra modules from /etc/modules file. You can investigate your /etc/modules file and see if there is any modules that you don’t need. Normally, this is turned on.
37. mountvirtfs - mount virtual filesystems. Leave it on.
38. networking - bring up network interfaces and config dns info during boot time by scaning /etc/network/interfaces file. Leave it on.
39. ntpdate - Sync time with the ubuntu time server. Leave it on if you want.
40. nvidia-kernel - I compiled the nvidia driver by myself, so its useless for me now. If you use the ubuntu nvidia driver from the restrict modules, just leave it on. 41. pcmcia - pcmcia device - useless if you are using desktop which doesn’t have pcmcia card. So in that case, turn it off please.
42. portmap - daemon for managing services like nis, nfs, etc. If your laptop or desktop is a pure client, then turn it off.
43. powernowd - client to manage cpufreq. Mainly for laptops that support CPU speed stepping technology. Normally, you should leave it on if you are configuring a laptop, but for desktop, it might be useless.
44. ppp and ppp-dns - Useless to me. I don’t have dial-up.
45. readahead - It seems readahead is a kind of “preloader”. It loads at startup some libs on memory, so that some programs will start faster. But it increases startup time for about 3-4 seconds. So, you can keep it… or not. I tested and I just didn’t feel difference loading programs. So I decided to turn it off. If you have a reason to keep it on, please do so.
46. reboot - Don’t change it.
47. resolvconf - Automatically configuring DNS info according to your network status. I left it on.
48. rmnologin - Remove nologin if it finds it. It wouldn’t happen on my laptop, so I got rid of it.
49. rsync - rsync daemon. I don’t use it on my laptop, so turned it off.
50. sendsigs - send signals during reboot or shutdown. Leave it as it is.
51. single - Active single user mode. Leave it as it is.
52. ssh - ssh daemon. I need this so I turned it on.
53. stop-bootlogd - stop bootlogd from 2,3,4,5 runlevel. Leave it as it is.
54. sudo - check sudo stauts. I don’t see any good to run it everytime on a laptop or desktop client, so I turned it off.
55. sysklogd - Leave it as it is.
56. udev and udev-mab - Userspace dev filesystem. Good stuff, I left them on.
57. umountfs - Leave it as it is.
58. urandom - Random number generator. Might not useful but I left it on.
59. usplash - Well, if you really want to see the nice boot up screen, leave it as it is.
60. vbesave - video card BIOS configuration tool. Its able to save your video card status. I left it on.
61. xorg-common - setup X server ICE socket. Leave it as it is.
62. adjtimex - This is a kernel hw clock time adjusting too. Normally, you shouldn’t see this on your boot up list. In very rare case if you do see its on your boot up process, then there might be a reason why it is on, so better leave it that way. In my case, it is off.
63. dirmngr - A certification lists management tool. Work with gnupg. You will have to see if you need it or not. In my case, I turned it off.
64. hwtools - A tool to optimize irqs. Not sure what’s the benefits of turning it on. In my case, I turned it off.
65. libpam-devperm - A daemon to fix device files permissions after a system crash. Sounds pretty good, so I left it on.
66. lm-sensors - If you matherboard has builtin some sensor chips, it might be helpful to see hw status via userspace. I ran it and it said “No sensors found”, so I turned it off.
67. screen-cleanup - A script to cleanup the boot up screen. Well, turn on or off is up to you. In my case, I left it on.
68. xinetd - A inetd super daemon to manage other damons. In my system, the xinetd is managing chargen, daytime, echo and time (find them from /etc/xinetd.d dir), I care none of them, so I turned it off. If you do have some important services configured under xinetd, then leave it on.
linux学习笔记(6)开机流程简介
开机流程简介
1、載入 BIOS 的硬體資訊,並取得第一個開機裝置的代號;
2、讀取第一個開機裝置的 MBR 的 boot Loader (亦即是 lilo, grub, spfdisk 等等) 的開機資訊;
3、載入 Kernel 作業系統核心資訊, Kernel 開始解壓縮,並且嘗試驅動所有硬體裝置;
4、Kernel 執行 init 程式並取得 run-level 資訊;
5、init 執行 /etc/rc.d/rc.sysinit 檔案;
6、啟動核心的外掛模組 (/etc/modprobe.conf);
7、init 執行 run-level 的各個批次檔( Scripts );
8、init 執行 /etc/rc.d/rc.local 檔案;
9、執行 /bin/login 程式,並等待使用者登入;
10、登入之後開始以 Shell 控管主機。
在/etc/rc.d/rc3.d內,以S开头的为开机启动,以K开头的为关闭,接着的数字代表执行顺序
GRUB vga设定
彩度\解析度 640x480 800x600 1024x768 1280x1024 bit
256 769 771 773 775 8 bit
32768 784 787 790 793 15 bit
65536 785 788 791 794 16 bit
16.8M 786 789 792 795 32 bit
./configure 检查系统信息 ./configure --help | more 帮助信息
make clean 清除之前留下的文件
make 编译
make install 安装
rpm -q ----->查询是否安装 rpm -ql ------>查询该套件所有的目录
rpm -qi ----->查询套件的说明资料 rpm -qc[d] ----->设定档与说明档
rpm -ivh ---->安装 rpm -V -------->查看套件有否更动过
rpm -e ------>删除 rpm -Uvh ------->升级安装
--nodeps ----->强行安装 --test ----->测试安装
转http://blog.chinaunix.net/u/30619/showart.php?id=249558
