[On GNU / Emacs articles of Linux combat Notes] Author: Ye Weibin MSN: fritz_yea@hotmail.comCopyright (C) Free Software Library, Org (http://yea.xiloo.com) in accordance with article GNU Free Document Lience released, anyone You can copy the original copy, reprint this article, but please keep this statement. The author is not responsible for any result caused by this article.
5. General Software under Linux --Emacs has the above foundation, you can use Linux console. However, light is relying on these, you can't edit and modify files, you cannot archive and compress (unzip) files, and you cannot enjoy audio and video entertainment and multimedia. Under the console, we can do a lot of things, including listening to music. Let's take a look at the most powerful application under the console --emacsemacs is a powerful text editing environment under Linux, saying that it is a simple text editor too little to see it. Don't be scared, Emacs can edit files, browse the Internet, access FTP, send and receive emails, use console commands, compile and debug programs, and more. It can simply act as an operating system! However, it is precisely because it has so many features that make people who want to learn to use it must pass a painful course. Emacs is really complicated. Let us come to see the true face of the following Emacs. $ EMACS NewText.txt / * Start Emacs, use it to create a new file newtext.txt * / If you are Emacs in the console, you can ignore the top-line menu bar. It is useless under the console. This is completely different from EDIT under MS-DOS. I am not used to the menu that Alt-f calls when I start. But this does not mean that Emacs has no menu. it has. You press F10 to see (or ESC-`). That is its menu. You can use it according to its prompt. Exit the menu with Ctrl-g or press the ESC (this is a general method of exiting all EMACS commands). We have created a file, you can now enter the text directly. This is not different from the ordinary text editor. The method of saving the file is "ctrl-x ctrl-s"; file saves as "Ctrl-x Ctrl-W"; open new files "CRTL-X Ctrl-f"; exit EMACS is "Ctrl-x Ctrl-C ". Or the old saying - I'm exiting, there is not terrible. There are many commands that use a combination key in Emacs. This is also the complexity of Emacs, and there are too many commands that need back. Can't remember, you can use its menu. In X you can use the mouse and its menu bar (useful when the menu bar is available). Emacs is supported by multi-text multi-window. So you can open multiple files and then switch in different "Windows". - Note that in Emacs uses buffer (buffer) to represent the window in our usual concept, you will be a memory area. We use the menu to see existing buffer: esc-`b See existing Buffer? You can use prompting your button to switch to that buffer. (Buffer list has a shortcut: ctrl-x ctrl-b) Buffer can be turned off, then it can be turned off. When we are suspected of buffer, or when we need some Buffers, we can turn that buffer. The menu is called, select File (CURRENT BUFFER) sequentially. Or you can also press the order button: Esc-`f c I said, Emacs is an integrated editing environment, which can run the shell, this is its great place, and the top of the world loves it. Let us try. Alt-x shell Emacs will open a new buffer, and your console prompt is in front of you. Also don't try the various commands in front. However, I have to remember the exit exit (Ctrl-D here). As for the game, I tell you where it is - Tools-> Game.
Slowly study slowly, but there is a five daughter chess and checkers. Emacs comes with a very detailed help system. When you need help, press CTRL-H t to call up the help tutorial. Inside the detailed introduction, how to use Emacs, is the official manual of Emacs. Unfortunately, it is in English, and it is difficult for our people who are in English. Emacs is here, for its clearer use, please refer to the tutorial in IBM DeveloperWorks / Linux: "Life in Emacs" can not contact me, I will give you a copy. Experiment: Use Emacs to modify your / etc / fstab and /etc/lilo.conf file.
Sixth, Emacs Advanced Application Introduced Emacs, and some basic UNIX commands. Below we will start touching a scripting language Bash (Bourne Again Shell). Bash is very much like a batch language under DOS, but is much better than batch. Master Bash, you have more capital of UNIX; BASH powerful features, it is enough to let you drive wild Linux. This unit learning requirement: You should at least understand the concept of basic computer programming, knowing the basic terms of programming languages such as variables, constants, cycles, and conditional judgments. This is not that I am in the piano, and I don't have to waste your precious time. Today we have to "not leave home" in the Emacs environment, and you can listen to wonderful music.
Advanced in advance - how to install software. For those who have just contacted Linux, their headache is the most pile of commands and parameters, but there is no software you are familiar with. Good system, there is no large amount of software to support, and it is not survived (IBM's OS / 2 is a typical example). But now, GNU / Linux can use software is rich, you can search for search, you will find a few major professional Linux software collections download sites, and the software reserves inside are rich. Download the package you need, install the software according to the following method. 1. Compilation and installation source code package is actually, most UNIX software is published in the form of source code, the advantage of doing this is that users can modify software according to their own system. Let's take a look at how to install the source package. Target Software: ENCON-0.2.3.tar.gz Linux Console Chinese System # mkdir Temp / * Create a temporary directory * / # cp zhcon-0.2.2.tar.gz Temp / / * will be copied to the temporary directory * / # cd temp # tar vxzf zhcon-0.2.3.tar.gz / * decompressed, archive one step in place, then generate a new directory * / # cd zhcon-0.2.3 #. / configure / * Configure compilation environment * / # Make / * Start compiling * / # make install / * installation * / to this, ENCON is installed. The last step is to install the standard operation of the source code package. After execution ./configure after the installer tells you the program after the program is installed. To uninstall the software, you can delete the directory directly (don't forget to delete the execution command in / usr / local / bin).
2, install the.rpm package with rpm, .src.rpm package RPM is Redhat Package Manager, which is the automation installation tool made by Redhat. We use it to install a MPEG player: CandyPlayer # cp CandyPlayer-0.1.1-1.i386.rpm Temp / # cd Temp # rpm -ivh CandyPlayer-0.1.1-1.i386.rpm / * Here is a package A full name * / installation will display a progress bar and tell you the installation process. The system's integrity will be detected before the RPM installation is to see if the file is missing. If the required file is missing, the installation is refused to install it. Sometimes we will encounter the source code .SRC.RPM, which needs us to compile it yourself. Installing such a package only needs to change the parameters of the RPM command. # rpm --rebuilddb target.src.rpm / * Assume the software package called target.src.rpm * / To delete the installed software, just the following command # rpm -e calandyPlayer / * Here is the name of the software * / RPM is as simple as. 3. Installation binary procedures Some software companies do not want to publish source code, so they directly make software into a large installation file. Let's take a such thing below. MusicMatch Jukebox wants everyone to be unfamiliar? Very excellent music play software. It has a Linux version, a single binary installation file -Install-mmjb-1.43.sh. Let's pack it. Since it must be installed in X, we assume that there is already a window environment. Open a console window. #CD /TEMP#./install-mmjb-1.43. SH then starts installed, and the process of installing software under Windows is similar. It is important to note that this software allows ordinary users to install, but they cannot add links to the / var directory, which can only be installed in their home directory.
The above is a method of installing various software installed in the Linux system. Let's go to today's topic. First download the two packages from www.mpg123.de. Start Emacs, create a new shell buffer, the SU rise becomes root, install these two packages described above, and restore to ordinary users. The installation order is first MPG123-0.59R.Tar.gz, and then put PlayMP3List.tar.gz. Create a Bash script addMP3C-x CF addMP3 / * CX is Ctrl-x, the same MX is Alt-x or ESC-X, the following * / in the new buffer input to the following command #! / Bin / bash # Add MP3 Files To My Playlist File ~ / Playlist.m3u