jump to navigation

Scripting Conky! March 1, 2009

Posted by Paimon in Conky.
Tags: ,
add a comment

For those of you who love to do some scripting and displaying of computer related data on your screen, conky is just the program for you!

You should already have the repo for grabbing Conky, so fire up terminal and enter:

sudo apt-get install conky

Next, fire up conky by typing the following in your terminal:

conky

You should see the default conky script show up on your screen

Default Conky Script

Default Conky Script

You can now monitor some valuable information about your PC like the frequency your CPU is running at, RAM usage, number of processes etc.

The other fabulous thing you can do is create some custom scripts to display data that you personally want to see, and to dress up the dialog to make it more enjoyable to look at.  An example of one of my custom conky scripts is shown below:

Custom Conky Script

Custom Conky Script

As you can see I’ve dressed it up a bit and added some more information like how much I have downloaded/uploaded, as well as what programs are using the most ram/cpu.

Scripting for conky isn’t all too difficult if you have any experience with any programming language as well as toying with the unix terminal/environment.  Here is an example to get your started

conkyrc

Make sure to rename the file to .conkyrc and place it into your home directory for the changes to take effect!  Have fun.

Embedding a Terminal in Gedit February 26, 2009

Posted by Paimon in Gedit.
Tags: , ,
add a comment

I do a lot of coding within linux, and unfortunately I sometimes code with a language that doesn’t have a standard GUI based IDE.  My thesis work actually had me coding in TinyOS which is nesC based (derived from C).  Although there is an Eclipse plugin for TinyOS, it isn’t 100% bug free.  Usually I end up coding in GEdit, and then firing up the terminal to compile and download the code onto my hardware.

I managed to come across a wonderful plugin for gedit.  By running the following command, you can get a few more plugins than what is bundled out of the box:

sudo apt-get install gedit-plugins

As you can see from the screen shot below, I now have a Terminal embedded in the “bottom pane” of Gedit.  Very useful for those of you who program /compile in the terminal like myself.

Terminal Is In The Bottom Pane

Terminal Is In The Bottom Pane

Ubuntu Tip #1: lshw February 25, 2009

Posted by Paimon in Uncategorized.
Tags:
add a comment

For those of you who love to check up on your hardware from time to time, heres a nice tool that you can run from the terminal to pop up some handy info:

sudo lshw

Make sure to run it as a super user (sudo) or else you will get a couple of warnings.  Also, if you would like to output the text to an html file, just run

sudo lshw -html > filenameHere.html

Enjoy

Some Compiz Fun February 25, 2009

Posted by Paimon in Uncategorized.
Tags: , ,
add a comment

Gnome has been my desktop manager of choice since installing Ubuntu.  Not only was it preinstalled (Kubuntu will provide you with KDE out of the box), but it provides a nice, clean, minimalistic interface, which is a nice getaway from the clutter of a Windows desktop.  However, there are times when I question if I should move over to KDE, not because of the bundled apps, but because of the more flamboyant visual effects.

KDE 4.2

KDE 4.2

Gnome 2.24

Gnome 2.24

Although KDE has a desktop that is more vibrant, theres a warm fuzzy feeling that you get when you log into a Gnome desktop. The panels are nice and small, the desktop is clean, and nothing is in your way. Logging into KDE I felt a bit overwhelmed. The application menu reminded me a lot like WinVista, the panels were large, and the environment itself just felt a bit sluggish compared to Gnome (mind you im on a quad core pc w/ 4gb ram).

One thing that I admit was nice about KDE however, is the fact that desktop icons are placed in “containers” allowing you to be more organized, but personally I like having 0 icons on my desktop, so it wasn’t something that was to influence my decision on staying with KDE.

Gnome users however, can add a couple tweaks to take advantage of the full fledged graphical features of the environment. Installing a program called Compiz (http://www.compiz-fusion.org/) adds a lot of fun options, one of my favorites being the “cube”. For those of you that havn’t been on a linux box, you have the luxury of having more than one “desktop”. Basically, on the “taskbar” there are icons that allow you to switch between desktops, meaning that you can avoid the clutter of having multiple windows open.

Two Desktops, Each With Its Own Purpose

Two Desktops, Each With Its Own Purpose

As you can see from the screen shot above, I have two desktops.  In the example above I have firefox running in one desktop, and a file browser in the other.  This allows me to get work done ( *cough* browse the internet *cough*) while leaving the other desktop for other stuff (i.e. have a music player playing full screen, etc).

Now….back to the cube I started talking about…

Four Desktops In Cube

Four Desktops In Cube

In the above example, I have four desktops, and by pressing my trusty hot keys (ctrl, alt, and drag the mouse), I am able to rotate my desktops in cube fashion.  It is a spectacular show of eye candy and the wonderful thing is that all the desktops are graphically interactive as seen below

Overlapping Firefox Between Two Desktops

Overlapping Firefox Between Two Desktops

Another thing I really like about the Gnome desktop (this feature is also available in KDE), is the “shade” feature.  If you look at the above screen shot, you can see two horizontal bars above the firefox window.  Those bars are actually my buddy list, as well as an IM, in “shade” mode.  I have set my preference to shade a window when i double click on the title of the window, which essentially shrinks the window so that only the title shows.  This is a great way to quicky free up some desktop space if you need to find something on the desktop.

Compiz features a ton of options, including transparent windows, window effects, desktop effects, etc.  The things that you can do with it are mind blowng.  For those who love the look of KDE, but are more comfortable with Gnome, this is a must have on your Gnome install.

Sound Blaster Audigy2 Platinum eX Installation February 24, 2009

Posted by Paimon in Uncategorized.
Tags: , , ,
add a comment

One of the hardest things that I had to accomplish with the installation of Ubuntu was getting my SB Audigy2 Live Drive (the external box on the platinum series products) to work.  I managed to get it working after hours and hours of searching and toying around.  Heres what has worked for me:

First, we are going to need to grab the Linux Infrared Remote Control software package.  You can do this by firing up Terminal and entering the following command

sudo apt-get install lirc lirc-x

When lirc is installing, it will ask you which remote control you have, select “livedrive_midi”.  At the next screen it asks for an IR Transmitter which you will answer “None”.

The next thing you want to do, is edit the alsa driver configuration file by doing the following in terminal

gksudo gedit /etc/modprobe.d/alsa-base

You want to scroll down to the bottom, and enter the following line at the end

options snd-emu10k1 enable_ir=1

Next we want to make sure everything is set up correctly in the lirc package.  Open up the lirc configuration file with the following command

gksudo gedit /etc/lirc/hardware.conf

Replace your file’s contents with the following

# /etc/lirc/hardware.conf
#
LIRCD_ARGS=”-d /dev/snd/midiC0D1 -H livedrive_midi”

#Chosen Remote Control
REMOTE=”Creative LiveDrive midi”
REMOTE_MODULES=”"
REMOTE_DRIVER=”livedrive_midi”
REMOTE_DEVICE=”"
REMOTE_LIRCD_CONF=”creative/lircd.conf.livedrive”
REMOTE_LIRCD_ARGS=”-d /dev/snd/midiC0D1 -H livedrive_midi”

#Chosen IR Transmitter
TRANSMITTER=”None”
TRANSMITTER_MODULES=”"
TRANSMITTER_DRIVER=”"
TRANSMITTER_DEVICE=”"
TRANSMITTER_LIRCD_CONF=”"
TRANSMITTER_LIRCD_ARGS=”"

#Enable lircd
START_LIRCD=”true”

#Don’t start lircmd even if there seems to be a good config file
#START_LIRCMD=”false”

#Try to load appropriate kernel modules
LOAD_MODULES=”true”

# Default configuration files for your hardware if any
LIRCMD_CONF=”"

#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn’t have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to “false”
FORCE_NONINTERACTIVE_RECONFIGURATION=”false”
START_LIRCMD=”"

Save the file and next we will initialize our live drive.  For some reason, on devices with a live drive, you need to “initialize” it by sending some random bytes to see if it will start responding.  We can easily do this by:

echo -e ‘\360004041\141000000\17700\367′ > /dev/snd/midiC0D1

Lets now make sure that we can get some output.  Enter the following in terminal

cat /dev/snd/midiC0D1

Now if you press some buttons on your remote, or play with the buttons on your live drive, you will notice some garbage printed to the screen.  If you are seeing some garbage we will check to see if lirc is recognizing our remote.  Type the following in terminal

irw

Running IPW

Running IPW

Now press some buttons on your remote, you should see some text describing the button pressed, as well as the address of the button.  If you do, then you have successfully activated lirc within ubuntu!

The last step is to configure the remote, which is great because it allows for customization.  You will need to create a .lircrc file in your home directory and you may use this template to get you started

begin
prog = irexec
button = display
config = /usr/bin/totem &
end
begin
prog = irexec
button = play
config = totem –play-pause
end
begin
prog = totem
button = eax
config = fullscreen
end
begin
prog = totem
button = next
config = next
end
begin
prog = totem
button = prev
config = previous
end
begin
prog = totem
button = close
config = quit
end
begin
prog = irexec
button = start
config = /usr/bin/beep-media-player -a&
end
begin
prog = irexec
button = ok
config = /usr/bin/beep-media-player -t&
end
begin
prog = irexec
button = down
config = /usr/bin/beep-media-player -f&
end
begin
prog = irexec
button = up
config = /usr/bin/beep-media-player -r&
end
begin
prog = irexec
button = vol+
config = /usr/bin/amixer -q set Master,0 5+,5+
end
begin
prog = irexec
button = vol-
config = /usr/bin/amixer -q set Master,0 5-,5-
end

Hello world! February 24, 2009

Posted by Paimon in Uncategorized.
add a comment

Hello all!  My name is Paimon and I am starting up this blog as a guide for all those who are new, or plan on becoming new users of the Linux operating system.  I am a computer engineer working for a US Military based company developing systems software for engine analysis and externals management.  I have been a computer user for most of my life, and started at the age of 8 with a windows 3.1 based system.

Windows has always been a part of my computing life, but it wasn’t until I caught a glipse of Red Had Linux back in the late 90′s that grabbed my interest in the linux computing world.  After some unix training classes and books, I started becoming more and more adept to using Linux and started to love it.  Unfortunately at the time, linux’s driver support was what drove me back to Windows, as I was engulfed in the concept of building a new PC every year that the driver support just couldn’t keep up.

I am happy to say that I am back into the groove of using Linux, especially the Ubuntu flavor.  I hope to spread my knowledge and help those who are on the fence get a nice view of my experiences.

Your feedback will be appreciated!!

Follow

Get every new post delivered to your Inbox.