Tuesday, July 24, 2007

Alias in .bashrc

Whenever I use command ls, I use it with the -l option and sometimes also the --human-readable option.

Typing ls -l -h in every instant is not too much for me. The problem is with my memory and remembering stuff. So usually I use ls alone and then remember to use ls -l -h

To fix this,
Edit the user .bashrc file (~/.bashrc) to add an alias: alias lc="ls --color=always". Then give the command: source .bashrc. That will reload .bashrc.

Lc is just an example. Make it whatever you want.

Monday, July 23, 2007

Digital Camera Access Made Easy

There are many ways to use your digital camera with your computer on Arch.

One easy way is via gphoto2
sudo pacman -S gphoto2
gphoto --auto-detect
you'll get something like this (with the camera plugged-in):
Model Port
----------------------------------------------------------
USB PTP Class Camera usb:
USB PTP Class Camera usb:003,002

Now simply use that information above:
/usr/bin/gphoto2 --port usb:003,002 --get-all-files
Walla! That'll get all your photos downloaded in no-time! Plus it's CLI.

A second way is:
/usr/lib/libgphoto2/print-camera-list > /etc/udev/rules.d/90-libgphoto2.rules
? sudo
chown username /usr/lib/libgphoto2/print-camera-list
? sudo
chmod 755 /usr/lib/libgphoto2/print-camera-list
/usr/lib/libgphoto2/print-camera-list udev-rules-0.98 group camera mode 0660 > /etc/udev/rules.d/90-libgphoto2.rules
and then reboot


A third way is to set Udev properly to detect the camera. I'll try posting other ways too.

See: http://gphoto.org/doc/manual/permissions-usb.html#usb-on-linux-udev

Friday, July 20, 2007

Elive 1.0 Gem Repos

This is the /etc/apt/sources.list of Elive 1.0 Gem:

### Do NOT use another extra repositories on Elive, not use Debian SID or UBUNTU
### repositories, NOT ARE COMPATIBLE WITH ELIVE, if you use any EXTRA repository
### than those, you can broke your system, USE IT ON YOUR OWN RISK


### Elive repositories (select one). Important to are Elive the first of your list
deb http://repository.elivecd.net elive main efl elive



### Debian repositories (select one)
# Do NOT use other repository than this one, if you want to use testing or unstable of debian, you need to know to you can broke your Elive system and apps don't works in the same way, use it at your own risk!
deb http://ftp.fr.debian.org/debian/ etch main contrib non-free
#deb http://ftp.uk.debian.org/debian etch main contrib non-free
#deb http://ftp.cl.debian.org/debian etch main contrib non-free
#deb http://ftp.fr.debian.org/debian etch main contrib non-free
#deb http://ftp.it.debian.org/debian etch main contrib non-free
#deb http://ftp.is.debian.org/debian etch main contrib non-free
#deb http://ftp.br.debian.org/debian etch main contrib non-free
#deb http://ftp.es.debian.org/debian etch main contrib non-free
#deb http://ftp.hu.debian.org/debian etch main contrib non-free
#deb http://ftp.de.debian.org/debian etch main contrib non-free
#deb http://ftp.us.debian.org/debian etch main contrib non-free

### Another repositories for Debian
#deb-src http://ftp.fr.debian.org/debian/ etch main contrib non-free
#deb http://security.debian.org/ etch/updates main


### Marillat repository, special multimedia
#deb http://www.debian-multimedia.org etch main
deb http://mirror.home-dn.net/debian-multimedia etch main

Taking Screenshot in E17

To take a screenshot/snapshot of enlightenment 17 (e17), use scrot in terminal.

Consistency

It doesn't matter what you do once, twice or ten times.

What matters is what you do often..

What you do most of the time.

Consistency.

Thursday, July 19, 2007

Tomboy on KDE

Tomboy icon

Trying to run Tomboy on KDE, using Kmenu, does nothing. Tomboy doesn't start nor does it produce any error messages.

Running tomboy from konsole works fine however.

To fix this, just edit the Tomboy entry in Kmenu --> Utilities --> Tomboy (right-click) --> Edit item

Now in 'KDE Menu Editor', just change the 'Command' line from 'tomboy --search' to 'tomboy' only and save it.

On OpenBox (and other WMs), you can use the same idea. Just run 'tomboy' without the '--search' argument.

Tuesday, July 17, 2007

Play RealMedia in Amarok

Update: The following tip might no longer work, so be responsible.

Amarok iconHaving some realmedia files in my music library, I've been wishing for a way to be able to play them within my current music manager Amarok.

The necessary codecs have been installed, yet it produces an error message everytime I double-click on one of those files.

The solution is in the file ~/.xine/catalog.cache as follows:
  • cp ~/.xine/catalog.cache ~/.xine/catalog.cache.backup
  • kedit ~/.xine/catalog.cache
  • Search (Ctrl+f) for "realadec"
  • Change "decoder_priority=" from whatever number it is (it was 7 for me, might be 5 for you) to make it "decoder_priority=10"
  • Save it.
  • Go play some .rm files!

GNOME Custom Hotkey for Application Launch

Steps for creating a custom hotkey to launch any application in GNOME:

  1. Open Applications --> System --> Configuration Editor (gconf-editor) as the user as you're logged in in GNOME
  2. Go to "apps" --> "metacity" --> "keybinding_commands"
  3. Double-click on e.g. "command_1"
  4. Type in the name of the application you want to launch, e.g. "gnome-terminal", the GNOME terminal, or "gcalctool", the GNOME calculator..
  5. Go to "apps" -> "metacity" -> "global_keybindings"
  6. Double-click on e.g. "run_command_1"
  7. Type in e.g. t
  8. Note the < and > for the special function keys
  9. Done! Close the gconf-editor and press Ctrl+Alt+Shift+t and the terminal should come up.
  10. If you're using KDE, right-click on the application in the K menu, click on "edit", press on the "None" button on the lower-right and press the keyboard combination that you want (Ctrl+Alt+Shift+t), click OK, and save your settings.
  11. Using Beryl on GNOME makes you lose the settings above, so launch the Beryl-manager-settings --> General Options (top) --> General Options (left) --> Commands tab (right) --> choose a command#, enter a command like gnome-terminal --> Shortcuts tab (right) --> commands --> choose the run_command# and type the shortcut like: t

Getting Nautilus Back

Nautilus

In using GNOME, Nautilus is the default file manager. So browsing a floder, one would expect to get Nautilus. In my last GNOME installation, everytime I browse a folder, its opened in pcmanfm (or in some cases Thunar) instead of Nautilus.

To restore Nautilus as the default:
  1. Launch Nautilus
  2. Right-click a random folder on your filesystem
  3. Click "Properties"
  4. Click "Open with.." tab
  5. Choose "File Manager" (or "Open folder")
  6. Click OK
You can use scripts too, among other ways.