avp::ptr weblog

Everything that is in our mind.

Archive for the ‘configuration’ tag

How to set up a fast emulator for Android on Linux?

without comments

This article describes how to setup a new emulator which allows to install apps which use Google Play Services.

Recently, Android 4.3 (API level 18) has been published. As former releases it contains system images for ARM and Intel Atom (x86). When creating an emulator via the Android Virtual Device Manager one can choose to target either the “plain” API level or include Google APIs. The “plain” configuration can benefit from both hardware acceleration options (ARM and  Intel Atom). Running such a virtual device is quite comfortable as it behaves similar to a hardware device. The Google API targets however do not allow to use Intel Atom architecture.

Android Virtual Device

Read the rest of this entry »

Written by tobi

September 12th, 2013 at 12:35 am

How to fix Eclipse colors for autocompletion and tooltips

with 11 comments

Sadly Eclipse ships with a broken color theme when it comes to autocompletion and tooltips. I cannot tell if the problem is limited to Ubuntu Precise, however, it is worth getting fixed immediately. The following screenshots illustrate the broken color settings in both situations. The tooltip window shows up with a black background color and blue links.

Eclipse IDE - Tooltip with default colors settings

Eclipse – Tooltip with default colors settings

When autocompletion popup appears the first suggestions is not readable at all.

Eclipse IDE - Autocompletion with default colors settings

Eclipse – Autocompletion with default colors settings

So, here is what you need to do to fix the colors. Read the rest of this entry »

Written by tobi

July 28th, 2012 at 5:11 pm

How to manually install TeX Live 2012

with 3 comments

Some days ago, at July 8, TeX Live 2012 has been released. In the meantime, I also updated to Ubuntu 12.04. (Precise) but I did not find the time to install TeX Live. I am happy to report that there is nothing new to learn regarding the installation. You can straight follow the very same instructions I posted earlier for TeX Live 2011. Have fun.

Update: I noticed that TeX Live 2012 has been made available via apt-get. I recommend testing it out (I haven’t done so yet).

Written by tobi

July 10th, 2012 at 11:50 pm

Amend files to a git commit without changing the commit message

with 3 comments

Quiet often there is the need to add files to the recent commit. This can be done with 2 simple commands.

git add file
git commit --amend

In case you do not wand to change the commit message there is the new option --no-edit for git commit introduced in git 1.7.9. The git release notes describe how the --no-edit option can be used.

git commit --amend” learned “--no-edit” option to say that the
user is amending the tree being recorded, without updating the
commit log message.

git commit --amend --no-edit

Of course, I added an alias for the new option to my global git configuration.

ci = commit
cm = commit -m
ca = commit --amend
cn = commit --amend --no-edit

Written by tobi

February 5th, 2012 at 10:11 pm

Posted in Uncategorized

Tagged with , , ,

Reset the author of a git commit

without comments

Once in a while one forgets to configure the user name and email address for git when initializing or cloning a new git repository. So do I. But git would not be git if it does not have an answer to that problem. Here is what git prints out when you commit without previously configuring the user credentials.

$ git cm 'Initial import.';
[master (root-commit) 0396c37] Initial import.
Committer: User User@Machine.(none);
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

    git config --global user.name ''Your Name''
    git config --global user.email you@example.com

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 file

Well done git!

Written by tobi

February 5th, 2012 at 9:54 pm

Posted in Uncategorized

Tagged with , , , ,

How to manually install TeX Live 2011 and Kile 2.1.0

without comments

It took me a while to find out how to install the latest TeX Live 2011 package on my Ubuntu 10.10 system. So this is a short summary of my success story.

First of all, it is worth mentioning that the default PPA installs TeX Live 2009.

As of July 2011 the texlive package that ships with Ubuntu (TeX Live 2009) is lagging two years behind the current TeX Live release (TeX Live 2011). If you want the latest version of TeX Live, you can install it directly from the TeX Live website (this does not interfere with the packages in Ubuntu).

Though, it is not too difficult to manually install TeX Live 2011 from the sources following these instructions. In this process, I decided to download the TexLive package via rsync since it can be a rather big installation.

After successfully installing TeX Live itself, I set up the latest version of Kile (which is 2.1.0 as of today) following this description.

UPDATE!

Please mind that there is TexLive 2012 as described in a follow up article. There is also a PPA available to avoid the manual setup.

Written by tobi

October 8th, 2011 at 5:00 pm

Fixed permissions issue with redmine and gitosis

without comments

Some days ago I discovered that our gitosis install did not work with redmine anymore. I could push and pull changes but could not add a new ssh key. I thought it might be caused by the redmine upgrade I did, but it was some months ago and I haven’t had any problems. The redmine logs didn’t tell me anything either.
Yesterday, I started a new project. No problems with creating it in redmine and also no problems creating a git repository.
When I tried to push, gitosis gave an error. “Permission denied..” on some file.
I connected to the the gitosis server and checked the repository folder. There was a folder backup I made and it was not owend by the gitosis user. That was causing the error. After fixing ownership of that folder, everything works again as it should.

Written by peter

October 2nd, 2011 at 7:51 pm

How to set the ownerchip for NTFS partitions mounted from Ubuntu?

without comments

To mount an NTFS partition under Ubuntu you need to edit the configuration in /etc/fstab. Though, when successfully mounted there still is a good chance that the access rights to the partition are not as you want them to be. You cannot changed them with chmod command. Instead you need to set the umask for the mounted partition. In general umask 007 would be satisfying. But in case you run a service that reads from the partition as an anonymous user umask 006 is needed, e.g. an apache web server.

UUID=1973945397942 /media/data ntfs defaults,umask=006,uid=1000,gid=1000 0 0

You can find more information on umask here. This article was inspired by this post by Andrew Martin.

Written by tobi

July 29th, 2011 at 12:36 pm

A git log alias with colors, date and owner.

without comments

Written by tobi

March 11th, 2011 at 3:22 am

Posted in Uncategorized

Tagged with , , , , ,

How to update your web site using git?

without comments

There is a smart way to keep your web site up-to-date when you use a git repository to manage your HTML sources. You can use a post-receive hook to immediately send changes to your httpdocs folder whenever you push changes to the repository. Here are the actions to do.

  1. Grant write access to the httpdocs folder for the user/group git.
  2. Add a detached worktree to the git configuration.
  3. Add the checkout command to the post-receive hook.

1. Grant write access to the httpdocs folder for the user/group git

You need to enable the user that runs the post-receive hook to write to the webserver folder. The user typically is git or the group git. Edit the sudoer file using the visudo command to grant access to the aforementioned folder.

%git ALL=(ALL) NOPASSWD: /usr/bin/git

Read this documentation to understand the sudoer file and another helpful posting from Gilles on sudoer parameters. My best regards go out to Abhijit Menon-Sen who helped me to understand the sudoer commands.

2. Add a detached worktree to the git configuration.

Following the tutorial of Abhijit Menon-Sen on “using git to manager a web site” you need to change your configuration as follows.

$ git config core.worktree /var/www/www.domain.com/httpdocs/
$ git config core.bare false
$ git config receive.denycurrentbranch ignore

3. Add the checkout command to the post-receive hook.

Finally add the command to the post-receive script that will update your web site httpdocs folder.

$ sudo git checkout -f

The git checkout command is run in the context of the root user. This context switch is allowed via the sudoer file edited earlier. The switch is necessary to gain write access to the location of the detached worktree which is httpdocs.

Written by tobi

October 2nd, 2010 at 2:22 pm