LyX

Linux distributions are generally full of packages that have specific uses that most people don’t need or maybe they just don’t know that they need. In my previous post I wrote about QPhotoRec which I had never used before my little accident that actually saved me a huge headache. I didn’t know that this application existed until I started researching how to undelete applications in Linux and I was pleasantly surprised that it was already included in OpenSUSE. The application below is one of many that I’ve found that make life easier for me and maybe it will for you too.

In the words of the developers, LyX is a WYSIWYM (what you see is what you mean) document processor. This is opposed to WYSIWYG (what you see is what you get) word processors like LibreOffice Writer or Microsoft Word. What does that mean? It means that what you see on the screen is only an approximation of what will go into the document. Instead of giving you a 1 to 1 representation, LyX handles the typesetting elegantly to create beautiful professional documents that would require a lot of extra work to get right in a conventional word processor. Thre is an example of this blog post written in LyX with output as a PDF at the end of this article. I didn’t choose any special fonts or any special settings to impress you. I just chose the defaults and you can see the difference in quality.

LyX is based on LaTeX which was originally developed as a cross-platform language for publishing academic papers. With LyX it’s relatively easy to include a formula like:

However, anyone who has worked with writing papers on Microsoft Word or LibreOffice can attest to it being somewhat less friendly. It can be used to write papers of course, but also full books, screenplays, and scripts, in many different formats.

You can try out LyX by installing it with zypper using:

sudo zypper in lyx

Creating a simple beautiful document is actually quite easy. Input your text first, highlight the sections that need special attention such as title, author, section, chapter headings, etc., apply the format from the menu bar, and save and then preview your document by going to Document –> View [PDF (pdflatex)]. LyX will then save your file as a temporary PDF and open it in your local PDF Reader. When you do this, prepare to see a document that looks like it was professional typeset for a textbook.

Any application this powerful is undoubtedly complex. I won’t make you think that everything is very easy and there is no learning curve. There is, but it’s really not as steep as first appears. To get you started, here are a few resources to get started with LyX.

LyX Homepage: https://www.lyx.org/
LyX Tutorials: http://wiki.lyx.org/LyX/Tutorials

I hope to present you with more random yet useful applications in the future buried in the OpenSUSE repository.

This article via LyX.

I Deleted Everything

I goofed.

I’m an avid hobbyist photographer and I happen to live in one of the most beautiful cities in the world. Needless to say, I take a lot of pictures. Recently I upgraded the drive in my home desktop from a slow HDD to 256G SSD. My workflow is like this: I take pictures, I copy the RAW files from my SD Card to my 1.5TB external drive and then copy the ones that aren’t blurry or terrible to my local hard drive for editing and the best ones that are edited get promoted to Flickr. The SSD would make this a lot easier and faster because RAW image files tend to be relatively huge and time consuming to process.

I added the new SSD, installed Tumbleweed, copied my personal files from the old disk to the new one and then deleted the files on the old disk. I had plans to use it for another project. Except one thing; I was in the wrong directory when I deleted everything. All 400GB of pictures were gone. I immediately stopped everything because I knew that deleting files doesn’t actually remove them from the disk. It simply makes them able to be rewritten and I didn’t want to risk that happening.

How I recovered.

OpenSUSE Leap and Tumbleweed have an application called QPhotoRec that saved me.

I loaded the application with the gnomesu command as it needs root access to run:

gnomesu -c qphotorec

From here I was able to choose my disk, the kind of filesystem that I was using and where I wanted the files to be restored to and then I let it run. It’s not a fast process. It took around 8 hours to restore my 400GB and even then there was two thing that I wasn’t able to restore; the filenames and their directories. All of my files had their correct extensions but they were missing the filenames that they originally had and the directories they were in. Also, files inside of other files such as .iso or .tar files were also recovered including thumbnail photos that were stored in other files. QPhotoRec tries to make educated guesses about what is and is not a file and recovered everything but it’s not perfect. My job then was to reorganize my files into some semblance of how they were previously but at least they were there again.

Mistakes happen and hardware breaks. Files get deleted, sometimes important files. The best way to proceed is to always to keep backups (all of my most important files are encrypted and on a remote server) but when disaster happens through human error or otherwise, it’s good to know that there are options.

How I Would Use OS to Solve a Problem in the World

Ben Heck is sponsoring a contest for a Raspberry Pi Laptop.

Here’s my entry.

Privacy, security, and information.

These are three things that any responsible internet user should be aware of. This includes the privacy of personal information ranging from personal tastes to financial information; security for everything from phone photos to government spying; and the ability to share information that we want with whom we want without restriction. Linux and open source are the prime means by which these things happen; but that’s not all. It also requires a grassroots efforts to educate and convince people to use new technologies and not simply follow the path of least resistance.

For example:

Privacy: Big data harvests everything about our lives and we should have the ability to opt out. More works needs to go into this but it has to come from the open source community who doesn’t have vested interests in getting advertising revenue.

Security: The DNC leaks to Wikileaks would never have happened if the DNC had a firm policy within their ranks to only allow official internal emails that are encrypted with GnuPG. Any hacks would have resulted in thousands of encrypted emails which could not have been easily leaked. What needs to happen next is that we need to get people to use this technology and to make the technology easier to use.  Projects like enigmail in Thunderbird are great but they are not easy for the un-saavy computer user to use. There is no excuse for shoddy security but it does explain why people on an individual level don’t adopt them more readily. Projects like GnuPG need to grow and evolve and from there become a part of our daily internet lives.

Information: What do you do when the things that you want to know and share are restricted by government regimes and overzealous lawmakers? You find new ways to share information. Projects like Tor get a bad wrap for being the means by which some truly evil people share pictures of abused children; but it’s also how people in countries and Iran, Syria, China, and others get information out. Projects like Tor need increased funding, visibility, and volunteers to keep it free and secure from any and all government and corporate meddling. If we’re not free to share our ideas then we aren’t free.

The challenge was to you how I would use Linux or Open Source to solve a problem in the world. I gave you three real world problems that can best be solved with Linux and open source software. I hope someone reads this and finds the suggestions to be things that the want to help with.

Rainy Days

When I was a kid, we used to play board games in school on rainy days. I wasn’t yet a chubby kid; that would come later but I had a touch of asthma, didn’t run very fast and had awkward gait. On the rainy days, I was equal to the other kids. I was good at little kid trivia, shoots and ladders, and other games of that sort for 7 year olds. On those days, I was an equal to my peers. After school I went back to being the lonely poor kid and on sunny days I was the kid who didn’t get picked to play games. Rainy days left and indelible mark on me; I’ll never get over it. I love them. I love the darkness of them. I love the coolness in the summer and terrifying thunderclaps in the middle of the night. When everyone else feels gloomy and sad; I am at peace.

Notes on Honor

Taken from Syntopicon Vol 1

The notions of honor and fame are sometimes used as if their meanings were interchangeable, and sometimes as if each had a distinct connotation.

Well, yeah. I would never have thought that they two were in any way directly related. It seems more often that famous people are dishonorable and honorable people are rarely well know outside of a relatively small circle.

The authors who see no difference between a man’s honor and his fame are opposed on fundamental issues of morality to those who think the standards of honor are independent of the causes of fame. This opposition will usually extend to psychological issues concerning human motivation and to political issues concerning power and justice. It entails contrary views of the role of rewards and punishments in the life of the individual and of society.

I guess I fall into the latter camp.

The meaning of honor seems to involve in addition the notion of worth or dignity. But whether a man is virtuous or not, whether he deserves the good opinion of his fellowmen, does not seem to be the indispensable condition on which his fame or infamy rests. Nor does his good or ill repute in the community necessarily signify that he is a man of honor or an honorable man.

Yes, this is pretty much where I stand, but then the author goes on it say this:

Where others consider what it means for a person to be honorable, Nietzsche substitutes the notion of nobility. Nietzsche’s hero, the superman, is noble.

I would not have guessed that Nietzsche’s superman is either noble or honorable. I always thought that he is nearly the opposite of both.

“The manifestation of the value we set on one another,” writes Hobbes, “is that which is commonly called Honoring and Dishonoring. To value a man at a high rate, is to honor him; at a low rate, is to dishonor him. But high and low, in this case, is to be understood by comparison to the rate that each man setteth on himself.”

A good groundwork definition of honor, though maybe missing something.

“Let men rate themselves at the highest value they can; yet their true value is no more than it is esteemed by others.”

My gut reaction is to use this quote as a proof against having unrealistic self-esteem. This is dynamite and the kind of thing that will drive modern people into a murderous frenzy because it minimizes their self worth and makes true worth something external to them. Full chapter.

.

Some thoughts on ebooks

Let’s start with some price comparisons.

The Stand  by Stephen King Price
New paperback from Amazon
Kindle Ebook
New paperback from B&N
Nook Ebook from B&N
Cheapest used from Amazon
Google Books
Used Bookstore cost**
Ebook Piracy
$8.99*
$8.99
$8.90*
$8.99
$.10 + 3.99sh
$8.99
$4.50
Free

* Not including s/h
** based on %50 of cover price which seems to be common for used bookstores.

I’m a big fan of ebooks.  I have been ever since I first found Project Gutenberg about a decade ago.  I quickly fell in love with Google Books when they started providing scanned copies of out of copyright books a few years ago.  I’ve owned a couple of ereaders.  I currently have a Nook and an no-name lcd Android tablet with all of the latest Nook, Kindle, etc apps on it.  My problem is that I want to buy more ebooks but they are cost prohibitive.

The above table gives a comparison of costs as of today on a book that was written over 20 years ago.  If you buy the ebook from Amazon or B&N, it’ll cost you the same as buying it in a retail store even though it contains no physical resources and doesn’t require any printing.  Furthermore, if you want to change devices, then you had better get an Android device or an iPad with the associated app because your books are not interchangeable the Kindle or the Nook.  If you are strictly limited on how you use a book that you buy, even an ebook, do you truly own it?  That’s a good debate in itself.

I’ve bought one ebook so far from Google Books new shop.  It’s one that I couldn’t find anywhere else, the price was great compared to the paper version, and it isn’t DRM’ed.  Basically that means that I can read it on Google’s book app and I can put it into my Nook.  I can even download a PDF copy of it that is readable on a Kindle without conversion.  That’s nice.  It’s also very rare.  Google’s bookstore is generally higher than they other two major ebook sellers and their selection is lacking to say the least.  However I think that they openness in the file format is the way to go.

If I go to a used bookstore and buy a book for $4.50, after I’m done I can turn it in for a small store credit which will also bring down the total cost of ownership for that book.  It’s my opinion that ebooks should be able to compete with the costs of going to a used bookstore.  Competition is good for everybody.  Used bookstore will also be an awesome place to browse and buy.  There is an experience factor to thumbing through books on a rainy Saturday afternoon that shopping online for ebooks can’t compete with.  There’s also the fact that authors don’t see one red cent of revenue when books are sold in them also.  Authors should want their older catalog of books sold at used bookstore prices because at least then they will see a little more revenue coming in.

Lastly, there is one company that I think is doing things right and that’s Baen book.  Baen is mostly known for pulp scifi and fantasy titles.  They are also one of the few really competitive publishers that are doing things right.  Many of their new ebooks are in the $15 range which I’m okay with because it’s new and in higher demand.  However, most of their older catalog is less than $6.00.  They also have a huge selection of older free ebooks so you can get a taste of what an other has to offer.  Their books also come multi-format and without restriction.  Use them on the device that you have.

Baen Free Library:  http://www.baen.com/library/