<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<?xml-stylesheet type="text/css" href="http://tonyagudo.net/styles/feed.css"?>
<title type="html">Linux</title>
<link rel="alternate" type="text/html" href="http://tonyagudo.net" />
<link rel="self" type="application/atom+xml" href="http://tonyagudo.net/archives/linux/index-atom.xml" />
<updated>2008-08-02T01:30:56-04:00</updated>
<author>
<name>Tony Agudo</name>
<uri>http://tonyagudo.net</uri>
</author>
<id>http://tonyagudo.net/</id>
<generator uri="http://nanoblogger.sourceforge.net" version="3.3">NanoBlogger</generator>
<entry>
<title type="html">PCLinuxOS TinyMe: A better PCLOS</title>
<author>
<name>Tony Agudo</name>
</author>
<link rel="alternate" type="text/html" href="http://tonyagudo.net/archives/2008/05/10/index.html#e2008-05-10T02_13_57.txt" />
<id>http://tonyagudo.net/archives/2008/05/10/index.html#e2008-05-10T02_13_57.txt</id>
<published>2008-05-10T02:13:57-04:00</published>
<updated>2008-05-10T02:13:57-04:00</updated>
<category term="Linux" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[<p>
Well, the conversion back to PCLOS went a lot smoother than I thought, 
thanks to a remaster of PCLOS dubbed "TinyMe". TinyMe is a very 
lightweight version of PCLOS, using Openbox as a window manager, PCManFM 
as file manager, and LXDE to round off the desktop experience. With 
TinyMe, I no longer had to fiddle with the GRUB boot options to make 
sure bootup actually went beyond GRUB(as it did with PCLOS 2007). So now 
I have a fairly lightweight environment, but I can also play SL thanks 
to Synaptic. But again, I'm not giving up on SliTaz. I may decide to buy 
an Eee PC laptop for my birthday coming up and plop SliTaz on it until 
they do get Nvidia packages made.
</p>]]>
</div>
</content>
</entry>
<entry>
<title type="html">SliTaz GNU/Linux, my new favorite distro</title>
<author>
<name>Tony Agudo</name>
</author>
<link rel="alternate" type="text/html" href="http://tonyagudo.net/archives/2008/05/05/index.html#e2008-05-05T01_14_54.txt" />
<id>http://tonyagudo.net/archives/2008/05/05/index.html#e2008-05-05T01_14_54.txt</id>
<published>2008-05-05T01:14:54-04:00</published>
<updated>2008-05-05T01:14:54-04:00</updated>
<category term="Linux" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[<p>
Recently on DistroWatch I heard about <a 
href="http://www.slitaz.org/en">SliTaz GNU/Linux</a>, a new distro 
that may very well be the smallest desktop distro ever(a 25MB LiveCD 
image). I had the chance to try out this little wonder on my PC, since 
PCLinuxOS updates weren't coming down the pipe for a long while(that's 
changed now), and I'm pleasantly surprised with it.
</p>
<h3>Overview</h3>
<p>
Currently Slitaz comes in two forms: Stable and Cooking. The Stable 
release features the JWM window manager, emelfm2 file manager, Firefox, 
AlsaPlayer, mtPaint, LightTPD web server, SQLite, and many other 
packages via the simple but effective package manager tazpkg. The 
Cooking release is what will eventually become the next stable release, 
replacing JWM with the much better Openbox window manager, PCManFM file 
manager, HardInfo system information tool, SearchMonkey and more tools 
to come. Plus you can create your own customized version of SliTaz using 
the Tazlito LiveCD creation tool.
</p>
<p>
I am actually <a 
href="http://tonyagudo.net/images/SliTaz-screenshot.png">writing 
up this post</a> in SliTaz right now, which says a lot about how I'm 
really liking this little powerhouse distro. The only thing keeping me 
from permanently switching to SliTaz is that there are no proper Nvidia 
or ATI 3D acceleration packages available yet, so I could play Second 
Life(TM). But then again SliTaz is meant for use on old hardware, so I 
could be putting an unrealistic expectation on it. I will be sticking 
with SliTaz for a while, then migrate back to PCLOS(which now sadly 
looks quite bloated for my needs) as I need to keep up with my store and 
friends in SL.
</p>]]>
</div>
</content>
</entry>
<entry>
<title type="html">My PCLinuxOS Experience: Part 1(Background and Installation)</title>
<author>
<name>Tony Agudo</name>
</author>
<link rel="alternate" type="text/html" href="http://tonyagudo.net/archives/2007/11/24/index.html#e2007-11-24T21_04_59.txt" />
<id>http://tonyagudo.net/archives/2007/11/24/index.html#e2007-11-24T21_04_59.txt</id>
<published>2007-11-24T21:04:59-04:00</published>
<updated>2007-11-24T21:04:59-04:00</updated>
<category term="Linux" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[<p>
Recently, my desktop PC's power supply had burned out. While I could easily have just bought a new power supply for $30(at most), I had decided to buy a new, better PC. What I got was a dual-core(2 Pentium D processors) monster in a crazy <a href="http://www.a-top.com/xblade/xblade.html">XBlade</a> case for $500. It came with Windows XP Pro pre-installed, but I quickly noticed something about it: it wasn't a legit copy! How did I know? First, it had Norton Antivirus <strong>2005</strong>. And, I found a little application called "KEYGEN!!!" hidden away in the Recycle Bin.
</p>
<p>
So, being a lawful citizen I decided to wipe out XP and install Linux on this bad boy(I just paid $500 and I'm not going to pay over $100 more just to "get right with Microsoft"). Sadly, the only Ubuntu disc I had was a Gutsy beta disc and it just would not install. I did however have a copy of <a href="http://www.pclinuxos.com">PCLinuxOS</a> 2007 ready to go on a Linux Format DVD I had(Note to self: must renew subscription). The Live session ran great, and the installation process was painless. But the installation wasn't really done after first boot. Once KDE started up, a little package update applet told me I had over 400 updates available. Yikes! But I expected that, so I proceeded to use Synaptic(yes, PCLOS is an RPM-based distro, but it uses apt-get/Synaptic instead) to install the updates.
</p>
<p>
After the updates were done, I had considered the installation complete and set up PCLOS for my specific needs. In part 2, I will talk about what I did customizing PCLOS and why I'm seriously considering making it my distro of choice for a while.
</p>]]>
</div>
</content>
</entry>
<entry>
<title type="html">Yet even more Python tricks!</title>
<author>
<name>Tony Agudo</name>
</author>
<link rel="alternate" type="text/html" href="http://tonyagudo.net/archives/2007/10/30/index.html#e2007-10-30T01_16_36.txt" />
<id>http://tonyagudo.net/archives/2007/10/30/index.html#e2007-10-30T01_16_36.txt</id>
<published>2007-10-30T01:16:36-04:00</published>
<updated>2007-10-30T01:16:36-04:00</updated>
<category term="Linux" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[<p>
Yes folks, Python is truly a programmer's goldmine. Today we're going to do something Web 2.0-worthy with Python. We're going to create a server written in Python. But not just any old server. We're going to create an XML-RPC server, and we'll also write up a tiny client for it as well to demonstrate how surprisingly simple it is to build a server.
</p>
<p>
First, let's write up the server itself. Let's call this file "xmlrpc_server.py":
<pre>
#!/usr/bin/env python

import SimpleXMLRPCServer
#set server address(local here)
servAddr=("localhost",8080)
#define server functions and instances here
def areaSquare(length):
        return length*length

def areaRectangle(length,width):
        return length*width

def areaCircle(radius):
        return 3.14*(radius*radius)

class MyFuncs:
        def say(self,line):
                return "#"+line+"#"

#create the server object
server=SimpleXMLRPCServer.SimpleXMLRPCServer(servAddr)
funclist=(areaSquare,areaRectangle,areaCircle)
#register functions
for eachfunc in funclist:
        server.register_function(eachfunc)
#register instance
server.register_instance(MyFuncs())
server.register_introspection_functions()
#start serving
server.serve_forever()
</pre>
To start up this little server, type "python ./xmlrpc_server.py &amp;" on the command-line. Now, let's write a little demo client to show that we can actually use the server. This file will be called "xmlrpc_client.py":
<pre>
#!/usr/bin/env python

import xmlrpclib
#connect to a server
servAddr="http://localhost:8080"

s=xmlrpclib.ServerProxy(servAddr)
#list available server methods
for m in s.system.listMethods():
        print m
#call server methods
print "Areas:"
print "Square:",s.areaSquare(5)
print "Rectangle:",s.areaRectangle(2,6)
print "Circle:",s.areaCircle(5)
print s.say("E=m(c*c)")
</pre>
Simply run "python ./xmlrpc_client.py", and you'll see that we are actually using functions stored remotely on the server. Pretty cool, right? No? Well, you haven't seen anything yet. You see, this XML-RPC stuff can be used within web services, which shockingly includes scripted objects within Second Life. With XML-RPC you can create objects networked together to do things that would be difficult, slow, or plain impossible to implement. I'll get more into this in my next post.
</p>]]>
</div>
</content>
</entry>
<entry>
<title type="html">Second Life and Open Source</title>
<author>
<name>Tony Agudo</name>
</author>
<link rel="alternate" type="text/html" href="http://tonyagudo.net/archives/2007/10/09/index.html#e2007-10-09T23_29_36.txt" />
<id>http://tonyagudo.net/archives/2007/10/09/index.html#e2007-10-09T23_29_36.txt</id>
<published>2007-10-09T23:29:36-04:00</published>
<updated>2007-10-09T23:29:36-04:00</updated>
<category term="Linux" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[<p>
In case you didn't know, for almost 1 and 1/2 years I have been addicted to one MMOG: <a href="http://www.secondlife.com">Second Life</a>. What separates SL from other games such as There, World of Warcaft and others is that whatever you create within SL, you own it and therefore can sell it. This has engendered many in-world businesses and business models to flourish, including open source. Even I've gotten into the business act.  <img src="http://tonyagudo.net/moods/smilies/grin.gif" alt=":D" />
</p>
<p>
I've opened up a <a href="http://slurl.com/secondlife/ama%20gi/242/58/22/?title=Antonius%20Misfit%27s%20Open%20Source%20Shop">store</a> on the newly created sim Ama Gi(which is ancient Sumerian for "freedom"), an island sim dedicated to the ideals and promotion of FOSS and free culture. My store is called simply "Antonius Misfit's Open Source Shop", where I sell some skyboxes, but mainly scripted "laptop" computers(all open source, of course). My latest creation is something still in development, but I'm very proud of it as it is my first product from scratch. It's a GPLv3-licensed build packager and rezzer I call "<a href="/Apt-Rez.tar.gz">Apt-Rez</a>". Of course, Apt-Rez isn't the only product of it's kind available(such as Rez-Foo and Rez-Faux), but I feel it perfectly serves as not only a ready-to-use solution for builders, but also as a learning aid for budding LSL scripters or a starting point to roll your own rezzer. Plus, Apt-Rez is also available for purchase either at my shop or on <a href="http://www.slexchange.com/modules.php?name=Marketplace&file=item&ItemID=386583">SL Exchange</a> for a nominal price(Yes, the GPL says it's perfectly acceptable to sell your own open source items as long as the source is freely attainable, something that apparently even <a href="http://www.slexchange.com/modules.php?name=Forums&file=viewtopic&t=25617">some open source developers</a> haven't grokked yet).
</p>]]>
</div>
</content>
</entry>
<entry>
<title type="html">More Ubuntu Programming Gems</title>
<author>
<name>Tony Agudo</name>
</author>
<link rel="alternate" type="text/html" href="http://tonyagudo.net/archives/2007/10/03/index.html#e2007-10-03T10_27_34.txt" />
<id>http://tonyagudo.net/archives/2007/10/03/index.html#e2007-10-03T10_27_34.txt</id>
<published>2007-10-03T10:27:34-04:00</published>
<updated>2007-10-03T10:27:34-04:00</updated>
<category term="Linux" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[<p>
In my last entry, I introduced Python as a quick and easy way to create GUI programs for Ubuntu. However, Python has a super-handy module for creating your own command-line interfaces, known simply as <strong>cmd</strong>. Specifically, cmd contains a minimal class representing a command-line shell, called <strong>Cmd</strong>. To create your own shells, you must subclass cmd.Cmd and add your own functionality there. Here's a minimal example of how to create a command-line shell wth Python:
<pre>
#!/usr/bin/env python

import os,sys,cmd,shlex,readline

class Shell(cmd.Cmd):
        def __init__(self,intro="Welcome to Shell):
                cmd.Cmd.__init__(self,intro)
        def do_prompt(self,line):
                "Set the command prompt"
                self.promptbackup="(Cmd) "
                if line=="":
                        self.prompt=self.promptbackup
                else:
                        self.prompt=line
        do_man=do_help
        def do_exit(self,line):
                "Exit Shell"
                return True

if __name__=="__main__":
        Shell().cmdloop()
</pre>
As you can see, it's a fairly trivial affair. Actual commands are implemented as methods that begin with "do_". Exiting the shell requires a method that returns True. You can even create scripts for your shell, just like with any standard *nix shell or Windows batch file.
</p>]]>
</div>
</content>
</entry>
<entry>
<title type="html">Ubuntu Programming Secrets</title>
<author>
<name>Tony Agudo</name>
</author>
<link rel="alternate" type="text/html" href="http://tonyagudo.net/archives/2007/10/02/index.html#e2007-10-02T00_09_23.txt" />
<id>http://tonyagudo.net/archives/2007/10/02/index.html#e2007-10-02T00_09_23.txt</id>
<published>2007-10-02T00:09:23-04:00</published>
<updated>2007-10-02T00:09:23-04:00</updated>
<category term="Linux" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[<p>
Ever since Ubuntu Linux arrived on the scene three years ago, it has become the most popular distribution in the world, and perhaps the one to bring Linux to the completely non-geek masses. But even though Ubuntu <i>seems</i> to be a desktop-only distribution at first glance, there's a lot of programming power built-in even before the first time the "Add/Remove..." app or Synaptic is run. Here's the rundown of Ubuntu's three hidden programming gems:
</p>
<p>
<strong>GUI programming with Python</strong><br/>
While many open source programs are written in C or C++, those languages are too cryptic for average users to grasp. Ubuntu ships with the interpreted and easy to learn Python language, along with full GUI programming modules(Gtk/Gnome or Qt for Kubuntu). Hidden away in Ubuntu's menu editor is an entry to run a Python shell interactively. To activate the entry, right-click the Applications menu and select "Edit Menus". In the "Menus:" section of the editor, go to Applications->Programming. You'll see two items show up in the "Items:" section. Check the box next to "Python (v2.5)", and close the menu editor. Now you will find the entry activated under Applications->Programming->Python, and an interactive Python terminal will pop up for you to learn and experiment.
</p>
<p>
<strong>Extending The File Manager</strong><br/>
On Ubuntu, you can easily extend the functionality of the file manager, Nautilus, through executable scripts. They can be written in Python, Perl, and even bash. To use a Nautilus Script, place the script in the $HOME/.gnome2/nautilus-scripts directory, select any files/folders to be passed to the script, then right-click your selection and navigate to Scripts->YourScript. To get a good idea of what scripting Nautilus can do for you, I've created a <a href="/Sample-Scripts.tar.gz">collection of scripts</a> used for programming, multimedia conversion, and even blogging(I'm using my "BlogShell.sh" script right now to make this entry). Kubuntu users have a similar feature called "service menus". You can find an excellent source of service menu scripts <a href="http://www.kde-look.org/index.php?xcontentmode=287">here</a>.
</p>
<p>
<strong>Creating GUI dialogs on the command-line</strong><br/>
Going hand-in-hand with file manager extensions are the tools zenity(for Gnome/XFCE) and kdialog(for KDE). These comman-line tools can create several GUI-based dialogs that are used within shell scripts. Ubuntu has excellent documentation for zenity, obtainable by clicking the "?" icon next to the main desktop menu and entering "zenity" in the search box. Kubuntu users need only enter "man:kdialog" within Konqueror.
</p>]]>
</div>
</content>
</entry>
</feed>
