Using Dolphin/KDE to manage Git repositories (or other VCS)

Dolphin is the default file manager of KDE.  Dolphin is very extensible and allows you to install plugins that provides a lot of new features. With the KDE SDK plugins for Dolphin its possible to manage a Git repository directly from the Dolphin GUI. In KDE 4.8, the plugin also works with Bazaar, Subversion (SVN), and Mercurial.

To do that in Linux Mint, Ubuntu and similar distros, you need to install the package kdesdk-dolphin-plugins by running:

sudo apt-get install kdesdk-dolphin-plugins

After that, you need to enable the feature:

  1. Open Dolphin and go to menu Settings > Configure Dolphin
  2. Click in the tab Services;
  3. Check the option Git (and any other Version Control System you want to use).
  4. Confirm the changes by clicking in Apply/OK.
  5. Restart Dolphin.

After that, whenever you enter a folder that is a Git repository, Dolphin will show some info about the repository, such as files that have changed. The following figure shows an example. When you click with the right button in the folder (or files), the context menu shows you options to checkout, commit, create tags, pull and push. It may be a very useful tool even if you know how to use Git by the command line.

Options using Dolphin Git Plugin

Options using Dolphin Git Plugin

Custom Latex Beamer Theme

I would like to share a beamer theme that I created recently. Beamer is a Latex class used to create presentations. Default beamer themes are usually full of stuff that waste the usefull space of the presentation. So, I created a custom beamer theme that is simple and clean.

If you already know latex and beamer, it’s pretty easy to use the theme. Download the file style.tex and put it on the same folder of you latex document. Then, you just need to include the file using the command “\input{style.tex}” at the begining of your latex document. It should look like this:

\documentclass[t,14pt,mathserif]{beamer}

% include your packages
\input{style.tex}

\title{Presentation Title}
\author{Author Name}

\begin{document}
% your document content
\end{document}

You can download the theme on my github: https://github.com/aecio/beamer-theme. There you will also find a demo presentation and a PDF of the demo presentation generated using the theme. You can use this demo as a template for your own presentations.

Problemas de ‘Permission denied (publickey)’ no github ao tentar realizar pull e push no Windows XP

Ontem perdi um bom tempo tentando configurar um projeto no github. Estava ocorrendo uns erros de autenticação (Permission denied) ao tentar fazer pull ou push.

Depois de muitas buscas na web e não encontrar nada, descobri que o erro estava sendo causado por codificação de caracteres. O nome da minha conta de usuário no Windows era ‘Aécio’ e por algum motivo o git bash não reconhecia o acento do nome. Ao chamar o comando ssh-keygen para gerar a chave de autenticação, ao invés do git bash gerar a chave detro da pasta de usuário padrão “C:\Documents and Settings\Aécio\.ssh\”, ele estava criando outra pasta com nome “C:\Documents and Settings\A’cio\.ssh\”. Consegui adicionar a chave gerada no github (foi aceita sem problemas). Até consegui fazer o primeiro push em um projeto, mas depois apareceram alguns erros ao tentar fazer push. Tentei gerar a chave ssh em outra pasta, mas o problema continuava.

Só depois de muito tempo consegui resolver o problema mudando o nome do usuário para outro sem ‘caracteres especiais’. Mudar o nome de Usuário no “Painel de Controle -> Contas de usuário” não adianta. Só muda o nome que aparece no menu iniciar e na inicialização. Para mudar é necessário fazer mudanças no registro do sistema e renomear a pasta de usuário manualmente. Existe alguns tutoriais sobre como fazer isso na internet.

Fica a dica pra quem se deparar com o mesmo problema. Uma dica melhor ainda é usar Linux (consegui configurar tudo sem problemas em menos de 10 minutos =).

Se você conseguiu resolver este problema de outra forma, me deixe saber.

Alguns links que podem ajudar:

Criação de chaves SSH (Generating SSH keys)

Resolvendo problemas de autenticação com SSH (Addressing authentication problems with SSH)