Blog is moving

My blog is moving to http://victormendonca.com/blog/. If you are looking for a specific or older post you are in the right place Otherwise check out my new page for more up to date content.

Friday, October 26, 2007

How to configure IMAP on Evolution and Gmail


Gmail introduced IMAP on their email systems this week. It may not be available to you yet, but they are working pretty fast to do so.

You can check if you have it or not by going to your Gmail account, them Settings. Check that on the top menu says “Forwarding and POP/IMAP” instead of just “Forwarding and POP”.

If not, make sure your language is set to “English (US)”.


If/when you do have the option, go to the menu and check the “Enable IMAP” radio button.


Now open your Evolution client and add the following settings:

=> Identity Tab
- Full Name: Name you’d like to be displayed on your messages
- Email Address: You full Gmail address


=> Receiving E-mail
Server Type: IMAP
Server: imap.gmail.com:993
Username: Your complete Gmail address
Security: SSL
Authentication Type: Password
Remember Password: Check (optional)


=> Sending E-mail
Server Type: SMTP
Server: smtp.gmail.com:587
Server Requires Authentication: Check
Security: TLS
Authentication Type: Login
Username: Your complete Gmail address
Remember Password: Check (optional)


After that click on send and receive. You should start getting your messages. I’ve heard some people saying that they had to restart Evolution for it to start working (also complaints that IMAP on Evolution is really slow).

You will see the folders added to the left pane of your Evolution inbox.


Here are some links that may help you as well!!!

Supported IMAP Client List
How do actions sync in IMAP?
IMAP Help Center

Tuesday, October 16, 2007

How to simply transfer files to another PC via SSH


Today I was trying to find a way of logging on my web server as root so I could transfer files to my ftp and web folders without having any permission problems.

I usually do it through ftp as an ftp user. I transfer the files to the server, than I logon to a terminal via ssh and manually move all the files to the desired place. After that I still have to chown and chmod. It's not a lot of work, but I like making things simpler!! :)

My server is on a DMZ, so I don't want to open access to any unnecessary port. I also limit a lot of the logins to my subnet so no one can access from the Internet.

I really don't like scp for large files, so that was a no no.

What I was trying to do was to enable root login to vsftpd and limit subnet login on hosts.deny hosts.allow. I went trough all the steps but them I could not get it to work.

After asking for some help on Ubntu forum, someone told me to try sshfs l, which depends on fuse. Both packages are easy to install. You can download a tar file and quickly compile it.

Once I had it installed all I had to do was run the following codes to mount a server folder to a empty local folder and unmount respectively:

# mount
$ sshfs user@server:[remote folder] [local folder]
# eg:
$ sshfs root@myserver:/ /home/juanito

# unmount
$ fusermount -u

It's pretty neat if you want to mount a remote folder trough SSH, but for me it was not yet what I needed. For some reason I did not have complete access. I could create folders, files and transfer the same anywhere but could not delete them. No deal!!

After some more searching I found something that made feel stupid (in most cases the simpler is the best). All I had to do was enter the following on Nautilus address bar (Ctrl+L if you can't see it):

ssh://user@server

Shazam!!! I had now complete access to my folders. You can use the same method for ftp, smb and sftp protocols as well.

If this is a server you use a lot you can even mount the login to your PC so you don't have to type the address all the time (yeah, I'm also lazy).

Go to main gnome menu => Places => Connect to Server


Choose SSH


Fill the fields:
Server - Your SSH server IP
Port - 22 (or other if you have changed)
Username - Local username on the remote machine
Name to use for connection - Human readable


Now every time you login you'll see and icon on you desktop and your Nautilus side pane like this:


The icon on your desktop can be removed using gconf, but that means that any mounted volume (eg: flash USB, CD) will not show on you desktop, but will on your "Computer" folder (and of course on your "/media" folder).

So to remove the icon, open gconf editor (Alt+F2, enter gconf-editor), go to /apps/nautilus/desktop and uncheck "volumes_visible". You can also enable "computer_icon_visible" to have something similar to "My Computer" on Windows.


Vic.

PS: the steps above for ssh access assume you have installed shh on the client and sshd on the remote PC

Thursday, October 11, 2007

How to create command alias to save time on Ubuntu

Do you have a long task (or line of command) that you run on your terminal window very frequently? If you do and want to save some time, this how to will for sure help you.

Let's say you are always connecting to a remote computer via ssh, with some different parameters than the defaults. Lets say you usually run the code:

$ ssh -v [user]@[ip or hostname] -p 2222

To save some time, you can also configure a "shortcut", or a alias, that when you type on the terminal window will call for the command above. Something like:

$ connecthome

The process is very simple. All you have to do is edit a file on your /home/user folder called ".bashrc". You can even add more options and edit some commands. For example, let's say you want Ubuntu to confirm that you want to delete a file every time you use "rm" on a terminal window (I did because I'm a noob, we make a lot of mistakes!). All you have to do is add the line:

alias rm='rm -i'

The "-i" sign means "interactive". Ubuntu will ask you to confirm that you really want the delete the file. Type "man rm" on a terminal window for more info.

So here's what you should add to your .bashrc to achieve the modifications above:

alias rm='rm -i'
alias connecthome='$ ssh -v [user]@[ip or hostname] -p 2222'

First make sure you backup your .bashrc and them edit the main one:

$ sudo cp .bashrc .bashrc.bak
$ sudo nano .bashrc

Press Ctrl+x to save, and "y" to confirm overwrite. The change will only take effect after you login again. But you can always check on the another tty. Type Ctrl+Alt+F1, login with you username and password and try it out. To go back to X just type Ctrl+Alt+F7.

Here's what a copy of my .bashrc looks like:

# Basics
alias cp='cp -v -i'
alias rm='rm -i'
alias mv='mv -i'
alias utar='tar -xvf'
alias utarz='tar -xzvf'
alias tarz='tar -czvf'

# Software Management
alias aptl='sudo apt-get update && sudo apt-get install'
alias update='sudo apt-get update'
alias upgrade='sudo apt-get upgrade'
alias inst='sudo apt-get install'
alias apts='sudo apt-cache search'


Vic.

Wednesday, October 3, 2007

How to install Pidgin "guifications" on Edgy for NOOBS (like myself)

After some looking on the Internet, I was a bit stressed as I was not able to find a how to install guifications for Pidgin on Edgy. There are many how to's install on Feisty, but none on Edgy. I was even able to get a .deb package from Ubuntu forum, but it was for Feisty and I did not have many of the lib files installed on my system.

Apparently Edgy repos have not been updated with Pidgin (not sure if they will). There's an option to install Gaim guifications, but in my case I was already using Pidgin 2.2.0.

The first thing you gotta do is download the tar file from guifications.org here. Then run the commands:


cd [folder where tar file was downloaded to]
tar -xzvf [guifications-version.tar.gz]

Once you untar it take a look at the INSTALL file. It has some important information. Now let's install the guifications:

cd [folder tar created]
./configure
make
sudo make install

If everything went ok you should now be able to right click on the Pidgin icon on your notification area, choose plugins and you'll see the following window:


This is where we can configure some (a lot) options for your guifications. Below are some screenshots of the menus you will find.




The default theme that comes with guifications is pretty "dumb". It looks like this:



But you can download some different and more interesting themes to spice things up a bit. Here are some sites where you can find more themes:

- Sourceforge
- Gnome-Look.org

And here are some screenshots from the themes I've downloaded:





Vic.