Category Archives: Howto

An Easy Way to Fix Grub

Sometimes GRUB stops working out of the blue. Other times, Windows kills GRUB out of spite – when you install Windows, GRUB breaks. One way to fix GRUB is via the command line by using a live CD. An easier method is Super Grub Disk. super

I use the CD-ROM disk method. Download Super Grub Disk and burn the .iso image to the CD. After this is accomplished reboot your PC. Change the BIOS settings so you boot to the CD-ROM drive first.

At the Super Grub Disk menu keep pressing enter until you get to an option screen that lets you choose Linux or Windows. If you have recently installed Windows choose Linux and then reinstall Grub. The process is automatic. After that reboot and remove the disk. Grub should now be working.  Play around with Super Grub Disk and learn how Grub works.

If Super Grub Disk does not work check to see if your Hard drive (HD) is plugged in correctly. If you have two hard drive switch the IDE cables. This might solve the problem.

Terminal on Your Desktop

If you have ever seen a screenshot of an ubuntu desktop created by a linux expert chances are it had a command line interface on the desktop.  To put the terminal on your desktop is really easy.

1. Create and Edit a Terminal Profile

Open Terminal. Applications -> Accessories -> Terminal
In Terminal go to Edit -> Profiles…
Click on ‘New
In ‘Profile name:‘ type DesktopConsole *NOTE: This is a very important; this will be reference later
Base on:‘ should then be set to Default
Create

In the ‘General‘ tab uncheck Show menubar by default in new terminals
In the ‘Title and Command‘ tab change ‘Initial title:‘ to transparentdesktopterminal *NOTE: This is a very important; this will be reference later
You can edit the options in the ‘Color’ tab on your own. I unchecked ‘Use colors from system theme‘ and changed ‘Built-in scheme:‘ to Gray on Black
In the ‘Effects‘ clicked on ‘Transparent background‘ and dragged the ‘Shade transparent or image background:‘ scroll bar to about 40%
In the ‘Scrolling‘ tab set ‘Scrollbar is:‘ to Disabled
There is no need to change anything in the ‘Compatibility‘ tab.

Close the ‘Editing Profile “DesktopConsole”‘ window and the ‘Profiles‘ window. Leave Terminal up and running though.

2. Install and Edit devilspie

First we need to install devilspie. We can do this in the already open Terminal window.
Run sudo apt-get install devilspie
Next we are going to make a devilspie directory (folder) in our home directory. It will be hidden. We will then make a DesktopConsole.ds file which will contain the configuration files.
mkdir ~/.devilspie
gedit ~/.devilspie/DesktopConsole.ds

In the DesktopConsole.ds file copy and paste the following code:
(if
(matches (window_name) "transparentdesktopterminal")
(begin
(set_workspace 4)
(below)
(undecorate)
(skip_pager)
(skip_tasklist)
(wintype "utility")
(geometry "450x350+795+605")
)
)

The only part of the code you will have to change is the geometry. This will change for each screen resolution. I have a screen resolution of 1280 x 1024 and my terminal is located in the bottom right corner. Here is the explanation of the geometry code.
(geometry "WIDTHxHEIGHT+HORIZONTAL_OFFSET+VERTICAL_OFFSET")

3.  Set it up!
We now have to set up the newly created Terminal to run on startup.
Open Sessions. System -> Preferences -> Sessions

Click ‘Add
Under ‘Name:‘ type devilspie (Transparent Terminal)
Under ‘Command:‘ type devilspie
Under ‘Comment:‘ type Makes the transparent terminal work

Click ‘Add‘ again
Under ‘Name:‘ type Transparent Terminal
Under ‘Command:‘ type gnome-terminal --window-with-profile=DesktopConsole *Note: double dashes before window
Under ‘Comment:‘ type A transparent terminal on the desktop

Make sure devilspie (Transparent Terminal) runs before Transparent Terminal. Restart your computer and you should have a beautiful terminal on your desktop. Ctrl + Alt + Backspace

Play around with your settings and color to create a beautiful and elegant desktop. Please take a look at the devilspie wiki for more commands for the ultimate in customization.

Bonus! Want to put Finch, the text-based messaging client based off of Pidgin, on your desktop? Follow the above instructions but name the window FinchConsoleWindow and add the following to your sessions: gnome-terminal --window-with-profile=FinchConsoleWindow -x "finch". Edit your devilspie or create a new one to match the new names.

Viewing Your Linux Partition in Windows

If you are using Windows XP or Vista and have Linux you may be wondering where your Linux partition is. Most likely it is not showing up in My Computer. This is because most Linux partitions are formated in Ext2/3. Windows does not recognize this type of file system. If you have a floppy/thumb drive that is formatted in this way, it too will not show up.

The solution is FS-Driver. Installation is very simple. Download then run the executable in Windows. The set-up menu (above) should look very similar to your operating system’s own partition manager. Select your partition and drive letter and then you will see your Linux drive in My Computer. I suggest that if you have a separate partition for /home that you just use that.

PeerGuardian For Linux = MoBlock and mobloquer

If you download files mobloquerwith Windows XP or Vista most likely you use PeerGuardian 2 from Phoenix Labs to protect yourself. PeerGuardian blocks IPs making it the safest and easiest way to protect your privacy on P2P. If you are using Linux, however, you can’t use PG2; instead use MoBlock.

To download MoBlock install the deb package.

Add source files (System -> Administration -> Software Sources -> Add…)

deb http://moblock-deb.sourceforge.net/debian gutsy main
deb-src http://moblock-deb.sourceforge.net/debian gutsy main

Then in the command line run:

gpg –keyserver wwwkeys.eu.pgp.net –recv 9072870B
gpg –export –armor 9072870B | sudo apt-key add –

double dashes above except at apt-key add-

sudo apt-get update
sudo apt-get install moblock-nfq

Restart and there you have it; MoBlock is installed. MoBlock can be run and tested in the command line.

  • moblock-control start – inserts iptables rules and starts MoBlock
  • moblock-control stop – deletes iptables rules and stops MoBlock
  • moblock-control restart – restarts MoBlock
  • moblock-control reload – rebuilds the blocklist and reloads MoBlock
  • moblock-control update – updates the blocklists and reloads MoBlock
  • moblock-control status – gives the iptables settings and the status of the MoBlock daemon
  • moblock-control test – simple test to check if MoBlock is working

If your internet is down stop MoBlock and do one of the following:

If you have Ubuntu Gutsy 7.10 download the latest version of mobloquer. mobloquer is a GUI for MoBlock that works in Debian lenny and sid and Ubuntu gutsy and hardy (As seen in screenshot above). You should download this even if your internet works just for ease of access. Extract.

tar -xvf mobloquer-xx.tar.gz
cd mobloquer
qmake-qt4make
sudo make install

You may have to install qmake-qt4. If you do just run the line the command line give you.

If you do not have Debian lenny and sid and Ubuntu gutsy and hardy you will have to edit your config file which is located at /etc/moblock/moblock.conf to open ports and enable IPs.

Wacom Tablet in Ubuntu

For most graphic designers a tablet is a must. One of the best tablet makers out there is Wacom. Due to the myth about Linux not having drivers support for everyday necessities, designers have steered clear of Linux. However, Wacom now supports the open source movement.

The process is not that difficult but you will have to use the command line and edit files. First download the official, latest, stable version of the driver. Extract.

cd linuxwacom
sudo ./configure
make
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
sudo gedit /etc/X11/xorg.conf

The last two lines helped open up the xorg file. Edit the xorg file so it looks somewhat like this.

Section “InputDevice”
Driver “wacom”
Identifier “stylus”
Option “Device” “/dev/ttyS0” #SERIAL ONLY

Option “Device” “/dev/input/wacom” #USB ONLY
Option “Type” “stylus”
Option “USB” “on” #USB ONLY

Option “ForceDevice” “ISDV4” #Tablet PC ONLY
EndSection

Section “InputDevice”
Driver “wacom”
Identifier “eraser”

Option “Device” “/dev/ttyS0” #SERIAL ONLY
Option “Device” “/dev/input/wacom” #USB ONLY
Option “Type” “eraser”

Option “USB” “on” #USB ONLY
Option “ForceDevice” “ISDV4” #Tablet PC ONLY
EndSection

Section “InputDevice”

Driver “wacom”
Identifier “cursor”
Option “Device” “/dev/ttyS0” #SERIAL ONLY
Option “Device” “/dev/input/wacom” #USB ONLY

Option “Type” “cursor”
Option “Mode” “relative”
Option “USB” “on” #USB ONLY

Option “ForceDevice” “ISDV4” #Tablet PC ONLY
EndSection

If you have a Intuos3 or Cintiq 21UX add this.

Section “InputDevice”
Driver “wacom”
Identifier “pad”
Option “Device” “/dev/ttyS0” #SERIAL ONLY

Option “Device” “/dev/input/wacom” #USB ONLY
Option “Type” “pad”
Option “USB” “on” #USB ONLY

EndSection

Section “ServerLayout”
Identifier “Default Layout”
Screen “Default Screen”
InputDevice “Generic Keyboard”
InputDevice “Configured Mouse”
InputDevice “stylus” “SendCoreEvents”
InputDevice “eraser” “SendCoreEvents”
InputDevice “cursor” “SendCoreEvents” #For non-LCD tablets only
InputDevice “pad” #For Intuos3/Cintiq 21UX/Graphire4 tablets. It should NOT send core event
EndSection

For pressure sensitivity add this line to the Stylus section.

Option “PressCurve” “50,0,100,50”

Now to use your tablet in Gimp you have change some things around in gimp.

File-> Preferences-> Input Devices-> “Configure Extended Input Devices”.
Under “Device” you will have 3 settings: Cursor, Eraser and Stylus. Set them from “Disabled” to “Screen”.

Now you should have pressure sensitivity in Gimp. *Hooray!* Just a side note, each input device (stylus,cursor,eraser) has a completely different set of attributes in Gimp, and in theory, you can even assign a unique serial number to different pens to get even more granularity. You will experience this when you try to use your eraser for the first time. Rather than selecting the eraser tool, you get the rectangle selection tool instead. This is by design, believe it or not. Gimp does not care that its an eraser, just that it’s not the pen you were just using. If you choose the eraser tool now, it will remember that for the next time you try to use it. On the plus side, you can set the eraser to be anything, including the Airbrush tool or Clone tool.

If you have any trouble check out the Ubuntu forums and the Wacom Help Page.