Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Friday, August 17, 2012

Debian is the most influential gnu/linux distro, ever.

Image/photo

Debian is the most influential [gnu/]Linux distribution ever. Of the 305 active distributions listed on Distrowatch, 147 are derived from Debian, and 87 from Ubuntu, Debian's most famous off-shoot. In other words, 77% of the distributions being used today wouldn't exist without Debian.

source: http://www.linux-magazine.com/Online/Blogs/Off-the-Beat-Bruce-Byfield-s-Blog/Debian-and-I

#debian #gnu #linux
@Linux-Group @GNU @Debian

Sunday, January 23, 2011

Adventures with Debian on AMD64

LibreOffice in AMD64 DebianWell, folks, I figured it was time for a computer upgrade, since, I was, until yesterday, still working on a 3.2ghz Celeron CPU with 1.5gm ram that I purchased almost 4 years ago, now, from TigerDirect.com. Frankly, that machine was still doing a great job on 95% of stuff I do. I can't lie. But, being the geek that I am, I felt the need for more speed, and whole lot of putrid green envy over newer, shinier things. So, I went to my favorite source, again, TigerDirect, and ordered a 2.5ghz dual core, AMD64 barebones kit with 4gb of ram.

d00d...I have not been able to ramp up the CPU usage past like 18%, nor use more than about 20% of the ram. I know there are bigger, faster machines out there, but this is clearly plenty of machine for my needs.

Anyway, this machine is an AMD 64 bit CPU. I won't pretend, for even a second, to comprehend what the difference is between 64 bit and 32 bit computer, beyond that 64 is twice 32, and, in some cases, it means I need different software.

So, I got the machine in two boxes, with all these separate parts, a motherboard, a cpu, 2 ram sticks, a hard drive, and I had to put them together. I yanked the video card from my old machine and used it, too, since it has dvi, and this mobo in this kit did not (works best for my monitor). And, then, being completely ignorant, as I am, I installed from the same Debian/Lenny XFCE installation disk that I had used for every other machine in my office. It installed okay, but, for the life of me, I could not get DHCP to work so I could connect to the internet. So I got on #debian at freenode with my old computer (now using an older monitor, and the onboard mobo video) and raised my hand and after several rounds of the real hackers in there massaging me with the Socratic method, it became clear that I had simply installed the wrong system, and that I needed the (duh!) AMD64 version of Lenny. So, I downloaded that ISO file, burnt up a CDROM, and installed it. And that worked nicely, and the DHCP works fine, and I'm actually writing to you from this new machine. I like it. But I had a few other adventures between then and now, and thought I'd share them.

One of the first things we all do is tweak up our browsers and import our bookmarks and all the good stuff. Well, I prefer google chrome, which makes a lot of that really, really easy, since you can synch all that stuff right online, so, of course, I installed google-chrome, which I'm using now, and, surprise, I like it. But, flash was not working...which made me sad. I did a lot of googling around and digging around and trying to figure out why, and, along the way even tried iceweasel (debian for "firefox") and found that flash wasn't working there, either. Eventually I found Adobe Flash Square, the new 64 bit, beta, prerelease, Flash plugin. Now, getting that to work with iceweasel/firefox was simple enough; Simply a matter of downloading the tarball, unpacking that, and copying the libflashplayer.so to /usr/lib/mozilla/plugins. Did that, and I could watch a youtube video in iceweasel, no problem. But there is no plugins directory for google-chrome. More googling about revealed that the browser, supposedly, has Flash support built right in. Sure. But it wasn't working... A bit more googling about and I learned that I could see more information about my plugins in google chrome by pointing my browser to about:plugins, and, so, I did, and I learned that flash was, in fact, not really built into chrome, but that chrome was looking in /usr/lib/swfdec-mozilla/ for nswrapper_32_64.libflashplayer.so, which was, indeed, there, but not working. I learned that this nswrapper nonsense was an older trick, which, apparently, is not compatible with the NEW Flash 10, or something, because, well, I figured that out because it wasn't working...But the Flash Square libflashplayer.so WAS working...So, this is what I did: I removed the nswrapper_32_64.libflashplayer.so, just yanked it right out of /usr/lib/swfdec-mozilla/. Then, I made a link in that directory to the libflashplayer.so in /usr/mozilla/plugins, and renamed it to nswrapper_32_64.libflashplayer.so (since that's what chrome would be looking for), and restarted chrome, and, guess what. IT WORKED!
cd /usr/lib/swfdec-mozilla/
su
********
rm -f nswrapper_32_64.libflashplayer.so
ln -s /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/swfdec-mozilla/
mv libflashplayer.so nswrapper_32_64.libflashplayer.so
That did it.

Now, that's not the only issue I've had. I installed LibreOffice, for which there are 64 bit .deb files. But when I tried to run it, it kept puking and giving up. I looked at the error it was giving. I neglected to write it down, but, it comes down to the fact that it could not find libcairo.so.2. I dug around for that, and found it right in (big surprise) /usr./lib....so, what was the problem? I looked again at the error. For some reason unknown to me or anyone with whom I've communicated, libreoffice was looking for libcairo.so.2 in /opt/libreoffice/basis3.3/program, rather than in /usr/lib, where any normal program would expect to find such a lib. That was easy. I just copied the lib right in there (I don't know, I probably could have symlinked that, too...didn't even try that...).
cp /usr/lib/libcairo.so.2 /opt/libreoffice/basis3.3/program/
And that was that. LibreOffice is now working superbly. Since then, I've realized I could have also either, a) symlinked (ln -s) that library, or just yanked it, so LO would be forced to look in /usr/lib.

There have been a few other tweaks and adjustments along the way, but, at this juncture, I've got a blazing fast system (debian with openbox is light and efficient) on which to work. Good stuff. I feel like a got a great deal from TigerDirect, and, as always the best deal ever with Debian gnu/linux. The guys on #debian at freenode were extremely patient and graciously helpful, and I owe them a great debt of gratitude. Debian ROCKS! both the software and the community.


On a side note, stealing my old machine's video card (Celeron 32.g 1.5mb ram, x86 arch), and the 24 inch 1680x1050 monitor, seemed to have pissed it off, because, with the onboard video and 15 inch 1280x960 monitor (both of which it HAD used before I purchased the big screen) all text in gui windows, menus, panels, etc. was

HUGE

too huge to read, even, where windows were expanded off screen and even alt-click grabbing them and moving them around was useless, and menus were unreadable, and, basically, all graphical elements were rendered useless, regardless of whether I used openbox, lxde, xfce, or wmii...I wrestled with that for hours...running Xorg -configure, dpgk-reconfigure xserver-xorg, xrandr, changing screen resolution, refresh rates...sacrificing chickens, and my best goat...blah blah blah..all to no avail.

Eventually, I figure out that the problem had nothing to do with Xorg, screen resolution, or what type of sacrifice I offered...The culprit was gdm (still don't know why). I figured it, because, if I logged into single user as root and started X without the assistance of gdm, everything was perfect. So that seemed, correctly, to identify gdm as the culprit. Still, I could not figure out how to fix gdm, so, I just yanked gdm right off the machine (aptitude remove gdm). Using startx from the command line kept starting LXDE on that machine, however, which displeased me since, well, I prefer plain old openbox, without LXDE, and, besides, I also have XFCE and WMII on that machine, and would prefer to have a choice when logging in. So, for that, I just had to copy a .xinitrc into my /home. I removed the entry for LXDE (never use it), and added entries for openbox, xfce and wmii. Now, no DM...I log in via the console, then startx, which tosses up a dialog and asks which of the 3 window managers I want to use, and, good to go. It works nicely.


One more really cool thing. I back up my /home regularly onto an external usb hdd (at least monthly, but I did it before building the new machine and stealing the video card from the old one, I do :~# rsync -rvu /home/tony /media/disk/home), so, I was able to simply copy my whole home directory onto the new machines, and, this being the very same system (well, except being amd64 in stead of 32bitIntel, or whatever), all the programs have the same configs, saved passwords, blah blah blah that they had before. That makes moving to a new computer so much easier. Since I run rsync as root, I do have to chown everything (chown -R tony:tony) again after moving it back, but that's no big deal. Except, some program configs from the x86 machine CAN interfere with AMD64 programs (I had to remove the libreoffice configs from the x86 machine).

DjVu: viable, Free alternative to PDF? convert .txt to .djvu

djview4First, a bit of ranting about open standards and free file formats:
Okay, you know I'm always harping about using Open Document Formats.
So, on the LibreOffice user list today there was discussion of a viable Free/Open alternative to .pdf files. After all, PDF is, indeed, a proprietary format, owned by Adobe, and it is ubiquitous, and there really should (must, perhaps), be a free, open alternative. As such, someone on the list mentioned DjVu, which, frankly, I'd never looked at before (I had heard of it, but knew not what it was). It's a free/open file format that was initially created for scanned documents, from what I gather, and has been around since the late 80s, still maintained by the original authors, and is now used for all kinds of gro0vy stuff.
I did a bit of research, googling, apt=cache searching, and poking around. Eventually, I aptitude installed djview4 and djvulibre and experimented a little. I have drawn the conclusion that, yes, in my opinion, DjVu would be an excellent candidate to be used as, in fact, a better option for many reasons, for the purposes .pdf currently serves (a portable document format that preserves formatting, essentially). Works great.

But there IS a rather glaring drawback...
The one big drawback is, conversion tools are lacking.
One can not, for instance, simply write a DjVu file in any kind of document editor, as you can write a pdf with many different editors, web browsers, most office software, LaTeX editors, and basic text editors, such as tcltext, and, frankly, even in a command line interface.
But to create DjVu, you can only convert other files to DjVu.
Then, in general, and this is what most irritates me, it seems you have to convert from non-free formats. There are no tools, for instance, to convert directly from plain text, LaTeX (.tex), .odf (.odt), .png, or even html files to a .dvju file. What's worse, is that all of your Free and/or open source browsers, document editors, etc., will export or print a file to .pdf, but not to .djvu. OpenOffice.org will write a .pdf. LibreOffice, and Abiword will write a .pdf. LaTeX editors will write a .pdf....Everybody will write a .pdf, but nobody has written code to write a file directly to .djvu. In my opinion, that needs changing. We need to use open standards and free/open file formats (all kinds of reasons for that discussed in this entry to this blog).

That said, today I wrote a script to convert a plain text file to DjVu (but, yes, I had to round-trip it through .pdf, darn it).
This script was written on a Debian/Stable (lenny at the time of this writing) system, on AMD64 arch, using all tools available in the lenny repos.
It requires (obvious when you read the script) enscript, ps2pdf, and pdf2djvu (part of dvjulibre).
The script first converts your text file to postscript with enscript, the from postscript to pdf, with, surprise, ps2pdf, and, then, the final step of converting to .djvu.

The script looks like this:
#!/bin/bash

if [[ $(echo $*) ]]; then
text="$*"
else
echo "try again, and include a file name, and ONLY 1 file name at a time. Thank you." && exit
fi

echo converting $text to $text.ps

enscript $text -q -B -p $text.ps

echo converting $text.ps to $text.pdf

ps2pdf $text.ps

echo converting $text.pdf to $text.djvu

pdf2djvu $text.pdf -o $text.djvu

echo renaming ...

rename.ul .txt.djvu .djvu $text.djvu

echo cleaning up ...

rm $text.ps $text.pdf

echo done

exit


I actually turned the script on itself, and created a DjVu file of this text, available here.

With this, I may very add the capacity to export a .djvu file to tcltext. Why not? It's just a shame, imho, that such an export is not direct, without having the cross into proprietary territory via .pdf, in order to be accomplished.

Also, as a gift to my fellow freedom fighters, foss hackers, and open standards supports, I have created a DjVu of my poetry here which contains all the poems published in my recent book (but not the paintings and photographs).

And, this full article in djvu format here. This last was fun, because I ended up having to change the text encoding first. Apparently enscript doesn't like utf8. I had copy/pasted the article into tcltext, which generates utf8 here (system default). I made a .dvju that had all these weird character substitutions (like /200a#blahblah for a quotation mark?). Here's how to handle the conversion.

iconv iconv -f utf8 --to-code=ascii//TRANSLIT yourfile > newfile

Now, if you use firefox or some other mozilla derivative, there's actually a plugin for view such files in your browser, included in the djvulibre packages.. Otherwise, you'll need a djvu viewer, such as djview or evince.

Anyway,
Enjoy.

./tony

Wednesday, August 11, 2010

Co0l Linux tricks: Hide files in an image

Here's a cool trick I just learned.
You can, in a gnu/linux system, hide files within an image file.
Why you might want to do so, of course, is open to speculation, but the "how" is really rather simple.


  1. Choose an image file, any image file. For this example, I will choose a wallpaper I made, say, debianolive.png. Copy this image to a directory with the documents you wish to hide.

  2. Compress the files or documents you wish to hide. This is simple enough. In terminal do:
    :~$ zip secretfiles.zip file1 file2

  3. Then, in terminal, simply do:
    cat debianolive.png secretfiles.zip > debianolive.png



All done.

This creates an image with the name "debianolive.png", which contains our documents.
When we wish to retrieve said documents, we rename the file to debianolive.zip
:~$ mv debianolive.png debianolive.zip
Then unzip:
:~$ unzip debianolive.zip
and you have your files back.

Handy! Nifty!
Enjoy!

./tony

Sunday, July 18, 2010

Adventures with an Everex Cloudbook (Debian saves the day!)

I bought an Everex Cloudbook on e-bay about a year ago. It came with Ubuntu 8.04, Hardy Herron on it. I immediately made some changes, removing gnome, adding ion3 (eventually replaced with wmii), lightened the load a bit.
For some reason, the wifi was fickle (most of the time it didn't work, but sometimes it did).
It sat around here for most of this past year without much use, so, I recently ordered a usbkey with Ubuntu Netbook Remix 9.10 on it. Finally, these past few days I got around to install that, completely wiping hardy herron from the machine.
The wifi worked flawlessly, out of the box, once that was done. Karmic Koala (ubuntu 9.10) had some groOvy features. I replaced the nauseating, bloated, useless netbook remix interface with XFCE (xubuntu-desktop).
All in all, not too bad.
But, sadly, the machine frequenly froze. Sometimes the system would stop taking input from the mousepad and keyboard, but the system was not frozen (stilly playing music, graphical elements still moving on screen).
I read hundreds of ubuntu forum entries, and it seems thousands of users were having similar problems, for a thousand reasons, and with a thousand different "solutions", none of which resolved the issue for me.
I tried to upgrade to the lastest ubuntu (Lucid Lynx, 10.04) via the update manager.
Lucid Lynx gave me even more problems...Numerous problems. Not only did the system to continue to freeze, but fonts were rendered so badly in gnome that they were unreadable, and the xfce panel had swelled to the size of the entire screen, so, pretty well all graphical elements were useless.
So, current ubuntu offerings on the cloudbook were decidedly not working out well for me.

So, today I did what probably I should have done a year ago when I bought the machine.
I read up on how to make my own bootable iso usb key, downloaded the Debian Business Card iso,
and loaded Debian/Stable (Lenny) onto this little machine.
Guess what.
IT ROCKS!

screenshot, actual size!


Everything is working out of the box. Wifi, sound, everything.
Now, had I read the instructions for installing from the business card iso, I would have known that I could have installed with an XFCE desktop by default, by using the parameter "desktop=xfce" upon boot, but I neglect to read that far until it was already halfway through installation. I had to spend a bit of time removing all the bloated unnecessary gnome crap, and now have a lightweight and functional XFCE desktop on the machine.
It's great! I installed FBReader to read ebooks (and evince for ebooks in pdf format), MOC (music on console) for listening to tunes (loaded up some Mana, Francis Cabrel, Grateful Dead, Bach, and a few other goodies onto the sdcard hdd already). I installed google-chrome browser.
Everything is working perfectly, no lock ups or freezes, etc. I was initially worried that getting wifi up and running was going to require all kinds of gymnastics, but, it simply wasn't true. Wifi worked out of the box. No problem.
So, if you find one of these little gems lying around, fire up a usbkey iso of Debian Stable and have at it.
You'll have a nifty, useful little machine on your hands.

Monday, May 31, 2010

Supercomputing by operating system: Linux RULES THE ROOST!

From the BBC: In Graphics: Supercomputing superpowers.
supercomputers by OS, LINUX RULES!

Supercomputer graph, by operating system: Linux RULES THE ROOST!

a surprise? I think not....
The data used to generate the interactive treemap visualisation come from a draft of the June 2010 TOP500 Supercomputing list. This ranks most of the world's fastest supercomputers twice a year. There may be minor differences between this list and the final published list.

The graphic allows you to see the visualise the list by the speed of each machine; the operating systems used; what it is used for; the country where it is based; the maker of the silicon chips used to build the machine and the manufacturer of the super computer.

The maps were produced using the Prefuse Flare software, developed by the University of California Berkeley.

Tuesday, May 18, 2010

Convert .html to .pdf in gnu/linux

There are various options for converting .html files to .pdf in a gnu/linux operating system. Your choice of methods will depend on the complexity of the file you wish to convert, and your familiarity with the tools a gnu/linux system provides.

What you'll need:

  • Gnu/linux operating system

  • Html file

  • Web browser


Optional:

  • Openoffice.org office suite

  • wget

  • html2ps

  • ps2pdf


Simply "Print to file"
One very simple option for creating a .pdf file from an .html file is to simply open the file in your browser, and choose, print. When the print dialog arises, choose "Print to File", and indicate "PDF". This will write the html file out to pdf format.
html to pdf conversion: print to file

Here is a pdf of this article generated in this fashion: converthtml2pdfgnulinux.pdf

OpenOffice.org

"Print to File" works well for basic html files with simple text and some images. If the html file in question has more complex formatting, this option may not always produce the best results. Luckily, other options exist.

Save the html file to your computer (if you haven't already done so), and open it with OpenOffice.org's html editor (ooweb). Then simply go to the "File" menu, and choose "Export". OpenOffice.org will then offer you the usual options for saving a file, such as choosing where to save it, and what title to give the file, and, preso-magico, will produce a .pdf file from your .html file.

Command Line

Of course, no linux how to article would be complete without instructions on how to accomplish your task using only the magical Bash command line interface. For those so inclined, then, the following is a complete process for acquiring an .html file and converting it to a .pdf file. In order to proceed with this method, the following software must be installed on the your computer: wget, html2ps, and ps2pdf. These programs are either already a part of most gnu/linux distributions, by default, or can be easily acquired with your favorite package manager (apt, yum, pacman, portage, etc.)

First, let's save the file to your computer:
wget http://www.somesite.com/yourfile.html

Next, let's convert the .html file to a postscript or .ps file:
html2ps yourfile.html > yourfile.ps

Then, we'll convert the postscript file, finally, to a .pdf file:
ps2pdf yourfile.ps

Voila!
You should now have "yourfile.pdf".

This could, of course, all be scripted.

#!/bin/bash

# convert webpages to pdf files
# get url
echo "Enter the url of the page to be converted:"
read page
#download page
wget $page

file=$(basename $page)
#convert to postscript
html2ps $file > $file.ps
#convert to pdf
ps2pdf $file.ps
#clean up extraneous files
rm -f $file
rm -f $file.ps
#clean up file name
rename "s/.html.pdf/.pdf/g" *.pdf

echo "done"

exit


Here is a pdf of this article, generated via this command line method: convertweb2pdflinux.pdf
Notice, it is different from the above pdf created with "Print to file".
One difference, which, depending on your goals, may be either advantageous or undesired, is that text in this file can be selected and copied, which is not true of the first file.

XHTML2PDF

In many cases, you may wish to create a pdf file from a complex .html or .xhtml file that includes .css (cascading style sheet) or other elements, that will not render in the above methods in such a manner as to produce a file that appears as it does on the Internet.

For those cases, there is a program called xhtml2pdf. This program is not as likely to be a part of most gnu/linux distributions by default, nor available from said distributions' repositories. As such, you may to have to download and install it by hand. Thankfully, the site for this program is easily enough found at http://www.xhtml2pdf.com/, and, of course, the program is free, open source software.

And, of course, here is a pdf of this article generated with xhtml2pdf: xhtml2pdfconversion.pdf

There's more!

Yet other methods exist for generating .pdf file from .html files, of course, and an attempt to compile an exhaustive list, with instructions for each, would be beyond the scope of this article.

Sunday, May 9, 2010

screenshots


I like a nice, clean, simple, uncluttered desktop.
Here, we're looking at openbox, running on Debian Gnu/Linux (stable, lenny), with not desktop environment elements (panels, icons, etc.), but only a small conky script to display a few system parameters and a clock. Also pictured in this first shot are Xpostulate, TclTxt, and a roxterm.



Just a roxterm, displaying lyrics/tabs for a song, Animal by Chilean rock group, La Ley (click to see the video).
And in this last, again, TclText and Roxterm:


Wednesday, May 5, 2010

TuxTrans - gnu/linux for translators


This morning I awoke to find announcement in my inbox of the release of Tux Trans, a gnu/linux distribution, based on Ubuntu Linux.

Tuxtrans includes all of the software any professional needs for their usual office and communications needs, including web browsers, e-mail clients, VoIP and chat, the fully featured OpenOffice office suite (word processing, spreadsheets, etc.), tools for multimedia, pdf file manipulation, creation, and other desktop publication tools, plus additional programs specifically useful to translators, including CAT (Computer Aided Translation) software, text aligment tools, software localization, tools, even video subtitling tools, such as:

With these tools, any professional translator is fully equipped to conquer the industry. Seriously.
The underlying system, Ubuntu gnu/Linux, of course, is a solid, fully featured, and very popular gnu/linux distrubtion (I have Ubuntu on my laptop and my netbook, but Debian on my desktops).
Tuxtrans can be tried without affecting your current system, being a LiveCD distrubtion (it can run from a CDRom, without being installed to or effecting your hard drive, while, installation is, of course, an option once you've tried it).

Kudos to Peter Sandrini for putting this all together!

Friday, April 30, 2010

Window managers...again: 2 thumbs up for OpenBox

So, after using wmii (window manager improved) as my default window manager for several months, I find myself using OpenBox, again.

openbox, xpostulate

Of course, I use openbox without any desktop icon managers, panels, or other trappings, solely as a window manager, and not as a desktop environment (as is done with, for instance LXDE, a "lightweight" desktop environment which uses openbox as it's window manager). I do keep a small conky script running to display a clock and a few relevant system statistics (cpu/mem usage, running procs, network traffice, clock), but that's it.

Why?
I was having issues with my CPU usage getting ramped up beyond believe, and, when taking a look at running process, it looked as though, for every wmii tab, another instance of wmii was running. Of course, I don't blame wmii entirely for running up my CPU, since I was also running some rather heavy applications, such as OmegaT (translating for very large documents, while using directories chock full of large translation memories, glossaries, and dictionary files, etc.), and, Google Chrome (which, despite being a very nifty, and blazing fast browser, is rather memory heavy). But, I saw that there were numerous instance of wmii running, and killed them, and logged into openbox again.
Gosh...openbox is just so light and fast...seriously.
Now, I really, really dig the tiling feature of wmii and similar window managers, but, that can be achieved in openbox, using a nifty little program called (who'd have thunk it) "tile".

openbox, roxterm, mocp

So, I find myself once more happily using openbox, which I've come back to time and again. I really like the ease of configuration, involving only editing a simple xml file.
editing openbox rc.xml in tcltext
It is quick and snappy, allows (via editing said rc.xml file) me to program in all of my own preferred keyboard shortcuts for my most used actions and programs, etc., and, I'll even admit, it's nice to have the program menu (rt-click on desktop) at my disposal. wmii offers not such menus. I right-clicked on my desktop once I logged into openbox, and found programs in the debian menu that I'd entirely forgotten I even had on my machine! That was a pleasant surprise.

So, while I still have many positive things to say about wmii, today I give two thumbs up to OpenBox.


posted with Xpostulate

Thursday, February 4, 2010

playing with wmii window manager

I'm fooling around, wasting time, and playing with the wmii window manager.
This is what it looks like:
Learn more at http://wmii.suckless.org
lotso co0l software @ suckless.org, seriously.