Online Cash Advance Payday Loans Online Cash Advance Payday Loans


What else is there?
Thursday October 2nd 2014

Insider

Archives

Getting Started With Linux

How To Get Started With Linux?

Probably the most common question regarding Linux is how to get started. Keeners will ask what distro should they use or what desktop is best. Perhaps they will start investigating many distributions and comparing the pros and cons of each. The simple answer alludes these people. The simple answer is the best way to get started with Linux is to get started. That’s it. Just grab a distro and get going.

A Couple of Good Linux Books

Linux Bible 2010That said I’m sure those asking how to get started are asking what distro to grab and where. I’m going to assume you’re a desktop user. If you really feel the need to throw money at the problem pick up a good book. I personally recommend the Linux Bible for those wanting to survey the field of available distributions or Linux in a Nutshell for those looking for a succinct reference of commands and technology. But let me warn you now you’ll not get much from either of these offerings that you wouldn’t have in your hand if you took the first bit of advice (just download a distro install it and refer to man pages and help). In fact the only thing either really offers is a well organized presentation of what may seem like an overwhelming collection of impressive technology available to you once you’ve installed Linux.
Linux in a Nutshell

An Overview of Some Popular Linux Distributions

I suppose the next question may be “but I want Linux to do ….”. Fair enough, you could go down the wrong path I suppose. You could do something like install a Redhat Server when what you really wanted was an efficient Linux office desktop computer. Personally I’d consider that a lesson well learned (and much needed if you’re prone to such errors) but then I’ve the benefit of age and experience. So let me try to push you down the path to a distro you’ll spend some time with.

Ubuntu Desktop – Use this distro if you’re looking for low maintenance and an abundance of free open source software (FOSS). Pretty much everything is available for Ubuntu and the majority of it is available by going to the add/remove menu entry of the applications menu. Normally I’d recommend using LTS (long Term Support) if you’re looking for stability and solid offerings but at the date of this writing Ubuntu is just getting ready to release a new LTS version (10.04) so, there is little difference between 9.10 (current version) and the next version of LTS (10.04).

OpenSuse – Use this distro if you’re wanting office productivity. In my experience you may not have as many FOSS programs available but the ones you do have and the developers supporting them are interested in seeing office productivity work in Linux. My experience with Suse is its never as stable as Ubuntu LTS in all areas but its very likely more robust in the office productivity areas. Installing random FOSS on Suse has caused me more grief than installing random programs provided by Ubuntu. The SUSE commercial offering, Suse Linux Enterprise Desktop (SLED) is supported by Novell in case commercial enterprise support is a consideration.

Redhad Fedora – If you’re looking for resume material Redhat is probably the way to go. Its a little more work (consider it the cost of education) but pretty much anything you can do with Linux you can do with Fedora. There are a lot of large organizations running Linux servers and many are using Redhat. They may or may not appreciate if you’re a debian user and probably would consider your Ubuntu usage (a debian based distro) with some sceptisim since its possible to use Ubuntu with no technical knowledge what so ever.

Debian - I’m a Debian user. Ubuntu is a debian based distro driven by a commercial arm known as Canonical. Debian gives me the flexibility to grab all the FOSS in stable or unstable forms and doesn’t sugar coat it as much as Ubuntu. I’d say Ubuntu is 25% more polished than Debian. Debian makes me think more and work harder all of which I consider educational and worth the investment (though it has frustrated me and cost me some productivity when I really wanted to get something done quickly). At times I’ve taken to running Ubuntu in a virtual machine as my office environment while I figured out my Debian configuration. Being a Debian user carries almost as much panache as saying you’re a Redhat user but if you’re targeting a career in Linux I suspect most organizations would say a Redhat user can be brought up to speed on a debian system pretty quickly. Bringing a Debian user up to speed on a Redhat system will result in a lot of whining in my experience. More on that another day.

Xubuntu – Xubuntu takes the Ubuntu releases and applies the XFCE desktop. Use this distro if you’re thinking you’ll use some old hardware that barely runs Windows XP but don’t expect too much from something older. In my experience Xubuntu certainly does require a less system resources but there really is no replacement for a fast CPU and adequate RAM (probably 512MB is as low as I’d care to go, though I do have a local print/web server with less).

New and Specialized Linux Distributions

There are lots of derivatives and more trendy distros (mint comes to mind as one to try) and there are specialized distro’s (Boxee and XBMC for media players and MythTV for PVR technology for instance). I don’t have opinion on the former but in the case of the latter I’d take a full distro and install the SW on it to accomplish what I want before taking a pre-packaged specialized distro. To be honest I’ve never got Boxee or MythTV running to my satisfaction by downloading specialized distro’s but I’ve had both running to my satisfaction on other distro’s and learned a lot in the process.

There’s More To Learn by Using Linux Than Reading

There are many more topics and considerations, some of which I’m sure I’ll feel compelled to write about at some point in time. KDE vs Gnome and Debian vs Redhat for example, but I’d be hard pressed to recommend you do anything but experience these technologies. Choosing one over the other is very much a personal choice akin to choosing chocolate over blue berries or a practical choice akin to choosing a hammer over a wrench.

Thanks for coming by.

Linux Bible 2010 Book Review

Linux Bible 2010I picked up Linux Bible 2010 Edition the other day. I was skeptical I have to admit. I mean every scrap of information you could imagine about Linux is out there on the Internet. The value add for me was to have the information organized and to have a good read on a variety of topics from one source. The problem with the information on the Internet is “what you don’t know, you don’t know” meaning you really have to have a clue about what you need to know before you go find it.

The subtitle of the book “Boot Up to Ubuntu, Fedora, KNOPPIX, Debian, openSUSE, and 13 Other Distributions” concerned me but as it turns out there is really only a couple hundred of the 900+ pages devoted to introducing you to the various distros. This is probably a good thing since a book that tried to cover all these distros would either be too large or simply not detailed enough to be useful.

The 13 distributions was appealing to me though. I wanted to experience some other distros and needed to review a few other distos for some compatibility with some hardware. I was pleasantly surprised to find the DVD’s had live versions of many of the distributions. I was able to try them out on my laptop really quickly and check compatibility on things like network cards, wifi, sound and so on. This in the past has been a major deciding factor in my choice of what distro to install (though its not as critical now that I prefer Debian for a host of other reasons).

The book is somewhat bias in that if you want to “jump right into” linux and get started they push Knoppix for powerful computers or Damn Small Linux if you’re trying to leverage your basement full of old hardware. My favorite parts of this book included:

  • The live images on the DVD which let me experience 3 distros in 10 minutes
  • An overview of the window managers
  • An friendly introduction to vi
  • Overview of multiple applications typically sought (eg: music, video and desktop publishing)
  • The command line documentation (useful topics like on reverse searching and sequential commands)

So I’m giving this book a thumbs up for someone who is just getting into Linux or wants to know what they don’t know. For more experienced Linux users I’d recommend Linux in a Nutshell.

Content Management and the Future of Publishing

I’m a publisher of sorts and I also have a background in content creation and management (can you say SGML?). Anyway the reuse of content and management of content is a fascinating area of interest for me. Some of it comes from my passion for information and the flip side of that, finding information when you have generated or collected a lot.

Of course my goal is to combine these interests with open source software, databases and Linux to have a content management solution to re-purpose my content or at least convert it to on-line content. That may take a while but in the mean time there are some fascinating activity in the area of content management. First some recommended reading.

Document Engineering: Analyzing and Designing Documents for Business Informatics and Web Services is a great resource that talks about creation of documents for reuse.

Managing Enterprise Content: A Unified Content Strategy is another recommended resource, more about the strategy of implementing a solution but also provide a companion web site with some free white papers at http://www.managingenterprisecontent.com/.

Content Management for Dynamic Web Delivery is another recommended resource for content management and as the name suggests is web centric in its approach.

Document Engineering       Managing Enterprise Content       Content Management for Dynamci Web Delivery

Its ironic that there are some great books on the subject of content management because I suppose in some ways books themselves are an antiquated way of accessing information. Still as I mentioned in my previous post about my beloved Linux in a Nutshell book, sometimes a book is a welcome resource when technology is the topic. Anyway here are a couple of really fascinating projects showing the future of information management and delivery.

Wiley’s custom select is a service provided by Wiley Publishing with allows you to amalgamate information from various sources and combine it into one printable deliverable. All the content providers are appropriately compensated so Wiley’s has even managed to get some competitors to provide content (co-op-petition I believe would be the buzz word for that). Imagine a teacher pulling content from various in print sources and generating a text book. Or perhaps a company developing training materials. Imagine pulling the content from the books above and generating your own manual for your organizations content management implementation. Fascinating, dynamic resource books!

The next activity around content management and future of publishing that I find really interesting is demonstrated by Floss Manuals. Floss Manuals at http://en.flossmanuals.net/ provides a place for authoring manuals for open source software. It leverages a wiki like approach allowing users to edit the content. The presentation however is like a book on a web page with the Table of Content on the left side and the content in the container in the middle. Here is an an example from the Blender 3D on-line manual at Floss Manuals.
Floss Manuals - Online Blender 3D Manual

Now what I find so fascinating about Floss Manuals is it combines many of my interests specifically:

  • Collaborative writing
  • New approaches to content creation (for books specifically)
  • Content Management (ok, it is a wiki but still)
  • Free Open Source Software
  • Linux
  • Content re-purposing
  • A Business Model for all of the above

You see I think that Floss Manuals may be on to something here. You have this dynamic content on-line and if you want a book they will print and bind it for you. Is this a business model for open source software? Maybe. Who knows maybe its the future of publishing!

VIM Quick Reference

For those not interested in my ramblings, no offense taken, there is a great VIM Quick reference chart available in an impressive number of languages at Laurent Grégoire’s web page http://tnerual.eriogerg.free.fr/vim.html.

In the event you just want instant gratification or the original has moved here is the English version of the VIM Quick Reference Card by Laurent Grégoire.

In the event you just want you feel lucky and think I probably use the command you need right now here is my list of the vi commands I find most useful:

Command Function
esc :w Write the file quick before I mess it up
esc :q! I screwed it up, quit now and don’t write my changes
esc :wq! Cool I didn’t screw it up, write it out and quit now before I screw it up

Now on to the rambling:

I have this love hate relationship with VIM for text editing. Figuring out where the name VIM came from reads like the first few chapters of Lord of the Rings actually. Ex begot vi begot vim … and the name VI was actually the shortest command in ex to visualize the your file; but I digress.

Anyway, the times when I love vi (vim) its the best – fast and most importantly easily installed on almost any Linux device. The times I hate it are really due to my own shortcoming. I know :wq and that’s about it for commands. Everything else is shot in the dark. I know insert works pretty good and delete but the sequence you use them in is important and quite mysterious. Oh yes the other command I know :q! . Thats quit now, don’t write (save) what I’ve done, just get me out of here and lets forget I ever tried to use vi for now. Of course that command is inevitably followed by me typing the an up arrow to recall the last command line command and getting back to what I was trying to do with a fresh start.

So the point of this ramble is that there is a great VIM quick reference card. The original was provided by Laurent Grégoire, who also not surprisingly has offered to answer other questions about the true nature of the Universe. It’s available in an impressive list of languages. Thanks Laurent Grégoire.

Extracting Files From a .deb Debian Package (or RPM)

Today I was trying to extract a file from a debian package. It was actually a pretty silly move on my part. The package didn’t install correctly so I decided I would install it by brute force by copying the files from the .deb package to the appropriate places and doing what I could with the pre and post install scripts. DON’T TRY THIS AT HOME – but on the other hand it did force me to read some man pages and learn a thing or two. The most helpful thing I learned was on the dpkg-deb man page:

dpkg-deb is the Debian package archive (.deb) manipulation tool.

It’s pretty easy to use:

dpkg-deb [options] command

and the command I needed was -x or –extract which takes the archive (.deb file) name and the directory you want to extract the files to.

-x, –extract archive directory

Put it all together and you get a command like this:

dpkg-deb -x mydeb.deb test

Which takes the contents of mydeb.deb and extracts them to a folder called test which is will create in the current directory.

Now something infinitely more useful may be to be able to extract the contents of an RPM file on a debian system. Again note that if you’re doing this to try to install software by brute force you’re doing something I would NOT recommend. That being said, for those of us who may have a legitimate reason to want to view and play with the contents of an RPM package on our system the commands are only a little more complex. The steps are:

1. Extract the cpio archive from RPM Package using rpm2cpio

2. Convert the cpio stream to files and directories using cpio -id

Thats it, you can do it all in one line like this.

rpm2cpio My_RPM.rpm |cpio -id

If you don’t have the RPM tools on your debian system you can install them as follows:

sudo apt-get install rpm

Hope this is useful for someone and don’t forget – you really should not be using this to install software by brute force.

Reconfigure X in Debian

This may be obvious to experienced debian users but its saved me a couple of times so I’m capturing it here and passing it on. The problem I have is with my laptop sometimes the screen resolution gets messed up due to the use of multiple external monitors. In the early days I’d be in there tweaking xorg.conf to get things right again. Man does that bring back nightmares. Now I just run the dpkg-reconfigure command as follows and let Linux figure it out for itself.

sudo dpkg-reconfigure -phigh xserver-xorg

That’s it, now X is back the way it should be. You can also run xrandr and see what settings have been detected and what is in use. Here is the output from my laptop.

$ xrandr

Screen 0: minimum 320 x 200, current 1280 x 800, maximum 2560 x 1024
VGA disconnected (normal left inverted right x axis y axis)
LVDS connected 1280×800+0+0 (normal left inverted right x axis y axis) 303mm x 190mm
1280×800 60.0*+
1024×768 85.0 75.0 70.1 60.0
832×624 74.6
800×600 85.1 72.2 75.0 60.3 56.2
640×480 85.0 72.8 75.0 59.9
720×400 85.0
640×400 85.1
640×350 85.1
TV disconnected (normal left inverted right x axis y axis)

Now if someone can tell me how to do the same on a Redhat system I’d really appreciate it.

Taking a Screen Capture of Embedded Software

I’m frequently faced with the problem of needed a screenshot of my embedded software. Sometimes its just not practical to install an appropriate program so I’ve worked out a fairly simple technique using ssh that may be obvious to some but took me a bit of head scratching. You need ssh access to both machines and to know your IP address. My desktop is Debian with gnome and the embedded design is running an embedded Linux with a minimal window manager. Except for clicking save to save the screen shot this whole process is done from a terminal on your development system. Here is the overview followed by some detailed steps:

ssh user@[device-ip]

export DISPLAY=:0

ssh -X [your user name]@[your-ip-address]

gnome-screenshot

1. First I ssh into the device running the embedded design which is in this case has a user called user and an ip address of 172.16,123.133

ssh user@172.16,123.133

2. Next export your X display on the embedded design.

export DISPLAY=0:

3, Now ssh back to your development system exporting with X11 forwarding enabled. In this example the user on my development system is redondo and the ip address is 172.16,123.131

ssh -X redondo@172.16,123.131

4. Now I run the screen capture program of my choice. In this case I’m using gnome-screenshot but at some point in time I’ll probably need to find a utility the works without interaction.

gnome-screenshot

That’s it. The gnome-screenshot program will appear on your embedded design with a screenshot already taken and ready to be saved. As I mentioned earlier it will save by default to your development system’s Desktop but you can use save as and put it where you wish.

xev – Print Contents of X Events

Recently I was working with a remote control to interact with a Linux media center (more on that later). I was struggling a bit because I didn’t really know the key events being generated by the remote control and interaction with the media center software was quite unpredictable. I found out about xev a nifty little utility that captures X events and prints them out. The following is the console output when I launch xev and press the left and right arrow then click on the console window and close xev by using CTRL+C .
$ xev
Outer window is 0×4200001, inner window is 0×4200002

PropertyNotify event, serial 8, synthetic NO, window 0×4200001,
atom 0×27 (WM_NAME), time 17608053, state PropertyNewValue

PropertyNotify event, serial 9, synthetic NO, window 0×4200001,
atom 0×22 (WM_COMMAND), time 17608054, state PropertyNewValue

PropertyNotify event, serial 10, synthetic NO, window 0×4200001,
atom 0×28 (WM_NORMAL_HINTS), time 17608054, state PropertyNewValue

CreateNotify event, serial 11, synthetic NO, window 0×4200001,
parent 0×4200001, window 0×4200002, (10,10), width 50, height 50
border_width 4, override NO

PropertyNotify event, serial 12, synthetic NO, window 0×4200001,
atom 0x1a8 (_NET_WM_ALLOWED_ACTIONS), time 17608056, state PropertyNewValue

PropertyNotify event, serial 14, synthetic NO, window 0×4200001,
atom 0×134 (WM_PROTOCOLS), time 17608056, state PropertyNewValue

MapNotify event, serial 15, synthetic NO, window 0×4200001,
event 0×4200001, window 0×4200002, override NO

PropertyNotify event, serial 18, synthetic NO, window 0×4200001,
atom 0x1ad (_NET_FRAME_WINDOW), time 17608057, state PropertyNewValue

PropertyNotify event, serial 18, synthetic NO, window 0×4200001,
atom 0x1a8 (_NET_WM_ALLOWED_ACTIONS), time 17608057, state PropertyNewValue

PropertyNotify event, serial 18, synthetic NO, window 0×4200001,
atom 0×139 (_NET_FRAME_EXTENTS), time 17608057, state PropertyNewValue

ConfigureNotify event, serial 18, synthetic NO, window 0×4200001,
event 0×4200001, window 0×4200001, (5,61), width 178, height 178,
border_width 2, above 0x10363aa, override NO

ConfigureNotify event, serial 18, synthetic NO, window 0×4200001,
event 0×4200001, window 0×4200001, (676,61), width 178, height 178,
border_width 2, above 0x10363aa, override NO

ConfigureNotify event, serial 18, synthetic NO, window 0×4200001,
event 0×4200001, window 0×4200001, (676,61), width 178, height 178,
border_width 2, above 0x3e00004, override NO

MapNotify event, serial 18, synthetic NO, window 0×4200001,
event 0×4200001, window 0×4200001, override NO

VisibilityNotify event, serial 18, synthetic NO, window 0×4200001,
state VisibilityUnobscured

Expose event, serial 18, synthetic NO, window 0×4200001,
(0,0), width 178, height 10, count 3

Expose event, serial 18, synthetic NO, window 0×4200001,
(0,10), width 10, height 58, count 2

Expose event, serial 18, synthetic NO, window 0×4200001,
(68,10), width 110, height 58, count 1

Expose event, serial 18, synthetic NO, window 0×4200001,
(0,68), width 178, height 110, count 0

PropertyNotify event, serial 18, synthetic NO, window 0×4200001,
atom 0×142 (_NET_WM_STATE), time 17608059, state PropertyNewValue

FocusIn event, serial 18, synthetic NO, window 0×4200001,
mode NotifyNormal, detail NotifyNonlinear

KeymapNotify event, serial 18, synthetic NO, window 0×0,
keys: 4294967173 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

PropertyNotify event, serial 18, synthetic NO, window 0×4200001,
atom 0x13c (_NET_WM_DESKTOP), time 17608059, state PropertyNewValue

PropertyNotify event, serial 18, synthetic NO, window 0×4200001,
atom 0×159 (WM_STATE), time 17608062, state PropertyNewValue

KeyRelease event, serial 18, synthetic NO, window 0×4200001,
root 0xab, subw 0×0, time 17608065, (-649,534), root:(29,597),
state 0×0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
” XLookupString gives 1 bytes: (0d) ”
XFilterEvent returns: False

PropertyNotify event, serial 18, synthetic NO, window 0×4200001,
atom 0×171 (XKLAVIER_STATE), time 17608066, state PropertyNewValue

PropertyNotify event, serial 18, synthetic NO, window 0×4200001,
atom 0x1aa (_NET_WM_ICON_GEOMETRY), time 17608147, state PropertyNewValue

PropertyNotify event, serial 18, synthetic NO, window 0×4200001,
atom 0x1db (_COMPIZ_WINDOW_DECOR), time 17608279, state PropertyNewValue

KeyPress event, serial 35, synthetic NO, window 0×4200001,
root 0xab, subw 0×0, time 17610205, (-649,534), root:(29,597),
state 0×0, keycode 113 (keysym 0xff51, Left), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 35, synthetic NO, window 0×4200001,
root 0xab, subw 0×0, time 17610353, (-649,534), root:(29,597),
state 0×0, keycode 113 (keysym 0xff51, Left), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

KeyPress event, serial 35, synthetic NO, window 0×4200001,
root 0xab, subw 0×0, time 17611071, (-649,534), root:(29,597),
state 0×0, keycode 114 (keysym 0xff53, Right), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 35, synthetic NO, window 0×4200001,
root 0xab, subw 0×0, time 17611219, (-649,534), root:(29,597),
state 0×0, keycode 114 (keysym 0xff53, Right), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

KeyPress event, serial 35, synthetic NO, window 0×4200001,
root 0xab, subw 0×0, time 17611709, (-649,534), root:(29,597),
state 0×0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 35, synthetic NO, window 0×4200001,
root 0xab, subw 0×0, time 17613092, (-649,534), root:(29,597),
state 0×4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

FocusOut event, serial 35, synthetic NO, window 0×4200001,
mode NotifyNormal, detail NotifyNonlinear
^C

Of course the interesting part is where the key presses occurred (which I have made bold in the above output). The output above is from my desktop using my keyboard. The output from the remote control on my media center was quite different. It showed clearly the remote control was generating many keystrokes with each key press hence the irratic behavior I witnessed in the media center software. Hope this little post is helpful to someone, I’m sure I’ll be looking it up years from now when I wonder how I can capture X events.

Linux Console as a Stop Watch

Here is a nifty little trick I use at work all the time when I need a stop watch.

Open a Linux terminal
type time cat and enter to start the timer
Use CTRL+D to stop the timer

You’ll be left with the following output giving you a neat little report where the real value is the actual elapsed time between when you hit enter and the CTRL+D on the elapsed time:

$ time cat

real	0m2.437s
user	0m0.000s
sys	0m0.004s

$

Pretty neat and useful, don’t you agree?

Debian vs Redhat Linux

I”m a Debian Linux user and have been for about 10 years now.  I started using Debian after about the third failed attempt to fall in love with Linux using Redhat. With Redhat,  at the time, virtually every sophisticated software application I installed resulted in hours of tracking down dependencies and resolving conflicts. Debian on the other hand was stable and installing software was a breeze.  That was a long time ago in Linux years and I’m sure things have changed. At any rate I’m not willing to enter into the religious debate of which packaging mechanism is best. However, my recent interest in Moblin has me having to use RPM again and so I thought I’d blog a bit about my experience in the hopes of finding enlightenment and becoming fully bilingual in both popular Linux packaging methodologies.

My first realization, with my acquired experience, was that the rpm command was not an equivalent of my debian savior apt-get at all but was more the equivalent of dpkg. That may explain a lot about my initial experience. Imagine trying to install all software using only dpkg or rpm. Apt-get and yum are the saviours for such painful experiences. But dpkg has also been useful to me so here I go trying to find the same functionality on RedHat. So I’m looking for some help here – can someone fill me on the commands I need to use in Redhat to do what I’m used to doing in Debian?

dpkg vs rpm

Command Debian Redhat
install a package dpkg -i package rpm -install package
List install packages dpkg -l ?
List package owning files dpkg -S path/file ?
List files a package installed dpkg -L ?
How to tell what package will be installed apt-cache policy package-name ?

One of the other big problems I have is where certain files reside or what the Redhat equivalent is.

Items Debian Redhat
sources.list /etc/apt/sources.list ?
 Page 1 of 2  1  2 »