Archive for the 'Linux Tutorials' Category

Linux Tutorials…?


I want Linux Administration Tutoriels in PDF Format How get That Tutorials. . .


Installing Linux on your computer


A week or so ago I said I’d write a short tutorial on installing a couple of Linux distros on your computer and I’ve decided I’d just show you the various ways for Ubuntu, because the other distros are very similar to install and there’s tons of tutorials out there. Anyway on with the how-to. There are a couple of ways to install Ubuntu:

Option 1 is by the easiest of them all. You just send off for a disk from Canonical (for Ubuntu), shove it in your CD drive on your computer/laptop, boot up and some options will come up. But before the options come up you must press F-, one of the F- keys along the top of your keyboard. This will depend on your machine, mine if F9. The computer will say, usually in the left hand bottom corner, something like ‘Boot options F5′ and you press that key, select the boot device (the CD) and away you go. You can choose to install the distro straight to your hard drive, or, and this is a very nifty, little idea, you can ‘try before you buy’. This involves booting up the disk and checking out the distro to make sure that everything works with your machine and that sort of stuff.

Option 2 is marginally harder than the above. What you will need is a blank CD, a CD creator drive, a CD burner program and of course the distro ISO. An ISO is basically the file that contains everything needed to run the OS on your computer. It is called an image and is usually around 650MB. You can find it by typing the distributions name into Google, bringing up their site and clicking on download. Right on to the creation. Start you CD burner program, such as Nero and click ‘create CD-ROM ISO’ or something along these lines. Then browse through to where you you saved the . iso file, for example Computer>Documents>Downloads, select it and click create. This will burn the disk and you just do the same as in option 1. It also gives you the option to test before you install it.

So good luck with the installation, and have fun with Linux.

en. wikipedia. org/wiki/Linux

distrowatch. com/

Disclaimer: I accept no responsibility for any part of this process going wrong or damaging your computers hardware or software. You use this tutorial at your own risk.


Working With Files in Linux: Kludges and Solutions


A year ago, I made the best and worst mistake of my life: I messed up my GRUB boot list, and didn’t have the wherewithal to fix it. I was so frustrated, that I chose to abandon the Microsoft axis altogether. What would I do without the tools I used in Windows? I found myself relying on some very helpful roundups online. You know “The 5 best apps for this or that”, and the like.
It turns out, after you read 50 or so Linux roundups that don’t help you at all, you find one shining program( or solution )in the rough that takes care of your issues. Sometimes, you end up using a combination of programs together, with varying degrees of success. Then, you have the “kludge”. This is a programming term that basically means ” an inefficient, clumsy way to get the result you want”. I have plenty of those, and have detailed a few of my favorites below.
I’m not saying that you will see much of a difference in the programs I suggest in this roundup. Depending on how new you are to the Linux scene, you might stumble onto something you aren’t currently using. What I will offer are unique and occasionally “kludgey” solutions to get the job done.
PDF’s: These gave me a real problem when I started using Linux full-time. Don’t get me wrong, Linux has plenty of PDF readers/writers. When it came to editing them all, I hit a bit of a roadblock. I have to amend PDF’s(photo and text-based) on a regular basis. So what are the solutions I found?
- PDFedit: This is okay, provided you are satisfied with having a one-shot edit. By that, I mean that you can access the document and change it, but it does not have an “undo” function. Hopefully, they will add this feature in future. You have to close the document in order to “undo” any changes. I only use this for highlighting text based PDF’s. For image based PDF’s I choose. . .
- GIMP(a kludgin’ we will go): Yes, that’s right. The venerated Photoshop replacement can edit text and image-based PDF’s. There are several issues with this method, but I’ll explain how to use it, should you be so inclined. The downfall of this method is that GIMP imports the PDF, whether Image or Text based as an Image. When it exports, it exports the file independently of the original as a PDF. That being said, it is a good solution for 1-3 page docs. All you have to do is create a new layer in Gimp, cover up the old information with a color( I use white, generally) and create a new text layer to replace the old data. Then export as a . jpg or . png (I generally use . jpg, but . gif works pretty well, should you need a smaller file size. )
Here comes the fun part: Now, you have to open up the other PDF pages in GIMP, and export them as a . jpg or whatever. Then, open up OpenOffice Draw. Insert the picture into the first slide. Insert another slide, insert pic. Repeat until done. Click “Export as PDF” button. Tada. Not fun. Or you can just write a PHP script to run on your Apache server, and use the PHP/PDF library to export your files as a single PDF(if you feel froggy, jump. ) I hired someone to write a short script for me, and they were among the best dollars I have ever spent.
- Scribus: This is the most mature of the editing/publishing platforms out there. I have heard great things about its ability to edit PDF’s. The only problem is, I cannot get it edit a single PDF. It tells me that my PDF’s are not in an acceptable format. Should they fix this in a later release, this would be your best shot at a editing on a great platform. It just does not work with PDF’s generated in OpenOffice, or anywhere else for that matter.
- Xournal or Gournal: Xournal is the better of the two. They are both lightweight PDF annotators/editors. They do not work well with Image based PDF’s. They do an admirable job when dealing with text based PDF’s.
Let’s move on to picture formats, and photo management systems. Man, have I ever had a problem with these. This mostly has to do with the frequent inability of Linux programs to understand layers, as they relate to Adobe based products.
The following programs allow you to view, and even batch process photos. These are the ones that will save you more time than any other.
- Phatch: The single greatest contribution to Open Source photo editing since GIMP. Phatch allows you to quickly and easily batch edit thousands of files at the time. A simple GUI makes this a snap. Resize, change file quality parameters,rename, rotate, drop shadow, etc. , without ever seeing the command line.
- Inkscape: A vector editor that comes close to accurately opening . ai and layered . eps files. I say, comes close, because it picks and chooses which of these files it interprets. It’s Russian Roulette. I wouldn’t pay for a vector graphics package based on its performance, unless it gives you the file in . svg, which it interprets without a problem.
- GIMP: Okay, if you don’t know already, GIMP is the app that started it all. You can open up pretty much anything in GIMP. It just works. There are enough scripts and tutorials out there that enable you to do anything you want with an image. Its batch processing abilities are not nearly as good as Phatch, but you can add “Dave’s Batch Processor” should you feel the urge.
(For all of you who say “Well, you can use Adobe products with WINE. “, let me remind you that I am not dual-booting MS and Linux. To speak of a solution using WINE would nullify the point of this article. )
Ok, now that I am done with programs, I’d like to share with you some websites that help you convert files into usable formats. You know the ones, the primarily brilliant spawn of Microsoft that are a pain to open: . docx, . xlsx, . pub, and anything else you need decoded on the fly.
(It should be noted that current Linux versions of OpenOffice will open . docx, . xlsx, and . pptx locally. Windows versions of the program do not support these files as of yet. ) These are for when you are on the go, or using a machine that isn’t owned by you. You could always carry a custom distro on your keychain, but my guess is you are not that hardcore yet. If you are, you have probably discovered or coded far better solutions than I am offering.
- k2pdf. com : This will take . rtf, . txt, . doc, . eps, . docx, . mdi, . tif, and a few other formats, and convert them into a usable, viewable PDF for you.
- pdfonline. com- Should you need the document editable in word, head over here to convert your PDF to a standard MS Word file. The only reason that you would possibly need this, is to edit tables from an . xlsx to PDF conversion. Still, a reasonably decent kludge.
http://www. adobe. com/products/acrobat/access_onlinetools. html- Yup. Adobe offers to convert your PDF to HTML for you here. You take the help where you can get it. Then you can paste the HTML into OpenOffice and save as . doc (or preferably, an . odt. ) Again, not the greatest solution, but one that works.
The Linux community is doing an admirable job of making file formats accessible. Hopefully, in the near future, an open standard will overtake these proprietary formats. In the meantime, I hope some of these patched together solutions will help you get the job.
I have paperwork to do, so I’ve gotta run. The penguin shall prevail. . .


3 Reasons to Host Your Web Site in a Linux Server


It’s more and more common that a person owns a web site, which can be for blog, family web site, small business web site or even a forum. And the majority of those small-size or medium-size web sites are hosted in Linux environment. Why so many webmasters would like to make this decision?

I think below are 3 key reasons for it.

1) Stable

As an open source operating system, code of Linux is open to the public so that anyone can read it and suggest improvements or point out bugs. Over the years, Linux has been developed in various flavors (the most famous one is Red Hat). Thousands and thousands of people have contributed their time and effort to making Linux web hosting run faster and to provide simpler, more efficient and bug free code. With an open programming environment, improvements are made on a continual basis and problems are seen relatively quickly and solved with a minimum of difficulty.

And the same reason as why it’s stable, the security level of Linux is also higher than Windows.

2) Cheap

Linux is free to all. Unlike Windows, you have to pay thousands of dollars for a license. And this is also part of reason why the list price of Linux web hosting package is much lower than that of windows web hosting packages.

3) A lot of Free Scripts to Help Setting up the Web Site

Open source world is just as beautiful as it could be. A lot of people contribute to it from different perspectives, such as OS, software development tools or applications. Linux, php, and MySQL have been a very popular platform to build an application. Right now, you can find many very good open source application to set up a forum, blog, image galleries, etc. And all those are free and easy to be installed. Even php and My SQL can work on Windows, Linux just a perfect platform for them.

There are more reasons that the webmasters want to choose Linux to host their web site. But a general guideline is that only if you want to use asp. net or sql server to build your web site, otherwise, Linux is always your best choice. Reference: Reliable Affordable Web Hosting Review, Guide and AwardsTop 10 Web HostingWebmaster Tutorials


The Top Ten Reasons for Learning Linux, Number 10 a Potpourri of Reasons



Top Ten Reasons for Learning Damn Small Linux – Number 1, It’s Free


Can you remember the 1992 Janet Jackson song entitled The Best Things In Life Are Free? You might even remember the 1956 Hollywood movie of the same name. In any case do not guarantee that you will find Damn Small Linux and our associated tutorials to be among the best things in your life. On the other hand we do guarantee that they are both completely free. Well, wait a minute. They are both free, but. . .

You may have to shell out some of your hard-earned cash to learn Linux. This is particularly true if you are downloading the software and running the tutorials on your home computer. Yes, you will have to pay for an Internet connection at least for the time spent downloading the files. By today’s bloated standards Damn Small Linux is really small; it weighs in at a mere 50 Megabytes. Downloading this software distribution is really quick, especially if you have a high-speed connection. And yet as we all know, sometime during the following month your Internet Service Provider will want money.

After downloading Damn Small Linux you won’t need the Internet to run it. But you may want to activate one or both of the Internet browsers that are part of the Damn Small Linux distribution. And you may want to download additional applications; there are lots of them. Because Damn Small Linux is so small you should still have scads of disk space available.

Your Damn Small Linux costs don’t end with the Internet. I would be surprised to learn that the electricity powering your computer is free. Surely the longer your days and nights spent in front of the computer the higher your light and heat bill. Furthermore, the more time you spend on Linux the more money you may end up spending on snacks, new eyeglasses, and taxis when you miss the bus to work because you just couldn’t tear yourself away from the computer in time. I think you get my drift. But we repeat. Damn Small Linux, this website, and many of the references on the web are free. Should you outgrow Damn Small Linux the larger versions of Linux are free, or at least quite inexpensive when compared to ostensibly similar versions of Microsoft Windows.

Most people don’t run operating systems in and of themselves but rather for the applications they enable. Reason number two: Damn Small Linux provides lots of free applications as discussed in our next article.


How to Get Help in Linux



The Basics of The Palm Pre Linux


Written by: Alexandr Dodatko, Junior Software Developer of Device Team

Apriorit Inc.

Table of content

Introduction

1. SDK Installation

2. Start to work with Linux

3. Program Installation

4. System foldes review

4. 1 Standard system directories

4. 2 Specific Directories of Web OS

5. Work with FTP on the Palm Pre

5. 1. Data exchage procedure

5. 2 Work with console client ncftp

Referrences

Palm company released (http://www. palm. com/us/products/phones/pre/) the new smartphone managed by GNU Linux based operating system. This product becomes more and more popular due to the cute GUI, well-documented SDK and easy start on the development. But nevertheless many low-level features of this system is poorly documented.

This article will be useful for those who start working with the console interface of GNU Linux generally and Palm Web OS in particular. It may be useful also for the developers who need more capabilities than Mojo SDK provides to solve their task.

In this article we’ll consider such questions:

This article is some kind of review.

I used emulator from the Palm Mojo SDK package to research the features of Web OS.

You can download it from the official site: http://developer. palm. com/index. php?option=com_ajaxregister&view=register&sdkdownload

Or use this link (no registration): http://developer. palm. com/index. php?option=com_content&view=article&id=1788

Choose the platform you need on the download page (Fig. 1) and then follow the instuctions on the site and in Install Wizard. It’s better to install Java first, thenVirtualBox, and thenSDK. Such order decrease the possibility of errors.

Figure 1: Choosing platform

During the installation the virtual machine for Palm Web OS will be created. You don’t have to create it manually.

To start work with Web OS Linux start the emulator. You can use either the shortcut created by installation program (fig. 2) or VirtualBox interface(fig. 3).

Figure 2: Start with shortcut

Figure 3: Start from Virtualbox

If verything is ok then you’ll see the Emulator window (fig. 4). We’ll need the Internet connection for the further work. It should be configured only in the host system (in our case it’s Windows) . You can check ff there is Internet on Emulator simply starting Web Browser. To do it choose Programs (right bottom icon) => Web. After that try to open some site just like on the computer. Search something for example (fig. 5).

Figure 4: Palm Emulator

Figure 5: Palm Web Browser

Now we should use the novacom. exe utility to connect to the device. To get the full information about this program options enter

The command

opens the Linux terminal window.

Figure 6: Linux Console

Note: like in the usual Linux, more than one terminal can be opened in Web OS.

First lets browse the file system. ls command is used for this. After entering it we see the content of the current directory (root by default).

Figure 7: Results of the ls command

To distinguish files from directories we an use option ls -F

Figure 8: Results of the ls -F command

Directories now have / symbol at the end. So as you see we have only three files in the root directory: wget, log. txt, md5sums.

When using ls -F some other symbols can occur at the end of the file names.

Suffics

Meaning

@

Symbol link

*

Executable file

/

Directory

=

Socket

You can see the examples by entering commands:

More detailed information about the file system element type can be obtained by means of file utility. This utility is disabled in Palm Web OS by default. Later we’ll consider how to install it.

To browse the file content use the command cat .

For example,

To obtain the full information about the command enter –help, or search the Internet with keywords “man “. You can also read the help in the full Linux version entering “man “.

I propose reader to learn also such commands as rm (remove filesdirectories), mkdir (make directory), touch(create file), cp (copy), pwd (get current path).

The process of the program installation for Linux is a bit different from this process in Windows. Unlike other systems Linux has repositories. Repository can be considered as the database that contains program, libraries, and relations between them. There is some special software that manages repositories and install software on the local computer. Such software is called “package manager”. The package manager compares software versions on the computer and in the repository, download software, resolve conflicts between packages. More information about package managers can be found in the articles [4],[5],[6],[7].

By default, Palm Web OS does not have a package manager. To install it use the guide

http://www. webos-internals. org/wiki/Next_steps.

The script optware-bootstrap. sh performs the following:

In the original script some of the mentioned actions cannot be performed on the emulator (for example (4)). It’s also required to have /dev/hdb device. By default, there is no such device on the emulator so you should add it manually. Detailed instructions can be found here:

http://www. webos-internals. org/wiki/Adding_Disks_to_the_Emulator

I’ve put the fixed version of this script into the attachments to this article. It lets user to change disk for installation and also is free from the limitations for the emulator.

To start the fixed script you shoud get it on the device using the wget command. To organize file exchange with the device you can install ftp server on your computer or other computer in your local network.

After entering the command

the file will be uploaded to the device ???? to the current directory (ip adress should be of the computer with ftp server of cause). DON’T use symbol names of the machines (for example

) as far as Web OS won’t be able to convert them to the address correctly.

So, we have executed the script and installed a lot of useful programs. Now we have package manager and so we’ll be able to install all missing programs. To do it, use the following command:

For example

The list of the packages can be browsed by the command

or by following the link:

http://ipkg. nslu2-linux. org/feeds/optware/i686g25/cross/unstable/Packages

Developers and enthusiasts may want to install gcc compiler, gdb debugger, make utility, python interpreter and other great things. The presence of these utilities allows program installation by means of building from the source texts.

Let’s start from the folders that are common for all Linux systems.

1. /bin, /lib, /home,

These are folders for standard utilities from Linux package, shared libraries (Windows *. dll analogues) and user files correspondingly.

2. /mnt, /media, /lost+found

The access points to the external data storages (floppies, hard disks, optical disks) are stored in these directories. In the Palm memory card (micro sd) can be mounted to this directory. And there is nothing interesting there on the emulator.

Note: The lost+found directory is specific for the extX (ext1, ext2, ext3, ext4) file systems.

3. /dev

Device files are stored here.

/dev/hd[a. . z][1. . N] – logical partitions of hard disk

/dev/hda1 – root file directory

/dev/hdc – bootloader

/dev/hdb – the section we created earlier or the physical data storage of the real device – 8GB (~7GB user available)

ttyN – console devices.

null – «black hole», eating all information that is entered into it.

1. /var/luna/data/dbdata/

There are databases used by high-level applications of Web OS.

Bases PalmDatabase. db3 and PalmAccountDatabase. db3 is in sqlite format. There are data of such applications as mail accounts, notes, calendar, chat, memo stored in them.

They can be browsed by any sqlite viewer (see [9]). I would like to advise this one http://link. osenxpsuite. net/?uid=homepage&id=sqlite2009pro. zip

We will discuss how to exchange files with Palm Pre in the next section.

2. /var/luna/data/mediadb. db3

The data about the locations of images, music, movies etc. are stored here. After analysis I can say that these data are stored in the directories: /media/internal/, /usr/palm/ and their subdirectories.

3. /var/luna/data/emails

The text of email messages is stored in this directory in html and ascii formats.

4. /usr/share/dbus-1/system-services

Here you can find Java services (or, if yo like, deamons). Using them the application developed with the usage of Mojo SDK can get access to the low-level components of the system.

5. /usr/lib/luna/java

Here java library files (*. jar) are stored, they are used by services.

Well, now we know what and where is situated. But it’s not very convenient to research file content directly on Palm Pre. So we have a task of getting files from the device.

One of the methods is FTP protocol. And so you should:

To connect to the server enter ncftp .

Or

Remember that

When the connection is established the current local directory is «frozen». Instead of working with the directory all commands of navigation in the file system are translated in the commands of the FTP and processed by the server.

Figure 9: Server navigation with ncftp

Now, after you choosed the necessary remote directory data exchange can be performed:

You can also use some mask instead of the argument. For example, put *. txt

Figure 10: Transmission of the several files using the mask

To send the directory use the command put -R

Figure 11: Sending the directory with ncftp

Ncftp also supports such commands as mkdir, rm, rmdir, pwd.

The same commands but with l- prefix are used to navigate in the local file system: for example lmkdir, lls, lpwd etc.

You can find the full list of the commands on the official program site:

http://ncftp. com/ncftp/doc/ncftp. html

Download scripts sources.

http://developer. palm. com/

http://www. palm. com/us/products/phones/pre/

http://www. webos-internals. org/wiki/Next_steps

http://www. control-escape. com/linux/lx-swinstall. html

http://www. linuxforums. org/forum/linux-tutorials-howtos-reference-material/64958-how-install-software-linux. html

http://www. linuxcenter. ru/lib/articles/system/rpm_howto. phtml

http://www. debian. org/doc/manuals/apt-howto/index. ru. html

http://www. webos-internals. org/wiki/PalmDatabase. db3_File

http://www. sqlite. org/cvstrac/wiki?p=ManagementTools

http://link. osenxpsuite. net/?uid=homepage&id=sqlite2009pro. zip

http://ipkg. nslu2-linux. org/feeds/optware/i686g25/cross/unstable/Packages

http://filezilla-project. org/download. php?type=server

http://filezilla-project. org/download. php

http://www. perpetualpc. net/srtd_commands_rev. html

http://ncftp. com/ncftp/doc/ncftp. html


Damn Small Linux Text Processing


Damn Small Linux is an excellent tool for learning Linux commands and running the Linux operating system. But what if you don’t plan to be a computer nerd; can this software still be useful? The answer is a definite yes; you can make use of this tiny operating system whether or not you want to learn the sometimes gruesome details of operating systems. This article introduces the text editors that come with your free Damn Small Linux that runs on even obsolete Windows computers. You can use these applications to compose simple text or programs of any level of complexity.
Once you have downloaded and installed Damn Small Linux there are several equivalent ways of launching its text editors. You can click on the DSL button in the lower-left hand corner or on the Apps icon toward the top of the screen. Then open the Editors: there are four, Beaver, Nano, Notepad, and vi (actually vim). We will look at these editors in order plus an additional one.
Beaver is my choice for creating and editing the text files used in my Damn Small Linux tutorials. The name Beaver stands for Beaver is an Early AdVanced EditoR which is the kind of joke that many Linux and Unix people find funny. This editor is particularly useful for programming and web page editing. Beaver’s special features include color coding and the ability to convert text to Upper Case, Lower Case or to capitalize the first letter of every word. You can convert text among the following formats: Unix, DOS, and Mac. Programmers will be glad to know that Beaver formats code for the following programming languages: C/C++, HTML, Perl, JavaScript, PHP, and Bash. Unfortunately there is no Help function.
The nano program is especially used for email messages. It stems from the widely used Pico email program that is not available for some versions of Linux. I have not worked with nano but am told that many Linux and Unix people like it.
What the Damn Small Linux people call Notepad is actually another text processor that is similar to the DOS/Windows Notepad. I haven’t used it because Beaver is more powerful, and just about as easy to use.
The final application in this group is VIM, vi IMproved. The original vi was a very-widely used text editor for Unix and Linux systems. Today almost all Unix and Linux people work with other, more sophisticated text editors. When I teach Linux on systems other than Damn Small Linux I teach a reduced version of vi. This editor is cumbersome, but you make like the improved version. Damn Small Linux offers you a choice.
The Office folder includes Ted, a word processor which is compatible with Microsoft Word. Ted saves documents in RTF (rich text format) that can be read by Microsoft Word and other word processors including Open Office. Ted and Beaver belong to different worlds; you can’t take documents back and forth between these two applications.

Over the years Levi Reiss has authored or co-authored ten books on computers and the Internet. He loves wine in moderation as exemplified by his wine websites such as www. theitalianwineconnection. com. He teaches various computer courses including Linux and Windows operating systems at an Ontario French-language community college. Visit his new website http://www. linux4windows. com which teaches you how to download and run Damn Small Linux even on that outdated Windows computer which you have been meaning to throw out.