<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6035189260502660598</id><updated>2024-09-01T01:26:17.064-07:00</updated><category term="commandline"/><category term="desktops"/><category term="filesystem"/><category term="installing"/><category term="repositories"/><category term="networking"/><category term="security"/><category term="help"/><category term="media"/><category term="text editors"/><category term="about"/><category term="backup"/><category term="compiling"/><category term="display"/><category term="email commandline"/><category term="f"/><category term="files"/><category term="groups"/><category term="virtualization"/><category term="wine"/><title type='text'>easierbuntu</title><subtitle type='html'>Making Ubuntu that bit easier</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>61</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-6372261766189586529</id><published>2011-09-11T08:50:00.000-07:00</published><updated>2011-09-11T11:06:37.311-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="email commandline"/><title type='text'>Managing your email with fetchmail, procmail and mutt</title><content type='html'>Let&#39;s face it, email can be a pain. Sure it&#39;s useful, but between the social network stuff, the marketing emails and other stuff, there&#39;s a lot to wade through, and that&#39;s without even counting the spam. Graphical email clients may be full of features and relatively easy to use, but after a point it becomes worthwhile considering a more powerful solution.&lt;br /&gt;&lt;br /&gt;My favourite email client these days is mutt. I have a small mail server (actually a Pogoplug running Debian, since it&#39;s got better ARM support than Ubuntu) that I use to back up all my email from my Gmail account, as well as several others, and it&#39;s an extremely efficient way to deal with your email. If necessary, I can view it in a graphical client like Mozilla Thunderbird, but for most of my needs mutt is more than sufficient. Traditionally, the Unix way of doing things is to have many smaller applications that will do one job and do it well, and once you get a setup like this working, it&#39;s incredibly powerful and flexible as a result.&lt;br /&gt;&lt;br /&gt;So today we&#39;re going to cover creating a similar setup on whatever computer you want. If you have a machine that is always on, you could set up an SMTP and IMAP or POP server (I use Postfix and Dovecot), obtain a fully-qualified domain name and run your own mail server, which is a powerful and flexible option. Or you could just get and sort your email automatically, or just back it up offline.&lt;br /&gt;&lt;br /&gt;We&#39;re going to create a simple setup in this tutorial that will use fetchmail to grab emails from one or more email accounts, then use procmail to filter them into the folders you designate, before using mutt to read them. From here it&#39;s fairly trivial to expand upon this - you could set up SpamAssassin to filter out spam emails, for example.&lt;br /&gt;&lt;br /&gt;Get the required packages in the usual way:&lt;br /&gt;&lt;blockquote&gt;sudo apt-get install procmail fetchmail mutt&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Once these are installed, you can start working on the configuration files. Don&#39;t panic! I&#39;ve found that fetchmail, procmail and mutt are all well-documented, there&#39;s plenty of great reference materials online, and once you&#39;re done you can easily move your configuration files to a new computer if necessary.&lt;br /&gt;&lt;br /&gt;So first of all, create the .forward file in your home directory with the following command:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;echo &quot;|/usr/bin/procmail&quot; &gt; .forward&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Of course, you could do this with your favourite text editor, but why bother waiting for it to open? This just displays |/usr/bin/procmail to standard output and then redirects it into a new file, thus saving you keystrokes!&lt;br /&gt;&lt;br /&gt;Next, you need to create the configuration for fetchmail. Create a new file in your home directory called .fetchmailrc and enter something like this:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;set daemon 3600&lt;br /&gt;set logfile /home/user/.fetchmail.log&lt;br /&gt;set no bouncemail&lt;br /&gt;poll pop.gmail.com proto POP3 auth password no dns user &quot;user@gmail.com&quot; pass &quot;password&quot; is user keep ssl&lt;br /&gt;&lt;br /&gt;mda &quot;/usr/bin/procmail -d %T&quot;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This example is for a Gmail account and uses the POP3 protocol to download email (I find that for fetchmail, POP is probably a better choice than IMAP in most cases since with IMAP, if you&#39;ve already read something it won&#39;t get downloaded via IMAP). Note the first line - this specifies an interval in seconds between fetchmail checking for new mail. Here I&#39;ve set it to download once per hour since I use this for backing up my email, but set it to whatever you want. If you want you can then add more email accounts after the end of the settings for that one, but before the line that starts with mda, which tells fetchmail to send all the fetched emails to procmail for delivery, so for instance you could download your work and home email into the same mailbox.&lt;br /&gt;&lt;br /&gt;Don&#39;t forget to change user to the name of your user account on your machine, and the email address and password for those for the email account(s) you want to use fetchmail with&lt;br /&gt;&lt;br /&gt;You also need to set the permissions correctly for your .fetchmailrc. Enter the following command to correct these:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;chmod 700 .fetchmailrc&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;So with fetchmail configured, we&#39;ll move on to procmail. Now, procmail is an insanely powerful tool and I can only hope to give you a very brief overview of what it can do, including:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Automatically sort emails from or to specific email addresses into specified folders&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Break up mailing list digests into individual messages (this is very useful!)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Automatically respond to emails&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Work as a spam filter (although something like SpamAssassin is considerably more effective&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;So create a new text file in your home directory called .procmailrc and enter the following:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;SHELL=/bin/bash&lt;br /&gt;PATH=/usr/sbin:/usr/bin&lt;br /&gt;MAILDIR=$HOME/Maildir/&lt;br /&gt;DEFAULT=$MAILDIR&lt;br /&gt;LOGFILE=$HOME/.procmail.log&lt;br /&gt;LOG=&quot;&quot;&lt;br /&gt;VERBOSE=yes&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Once you have the filter working how you want it, you may wish to consider changing VERBOSE to no so the log is not so large.&lt;br /&gt;&lt;br /&gt;Now you need to think about what kind of format and folders you want to use. The two mail formats for mail files are mbox and Maildir. While mbox uses a single text file to represent a mailbox, Maildir uses a folder that contains three further folders called cur, new and tmp. Maildir is generally considered superior so we will go with that, however if you want to use mbox instead, all you need to do is drop the trailing / from the mailbox name - the setup above uses a Maildir called Maildir, so if you wanted to use a single mbox file called Mail, you would change that line to MAILDIR=$HOME/Mail for example.&lt;br /&gt;&lt;br /&gt;Assuming you want to use Maildir, create a folder in your home directory called Maildir, then go into it and create three directories called cur, new and tmp. Then create three more called .Drafts, .Sent , and .Spam and create the cur, new and tmp directories inside each of them. If you&#39;d like to create more folders for specific purposes, create them in Maildir with the name preceded by a . and create the same cur, new and tmp directories inside each one. For instance, if you want to have a mailbox for emails relating to Linux, you might create it as .Linux inside the Maildir folder.&lt;br /&gt;&lt;br /&gt;Now return to your .procmailrc. When configuring procmail, you&#39;re creating a series of rules, and if an email matches one of those rules, the action specified in the rule will be taken. As a simple example, here&#39;s a rule from my .procmailrc:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;# Drop all emails from National Express East Anglia, as there is no good reason to retain these&lt;br /&gt;:0:&lt;br /&gt;*^From:.*(noreply\@nexusalpha\.com)&lt;br /&gt;/dev/null&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;In this case, these emails are essentially worthless after I have read them, as they&#39;re merely to advise if my train to or from work is on time, so I see no reason to keep them around.  Rules for procmail are referred to as recipes, and generally consist of three parts.&lt;br /&gt;&lt;br /&gt;The first part doesn&#39;t mean much - it simply designates the start of the recipe. However, the trailing colon ensures that only one message gets written at the same time - this isn&#39;t really necessary for Maildir, but it&#39;s a good idea to use it if you&#39;re using mbox.&lt;br /&gt;&lt;br /&gt;The second part describes a pattern that an email should match. Here, we&#39;re looking for emails from the email address noreply@nexusalpha.com. Note that as procmail uses regular expressions, some characters will need to be escaped by preceding them with a \ character, including @ and . characters. Note that you can also specify multiple addresses by separating them with a pipe character, as in this example:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;*^From:.*(bob\@company\.com|dave\@company\.com)&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This will match any of the email address quoted in the rule. Also note that you can include more than one place to find the string you&#39;re searching for at once by placing it in brackets and separating them with a pipe, as in this example:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;*^(To|Cc|Bcc):.*(bob\@company\.com|dave\@company\.com)&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;You can search for a string in From, To, Cc, Bcc, Subject, or practically anywhere else in an email if you want. You can also require that multiple conditions be met, as in this example:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;*^From:.*(bob\@company\.com)&lt;br /&gt;*^Subject:.*(joke)&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This example would match anything from bob@company.com with joke in the subject.&lt;br /&gt;&lt;br /&gt;Finally, the third part shows what should be done with the email once it&#39;s been matched against the pattern. In the example above, we sent it to /dev/null, effectively deleting it, which is useful as long as you know you don&#39;t want to keep email that matches that pattern. More normally, you&#39;re going to want to put it in a specific folder. Here&#39;s how you might do that:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;:0:&lt;br /&gt;*^Subject:.*(Linux)&lt;br /&gt;$MAILDIR/.Linux/&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This would send anything with Linux in the subject line to the folder .Linux. By writing some rules carefully, you can generally rely on procmail delivering them to the right location. When you receive emails, procmail will work down the configuration file until it finds a pattern that matches. If it doesn&#39;t the email will go in the default folder specified above.&lt;br /&gt;&lt;br /&gt;Npw, a couple of very handy tricks I&#39;ve learned with procmail. First, a lot of spam emails tend not to be specifically addressed to your email address, so a lot of them can be caught by sending anything not specifically sent to your email address to the spam folder, as in this example:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;:0:&lt;br /&gt;* !(To|Cc).*(bob\@company\.com)&lt;br /&gt;$MAILDIR/.Spam/&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Here the ! negates the condition so that anything not for bob@company.com gets sent to the Spam folder. Note that this will also catch many mailing list emails, however, since they are also often not sent directly to your email address.&lt;br /&gt;&lt;br /&gt;Finally, another favourite of mine is this one, which will break up a mailing list digest into individual messages using the formail tool:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;:0:&lt;br /&gt;*^From:.*(mailinglist)&lt;br /&gt;| formail +1 -ds procmail&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Note that if you then want this to go into a specific folder, you&#39;ll need to set up another rule to catch the individual messages. Fortunately, these are normally sent to the mailing list address, so you should be able to use something like this after the recipe above:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;:0:&lt;br /&gt;*^(To|Cc):(mailinglist)&lt;br /&gt;$MAILDIR/mailinglist/&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;If you want to know more, refer to the man pages for procmail, procmailex, procmailrc and procmailsc. In particular, procmailex contains lots of great examples, and there are loads of procmail recipes around on the web that you may want to borrow snippets from.&lt;br /&gt;&lt;br /&gt;Finally, time to configure mutt. Here&#39;s a sample mutt configuration for you - save this as .muttrc:&lt;br /&gt;&lt;blockquote&gt;set mbox_type=Maildir&lt;br /&gt;&lt;br /&gt;set spoolfile=&quot;~/Maildir/&quot;&lt;br /&gt;set folder=&quot;~/Maildir/&quot;&lt;br /&gt;set mask=&quot;!^\\.[^.]&quot;&lt;br /&gt;set record=&quot;+.Sent&quot;&lt;br /&gt;set postponed=&quot;+.Drafts&quot;&lt;br /&gt;&lt;br /&gt;mailboxes ! + `\&lt;br /&gt; for file in ~/Maildir/.*; do \&lt;br /&gt;   box=$(basename &quot;$file&quot;); \&lt;br /&gt;   if [ ! &quot;$box&quot; = &#39;.&#39; -a ! &quot;$box&quot; = &#39;..&#39; -a ! &quot;$box&quot; = &#39;.customflags&#39; \&lt;br /&gt;       -a ! &quot;$box&quot; = &#39;.subscriptions&#39; ]; then \&lt;br /&gt;     echo -n &quot;\&quot;+$box\&quot; &quot;; \&lt;br /&gt;   fi; \&lt;br /&gt;done`&lt;br /&gt;&lt;br /&gt;macro index c &quot;&lt;change-folder&gt;?&lt;toggle-mailboxes&gt;&quot; &quot;open a different folder&quot;&lt;br /&gt;macro pager c &quot;&lt;change-folder&gt;?&lt;toggle-mailboxes&gt;&quot; &quot;open a different folder&quot;&lt;br /&gt;&lt;br /&gt;# Move spam to the Spam folder more easily&lt;br /&gt;macro index X &quot;s=.Spam\n&quot; &quot;file as Spam&quot;&lt;br /&gt;macro pager X &quot;s=.Spam\n&quot; &quot;file as Spam&quot;&lt;br /&gt;&lt;br /&gt;set sort = &#39;threads&#39;&lt;br /&gt;set sort_aux = &#39;reverse-last-date-received&#39;&lt;br /&gt;set auto_tag = yes&lt;br /&gt;ignore &quot;Authentication-Results:&quot;&lt;br /&gt;ignore &quot;DomainKey-Signature:&quot;&lt;br /&gt;ignore &quot;DKIM-Signature:&quot;&lt;br /&gt;hdr_order Date From To Cc&lt;br /&gt;alternative_order text/plain text/html *&lt;br /&gt;auto_view text/html&lt;br /&gt;&lt;br /&gt;# Editor&lt;br /&gt;set editor = &quot;vim&quot;&lt;br /&gt;&lt;br /&gt;# Colours&lt;br /&gt;color index red black ~N&lt;br /&gt;color index red black ~O&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This is a fairly simple muttrc that I use, but you may want to take note of a few things. This shows any unread emails in red, making it easy to see at a glance. By hitting c, you can switch to a different mailbox, and by hitting Shift-X, you can send an email to the Spam folder.&lt;br /&gt;&lt;br /&gt;With this in place, you should be ready to go. Enter the following command:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;fetchmail -vk&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This will launch fetchmail. Note that if you have a lot of email to download, it can take a while. Also note that your .procmailrc may not be perfect and you may find things winding up in the wrong folders, so you may wish to make a backup - there is a good example of how to do this in procmailex.&lt;br /&gt;&lt;br /&gt;Have fun getting fetchmail, procmail and mutt working, and feel free to share some of the procmail recipes you find or come up with here if you think they&#39;re something others may be interested in! I&#39;ve found the sheer power of procmail addictive - to quote Douglas Adams, &quot;I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.&quot;, and after you&#39;ve gotten stuck into configuring procmail, you may well agree!</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/6372261766189586529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/6372261766189586529' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/6372261766189586529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/6372261766189586529'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2011/09/managing-your-email-with-fetchmail.html' title='Managing your email with fetchmail, procmail and mutt'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-1121341377019594614</id><published>2010-07-05T13:36:00.000-07:00</published><updated>2010-07-05T14:09:19.751-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="commandline"/><title type='text'>Using Screen</title><content type='html'>The bash shell is great, but it can be awkward to use because a task will continue to run until it&#39;s completed. It&#39;s possible to push a task into the background, but this isn&#39;t the best way to do so. What you really need is a way to have more than one shell operating at once.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now, on a graphical desktop this is no problem, as you can just open a new terminal, or a new tab in the same terminal. However, this is less practical on a command-line only system, or one you&#39;ve remoted into via SSH. But there is a solution, and it&#39;s called Screen.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Screen is a terminal multiplexer - it allows you to access multiple terminal sessions inside a single terminal window or remote terminal session (including SSH). Think of it as being like having a tabbed terminal, but in the command line. You can leave Screen running and detach from a session, then reconnect to it later, so for instance if you had an Ubuntu Server install you could connect to it via SSH, issue a command to update the system, then detach and attach again later once it had finished.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Screen is almost certainly preinstalled on your system, but if not you can install it via apt-get in the usual way (sudo apt-get install screen). Once you have it installed, you can start it by issuing the following command:&lt;br /&gt;&lt;blockquote&gt;screen&lt;/blockquote&gt;You&#39;re now running screen! You should be confronted by a standard copyright notice (you can remove this by editing /etc/screenrc and removing the hash at the start of the line that reads #startup_message off).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;All of screen&#39;s internal commands require you hit Ctrl-a, followed by the appropriate key for what you want to do. Try hitting Ctrl-a, then c, and you&#39;ll create a new virtual console. Then hit Ctrl-a, then n to cycle to the next virtual console, or Ctrl-a then p to go to the previous one. Ctrl-a, then &quot; will get you a list of all currently running virtual consoles that you can select from using the cursor keys, while Ctrl-a then d will detach you from your current screen session (it will continue to run in the background, so you could potentially log out and leave the processes to run while you do something else). When you want to reattach, just start screen with screen -r and it will reattach you to the running processes. To stop screen, just exit each of the running consoles with Ctrl-d or the exit command in the usual way.&lt;/div&gt;&lt;div&gt;Screen is of limited use on a graphical desktop, but you can still use it there to get used to the idea. It&#39;s most useful when dealing with command-line systems. For more details, check out the man page for Screen, or try searching on Google. It&#39;s a great tool that makes a lot of tasks easier, and is indispensable if you have to log into a server via SSH a lot. It&#39;s also quite handy if you use a lot of command-line tools because it means you can have everything in one terminal session - for instance, you could have mutt in one screen, irssi in another, lynx in a third, Vim in a fourth, and be compiling code using GCC in a fifth, all at the same time, and in a way that makes it easy to switch between them.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It&#39;s also worth checking out byobu, which is an Ubuntu-specific tool that makes Screen a lot easier to use if you&#39;re new to it. Byobu makes it easy to set Screen up according to your preferences, without having to edit the configuration files by hand.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/1121341377019594614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/1121341377019594614' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/1121341377019594614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/1121341377019594614'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2010/07/using-screen.html' title='Using Screen'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-7973839352257153128</id><published>2010-05-23T11:14:00.000-07:00</published><updated>2010-05-23T12:14:47.913-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="commandline"/><title type='text'>SSH - using the shell remotely</title><content type='html'>If you came to Ubuntu from a Windows background, or are otherwise familiar with Windows (let&#39;s face it, not many of us are in a position where they never use Windows at all!), you&#39;ll probably be familiar with Windows Remote Desktop, which is often used as a troubleshooting tool. You can do the same kind of thing in Ubuntu, but because the Linux command line is so much more powerful and flexible than its Windows counterpart, it&#39;s often much more practical to use a command-line only tool for the same purpose. This is often a better solution because sending a constantly updated image of your desktop to somewhere else is inevitably going to use a lot more bandwidth than a few shell commands, and it&#39;s very likely you can resolve the issue from the shell. It can also be useful for connecting to servers, shell accounts, web hosts etc.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Telnet was the original method of connecting to a remote computer, however it has declined in popularity due to security issues. SSH has largely replaced it because it&#39;s more secure, and that&#39;s what I&#39;m going to tell you about today.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SSH requires two components to work - a client and a server. Think of it like surfing the web - when you visit a web page, you use a client (the web browser) to connect to a server (the web server). Similarly, with SSH you use an SSH client to connect to an SSH server on the machine you want to connect to. The most common SSH client and server on Linux are maintained by the OpenSSH project. Ubuntu ships with the OpenSSH client by default, and if you have a machine you&#39;d like to be able to connect to remotely via SSH, just install the openssh-server package in the usual way.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;How do you use it? It&#39;s simple. Open a terminal and enter something using the following format:&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;ssh user@server&lt;/blockquote&gt;Let&#39;s go into this in a little more detail. First of all, user is just the user name you want to log in as on the remote server. For instance, if you&#39;ve installed openssh-server on your desktop and your user account is called eric on that machine, then you should put eric as the username. If you want to connect to a shell account in the name of ebarnes, then it should be ebarnes.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The server can be either a domain name or an IP address. So if you have a shell account on a machine which has the domain name myfreeshellaccount.com and your user name is ebarnes, you&#39;d enter ssh ebarnes@myfreeshellaccount.com. If you want to connect to a machine that doesn&#39;t have a domain name associated with it, then you&#39;d need to enter the IP address to connect to. There&#39;s nothing stopping you connecting to another machine on your home network via this method, so if you have an old machine running Ubuntu Server, for instance, on your home network, and it&#39;s been assigned the IP address 192.168.1.4 by your router, you can just connect like this:&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;ssh ebarnes@192.168.1.4&lt;/blockquote&gt;&lt;div&gt;If you&#39;d like to be able to use SSH to connect to your home machine from outside your home network, that&#39;s a bit more demanding. You&#39;d need to either obtain a static IP address from your ISP, which can be expensive, or use a service like &lt;a href=&quot;http://www.dyndns.com/&quot;&gt;DynDNS&lt;/a&gt;, and would also need to set up port forwarding on your router. However, there&#39;s all sorts of possibilites that offers, such as managing BitTorrent downloads remotely by using a command-line client like rTorrent, or administering your machine remotely over SSH.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Once you&#39;re connected, SSH works just like any other shell session - you can do exactly the same things with SSH as you would in the terminal. When you&#39;re finished, just type in exit or hit Ctrl-D as you would normally to close the shell and that will finish your session.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note that you aren&#39;t limited to connecting to an SSH server from Linux or Unix hosts. Although most Linux or Unix-based operating systems ship with an SSH client, you can use &lt;a href=&quot;http://www.putty.org/&quot;&gt;PUTTY&lt;/a&gt; to connect from a Windows box (so, for instance, if you have a desktop running Ubuntu with an OpenSSH server installed, and you want to remote into it from your laptop running Windows 7, you can do that). There&#39;s even SSH clients for a number of smartphones, including the iPhone and Android, so you can remote into your machine from anywhere.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you want to try it out, and you have an old desktop you don&#39;t use, it&#39;s quite interesting to install Ubuntu Server on it, connect it to your router and disconnect the monitor, managing it entirely via SSH. It can be a useful resource to have around, and offers a lot of possibilities, such as:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;File server&lt;/li&gt;&lt;li&gt;uPnP server (allows you to stream content to many electronic devices, including the Sony PlayStation 3)&lt;/li&gt;&lt;li&gt;BitTorrent box&lt;/li&gt;&lt;/ul&gt;By managing it entirely via SSH, you don&#39;t need the additional overhead of running a desktop, and can devote more system resources to whatever job you want it to do. You can use SSH to install whatever software you want via apt-get to customise it for the job you want it to do.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Alternatively, if you don&#39;t have an old machine spare or don&#39;t wish to try this, why not try it in a virtual machine? Virtualbox is good for this - just install Ubuntu Server in a VM, and under the network settings, attach it to a bridged adapter. This will mean the virtual machine gets allocated its own IP address by your router, and you can connect to it via SSH.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you have a web hosting account, you may be able to connect to this via SSH - the host will provide the details if this is an option. Finally, another option is to get a shell account - essentially it&#39;s a user account on a remote server. I highly recommend &lt;a href=&quot;http://devio.us/&quot;&gt;devio.us&lt;/a&gt;, who are a free shell account provider running on OpenBSD.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Have fun with SSH! Next time I&#39;ll show you a few tricks to make your experience with it better!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/7973839352257153128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/7973839352257153128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/7973839352257153128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/7973839352257153128'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2010/05/ssh-using-shell-remotely.html' title='SSH - using the shell remotely'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-8183196707208133252</id><published>2010-05-17T13:34:00.000-07:00</published><updated>2010-05-17T14:16:03.853-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="commandline"/><title type='text'>Going further with environment variables</title><content type='html'>First of all, I apologise for how long it&#39;s taken to get round to this (merely days away from being a full year) but I&#39;ve been busy! I was frantically busy at work for much of the last year, and have my own web development studies to deal with too, so I&#39;ve only just gotten around to doing this post. Hopefully I should be able to maintain a better frequency of posts in future!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Last time I explained a bit about how environment variables work. Now we&#39;ll get to use them a little. For instance, say you want to set up a shortcut to a specific folder called mystuff to make it easy to get to. Well, you can easily set up an environment variable to hold the path to that folder. Just enter something like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;blockquote&gt;export mystuff=/home/user/my/stuff&lt;/blockquote&gt;This will set mystuff up as a local variable that you can call at any time in the same way you&#39;d refer to it normally, like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;blockquote&gt;cd $mystuff&lt;/blockquote&gt;Note the dollar sign is only used when calling it, not when setting it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you want to set variables permanently, just add them to the .profile file in your home directory. Then, when you next start up a shell, it will automatically load these settings.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There&#39;s a number of different settings you can add to customise your bash shell. For instance, the other day I added this to my .profile so that Vim was set as my text editor when using Subversion:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;blockquote&gt;export SVN_EDITOR=/usr/bin/vim&lt;/blockquote&gt;&lt;br /&gt;I also added the following to my shell account at &lt;a href=&quot;http://devio.us/&quot;&gt;Devio.us&lt;/a&gt; (who, incidentally are hands down the best shell account providers I have ever found, and I recommend) so I could use Vim in colour, even over SSH:&lt;br /&gt;&lt;blockquote&gt;export TERM=xterm-256color&lt;/blockquote&gt;There&#39;s a huge range of settings you can change to customise your bash shell, so I won&#39;t attempt to cover them all. Instead, I&#39;ll refer you to the &lt;a href=&quot;https://help.ubuntu.com/community/EnvironmentVariables&quot;&gt;guide&lt;/a&gt; in the Ubuntu documentation. A few I will mention, however, are PAGER (typically /usr/bin/less), EDITOR (the default text editor, you can set it to /usr/bin/vim, /usr/bin/emacs, or /usr/bin/nano, or any other CLI editor you want), VISUAL (the visual editor, normally /usr/bin/gedit, although may be different on Kubuntu or Xubuntu), or BROWSER (pretty much what you&#39;d expect).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now, a related subject to environment variables is aliases. These are handy shortcuts you can write for commonly used commands, and can be a great timesaver. For instance, if you often connect to a specific host via ssh, you can write an alias for it. To set up an alias, just enter something like the following:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;blockquote&gt;alias example=&quot;ssh user@server&quot;&lt;/blockquote&gt;&lt;br /&gt;Now, just enter example, on its own, into the shell, and it will run the command. But, of course, this is only temporary. To make it permanent, set up a file in your home directory called .bash_aliases and add the alias you want to set up to it. Once you&#39;ve done that, every time you start a new shell, all the aliases you&#39;ve defined in the file will be available to you! &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I hope this has given you some idea of how to customise your bash shell to your own liking and improve your workflow in the process!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/8183196707208133252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/8183196707208133252' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/8183196707208133252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/8183196707208133252'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2010/05/going-further-with-environment.html' title='Going further with environment variables'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-4343230780869899993</id><published>2009-05-26T13:30:00.001-07:00</published><updated>2009-05-26T14:16:16.695-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="commandline"/><title type='text'>Introducing Environment Variables</title><content type='html'>What are environment variables? If you&#39;re even vaguely familiar with any programming language you&#39;ll have heard the term variable, which is a method of storing some information, such as a letter, number, or string of text, in a convenient manner that makes it easy to manipulate. Just as an example, here&#39;s a line of Python code (you don&#39;t have to know Python, I&#39;ve just used it because it&#39;s the programming language I know best):&lt;br /&gt;&lt;blockquote&gt;name = raw_input(&quot;Please enter your name: &quot;)&lt;/blockquote&gt;&lt;br /&gt;This should be fairly clear. The variable here is &lt;span style=&quot;font-style: italic;&quot;&gt;name&lt;/span&gt;, because it holds the response to the question.&lt;br /&gt;&lt;br /&gt;Now, the shell is in fact a programming language of sorts, so you can do the exact same thing in the shell. However, the syntax (grammar) is different, as it differs between programming languages. Here&#39;s an example which sets up the variable example to represent a string of text:&lt;br /&gt;&lt;blockquote&gt;matthew@trinity:~$ example=&quot;This is an example&quot;&lt;/blockquote&gt;&lt;br /&gt;This should be easy to follow. Please note, however, that the bash shell, at least, is less forgiving than many programming languages - it won&#39;t tolerate spaces between the elements of the command. Also, while you can set up a variable using a number or a single word and not use quotes, if you want to put in a string of more than one items, you MUST use either single or double quotes.&lt;br /&gt;Now you&#39;ve set this, it&#39;s easy to view it using the echo command, which for those of you with programming experience is like print in Python or Basic. Note when printing the variable you precede it with a dollar sign:&lt;br /&gt;&lt;blockquote&gt;matthew@trinity:~$ echo $example&lt;br /&gt;This is an example&lt;/blockquote&gt;&lt;br /&gt;Environment variables are divided into two types - global and local. Local variables are limited to the current shell session - in other words they&#39;re lost once you exit, and if you have two shell sessions and define a local variable in one of them, it&#39;s not available in the other. Global variables are present throughout the system, and are often defined for you by the system. By convention, they are usually expressed in uppercase.&lt;br /&gt;You can view the global environment variables with the printenv command:&lt;br /&gt;&lt;blockquote&gt;matthew@trinity:~$ printenv&lt;br /&gt;KDE_MULTIHEAD=false&lt;br /&gt;SSH_AGENT_PID=5704&lt;br /&gt;DM_CONTROL=/var/run/xdmctl&lt;br /&gt;TERM=xterm&lt;br /&gt;SHELL=/bin/bash&lt;br /&gt;XDG_SESSION_COOKIE=efec6dfd9a5f464a8c8a6760490c6b47-1243367179.617199-1707425974&lt;br /&gt;XDM_MANAGED=/var/run/xdmctl/xdmctl-:0,maysd,mayfn,sched,rsvd,method=classic&lt;br /&gt;GTK2_RC_FILES=/home/matthew/.gtkrc-2.0-kde:/home/matthew/.kde/share/config/gtkrc-2.0&lt;br /&gt;GTK_RC_FILES=/etc/gtk/gtkrc:/home/matthew/.gtkrc:/home/matthew/.kde/share/config/gtkrc&lt;br /&gt;GS_LIB=/home/matthew/.fonts&lt;br /&gt;WINDOWID=31468213&lt;br /&gt;KDE_FULL_SESSION=true&lt;br /&gt;USER=matthew&lt;br /&gt;LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:&lt;br /&gt;SSH_AUTH_SOCK=/tmp/ssh-YTSIDl5600/agent.5600&lt;br /&gt;SESSION_MANAGER=local/trinity:/tmp/.ICE-unix/5751&lt;br /&gt;DCOP_YAKUAKE_SESSION=4&lt;br /&gt;KONSOLE_DCOP=DCOPRef(yakuake,konsole)&lt;br /&gt;PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games&lt;br /&gt;DESKTOP_SESSION=default&lt;br /&gt;KONSOLE_DCOP_SESSION=DCOPRef(yakuake,session-1)&lt;br /&gt;PWD=/home/matthew&lt;br /&gt;KDE_SESSION_UID=&lt;br /&gt;LANG=en_GB.UTF-8&lt;br /&gt;HISTCONTROL=ignoreboth&lt;br /&gt;HOME=/home/matthew&lt;br /&gt;SHLVL=1&lt;br /&gt;XCURSOR_THEME=DMZ-White&lt;br /&gt;LOGNAME=matthew&lt;br /&gt;LESSOPEN=| /usr/bin/lesspipe %s&lt;br /&gt;DISPLAY=:0&lt;br /&gt;LESSCLOSE=/usr/bin/lesspipe %s %s&lt;br /&gt;COLORTERM=&lt;br /&gt;DCOP_YAKUAKE_TERMINAL=4&lt;br /&gt;_=/usr/bin/printenv&lt;/blockquote&gt;&lt;br /&gt;These variables can be viewed just like any other. I&#39;ll point out three for you in particular. SHELL represents the default shell you have set:&lt;br /&gt;&lt;blockquote&gt;matthew@trinity:~$ echo $SHELL&lt;br /&gt;/bin/bash&lt;/blockquote&gt;&lt;br /&gt;HOME represents your home directory:&lt;br /&gt;&lt;blockquote&gt;matthew@trinity:~$ echo $HOME&lt;br /&gt;/home/matthew&lt;/blockquote&gt;&lt;br /&gt;And finally, PATH represents where your system looks by default for executable files. The different folders are show, separated by commas:&lt;br /&gt;&lt;blockquote&gt;matthew@trinity:~$ echo $PATH&lt;br /&gt;/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games&lt;/blockquote&gt;&lt;br /&gt;This last one is worth mentioning because it can cause problems. Your PATH variable essentially refers to all the places your system will look for an executable. For instance, Firefox on my system is in /usr/bin/firefox. If I type firefox into the terminal and press Enter, the system will search through all the folders in PATH until it finds a file called firefox in one of them, whereupon it executes it.&lt;br /&gt;&lt;br /&gt;Note that the current directory (which would be represented by a period/full stop)does not appear. That&#39;s a security feature common to most Unix-like operating systems - by not looking in the current directory by default, it makes it harder to run a recently downloaded executable file, and that along with the permissions system is one of the things that makes Linux more generally secure than Windows. This is why if you want to run an executable file in the current directory, you need to precede its name with ./ to show that it&#39;s in the current directory, such as ./configure for example, or provide the full path to it, such as /home/matthew/configure.&lt;br /&gt;&lt;br /&gt;Local environment variables don&#39;t have a specific command to print them. However, you can use the set command to display all environment variables, both global and local. I haven&#39;t repeated this here because there was a LOT of it, but if you want to try it just enter the following:&lt;br /&gt;&lt;blockquote&gt;matthew@trinity:~$ set&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Next time, we&#39;ll take a further look at environment variables, and go into more details about how you can use them.</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/4343230780869899993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/4343230780869899993' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/4343230780869899993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/4343230780869899993'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2009/05/introducing-environment-variables.html' title='Introducing Environment Variables'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-8255842549850661152</id><published>2009-03-23T13:34:00.000-07:00</published><updated>2009-03-23T13:56:05.538-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="commandline"/><title type='text'>INX</title><content type='html'>&lt;span style=&quot;font-family: arial;&quot;&gt;If you&#39;ve been following along for a while, you should have picked up a fair bit of knowledge about how to use the command line. You should be comfortable using a non-graphical text editor such as Vim or nano, installing software using apt-get or dpkg, and viewing text files using cat or less. But I strongly suspect you may not be ready to use the command line exclusively!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;However, you may be surprised by just how much can be done from the command line. Did you know you can listen to music from the command line? Or watch videos? Read email? Chat via IRC or IM? Even surf the Web (and not just using a text-only browser such as Lynx, I&#39;m talking about with graphics, although you shouldn&#39;t expect the same experience as you get in Firefox).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Furthermore, there&#39;s a lot you can get from an interactive teaching method, rather than just following along with my blog posts. For that reason, I highly recommend that if you can spare the bandwidth, you download a copy of &lt;/span&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;http://inx.maincontent.net/&quot;&gt;INX&lt;/a&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;. It&#39;s a live CD, based on Ubuntu, that doesn&#39;t include either a desktop or an X window server. In other words, it&#39;s command line only!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Now, I&#39;m not dreaming of suggesting you install this in place of your regular Ubuntu or Ubuntu-derived distro install, but it&#39;s a great teaching tool. It includes the excellent Ceni network manager, which I&#39;ve encountered before in Sidux, another distro which like Ubuntu is based on Debian. Ceni is surprisingly intuitive to use and isn&#39;t appreciably harder to use than Network Manager in Ubuntu.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;INX is also a great showcase for GNU Screen, which is included along with a full tutorial on how to use it. There&#39;s also a great introduction which shows just how much the command line can do. On top of that, there&#39;s a very easy tutorial that teaches you some of the basics of the bash shell, in an interactive and fun way. All the way through you&#39;re given menus to navigate, and you&#39;ll never be left at a blank prompt with nothing obvious to do (unless you ask to!).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;INX is a great way to learn more about the Linux command line, and I strongly recommend everyone who reads this downloads a copy if they can, and either runs it in Virtualbox or burns it to a CD and boots from it. It&#39;s based on Ubuntu Hardy so it should work fine on most hardware. Try it out, and even if you always swore you&#39;d never touch the command line you&#39;ll soon lose your fear and will begin to appreciate just why so many Linux and Unix users are ardent fans of the command line. It&#39;s an interface that in many ways is more powerful and quicker to use than a point-and-click graphical desktop, and INX will help you get the best out of it. And as it&#39;s a live CD you don&#39;t have to worry about messing anything up!&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/8255842549850661152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/8255842549850661152' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/8255842549850661152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/8255842549850661152'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2009/03/inx.html' title='INX'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-6639661201219529598</id><published>2009-02-04T13:49:00.000-08:00</published><updated>2009-03-15T10:19:51.001-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="commandline"/><title type='text'>Redirection</title><content type='html'>&lt;span style=&quot;font-family:arial;&quot;&gt;If you&#39;ve understood pipes reasonably well, redirection should be easy to understand as well. It&#39;s a similar concept in that it involves doing something with the output of a command.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Redirection allows you to send the output of a command into a text file, or send the contents of a file as input to a command. It&#39;s used in a similar fashion to pipes, and is represented by the &gt; symbol.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Here&#39;s an example:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;ls -A &gt; list.txt&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;br /&gt;Try running this and it will generate a list of all the files and folders in your home directory and save it as list.txt. If you then open the created text file using less or cat, you can see the effect for yourself.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Please note, however, that if you use this with an existing file it will be overwritten. However, by using the double redirection sign(&gt;&gt;) you can append the results to the file, so they are added to whatever is there. Try running a variant of the same command:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;ls -A &gt;&gt; list.txt&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;br /&gt;If you&#39;ve done it right, there will be two entries for each item in list.txt.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;You can also use redirection in the opposite direction to send the contents of a file to a command in order to be written to standard output, as in this example:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;matthew@trinity:~/Development/Python/PPAB2ED$ grep game &lt; list.txt&lt;br /&gt;game_over_2.py&lt;br /&gt;game_over2.py&lt;br /&gt;game_over.py&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;br /&gt;&lt;br /&gt;In this case I&#39;d already used ls -A &gt; list.txt to provide a list of the files in a directory I&#39;d used for Python programming. This command allows grep to sort through the file and pick out those lines that have the word &quot;game&quot; in them. OK, there are other ways to do this using pipes, such as cat list.txt | grep game, but this demonstrates how redirection works&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;You can also combine redirection each way within one command. In this case, I use grep to sort through list.txt for lines featuring the word &quot;game&quot;, but I then send the output of that to a new file, game_list.txt:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;matthew@trinity:~$ grep game &lt; list.txt &gt; game_list.txt&lt;br /&gt;matthew@trinity:~$ cat game_list.txt&lt;br /&gt;game_over_2.py&lt;br /&gt;game_over2.py&lt;br /&gt;game_over.py&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;I&#39;ve had to shorten the path to fit this in, but it&#39;s still in the same directory. This demonstrates how you can combine redirection in both ways.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;It&#39;s quite common to see redirection used in shell scripts (programs written in bash) for various purposes, such as capturing errors, editing text files (I&#39;ve seen it used to edit your /etc/apt/sources.list in order to add new repositories) and other purposes. It&#39;s not of use to the average user as often as pipes are, but it&#39;s still worth knowing about.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/6639661201219529598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/6639661201219529598' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/6639661201219529598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/6639661201219529598'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2009/02/redirection.html' title='Redirection'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-6273261952099302573</id><published>2009-01-14T11:53:00.000-08:00</published><updated>2009-01-14T13:14:20.451-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="commandline"/><title type='text'>Pipes</title><content type='html'>&lt;span style=&quot;font-family: arial;&quot;&gt;One of the original philosophies behind Unix is that each program should do one thing only, and do it well, and by and large most command-line applications in Ubuntu continue that tradition. By sticking to just that one task, they remain efficient and powerful.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;But sometimes you may need more complex functionality, and this is where piping comes into its own. Piping allows you to combine commands in a simple but effective way that, if well used, makes them more powerful than the sum of their parts.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;The concept is simple. Say it&#39;s a hot day and you want to water the plants in your garden. You have a tap on the outside wall of your house, but that&#39;s nowhere near the plants. You need to take the output of the tap (water) and use it as input to the plants.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;How do you do it? You use a hosepipe, and that&#39;s exactly what a pipe is in Linux and Unix. It takes the output of one command and uses it as input for another.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;The pipe character looks like this:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;|&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Where you find it differs on different keyboards, and some really do their best to hide it away! It&#39;s often shown as broken in the middle. On my Kubuntu machine it&#39;s on the same key as the backslash (\) character. Make a mental note of where it is, as you&#39;ll find it very handy!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Here&#39;s a simple example. On my Kubuntu laptop, I want to run ls -A, which shows all the files and folders in a directory, including hidden ones, within my /home directory. However, there&#39;s quite a lot here so if I display it all, it&#39;ll just run off the screen. But if I pipe it into the less command, I can easily scroll up and down through them. Here&#39;s how you do it:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;ls -A | less&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Try it out! This is a common way of making directories like this more readable. Note that less didn&#39;t need a file name specified, instead it accepted the output of ls -A as input. Most commands will accept this fine.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Remember I said that grep was more effective when combined with pipes? Well, here&#39;s an example where I&#39;m again running ls -A in my /home directory. However, here I want to find files or folders with bash in their names, so I use grep to filter the output for responses that include bash:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;matthew@trinity:~$ ls -A | grep bash&lt;br /&gt;.bash_history&lt;br /&gt;.bash_logout&lt;br /&gt;.bashrc&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;You can use more than one pipe if you wish. To the best of my knowledge, there&#39;s no upper limit! Here&#39;s an example I used the other day when trying out OpenBSD, another open-source Unix-based operating system similar to Linux. I wasn&#39;t sure what device the CD drive was recorded as, so I ran the following:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;ls /dev | grep -i cd | less&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;The first part listed all the files or folders in the /dev directory (in other words, devices on the computer). I then piped the output into grep, which picked out the files or folders which had cd in their names (note the use of -i to make grep case-insensitive). Finally, I piped the results of that into less so I could easily move up and down through the responses. Although this wasn&#39;t in Linux, it would work exactly the same in Ubuntu as in OpenBSD.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Pipes are extremely powerful. They let you &quot;glue&quot; commands together to make them more useful. You should already be able to see just how useful pipes can be if used well. Next time we&#39;ll deal with a related concept, redirection.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/6273261952099302573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/6273261952099302573' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/6273261952099302573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/6273261952099302573'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2009/01/pipes.html' title='Pipes'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-4314834545044059016</id><published>2009-01-13T12:49:00.000-08:00</published><updated>2009-01-14T10:51:20.853-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="commandline"/><title type='text'>Using grep to find text</title><content type='html'>The grep command is one of the most useful in Linux. It may not seem that exciting at first, but once you learn about pipes (next time!) you&#39;ll begin to see why it&#39;s so indispensable.&lt;br /&gt;&lt;br /&gt;Put simply, grep searches through one or more text files for a specific word or phrase. For any lines it finds which include the specified word or phrase, it will display them on the screen. It will also work with standard output (such as the output of the cat command, for example), when combined with pipes.&lt;br /&gt;&lt;br /&gt;Let&#39;s take a simple example: Your name is Eric and you know that somewhere in your /home directory is a report you&#39;ve written for work. Let&#39;s say you know that it has the word &lt;span style=&quot;font-style: italic;&quot;&gt;competition&lt;/span&gt; in it. So you can instruct grep to search through all the files in your home directory like this:&lt;br /&gt;&lt;blockquote&gt;grep -r competition /home/eric/*&lt;/blockquote&gt;&lt;br /&gt;Note the use of the * wild card character, meaning it will search through every file in /home/eric. Also, I&#39;ve used the -r option here, short for recursive (similar to with rm), so it will also search every folder within /home/eric.&lt;br /&gt;&lt;br /&gt;However, grep is case sensitive, so if you wanted to make it include results in both upper and lower case, you would use the -i option, like this:&lt;br /&gt;&lt;blockquote&gt;grep -ir competition /home/eric/*&lt;/blockquote&gt;&lt;br /&gt;If you&#39;re entering a phrase with more than one word, you&#39;ll need to put it in quotes, like this:&lt;br /&gt;&lt;blockquote&gt;grep &quot;Hello there&quot; hello.txt&lt;/blockquote&gt;&lt;br /&gt;grep is most commonly used just with one file, as in this example, where I&#39;m using to search for the word &lt;span style=&quot;font-style: italic;&quot;&gt;universe&lt;/span&gt; in /etc/apt/sources.list:&lt;br /&gt;&lt;blockquote&gt;matthew@trinity:~$ grep universe /etc/apt/sources.list&lt;br /&gt;## universe WILL NOT receive any review or updates from the Ubuntu security&lt;br /&gt;deb http://gb.archive.ubuntu.com/ubuntu/ hardy universe&lt;br /&gt;deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy universe&lt;br /&gt;deb http://gb.archive.ubuntu.com/ubuntu/ hardy-updates universe&lt;br /&gt;deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-updates universe&lt;br /&gt;# deb http://gb.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse&lt;br /&gt;# deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse&lt;br /&gt;deb http://security.ubuntu.com/ubuntu hardy-security universe&lt;br /&gt;deb-src http://security.ubuntu.com/ubuntu hardy-security universe&lt;br /&gt;matthew@trinity:~$&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;While grep is a simple utility, and is therefore fairly easy to explain, it&#39;s incredibly useful once you get the hang of it. If you want to know more about the various options available, you may want to examine the man page for grep:&lt;br /&gt;&lt;blockquote&gt;man grep&lt;/blockquote&gt;As stated above, its real power comes when you combine it with pipes, which I&#39;ll be demonstrating next time.</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/4314834545044059016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/4314834545044059016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/4314834545044059016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/4314834545044059016'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2009/01/using-grep-to-find-text.html' title='Using grep to find text'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-6564828630039943692</id><published>2008-12-06T12:25:00.000-08:00</published><updated>2008-12-06T12:55:45.867-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="commandline"/><title type='text'>Viewing text files</title><content type='html'>&lt;span style=&quot;font-family: arial;&quot;&gt;One of the central philosophies behind Unix, which Linux has inherited from it, is that configuration files should be plain text. This has the advantage that you can easily edit these files, even if for some reason you can&#39;t start the X window server. So an unbootable system can be repaired (hopefully!) by editing a few text files. It also means you can make changes to your system remotely with ease, by logging on via telnet or ssh (don&#39;t worry if you don&#39;t know what these are!)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;For this reason, Linux has a lot of incredibly powerful tools to enable you to manipulate text files. I&#39;m going to go through several that you can use to view text files from the command line.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;The most basic of these is cat. This just prints the file as standard output - in other words, it just dumps it into your terminal, as in this example:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;matthew@morpheus:~$ cat /etc/apt/sources.list&lt;br /&gt;#deb cdrom:[Ubuntu 8.04 _Hardy Heron_ - Release i386 (20080423)]/ hardy main restricted&lt;br /&gt;# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to&lt;br /&gt;# newer versions of the distribution.&lt;br /&gt;&lt;br /&gt;deb http://gb.archive.ubuntu.com/ubuntu/ hardy main restricted&lt;br /&gt;deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy main restricted&lt;br /&gt;&lt;br /&gt;## Major bug fix updates produced after the final release of the&lt;br /&gt;## distribution.&lt;br /&gt;deb http://gb.archive.ubuntu.com/ubuntu/ hardy-updates main restricted&lt;br /&gt;deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-updates main restricted&lt;br /&gt;&lt;br /&gt;## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu&lt;br /&gt;## team, and may not be under a free licence. Please satisfy yourself as to&lt;br /&gt;## your rights to use the software. Also, please note that software in&lt;br /&gt;## universe WILL NOT receive any review or updates from the Ubuntu security&lt;br /&gt;## team.&lt;br /&gt;deb http://gb.archive.ubuntu.com/ubuntu/ hardy universe&lt;br /&gt;deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy universe&lt;br /&gt;deb http://gb.archive.ubuntu.com/ubuntu/ hardy-updates universe&lt;br /&gt;deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-updates universe&lt;br /&gt;&lt;br /&gt;## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu&lt;br /&gt;## team, and may not be under a free licence. Please satisfy yourself as to&lt;br /&gt;## your rights to use the software. Also, please note that software in&lt;br /&gt;## multiverse WILL NOT receive any review or updates from the Ubuntu&lt;br /&gt;## security team.&lt;br /&gt;deb http://gb.archive.ubuntu.com/ubuntu/ hardy multiverse&lt;br /&gt;deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy multiverse&lt;br /&gt;deb http://gb.archive.ubuntu.com/ubuntu/ hardy-updates multiverse&lt;br /&gt;deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-updates multiverse&lt;br /&gt;&lt;br /&gt;## Uncomment the following two lines to add software from the &#39;backports&#39;&lt;br /&gt;## repository.&lt;br /&gt;## N.B. software from this repository may not have been tested as&lt;br /&gt;## extensively as that contained in the main release, although it includes&lt;br /&gt;## newer versions of some applications which may provide useful features.&lt;br /&gt;## Also, please note that software in backports WILL NOT receive any review&lt;br /&gt;## or updates from the Ubuntu security team.&lt;br /&gt;# deb http://gb.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse&lt;br /&gt;# deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse&lt;br /&gt;&lt;br /&gt;## Uncomment the following two lines to add software from Canonical&#39;s&lt;br /&gt;## &#39;partner&#39; repository. This software is not part of Ubuntu, but is&lt;br /&gt;## offered by Canonical and the respective vendors as a service to Ubuntu&lt;br /&gt;## users.&lt;br /&gt;# deb http://archive.canonical.com/ubuntu hardy partner&lt;br /&gt;# deb-src http://archive.canonical.com/ubuntu hardy partner&lt;br /&gt;&lt;br /&gt;deb http://security.ubuntu.com/ubuntu hardy-security main restricted&lt;br /&gt;deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted&lt;br /&gt;deb http://security.ubuntu.com/ubuntu hardy-security universe&lt;br /&gt;deb-src http://security.ubuntu.com/ubuntu hardy-security universe&lt;br /&gt;deb http://security.ubuntu.com/ubuntu hardy-security multiverse&lt;br /&gt;deb-src http://security.ubuntu.com/ubuntu hardy-security multiverse&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;cat is fine for small text files, but for long ones like this example, the text just scrolls off the screen. So for longer files, it&#39;s better to use an alternative.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;To give you more control when viewing text files, someone came up with the more command, which allows you to scroll through pages of text (for this reason it&#39;s known as a pager). The more command has now been largely replaced by the less command, which is more advanced, but does essentially the same thing. However, both are available in Ubuntu.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Try using less to get a feel for it:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;less /etc/apt/sources.list&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;You can scroll up and down using the cursor keys. Alternatively, if you&#39;re used to the Vim text editor, you can use j and k to scroll up and down, same as you would in Vim. To exit, press Q.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Finally, two commands that you&#39;re unlikely to need unless you&#39;re running Ubuntu as a server are head and tail. As the name suggests, these allow you to view the beginning (head) or the end (tail) of a text file, as in this example for head:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;matthew@morpheus:~$ head /etc/apt/sources.list&lt;br /&gt;#deb cdrom:[Ubuntu 8.04 _Hardy Heron_ - Release i386 (20080423)]/ hardy main restricted&lt;br /&gt;# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to&lt;br /&gt;# newer versions of the distribution.&lt;br /&gt;&lt;br /&gt;deb http://gb.archive.ubuntu.com/ubuntu/ hardy main restricted&lt;br /&gt;deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy main restricted&lt;br /&gt;&lt;br /&gt;## Major bug fix updates produced after the final release of the&lt;br /&gt;## distribution.&lt;br /&gt;deb http://gb.archive.ubuntu.com/ubuntu/ hardy-updates main restricted&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;And this example for tail:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;matthew@morpheus:~$ tail /etc/apt/sources.list&lt;br /&gt;## users.&lt;br /&gt;# deb http://archive.canonical.com/ubuntu hardy partner&lt;br /&gt;# deb-src http://archive.canonical.com/ubuntu hardy partner&lt;br /&gt;&lt;br /&gt;deb http://security.ubuntu.com/ubuntu hardy-security main restricted&lt;br /&gt;deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted&lt;br /&gt;deb http://security.ubuntu.com/ubuntu hardy-security universe&lt;br /&gt;deb-src http://security.ubuntu.com/ubuntu hardy-security universe&lt;br /&gt;deb http://security.ubuntu.com/ubuntu hardy-security multiverse&lt;br /&gt;deb-src http://security.ubuntu.com/ubuntu hardy-security multiverse&lt;/blockquote&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Head and tail are primarily used for log files, which can contain hundreds of lines of text. For example, someone administering a web server would no doubt find tail invaluable to examine the server logs.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;By default head and tail display 10 lines of text, but you can change this with the -n modifier, as in this example:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;matthew@morpheus:~$ tail -n5 /etc/apt/sources.list&lt;br /&gt;deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted&lt;br /&gt;deb http://security.ubuntu.com/ubuntu hardy-security universe&lt;br /&gt;deb-src http://security.ubuntu.com/ubuntu hardy-security universe&lt;br /&gt;deb http://security.ubuntu.com/ubuntu hardy-security multiverse&lt;br /&gt;deb-src http://security.ubuntu.com/ubuntu hardy-security multiverse&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;This applies to head as well.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Over the next few sessions, we&#39;ll go into some of the other useful tools that are available for manipulating text files in Ubuntu.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/6564828630039943692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/6564828630039943692' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/6564828630039943692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/6564828630039943692'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2008/12/viewing-text-files.html' title='Viewing text files'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-5145796014615570117</id><published>2008-11-25T12:03:00.000-08:00</published><updated>2008-11-25T13:00:05.542-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="commandline"/><title type='text'>Handy shortcuts in the bash shell</title><content type='html'>&lt;span style=&quot;font-family: arial;&quot;&gt;You may have noticed that I&#39;ve pushed the use of the command line (or, to give it the proper name, the &lt;/span&gt;&lt;span style=&quot;font-style: italic; font-family: arial;&quot;&gt;shell&lt;/span&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;), over graphical utilities much of the time. This is deliberate - the shell is a fast, flexible and powerful interface. Once you&#39;ve got a bit of experience, most things can be done a lot faster from the shell. Now that I&#39;m used to apt-get and apt-cache, I almost never use Synaptic to install anything in Ubuntu as it&#39;s so much quicker and more efficient to use the shell.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;There are several different shells available for Unix-like operating systems, such as the original Bourne shell, the C shell, the Korn shell (used in Sun&#39;s Solaris operating system, among others), the Z shell (which was used in early versions of Mac OS X), and others. Linux uses the bash shell (in common with more recent versions of Mac OS X and OpenSolaris), which stands for Bourne Again SHell. This is a free software rewrite of the Bourne shell, but with many of the more advanced features of other shells incorporated into it.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Bash includes a number of very handy shortcuts that really make a difference. Don&#39;t you hate having to type out filenames in full, such as package-0.8.1.tar.gz? Me too, but bash has an answer - autocompletion.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;To use autocompletion, start typing a command, then press tab. If bash has enough to confirm what you&#39;re typing, it will automatically fill in the rest. For example:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo apt-get upd&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Press tab here, and there&#39;s enough for bash to autocomplete to this:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo apt-get update&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;But what if you enter this:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo apt-get up&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Here, there&#39;s more than one option. The final word could be update or upgrade, so bash doesn&#39;t know how to complete it. Instead, when you press tab, you&#39;ll hear a bell to show that bash can complete it. But press it again and you&#39;ll be shown a list of possible options, as in this example:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;matthew@morpheus:~$ sudo apt-get up&lt;br /&gt;update   upgrade &lt;br /&gt;matthew@morpheus:~$ sudo apt-get up&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Note that although the line you were on ends, what you&#39;d entered is copied to the new line so you don&#39;t have to retype it.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;This works for filenames and commands, so you could use autocompletion in this example with the file package-0.8.1.tar.gz:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;tar -xzf pack&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Assuming there wasn&#39;t another file in the current directory whose first four letters were pack, this would autocomplete fine. You can also use autocompletion to fill in the names of folders. If you had a path to a file like this:&lt;br /&gt;&lt;blockquote&gt;/usr/share/doc&lt;/blockquote&gt;You could type one or two letters for each folder within the path, and press tab to fill in the rest of the folder name.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Autocompletion is a very handy feature in bash that can save you a lot of time, and makes using the shell a lot quicker and easier.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;There are some other handy keyboard shortcuts you might want to be aware of. I&#39;ve mentioned in a previous post that if you&#39;ve started a process and would like to cancel it, you can press Ctrl-C and the process will stop dead.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Another handy shortcut is Ctrl-D, which acts the same as the exit command ie. it closes down the shell you&#39;ve been using. However, it&#39;s possible to have one shell running inside another so this doesn&#39;t necessarily mean it closes the terminal emulator. For instance, if you open the terminal, you have one shell running. If you then enter bash and press enter, this opens a new shell and places you in it (this would be a subshell). By pressing Ctrl-D here, you&#39;d be returned to your original shell. Pressing it again would close the terminal.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Another is Ctrl-L, which clears the terminal. A similar effect can be had by entering the clear command.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;If you want to repeat previous commands, you can use the up and down cursor keys to scroll through previously used commands in the current session. For example, if you entered ls, then less text.txt, you could press up twice to get ls again.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Finally, two things you may want to know are how to copy and paste. Copying is Ctrl-Shift-C, while pasting is Ctrl-Shift-V or Shift-Insert.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;If you&#39;re interested in learning a few more shortcuts, check out &lt;/span&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;https://help.ubuntu.com/community/AdvancedCommandlineHowto#Other%20shells&quot;&gt;this link&lt;/a&gt;&lt;span style=&quot;font-family: arial;&quot;&gt; for more details. I&#39;d recommend you get familiar with at least the commands mentioned above as these are extremely labour-saving. Also, over the next few posts I plan to delve into the shell a little more and you&#39;ll probably find these shortcuts invaluable.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;I&#39;d also recommend that you find a good command-line editor as these are invaluable for editing configuration files. I highly recommend you take the time to learn Vim using the tutorial mode built into it (just open the shell and enter &lt;span style=&quot;font-weight: bold;&quot;&gt;vimtutor&lt;/span&gt;), as although Vim may seem tough at first, it&#39;s one of those things like touch-typing - at first it slows you down, but soon enough you&#39;ll be faster than you ever were. It&#39;s also a great text editor for if you want to program - I&#39;m currently learning Python and I find it incredibly useful. But if you try it and it really doesn&#39;t work for you, try nano instead. Even though it&#39;s a command-line editor, it&#39;s simple to use.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Finally, if you&#39;re really finding bash an uphill struggle and would prefer something that really goes out of its way to help beginners, why not try &lt;/span&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;http://fishshell.org/&quot;&gt;fish&lt;/a&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;? Short for Friendly Interactive SHell, this is a good choice for newbies, and a great learning tool. But don&#39;t give up on bash! Use fish to learn the ropes if you like it, but bash is more powerful and flexible in the long term. You can get fish from the repositories:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo apt-get install fish&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Then, to run it, just enter the following:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;fish&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;This will set fish running as a subshell within bash.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/5145796014615570117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/5145796014615570117' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/5145796014615570117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/5145796014615570117'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2008/11/handy-shortcuts-in-bash-shell.html' title='Handy shortcuts in the bash shell'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-7616520279049226314</id><published>2008-10-27T14:53:00.000-07:00</published><updated>2008-10-27T15:39:43.543-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="wine"/><title type='text'>Getting started with Wine</title><content type='html'>&lt;span style=&quot;font-family: arial;&quot;&gt;Ubuntu offers a huge range of software from the repositories that cover all kinds of needs. For any one piece of software you can name that you use in Windows, there&#39;s a pretty good chance that something else exists in Linux that can do the same job, often for free. OK, some of them may not be as well known as their Windows counterparts, and they may require a little adjustment, but this is fairly trivial. For most people, Ubuntu can do everything they use Windows for.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;But what if you absolutely need to use a specific application? Or you have other software that you bought for Windows and would like to be able to run? Or even those games you may still have?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Well, the answer is &lt;/span&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;http://www.winehq.org/&quot;&gt;Wine&lt;/a&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;. It stands for Wine Is Not an Emulator. It&#39;s a compatibility layer for running Windows programs. Essentially, it allows you to run many Windows programs on Linux. Wine recently released a stable 1.0 version after 15 years in development, and although it&#39;s by no means perfect, you may be surprised at just how good it is. I have successfully run two of my favourite games on it (Homeworld and Homeworld 2, the second of which doesn&#39;t seem to work in Vista!), and many other games are well supported and will work straight away. For some others, you can get them running with a little work - the website features a search engine so you can check the compatibility of something before you try it. If you have some Windows games you haven&#39;t been able to run, why not dig them out and give them a try?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Wine is in the Ubuntu repository, but unless you&#39;re already running the next version, Intrepid Ibex, this version may not be very up to date. It&#39;s probably better to go with the official version.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;To install the current version of Wine, you need to add another repository. Open a terminal and enter the following:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;This will download the APT key for the Wine repository. Now, to add the repository to you /etc/apt/sources.list:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/hardy.list -O /etc/apt/sources.list.d/winehq.list&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;This is the version for Hardy Heron. For Intrepid Ibex, you need to enter this instead:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/intrepid.list -O /etc/apt/sources.list.d/winehq.list&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Now to update it:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo apt-get update&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;And to install Wine:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo apt-get install wine&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Now, Wine creates its own entry in your applications menu, as shown here on my Kubuntu Hardy system:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style=&quot;font-family: arial;&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgP1uNQSmTgqYjFC6hiNhWpHiFCGSQ03aeQhLfwX7wY36qHr3aIAR6x4UTLhHOqbwu3HVZEf7MJW0Ak2ocIhxqCL4yiFP0EqVCC5tNCSKVKCKXCT3Wvk3pdfKMPq2n0vuRfu_6Q24jGGs/s1600-h/snapshot1.png&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgP1uNQSmTgqYjFC6hiNhWpHiFCGSQ03aeQhLfwX7wY36qHr3aIAR6x4UTLhHOqbwu3HVZEf7MJW0Ak2ocIhxqCL4yiFP0EqVCC5tNCSKVKCKXCT3Wvk3pdfKMPq2n0vuRfu_6Q24jGGs/s400/snapshot1.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5261961306582790450&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;This is how it looks in Kubuntu with Tasty Menu, but any Ubuntu variant should show the same four items for a newly installed copy of Wine: Notepad, Uninstall, Browse C Drive and Configure Wine.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Wine works by creating a folder in your home directory called .wine. This is then set up to trick the applications into thinking they are running on Windows. Choosing the Browse C Drive option lets you open a folder inside .wine called drive_c, which emulates the C drive (the main hard drive) on a Windows install. This is where anything you install using Wine will reside.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Notepad is a clone of the Windows version, and Uninstall is essentially a copy of the Windows Add/Remove software dialogue. That leaves Configure Wine, which comes up with this:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style=&quot;font-family: arial;&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsPi4ChnENwkLQb5xq-4o9eyoR6VN7D0bj8AYJkFbSZGxcjaJqN6vyPOqKws-tV3NcDU_dweN7lbqKNayxUf82XjncOtqKNqFYCB1O_GECTB_vLdmrP6EOt0F0abQNhJ84_Vi3xQ1tUts/s1600-h/snapshot2.png&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsPi4ChnENwkLQb5xq-4o9eyoR6VN7D0bj8AYJkFbSZGxcjaJqN6vyPOqKws-tV3NcDU_dweN7lbqKNayxUf82XjncOtqKNqFYCB1O_GECTB_vLdmrP6EOt0F0abQNhJ84_Vi3xQ1tUts/s400/snapshot2.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5261963368826862626&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;This dialogue lets you configure Wine to help make things work. For instance, you can specify for it to emulate different versions of Windows - even to the point of being able to run one as XP, another as Vista, and a third as Windows 98, for example! This gives you huge scope to tinker and get software working.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;For the most part, getting something working is easy. For a Windows EXE file, I find that whether you&#39;re using Gnome or KDE, you can just click on it as usual and it will run. You can also run it from the command line with something like this:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;wine setup.exe&lt;/blockquote&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Other types of files are generally just as easy to run. If you have an application on a CD or DVD that you wish to install, it won&#39;t usually autorun the way it does in Windows, but instead you have to browse through the disc yourself and locate the appropriate file (which is usually setup.exe, autorun.exe, or something similar). Follow the installer&#39;s instructions as usual and it should install fine.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;For more  information about using Wine, I&#39;d suggest going to &lt;/span&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;http://www.winehq.org/&quot;&gt;their website&lt;/a&gt;&lt;span style=&quot;font-family: arial;&quot;&gt; and having a good look around. Nearly every piece of software you can think of has been tried with Wine, and they give ratings for how well it works in Wine, often including instructions.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Now, I won&#39;t claim that Wine is perfect. Not everything will work on it, and not everything that does work on it works well. But you may be surprised at how well it does do, and it&#39;s improving all the time. If there&#39;s one or two applications you use in Windows that are keeping you from making the switch to Ubuntu, why not try Wine to see if they will run?&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/7616520279049226314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/7616520279049226314' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/7616520279049226314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/7616520279049226314'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2008/10/getting-started-with-wine.html' title='Getting started with Wine'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgP1uNQSmTgqYjFC6hiNhWpHiFCGSQ03aeQhLfwX7wY36qHr3aIAR6x4UTLhHOqbwu3HVZEf7MJW0Ak2ocIhxqCL4yiFP0EqVCC5tNCSKVKCKXCT3Wvk3pdfKMPq2n0vuRfu_6Q24jGGs/s72-c/snapshot1.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-1271619500549126262</id><published>2008-10-16T13:12:00.000-07:00</published><updated>2008-10-16T14:18:59.329-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="files"/><title type='text'>Tar files</title><content type='html'>&lt;span style=&quot;font-family: arial;&quot;&gt;It&#39;s quite likely that if you&#39;ve been using Linux for any great length of time, you&#39;ll have discovered tar files. If you go to a website and download something which is offered as the Linux version of an application, the chances are it will be a tar archive (although some offer separate RPM and deb packages for different distros). Tar files are widely used in Linux, as well as in other Unix-like operating systems.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;So what are they? Well, if you&#39;ve come from a Windows background, you should be familiar with .zip files. These don&#39;t usually contain an application, but instead contain a collection of files. The .zip format is simply a convenient way to store them as it rolls them into one file and compresses it, making it ideal for distributing these files across the Internet or storing them.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Well, tar files are Linux and Unix&#39;s equivalent. Tar stands for &lt;/span&gt;&lt;span style=&quot;font-style: italic; font-family: arial;&quot;&gt;T&lt;/span&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;ape &lt;/span&gt;&lt;span style=&quot;font-style: italic; font-family: arial;&quot;&gt;Ar&lt;/span&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;chive, and the term comes from backing up to a magnetic tape. Like .zip files, tar files are usually used as a convenient and easy way to store or distribute a collection of files. However, it&#39;s far more common for tar files to be used to distribute applications than it is for .zip files. If you download a non distro-specific Linux binary, that will usually be packaged as a tar file. Also, if you download source code for an application, you can generally expect it to be packaged as a tar file.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Although it&#39;s best to use a deb package in Ubuntu where possible, there are times when you can only get something as a tar package. So being able to deal with tar packages is a necessary Linux skill. In addition, they&#39;re ideal for backing up files in case something goes wrong.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Tar files aren&#39;t compressed by default. There are two utilities available to compress them: &lt;/span&gt;&lt;span style=&quot;font-style: italic; font-family: arial;&quot;&gt;bzip2&lt;/span&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;and &lt;/span&gt;&lt;span style=&quot;font-style: italic; font-family: arial;&quot;&gt;gzip&lt;/span&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;. Normally you&#39;ll be able to tell which one has been used from the file extensions used. This example is compressed using &lt;/span&gt;&lt;span style=&quot;font-style: italic; font-family: arial;&quot;&gt;bzip2&lt;/span&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;package.tar.bz2&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;While this is compressed using &lt;/span&gt;&lt;span style=&quot;font-style: italic; font-family: arial;&quot;&gt;gzip&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;package.tar.gz&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;That&#39;s pretty simple to follow, but remember that unlike Windows, Linux doesn&#39;t rely on file extensions to ascertain what a file is in quite the same way, and someone can easily give a package a completely different extension. So you may see variations such as .tgz.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;There are plenty of graphical applications available to deal with these packages, but as usual we&#39;re going to go the command-line route! For this example I&#39;m going to use the &lt;/span&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;http://wordpress.org/&quot;&gt;Wordpress&lt;/a&gt; software, as this is available as a gzipped tar package, and is a mere 1MB in size.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Click on &lt;/span&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;http://wordpress.org/latest.tar.gz&quot;&gt;this link&lt;/a&gt;&lt;span style=&quot;font-family: arial;&quot;&gt; to download the current version of Wordpress. If the package winds up on your desktop, move it to your /home directory to make it more convenient to work with.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Now, to extract the contents of an uncompressed tar archive, you would enter the following:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt; tar -xf packagename.tar&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;The x tells tar that you want to extract the files, while the f indicates that the filename for the package follows.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;But this won&#39;t deal with the compression. To make it work in this case, you need to tell tar to uncompress the archive as well. In order to do so, tar needs to know whether the package uses &lt;/span&gt;&lt;span style=&quot;font-style: italic; font-family: arial;&quot;&gt;bzip2&lt;/span&gt;&lt;span style=&quot;font-family: arial;&quot;&gt; or &lt;/span&gt;&lt;span style=&quot;font-style: italic; font-family: arial;&quot;&gt;gzip&lt;/span&gt;&lt;span style=&quot;font-family: arial;&quot;&gt; compression.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;In our example, the package uses gzip. To handle this, add a z to the options. So, to uncompress and extract Wordpress, we need to enter the following:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;tar -xzf wordpress-2.6.2.tar.gz&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;This will create a new folder called wordpress, which contains all the files you need to get Wordpress working on your system. But we&#39;re not going to do that (at least, not until at least after the end of the lesson!). Instead, we&#39;re going to become familiar with the tar command by using it to both create and extract archives.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;If you run ls, you&#39;ll notice the original archive is still there. Move it to another directory so it&#39;s out of the way, but still there in case you need it. Now, we&#39;ll use the wordpress folder you just extracted to create a bzipped tar file.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Now, because you&#39;re creating an archive rather than extracting one, you don&#39;t use the x option. Instead you use the c option. This is easy to remember as it&#39;s c to create, x to extract. You need to include the f option as again you need to specify the filename. The difference is, you also need to specify the path to the folder you want to create an archive from. This makes the default something like this:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;tar -cf packagename.tar /folder&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;But as with extracting the archive, you need to add options to compress it. Fortunately, you can used the same option for each type of compression whether you&#39;re creating or extracting, so with &lt;/span&gt;&lt;span style=&quot;font-style: italic; font-family: arial;&quot;&gt;gzip&lt;/span&gt;&lt;span style=&quot;font-family: arial;&quot;&gt; you would always put a z. For &lt;/span&gt;&lt;span style=&quot;font-style: italic; font-family: arial;&quot;&gt;bzip2&lt;/span&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;, you use j. So, to create an archive of the wordpress folder and compress it with bzip2, you&#39;d enter the following:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;tar -cjf wordpress.tar.bz2 wordpress&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Notice that again, the original folder is still there. Remove it with the following command to get it out of the way:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;rm -rf wordpress&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Now, let&#39;s just extract this again, then create another archive using and you&#39;ll be familiar with extracting and creating both gzipped and bzipped tar files. Enter the following to extract your bzipped tar file:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;tar -xjf wordpress.tar.bz2&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;That should extract the file once more as wordpress. Finally, lets turn it into a gzipped tar file:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;tar -czf wordpress.tar.gz wordpress&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;That&#39;s it! Now you should be sufficiently savvy with tar files to be able to extract and create them as you wish!&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;There are many more options available for tar, such as v, which verbosely lists extracted files (so as it extracts files, it lists them), among others. If you want to know more, I suggest you study the man page for tar, using the following command:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;man tar&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;One final note. Ubuntu does include the unzip utility, which enables you to extract Windows .zip files using the following command:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;unzip file.zip&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;So if you need to transfer something across from Windows to Linux, it&#39;s fine to zip it up in Windows and extract it in Linux.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Dealing with tar files is necessary for installing any software that isn&#39;t specifically packaged for your distro. If you download a tar file for an application, to install it you need to extract the archive and look in the resulting folder for a text file called something like INSTALL or README. You will usually find something that will give instructions on how to install it. For source code, there will usually be instructions on how to compile the application from source.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/1271619500549126262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/1271619500549126262' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/1271619500549126262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/1271619500549126262'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2008/10/tar-files.html' title='Tar files'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-6604424563282159698</id><published>2008-09-18T11:14:00.000-07:00</published><updated>2008-09-18T13:07:42.388-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="filesystem"/><title type='text'>Permissions</title><content type='html'>&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;Something we haven&#39;t touched on yet is permissions in Ubuntu. The concept of permissions is highly important to how Linux works.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;As you may know, Linux is a clone of the Unix operating system. Unix was originally designed to be used on huge systems which might have hundreds or even thousands of users, such as in universities, and it was therefore important to establish who was entitled to do what. The concept of groups therefore came about. By creating groups, and making individual users members of these groups, system administrators could set what users could do quickly and easily.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;For example, refer back to the VirtualBox install article a while back and you&#39;ll notice that in order to use VirtualBox, a user needs to be a member of a group called &quot;vboxusers&quot;. By adding a user name &quot;fred&quot;to this group, this shows that the administrator has given permission for the user fred to use VirtualBox. Now, to a certain extent this is a little redundant on a desktop system that will have only a handful of users, but it illustrates how Unix-like operating systems such as Linux handle files. In Ubuntu, a normal user will belong to a group based on their username, but other Linux distributions may instead have a group called &quot;users&quot;.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;A user account has limits. Each user has their own directory in the /home folder (so in this example, fred has /home/fred), in which they can save and edit files, but normally they can&#39;t save elsewhere. Users can move around, but some files are out of bounds. Some files (normally system files, such as your /etc/apt/sources.list), can be read, but not written to, so you could open it in a text editor, edit it and save a copy in your own home folder, for example, but you couldn&#39;t edit and save the original. This is enforced by the use of file permissions.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;Each file or directory is owned by a user. For instance, if the user fred rips a CD using Sound Juicer and save it to a directory called Music in his /home directory, he will be the owner of the audio files created. He&#39;s therefore free to do as he wishes with these files. If he then logs out and another user, jane, logs in, she is not the owner and what she can do with these files will be subject to the permissions fred has set for these files. He can if he wishes make these files available for other users to edit or delete if they wish, or he can make them read-only. If he prefers not to share these, he can deny anyone else access to the files.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;Another thing to note is the Unix philosophy that &quot;everything is a file&quot;. This includes folders, so fred can also make entire folders read only, or can deny others access to them completely. So he could make his entire /home directory available for others to access or edit, or keep people from accessing it entirely.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;There are three sets of permissions for each file or folder. There is one for the user, one for the specified group, and one for everyone else. To demonstrate this, open your file manager (Nautilus in Ubuntu, Konqueror or Dolphin in Kubuntu and Thunar in Xubuntu). Right-click on a file or folder and select Properties. Select the Permissions tab and you&#39;ll see something like this:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style=&quot;font-family: arial;&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA5cyyBQkzv4EXg-XKllrMtppNOawQ8X5_HEzNNsn2AyeSZnC5C8Tg0V5Jjqhbw6ukoLXgeGGA5xPYj5DJhC_EsAi_ISJvGcXOaT1wHb3AGivADQ7bVSds1JBvxqRH8lgfO3k7FvgDgRg/s1600-h/Screenshot.png&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA5cyyBQkzv4EXg-XKllrMtppNOawQ8X5_HEzNNsn2AyeSZnC5C8Tg0V5Jjqhbw6ukoLXgeGGA5xPYj5DJhC_EsAi_ISJvGcXOaT1wHb3AGivADQ7bVSds1JBvxqRH8lgfO3k7FvgDgRg/s400/Screenshot.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5247438689753986146&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;You may want to open this image in a separate tab so you can see it better. As you can see, each set of users has a dropdown box for you to set the permissions, and Group has an additional dropdown so you can set the permissions for each group. So far, this may have seemed quite technical, but hopefully this makes it a bit easier to understand!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;There&#39;s three types of access you can set for a file:&lt;/span&gt;&lt;br /&gt;&lt;ul style=&quot;font-family: arial;&quot;&gt;&lt;li&gt;You can set out who is allowed to read a file;&lt;/li&gt;&lt;li&gt;You can set out who is allowed to write to a file;&lt;/li&gt;&lt;li&gt;And you can set who can execute (run) a file&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;Normally, a file in your /home directory which you own will allow you to read or write to it, but not execute it (this is just another one of the reasons why Linux is regarded as being more secure than Windows, as by default a freshly downloaded file can&#39;t be executed straight away). So, if you wanted to run it, you&#39;d have to change the permissions on it. For instance, if you write a shell script to automate a task for you, you&#39;ll need to give yourself permission to run it.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;One other thing to remember: Opening a folder is executing it, not reading it. So if you want to prevent other people looking in a folder, it should not be executable for others.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;To illustrate the permissions on the files in a directory, run the following command:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;ls -lh&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;You should see something like this:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;matthew@matthew-laptop2:~/Demonstration$ ls -lh&lt;br /&gt;total 8.0K&lt;br /&gt;drwxr-xr-x 2 matthew matthew 4.0K 2008-09-18 20:31 Example&lt;br /&gt;-rw-r--r-- 1 matthew matthew   13 2008-09-18 20:30 example.txt&lt;br /&gt;matthew@matthew-laptop2:~/Demonstration$&lt;br /&gt;&lt;/blockquote&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;Now, pay attention to the string of characters at the start of each sentence. The d at the start of the Example line indicates this is a directory, while this is a dash for example.txt, showing that this is not a directory.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;The next three characters give the permissions for the owner. The r shows this can be read, the w shows this can be written, and the x shows it&#39;s executable. As example.txt shows a dash instead of an x, it shows it&#39;s not executable, but the r and w show it can still be read or written to.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;The next three characters show the permissions for the group specified (more on this a bit later). The format is the same. Then, the final three characters are the permissions for everyone else.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;You&#39;ll notice there are two names afterwards. The first is the name of the owner, while the second is the owner&#39;s group. As stated previously, in Ubuntu each user has their own group. The rest is information about the file.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;OK, so we&#39;ve established what permissions are. Now, how can we change them? You can easily use a file manager to change these, as demonstrated in the screenshot above, but as usual I&#39;m going to point you towards the terminal as the best way to do it.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;First, to change permissions, you use the chmod command. In this example, to make the example.txt document available so that everyone can read and write to it, you enter this:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;chmod a+rw example.txt&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;This is quite easy to follow - all users (a) add (+) read (r) and write (w) permissions. Another example:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;chmod a-w example.txt&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;This means all users (a) take away (-) write (w) permission. You can edit permissions for just the user as follows:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;chmod u+rw example.txt&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;Similarly, you can edit it for the group like this:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;chmod g+rw example.txt&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;Or you can edit it for others:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;chmod o+rw example.txt&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;Please note that you can leave out the first character, which means it will default to a (all), as in this example:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;chmod +x example.txt&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Now, say you&#39;ve written a shell script called housekeeping to automate a common task for you. To enable this to run, you need to make it executable, like this:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;chmod +x housekeeping&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;OK, so now you should understand how to change permissions for a file or folder. But what about changing the user who owns it? There&#39;s an easy way to do this, using the chown (CHange OWNer) command. Please note, this must be run using sudo for security reasons. So if fred wants jane to own his example.mp3 file, he should run the following:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo chown jane example.mp3&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;He can also change the group at the same time:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo chown jane.examplegroup example.mp3&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;Or, he can change the group alone with chgrp (CHange GRouP):&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo chgrp examplegroup example.mp3&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;font-family:arial;&quot; &gt;This is a fairly complex concept, so you may want to spend some time getting familiar with the idea of permissions.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/6604424563282159698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/6604424563282159698' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/6604424563282159698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/6604424563282159698'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2008/09/permissions.html' title='Permissions'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA5cyyBQkzv4EXg-XKllrMtppNOawQ8X5_HEzNNsn2AyeSZnC5C8Tg0V5Jjqhbw6ukoLXgeGGA5xPYj5DJhC_EsAi_ISJvGcXOaT1wHb3AGivADQ7bVSds1JBvxqRH8lgfO3k7FvgDgRg/s72-c/Screenshot.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-4335084678774748700</id><published>2008-08-25T09:30:00.000-07:00</published><updated>2008-08-25T09:53:33.336-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="filesystem"/><title type='text'>Manipulating files and folders</title><content type='html'>&lt;span style=&quot;font-family: arial;&quot;&gt;Apologies for the delay since my last post - as I don&#39;t have access to the Internet during the week at present and my parent&#39;s Internet connection has been playing up, it&#39;s been hard to get any blogging done! Hopefully that will change soon!&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Anyway, manipulating files and folders is something that you need to know about, seeing that Linux applies the Unix philosophy of &quot;everything is a file&quot;. So I&#39;ll walk you through some basic commands.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;First up is mkdir. This command makes a new folder. So, if you&#39;re in your /home directory and you enter the following:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;mkdir Work&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;You&#39;ll create a new directory called Work. Never forget that Linux, unlike Windows, is case sensitive. Also, if you want to create a new directory anywhere other than in your own /home directory, you&#39;ll need to use sudo.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;To remove an empty directory, you can use rmdir, as in this example:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;rmdir Work&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Now, to remove a file, you use the rm command, as in this example where we&#39;re deleting the document Example.html:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;rm Example.html&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Like most commands in Linux, rm has a number of options you can specify. A word of warning: watch out for the command rm -rf. The r option means remove things recursively (so you can remove a directory AND everything inside it), while the f option forces it, even if it gives a warning. You can specify the folder you want to delete with its path, so NEVER run the following command (unless you actually want to destroy your system!):&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo rm -rf /&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;This means &quot;delete the whole filesystem recursively, ignoring all warnings, with root access&quot;, essentially meaning delete everything!. I&#39;ve tried this on VirtualBox installs of Ubuntu and it will destroy everything on your system! That said, the command rm -rf can be quite handy for deleting a folder and it&#39;s contents, but be VERY careful with it!&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;To copy a file, use the cp command, with the source followed by the destination, as in this example:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;cp Example.html /media/USB&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;You can change the name of the destination by specifying the file name as well, like this:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;cp Example.html /media/USB/Example2.html&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Moving a file is similar to copying it, with similar syntax:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;mv Example.html /media/USB&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;And again you can change the name, in the same way as with cp. Or you can use it to rename a file without moving it, like this:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;mv Example.html Example2.html&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Now, moving files and folders is all very well, but how can you show them? Simple, use the ls command:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;ls&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;To show hidden files and folders as well, use this:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;ls -A&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;As usual, if you want to know more about these commands, refer to the man pages for more specific guidelines. Hopefully this has given you enough to get started. I recommend spending a little time becoming comfortable with these commands, they&#39;ll give you a sound grasp of the fundamentals of using the command line.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/4335084678774748700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/4335084678774748700' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/4335084678774748700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/4335084678774748700'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2008/08/manipulating-files-and-folders.html' title='Manipulating files and folders'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-3441568071398326606</id><published>2008-07-26T12:53:00.000-07:00</published><updated>2008-07-27T07:46:00.412-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="commandline"/><title type='text'>Navigating folders from the command line</title><content type='html'>If you&#39;ve followed the posts on this blog for a while, you should be reasonably comfortable using the command line to install software, edit configuration files and so on. You should also be aware of the layout of the Linux filesystem. However, you may not be aware of how to navigate it without using a graphical file manager such as Nautilus or Konqueror. So in this post I&#39;m going to go through basic commands for navigating from the command line.&lt;br /&gt;&lt;br /&gt;First of all is the cd command. This is short for &quot;change directory&quot;. The default location for you to start is in your home directory, and entering the following:&lt;br /&gt;&lt;blockquote&gt;cd&lt;/blockquote&gt;&lt;br /&gt;will take you to your home directory. You can also use the ~ character (known as a &lt;span style=&quot;font-style: italic;&quot;&gt;tilde&lt;/span&gt;) as shorthand for your home directory, which is useful if referring to your home directory from elsewhere. So, entering the following:&lt;br /&gt;&lt;blockquote&gt;cd ~&lt;/blockquote&gt;&lt;br /&gt;will give the same results as the previous command.&lt;br /&gt;&lt;br /&gt;You can also navigate up one directory as follows:&lt;br /&gt;&lt;blockquote&gt;cd ..&lt;/blockquote&gt;&lt;br /&gt;And can go back to the previous directory using this command:&lt;br /&gt;&lt;blockquote&gt;cd -&lt;/blockquote&gt;&lt;br /&gt;These commands can be used as part of longer paths. For instance, say you are currently in /var/www but want to go to a folder called Music in your home folder. You can go there with this command:&lt;br /&gt;&lt;blockquote&gt;cd /home/username/Music&lt;/blockquote&gt;&lt;br /&gt;Or you can use this:&lt;br /&gt;&lt;blockquote&gt;cd ~/Music&lt;/blockquote&gt;&lt;br /&gt;Now, say you want to go from there to another folder in your home directory called Pictures. You can enter this:&lt;br /&gt;&lt;blockquote&gt;cd ../Pictures&lt;/blockquote&gt;&lt;br /&gt;Then, to head back to the Music folder, you can enter the following:&lt;br /&gt;&lt;blockquote&gt;cd -&lt;/blockquote&gt;&lt;br /&gt;And to head to the root of the filesystem, just enter the following:&lt;br /&gt;&lt;blockquote&gt;cd /&lt;/blockquote&gt;&lt;br /&gt;Now, how can you see where you are? Easy, just enter the pwd command (short for Print Working Directory). Here I&#39;m in the Desktop directory:&lt;br /&gt;&lt;blockquote&gt;/home/matthew/Desktop&lt;/blockquote&gt;&lt;br /&gt;Got that? I recommend you spend a little time getting comfortable with these commands as they are the first building blocks in becoming proficient at the command line. Next time I&#39;ll go into creating and deleting files and folders.</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/3441568071398326606/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/3441568071398326606' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/3441568071398326606'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/3441568071398326606'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2008/07/navigating-folders-from-command-line.html' title='Navigating folders from the command line'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-4903380201552791400</id><published>2008-07-20T07:00:00.000-07:00</published><updated>2008-07-20T08:12:55.729-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="desktops"/><title type='text'>Recreating my Ubuntu desktop</title><content type='html'>&lt;span style=&quot;font-family: arial;&quot;&gt;I&#39;ve been asked how to recreate the desktop I showed in the previous post in Ubuntu. For those who haven&#39;t seen it, here it is:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style=&quot;font-family: arial;&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuL5sdLsI3GELAm5qC8uC19_KrWgjOWtz2KDuNDRTmyApyccWi5U3Y3M0mDhXLRwDktgTNzJIjzXSwNAx14kITB0AZytKwA9NoRfRiBG-E0qZTgK0LIoQtwS2DozrIS-cs5Tv0WhoeqI8/s1600-h/Screenshot.png&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuL5sdLsI3GELAm5qC8uC19_KrWgjOWtz2KDuNDRTmyApyccWi5U3Y3M0mDhXLRwDktgTNzJIjzXSwNAx14kITB0AZytKwA9NoRfRiBG-E0qZTgK0LIoQtwS2DozrIS-cs5Tv0WhoeqI8/s400/Screenshot.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5225096824252282194&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;OK, first of all there&#39;s a number of applications you need (I&#39;m assuming you&#39;re working from a fresh install). So run the following command:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo apt-get install avant-window-navigator awn-manager compizconfig-settings-manager emerald gnome-do gnome-do-plugins&lt;br /&gt;&lt;/blockquote&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Strictly speaking, Gnome Do isn&#39;t required as it doesn&#39;t contribute to the appearance, but it&#39;s a very handy application launcher.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Once these are installed, you&#39;ll need to remove the bottom panel. Move any applets you want to keep up to the top panel, then right-click on the bottom panel and select Remove This Panel. To set Avant Window Navigator to run when you start up, go to System&gt;Preferences&gt;Sessions and select Add. Then enter Avant Window Navigator as the name, and /usr/bin/avant-window-navigator as the command. You can put anything you like for the description (I put &quot;Mac OS X-style dock bar&quot;).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Now to grab the packages you need:&lt;/span&gt;&lt;br /&gt;&lt;ol style=&quot;font-family: arial;&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://www.compiz-themes.org/content/show.php/Genesis?content=84946&quot;&gt;Genesis Emerald Theme&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://gnome-look.org/content/show.php/Blue-Joy?content=73387&quot;&gt;Blue-Joy GTK Theme&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://gnome-look.org/content/show.php/Oxygen+Refit+2?content=79756&quot;&gt;Oxygen Refit 2 Icon Theme&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://interfacelift.com/wallpaper/details.php?id=610&quot;&gt;Peace Wallpaper&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Now open System&gt;Preferences&gt;Appearance. From the Theme tab, click on Install. You&#39;ll be able to browse your filesystem for the theme packages you just downloaded. Use this method to install the Blue-Joy GTK theme and the Oxygen Refit 2 icon theme. For the background, go to the Background tab, click on Add, and select it using the file browser. You might want to copy it to your/usr/share/backgrounds so all users can have it - this can be done with the following command:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo cp (insert name of image here) /usr/share/backgrounds&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Finally, to install the Emerald theme. Go to System&gt;Preferences&gt;Emerald Theme Manager. Click on Import, select the theme package, and click on Open. You should then be able to select the theme package from the list of those installed.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;However, it won&#39;t have any immediate effect as Emerald isn&#39;t running. To start it up, enter the following command at the terminal:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;emerald --replace&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;To make Emerald always be the default window decorator, open CompizConfig Settings Manager and look for Window Decorator under Effects. Check the box, then click on the icon to adjust the settings. Replace whatever is in the Command box with emerald --replace.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;If you now log out, restart your X window server using the Options menu from the login page, then log back in, Emerald and AWN should be running straight away. You can then add whatever launchers you want, but by default AWN only has the launcher applet. If you want to add Ubuntu Tweak so you can add more applets to AWN, please refer to &lt;/span&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;http://easierbuntu.blogspot.com/2008/07/using-ubuntu-tweak-to-get-third-party.html&quot;&gt;my previous post&lt;/a&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;If you&#39;re interested in recreating the dock bar I&#39;ve got, here it is from left to right:&lt;/span&gt;&lt;br /&gt;&lt;ol style=&quot;font-family: arial;&quot;&gt;&lt;li&gt;File Browser applet&lt;/li&gt;&lt;li&gt;Firefox launcher&lt;/li&gt;&lt;li&gt;Exaile music player launcher&lt;/li&gt;&lt;li&gt;VLC media player launcher&lt;/li&gt;&lt;li&gt;GIMP launcher&lt;/li&gt;&lt;li&gt;Evolution launcher&lt;/li&gt;&lt;li&gt;Pidgin launcher&lt;/li&gt;&lt;li&gt;Jokosher audio editor launcher&lt;/li&gt;&lt;li&gt;Kino launcher&lt;/li&gt;&lt;li&gt;F-Spot launcher&lt;/li&gt;&lt;li&gt;Skype launcher&lt;/li&gt;&lt;li&gt;Last.fm launcher (not the Last.fm applet, I couldn&#39;t get that to work)&lt;/li&gt;&lt;li&gt;XChat IRC client launcher&lt;/li&gt;&lt;li&gt;Time Vault launcher&lt;/li&gt;&lt;li&gt;Ubuntu Tweak launcher&lt;/li&gt;&lt;li&gt;Gnome Terminal launcher&lt;/li&gt;&lt;li&gt;Showdesktop applet&lt;/li&gt;&lt;li&gt;Stacks Trasher applet&lt;/li&gt;&lt;/ol&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;I personally really like this desktop. I&#39;m normally more of a KDE guy (I have a separate Kubuntu install on another computer, while this computer is dual-booting Vista and Ubuntu), but I really enjoy working in this kind of environment. I&#39;ve added two more virtual desktops so as to get the cube effect, and the whole thing looks amazing.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;One problem with using this theme is that a lot of things are black that aren&#39;t normally (such as the paper in OpenOffice!) and I haven&#39;t yet found a way round this, so this might be a problem. I&#39;m hoping the theme&#39;s author will be able to resolve this.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/4903380201552791400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/4903380201552791400' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/4903380201552791400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/4903380201552791400'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2008/07/recreating-my-ubuntu-desktop.html' title='Recreating my Ubuntu desktop'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuL5sdLsI3GELAm5qC8uC19_KrWgjOWtz2KDuNDRTmyApyccWi5U3Y3M0mDhXLRwDktgTNzJIjzXSwNAx14kITB0AZytKwA9NoRfRiBG-E0qZTgK0LIoQtwS2DozrIS-cs5Tv0WhoeqI8/s72-c/Screenshot.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-6494702624833990125</id><published>2008-07-19T07:13:00.000-07:00</published><updated>2008-07-19T08:16:28.121-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="desktops"/><title type='text'>Using Ubuntu Tweak to get third-party apps</title><content type='html'>&lt;span style=&quot;font-family: arial;&quot;&gt;The likes of Compiz and Avant Window Navigator are great for improving the appearance and usability of your Ubuntu desktop, but out of the box many of them don&#39;t include the latest and greatest features. For instance, Avant Window Navigator is available from the Ubuntu repositories in Hardy, but there&#39;s no applets available from there other than the launcher applet. This is a shame as there are a lot of applets which improve the functionality of AWN no end. The same applies for Compiz - how can you get new new plugins such as Cube Deformation (allowing you to change the cube to a cylinder or sphere)?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Now, one way is to add the respective PPA (Personal Package Archive) on Launchpad to your /etc/apt/sources.list. But there&#39;s an easier way - &lt;/span&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;http://ubuntu-tweak.com/&quot;&gt;Ubuntu Tweak&lt;/a&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;. This incredibly useful application allows you to quickly and easily add these third party repositories using a graphical interface. Normally I&#39;m a strong advocate of the command line in this context, but we&#39;ve gone through adding additional repositories in the past, and in this case I feel Ubuntu Tweak is the easier way to do it.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;To get started, first &lt;/span&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;http://www.getdeb.net/download/2889/0&quot;&gt;download&lt;/a&gt;&lt;span style=&quot;font-family: arial;&quot;&gt; and install the package as usual. Run it as normal and you will come to a screen like this:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style=&quot;font-family: arial;&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCuLfTVdU8134Bvv2HpdXXZ4taeIrs9iIHPPvcGA7lDCkG_DABDq_gfeKK43xpxewfHwHUjltaK_90Ulbo0FLObEUXj1YGa5phwbi9H0nnNniTdlQpXp4dXf21e5G_DyaRzlbM8cEX378/s1600-h/Screenshot.png&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCuLfTVdU8134Bvv2HpdXXZ4taeIrs9iIHPPvcGA7lDCkG_DABDq_gfeKK43xpxewfHwHUjltaK_90Ulbo0FLObEUXj1YGa5phwbi9H0nnNniTdlQpXp4dXf21e5G_DyaRzlbM8cEX378/s400/Screenshot.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5224730956840678274&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Select Applications, then Third Party Software Sources. This will take you to a list of the software that you can use Ubuntu Tweak to keep up to date with. You&#39;ll need to click on Unlock and enter your password before you can add anything (this is because Ubuntu Tweak needs root access to add the new repositories).&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Now you can add the repositories for whatever apps you wish to keep up to date with, whether that&#39;s the latest versions of Google Gadgets, AWN, Compiz, Wine or whatever takes your fancy. Once you&#39;ve selected what you want, click Refresh. The new repositories will be added and Update Manager will open - you&#39;ll need to enter your password again and an apt-get update will run automatically.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Now that you have the new new repositories added, you can get the newest versions of the apps you&#39;ve chosen just by running the following:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo apt-get update&lt;br /&gt;sudo apt-get upgrade&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;However, there are a few things that aren&#39;t included by default, and additional applets for AWN are one of them. To add these, once you&#39;ve added the AWN repository from Ubuntu Tweak, just run the following command:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo apt-get install awn-applets-c-core awn-applets-c-extras awn-applets-python-core awn-applets-python-extras&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;This will install the applets available from the repository. You&#39;ll no doubt find that Avant Window Navigator becomes enormously more powerful once you add these additional applets. You can do a lot with it once you get used to it.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Ubuntu Tweak can be incredibly handy for non-technical users. It acts as a great one-stop control panel, and allows you to get some of the newest and most impressive goodies available for Linux. But unlike Automatix, it&#39;s safe to use and won&#39;t destabilise your system. For demonstration purposes, here&#39;s the Sphere effect. It&#39;s under Cube Reflection and Deformation in CompizConfig Settings Manager.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style=&quot;font-family: arial;&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi72MgSH9Y96Uqv0CP208jj0bx5yfY1EQzNwyvVoRi6X2l16XqS_mRdhZ9EieYkH0fb-Y3ZLsIBqUj3zGslfYPrVoIEB8TYnjRhVOz_IS5G91x4ViF0RNVrzoCejf2ADiRiZHzdWmSACFI/s1600-h/Screenshot-1.png&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi72MgSH9Y96Uqv0CP208jj0bx5yfY1EQzNwyvVoRi6X2l16XqS_mRdhZ9EieYkH0fb-Y3ZLsIBqUj3zGslfYPrVoIEB8TYnjRhVOz_IS5G91x4ViF0RNVrzoCejf2ADiRiZHzdWmSACFI/s400/Screenshot-1.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5224743763793930834&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Pretty impressive, huh? Hope you have fun with Ubuntu Tweak!&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/6494702624833990125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/6494702624833990125' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/6494702624833990125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/6494702624833990125'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2008/07/using-ubuntu-tweak-to-get-third-party.html' title='Using Ubuntu Tweak to get third-party apps'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCuLfTVdU8134Bvv2HpdXXZ4taeIrs9iIHPPvcGA7lDCkG_DABDq_gfeKK43xpxewfHwHUjltaK_90Ulbo0FLObEUXj1YGa5phwbi9H0nnNniTdlQpXp4dXf21e5G_DyaRzlbM8cEX378/s72-c/Screenshot.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-8648249933996860952</id><published>2008-07-09T05:16:00.000-07:00</published><updated>2008-07-09T05:45:39.654-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="backup"/><title type='text'>Backing up your system with Remastersys</title><content type='html'>&lt;span style=&quot;font-family: arial;&quot;&gt;I&#39;ve previously mentioned how to set up /home on a separate partition to help ensure that your data is safe if anything goes wrong with your Ubuntu install. However, we all like to add a few extra applications and other things, and if anything goes wrong, it will take you a long time to reinstall these. How can you make this easier?&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Simple, use &lt;/span&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;http://www.remastersys.klikit-linux.com/&quot;&gt;Remastersys&lt;/a&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;. This incredibly handy utility allows you to create your own customised install CD based on your Ubuntu or Linux Mint installation. It&#39;s actually used to create a few Ubuntu derivatives, and you can quite easily use it for this purpose yourself if you so wish, as you can use it to create a distributable copy. I now have a DVD based on my Kubuntu install so I can easily reinstall it if anything goes wrong, and it includes all the multimedia codecs so everything works out of the box. And it&#39;s extremely easy to use.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;So, how do you install it? It&#39;s not in the Ubuntu repositories, but there is a Remastersys repository which you can add. Just enter the  following:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo vim /etc/apt/sources.list&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;As always, you can use nano or another editor if you prefer. Now add the following lines:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;# Remastersys&lt;br /&gt;deb http://www.remastersys.klikit-linux.com/repository remastersys/&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Now run the following commands to install it:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo apt-get update&lt;br /&gt;sudo apt-get install remastersys&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Before you run it, you may want to change some of the settings. These are in a text file at /etc/remastersys.conf. This file is very straightforward to use, and everything is well signposted - you can easily change the name of the customised CD by editing this file.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Now, when you run Remastersys, it will create an ISO image based on your current install, so for instance if you&#39;re running Ubuntu but have added the Kubuntu desktop, it will be on the CD as well.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Before you run it, close down every other application you are running as they can affect the build. There are two ways you can run it. To back up everything, including user&#39;s directories, run the following:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo remastersys backup&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;If you&#39;re planning to distribute copies of this to other people, for instance if you are using Remastersys to create your own distro, you won&#39;t want to run this. Instead, run this command to create a distributable version which you can give to others:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo remastersys dist&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;The process can take a while, especially if you have a lot of applications installed. Be aware that ISO images of over 2GB can have trouble booting, however don&#39;t worry if your system takes up more space than that as it&#39;s compressed significantly when the ISO image is built (the standard Ubuntu install takes up around 2GB when installed, but around 700MB as an ISO). Please also note that an image larger than 700MB will need to be burned to a DVD.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Once the process has finished, if you go to the /home directory, you&#39;ll notice an extra user directory has been added - Remastersys. Go into this directory, and there&#39;s another Remastersys folder inside that. Inside you&#39;ll find your new ISO image, which you can move to your own home directory, along with an m5d checksum.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Now that&#39;s done, you can clear up the build directory. This is easy, just enter the following:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo remastersys clean&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Make sure you&#39;ve moved the ISO to your own directory before you do this. Now you can use whichever CD-burning tool you prefer to burn the disc to a CD or DVD, and you now have your own customised Ubuntu!&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;There are endless uses for this. I&#39;ve been experimenting with creating my own distribution using this method - so far it&#39;s pretty poor, but it&#39;s educational. With a distributable copy of your install and with your /home directory on a separate partition, it&#39;s easy to restore your system in case anything goes wrong. You can create a copy of your install and run it in VirtualBox so that you can use that as a test bed for any changes you might want to make. And it can be handy to have with you as it means you can boot any computer into your own familiar desktop environment, with your own favourite applications, without having to install a thing. I urge you to try it!&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/8648249933996860952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/8648249933996860952' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/8648249933996860952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/8648249933996860952'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2008/07/backing-up-your-system-with-remastersys.html' title='Backing up your system with Remastersys'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-430069431540955304</id><published>2008-06-08T16:14:00.000-07:00</published><updated>2008-06-08T16:25:47.451-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="help"/><title type='text'>Closing applications that have hung - part 2</title><content type='html'>&lt;span style=&quot;font-family: arial;&quot;&gt;In my previous post, there were some things I missed out, which I&#39;ll now fill you in on. First of all, if something has hung, it can be a pain to try and launch a terminal just to close something down, but you don&#39;t need to. Just press Alt+F2 in Ubuntu to get the Run dialog and enter xkill there.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;But what about if the entire screen has hung and it&#39;s too slow to do anything? Well, there&#39;s several options here. You can press Ctrl+Alt+Backspace to restart your X window server, but that&#39;s overkill. A better idea is to press Ctrl+Alt+F2 to take you to a virtual terminal. You can log in by entering your username, then you&#39;ll be prompted for your password. Once you&#39;ve logged in, enter the following command:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;top&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;This displays a list of the running applications. It includes details of how much memory and CPU each is using. Look for the application you want to stop, and note the PID (process ID) number. Then press Q to exit top.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Now you know this number, it&#39;s easy to kill the process from the command line. If this number was 1234 for the program you wanted to stop, you&#39;d enter the following:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;kill 1234&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Easy! Now press Ctrl+Alt+F7 and you&#39;ll be back at your desktop as usual, minus the hung application.&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/430069431540955304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/430069431540955304' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/430069431540955304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/430069431540955304'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2008/06/closing-applications-that-have-hung.html' title='Closing applications that have hung - part 2'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-6131508830073989581</id><published>2008-06-08T15:48:00.000-07:00</published><updated>2008-06-08T16:11:27.155-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="f"/><title type='text'>Mounting partitions and other devices from the command line</title><content type='html'>&lt;span style=&quot;font-family: arial;&quot;&gt;Many Linux users dual-boot with another operating system, and it can be inconvenient if you can&#39;t get access to the files you have in that partition. For instance, if you are dual booting Windows XP and Ubuntu, perhaps you&#39;d like to be able to play some music from your hard drive in Rhythmbox, but you can&#39;t get at it. Ubuntu is pretty good at mounting new filesystems automatically, but it&#39;s not perfect, so it pays to take the time to learn how to do it yourself. Don&#39;t worry, it&#39;s not that hard!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;If it&#39;s an external device such as a flash drive that you want to mount, then connect this. Then run the following command in the terminal:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo fdisk -l&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;This will display all the filesystems that your system can detect, whether they are mounted or not. For example, here&#39;s mine on my Kubuntu laptop:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;matthew@matthew-laptop:~$ sudo fdisk -l&lt;br /&gt;&lt;br /&gt;Disk /dev/sda: 40.0 GB, 40007761920 bytes&lt;br /&gt;255 heads, 63 sectors/track, 4864 cylinders&lt;br /&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;br /&gt;Disk identifier: 0x0008acac&lt;br /&gt;&lt;br /&gt;  Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/sda1   *           1        2918    23438803+  83  Linux&lt;br /&gt;/dev/sda2            2919        3042      996030   82  Linux swap / Solaris&lt;br /&gt;/dev/sda3            3043        4864    14635215   83  Linux&lt;br /&gt;matthew@matthew-laptop:~$&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Don&#39;t worry if this looks confusing. All you need to look for is the Device and System columns. The system column shows the filesystem used - this can be handy as different operating systems use different filesystems, so it would be easy to recognise a Windows-formatted partition - it would show as something like FAT or NTFS. The device column shows the device each partition is on - /dev/sda is the hard drive. /dev/sda1 is one partition, /dev/sda2 is another and so on. A different device would show up as something else, such as /dev/sdb, and its partitions might show as /dev/sdb1 and so on.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;So you should have no problem identifying which partition it is you want to mount. Once you know this, we can get started. If you remember from an earlier lesson, Linux will happily slot a new partition in anywhere you tell it to, you just have to say where. It&#39;s best to put it in the /media directory if it&#39;s something temporary like a flash drive, whereas /mnt is better for more permanent things like your Windows partition. You&#39;ll need to create a directory in which to mount it to make it easier to manage, something like this:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo mkdir /mnt/windows&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Then, once that&#39;s done, you can issue the command to mount the partition there. If the Windows partition was /dev/sda3, you could mount it in /mnt/windows as follows:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo mount /dev/sda3 /mnt/windows&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Once this is done, you should be able to browse the newly added partition or device with ease. If you want to remove it manually, issue this command:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo umount /dev/sda3&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;If you&#39;d like to mount something automatically when you boot up, such as your Windows partition, you can install the pysdm package. Then open the new Storage Device Manager, which will enable you to easily set up partitions to mount at boot, and specify where you want them.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/6131508830073989581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/6131508830073989581' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/6131508830073989581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/6131508830073989581'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2008/06/mounting-partitions-and-other-devices.html' title='Mounting partitions and other devices from the command line'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-8178523380018880470</id><published>2008-06-08T15:36:00.000-07:00</published><updated>2008-06-08T15:43:46.091-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="desktops"/><title type='text'>Adding Google Gadgets to your desktop</title><content type='html'>&lt;span style=&quot;font-family: arial;&quot;&gt;One thing some people may miss from other operating systems is desktop widgets. There&#39;s several ways to get these in Ubuntu and its derivatives. For Gnome users, there&#39;s the gdesklets or screenlets packages. For KDE3 users, there&#39;s superkaramba, and if you&#39;re using KDE4 there&#39;s plasmoids available - just add the extragear-plasma package.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Now there&#39;s a new way to get desktop widgets, and this way gives you access to a huge cross-platform library of widgets. This is of course Google Gadgets. It&#39;s long been missing from Google Desktop on Linux, but now it&#39;s available separately.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;I&#39;m not going to tell you how to set this up because the people at Ubuntu Unleashed have written a great guide to this, which is available &lt;/span&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;http://www.ubuntu-unleashed.com/2008/06/introducing-official-google-gadgets-for.html&quot;&gt;here&lt;/a&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;. You should already know how to add third-party repositories, so I&#39;m comfortable leaving you to head there if you want to install Google Gadgets for Linux.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/8178523380018880470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/8178523380018880470' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/8178523380018880470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/8178523380018880470'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2008/06/adding-google-gadgets-to-your-desktop.html' title='Adding Google Gadgets to your desktop'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-6689519468479884964</id><published>2008-05-25T11:24:00.000-07:00</published><updated>2008-05-25T14:22:36.632-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="networking"/><title type='text'>Getting a Huawei HSDPA modem working with Ubuntu</title><content type='html'>&lt;span style=&quot;font-family: arial;&quot;&gt;Here in the UK, mobile broadband has started to become more prominent in the last few months, with mobile phone providers offering HSDPA modems at rates comparable to landlines. I daresay the same is probably happening elsewhere in the world, so no doubt many users of Ubuntu and Ubuntu-derived distros are thinking about getting one. I actually tried Vodafone&#39;s Mobile Broadband myself but was disappointed with the speed I could get (the mobile networks aren&#39;t great in rural Norfolk) so I wound up taking it back. However, I&#39;m assured that in other parts of the country it&#39;s fast enough to compete with a DSL line.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;So, one question many people will want to know is &quot;Will it work with Ubuntu?&quot;. It depends on the device. The &lt;/span&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;http://en.wikipedia.org/wiki/Huawei_E220&quot;&gt;Huawei E220&lt;/a&gt;&lt;span style=&quot;font-family: arial;&quot;&gt; is currently being offered by Vodafone, 3 and T-Mobile in the UK, and apparently support for it was added in the 2.6.20 Linux kernel. Therefore it should work out of the box with any Ubuntu version from Feisty Fawn onwards (I think it should also work with the default OS on the Asus Eee as if I remember right that uses the 2.6.21 kernel). Also, this is a USB device so is easy to get working. Overall, this is probably the safest choice.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;The one I opted for was the Huawei E620 PCMCIA card. This was somewhat more troublesome. Fortunately, Vodafone have developed the Vodafone Mobile Connect card driver for Linux for this device which will apparently also work for other carriers as long as they are using a compatible device. It&#39;s available from &lt;/span&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;https://forge.vodafonebetavine.net/frs/?group_id=12&quot;&gt;this link&lt;/a&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;. Unfortunately, the comments seem to imply that the beta version doesn&#39;t yet work well with Hardy, but I can personally vouch for the stable version working well in Gutsy. I&#39;d therefore expect that once the beta reaches a stable version it will work OK, and it may be that one of the older versions works fine in Hardy.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;However, this does have a LOT of dependencies, so to get it working with Ubuntu, you&#39;ll need an alternative way to access the Internet. If you install the package as normal and use apt-get -f install to resolve the dependencies, it should be nearly ready to go.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;If you then start the application from the menu, you&#39;ll be prompted to enter the APN, user name and password. For Vodafone in the UK, &lt;/span&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;http://forum.vodafone.co.uk/index.php?showtopic=654&quot;&gt;this forum post&lt;/a&gt;&lt;span style=&quot;font-family: arial;&quot;&gt; gives you the details you need. For those of you outside the UK or connecting via other providers, you&#39;ll need to do a bit of Googling to get the correct settings. I also recommend using &lt;/span&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;http://www.opendns.com/&quot;&gt;Open DNS&lt;/a&gt;&lt;span style=&quot;font-family: arial;&quot;&gt; instead of your provider&#39;s own DNS servers for better performance.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;If you have trouble with the E220, the Vodafone Mobile Connect card driver might also be helpful in respect of that device.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Overall, the Huawei HSDPA modems are surprisingly easy to get working in Linux with just a few Google searches - I was able to get it working fine within a short period of time. So if you&#39;re running Ubuntu or a derivative on your laptop and are considering getting mobile broadband, but were concerned about whether it would work OK, then go ahead - these devices are quite Linux-friendly.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/6689519468479884964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/6689519468479884964' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/6689519468479884964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/6689519468479884964'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2008/05/getting-huawei-hsdpa-modem-working-with.html' title='Getting a Huawei HSDPA modem working with Ubuntu'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-2610514350422303339</id><published>2008-05-24T13:24:00.000-07:00</published><updated>2008-05-24T13:48:40.060-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="compiling"/><title type='text'>Using apt-get to compile from source</title><content type='html'>&lt;span style=&quot;font-family: arial;&quot;&gt;Compiling from source is something that strikes terror into the heart of every Linux newbie - it seems like such a black art. The usual trinity of /.configure, make and make install is something barely comprehensible if you&#39;re new to Linux. But you can relax - you almost never have to compile from source in Ubuntu as the repositories are very comprehensive.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Nonetheless, compiling from source has a place in every good Linux user&#39;s toolkit. It can result in better performance if you compile a CPU-intensive app from source. Distros like Gentoo enable you to get an entire system that&#39;s compiled specifically to get the absolute best out of your hardware.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;The Debian package manager used by Ubuntu offers an interesting compromise that allows you to easily compile apps from source. It doesn&#39;t get you the kudos that compiling from source will normally give you, but it&#39;s easy to use and is well within the capability of a relative newbie. It also creates a .deb package so it&#39;s easy to uninstall if necessary.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;We&#39;ll compile the Dillo web browser in this example. The process is different to how you&#39;d install software using apt-get normally. Before anything else, make sure you open Synaptic (or Adept if you&#39;re using Kubuntu) and check the box to include the source code repositories.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Once that&#39;s done, we can get on with the installation. First, you have to install the dependencies:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo apt-get build-dep dillo&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;This installs all the dependencies needed to compile Dillo. Next, you need to tell apt-get to download and compile the source code:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-family: arial;&quot;&gt;sudo apt-get -b source dillo&lt;/blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Once it&#39;s downloaded and compiled the code, you&#39;ll be left with a .deb package in your /home directory, which you can install in the usual way. If you later need to remove it, you can use apt-get remove as normal.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;There, that wasn&#39;t hard, was it? Ubuntu has several options available if you want to compile an application from source, and this is the easiest. I have to admit I don&#39;t use this much, but it can be worthwhile.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/2610514350422303339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/2610514350422303339' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/2610514350422303339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/2610514350422303339'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2008/05/using-apt-get-to-compile-from-source.html' title='Using apt-get to compile from source'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6035189260502660598.post-9171775561557380179</id><published>2008-05-18T10:23:00.000-07:00</published><updated>2008-05-18T10:26:34.539-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="desktops"/><title type='text'>Installing the Kubuntu KDE4 desktop</title><content type='html'>If you like the look of the KDE4 version of Kubuntu, it&#39;s easy to add it to your existing Ubuntu, Kubuntu or Xubuntu session. Just enter the following in the terminal:&lt;br /&gt;&lt;blockquote&gt;sudo apt-get install kubuntu-kde4-desktop&lt;/blockquote&gt;&lt;br /&gt;Now log out and use Change Session to switch to KDE4. Then log back in to your new KDE4 desktop!</content><link rel='replies' type='application/atom+xml' href='http://easierbuntu.blogspot.com/feeds/9171775561557380179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6035189260502660598/9171775561557380179' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/9171775561557380179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6035189260502660598/posts/default/9171775561557380179'/><link rel='alternate' type='text/html' href='http://easierbuntu.blogspot.com/2008/05/installing-kubuntu-kde4-desktop.html' title='Installing the Kubuntu KDE4 desktop'/><author><name>MattBD</name><uri>http://www.blogger.com/profile/15070988462909190312</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>