Showing posts with label system. Show all posts
Showing posts with label system. Show all posts

06 June 2008

Theme Info Script

I cooked up a little python script to print basic theme info. Here is what it looks like:



You can download the script here: https://sourceforge.net/project/showfiles.php?group_id=233270 . Alternatively, you can check out the latest version from cvs:

$ mkdir themeinfo
$ cd themeinfo
$ cvs -d:pserver:anonymous@themeinfo.cvs.sourceforge.net:/cvsroot/themeinfo login
$ cvs -z3 -d:pserver:anonymous@themeinfo.cvs.sourceforge.net:/cvsroot/themeinfo co -P trunk

You must make it executable and use python to execute it::
chmod +x themeinfo.py
python themeinfo.py


There are a few prerequisites to get the script to work. First, check the options around line 28. You need to set them up to match your system. The default setup is for GNOME. There are a few other options, but I am working on support for KDE, Xfce, and Fluxbox. If you have any tips or suggestions, please leave a comment!

GTK and Icons

Unless you are using gnome-settings-daemon , you must specify your GTK and icon themes in your .gtkrc.mine file with the following formatting:
include '/home/daniel/.themes/MurrinaAurantium/gtk-2.0/gtkrc'
gtk-icon-theme-name = "Crashbit"
It doesn't matter where these lines are in the file, but if you include multiple external gtkrc files or specify different icon themes in different styles, the script will only print the first one as the theme name.

Wallpaper

In order to get the wallpaper function to work, you must either set the background with nautilus or feh.

Colors

Changing colors is fairly easy. There are a few color names defined in the colors section (line 12). Just add one of these names before the string containing the text that you want to colorize in the print info section. The default is "orange", and "end" is used to reset the color to the terminal default.

Screenshot

Finally, there is an option to take a screenshot after the script had executed at the very end of the file. It requires scrot. If you want the script to take a screenshot automatically, uncomment the line:
call("scrot")

Also, you can delay the screenshot by tweaking the second parameter of the previous line:
call(["sleep", "x"]) where "x" is the number of seconds to pause before taking the screenshot
. You should leave this at at least "1" (the default), otherwise the screenshot will be taken before the text shows up in the terminal.

07 June 2007

What's Linux?

When people look at my computer screen and don't see a Start button, they start to ask questions:

"What's this?"
"Ubuntu."
"Oh. What's Ubuntu?"
"A type of Linux."
"Oh. What's Linux?"

That's where things get tricky. Most people would say: "It's an operating system." I guess that's true, but it's also misleading. "Linux" isn't a single entity. Windows XP is always sold by Microsoft, and it is always Windows XP. Mac OS X is always sold by Apple, and it's always Mac OS X. Linux, however, is distributed in hundreds and hundreds of forms, and it is almost never identical from one "distro" to the next. Let me now explain what makes any given distro unique.

Kernel
First, a distro starts out with a kernel, which is basically a block of code that connects applications and program to hardware (Linux started out as a kernel). Most users aren't going to care about this, unless they should end up getting a distro whose kernel won't allow a certain piece of hardware to work. The only way that I know how to check hardware compatibility with a kernel is to try the kernel in question. If it doesn't work, I try a different one. Once, I booted Ubuntu with at least 6 different kernels in a short period to find which one worked best.

Desktop Environment
The next characteristic in a distro is the Desktop Environment (DE). Familiar examples of DE's include Windows Vista's "Aero" or Mac OS X's "Aqua." You might call it the "look and feel" of the operating system, but it's also much more than that. With Linux, a DE also entails the basic set of applications and libraries for the system. This is probably the most important thing for a user to consider before trying a distro. Currently, there are two major DE's in use: GNOME and KDE. Others include Xfce, Enlightenment, and Mezzo. Although most disto's usually come with a single DE, you can install an additional or replacement one. I'll write more about DE's later.

Software
One of the great aspects of Linux is the sheer amount of free software, meaning that you don't have to pay for it (more on software freedom later). There are various ways to install software on Linux, in additions to the programs that come with a particular distro. The first is to compile it yourself. This is sometimes fun, while other times it's a pain. Another, less common way is through binary installers (like with Windows). Probably the most significant way is through packages. Three examples of software packages include deb (used by Debian Linux and derivatives, such as Ubuntu), rpm (used by Red Hat Linux, and derivatives like Fedora and OpenSuSe), and ebuild (used by Gentoo-based distro's). These packages are stored on special servers, called repositories. Users can browse the repositories (or repo's) with a package manager, and select which packages they want to install. It's a pretty straightforward process, but I might give a more in-depth explanation later, anyhow.

Those are the key features that I look for in a Linux distro. I find that although there are many variations between distro's, these differences are usually analogous in some way. For instance, Debian uses the 'aptitude' command to fetch and install 'deb' packages, whereas Gentoo uses the 'emerge' command to fetch and install 'ebuild' packages.

So, if you want to call Linux an operating system, that's fine. Just keep in mind that it's also very diverse.