Saturday, September 25, 2010

Change android system files [HTC Desire]

So I bought my HTC Desire and I wanted to change the hosts file in /etc
But you can;t change system files that easily. At first I had to download HTC Sync in my windows OS in order to be able to use adb usb drivers.
I downloaded android sdk, which it did its own stuff...

The really good part is where you get to open a cmd and then go to the tools directory. From there, one has to reboot into recovery mode. Mine was rooted, so I had to go to clockworkmod recovery->advanced->key
Then issue these commands:
adb shell mount /system #not sure if this worked
adb push [hosts] /etc


And then reboot. Not hard uh???

Edit: For the most bold and daring of you, why not try S-OFF??? Then you won't have to be in recovery mode. The phone can be on and still you will be able to alter your files.

Android

So I recently got my htc desire (well not so recently, it's been 2 months already).

Thursday, September 16, 2010

Add ttf fonts in ubuntu

Ok, so you've downloaded a great font (what about this one... ok maybe not) and you don't know how to install in Ubuntu?

Fear no more. Just sudo cp your file to /usr/share/fonts and then issue this command: sudo fc-cache -f -v

Disabling 'recent documents' in Ubuntu

To disable, open up a Terminal window by clicking on Application \ Accessories \ Terminal from the top panel menu and enter the following set of commands:

rm ~/.recently-used.xbel

followed by…

touch ~/.recently-used.xbel

…one more (after entering the following command, you will be prompted to enter your password)

sudo chattr +i ~/.recently-used.xbel

Next, clear the Recent Documents list as described above.
Now when you check Places \ Recent Documents again, it should now be greyed out and disabled.
No more displaying "those" recently viewed documents (..aahem).

To explain what occurred to disable Recent Documents using the above set of commands:
We first removed the file recently-used.xbel (located in the root of your Home directory by using the rm command (this file is used to store the list of documents)
Next we re-created the file using the touch command.
Then we changed the attribute of the file to make it inaccessible using the command chattr +i.
If you decide someday that you want to enable displaying of Recent Documents, just run the following command:

sudo chattr -i ~/.recently-used.xbel

The view will remain greyed out and disabled until you access a document, which will cause it to start displaying viewed documents.
Oh yeah, one more thing, when you do enable Recent Documents, all documents that you accessed when it was disabled, will be visible. So make sure you clear them out again….otherwise everyone will be able to see what you were trying to hide in the first place
Source