Category: Article

Disable Emergency Alerts In The HTC One V

Why would I disable the emergency alerts in my phone, well they tend to sound as if the world is about to end no matter the time of day. Also depending on the season you might received multiple alerts during the day.

HTC One V

Let’s Disable The Alarms

Find and select the Messages icon.

HTC One V

Once in the Messages application tap on Menu which is located in the upper right corner. From the drop down menu select Settings.

HTC One V

Select Emergency alerts.

HTC One V

Uncheck all available options. You can’t uncheck Presidential alert.

HTC One V

This is how your screen should look.

HTC One V

Now you can rest assured an emergency alert won’t wake you up in the middle of the night(multiple times).

Increase Console Resolution In Ubuntu

Higher resolution means more text in the same window this especially applies to the console. The following was tested in Debian 7 Wheezy and Ubuntu 13.04. With Grub 2 with can easily increase the resolution by making a few changes.

Console Resolution

Open and edit the grub file.

nano /etc/default/grub

Search for the following line and uncomment “#GRUB_GFXMODE=640“, modify it to include a higher resolution such as 1440×900. Also add the line “GRUB_GFXPAYLOAD_LINUX=keep“.

GRUB_GFXMODE=1440X900
GRUB_GFXPAYLOAD_LINUX=keep

The lines above should be what increases the console resolution.

Now update Grub.

sudo update-grub

And restart the system.

sudo shutdown -r now

Now you should be able to make better use of your monitor resolution.

HTOP 1440x900

Passwd: Authentication token manipulation error – Ubuntu

You probably encountered this error while trying to reset the password on a Ubuntu system.

root@u13-04:~# passwd nyuser

Enter new UNIX password:
Retype new UNIX password:
passwd: Authentication token manipulation error
passwd: password unchanged

This is the result of trying to work on a file system while mounted as read-only. The solution is a simple one. Before making changes to the users password mount the filesystem as read-write which allows for the necessary changes to be made.

mount -o rw,remount /

Now try to change the users passwords again.

root@u13-04:~# passwd nyuser

Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

Can Not Add SSH Key To Ubuntu

4/17/16 – Fixed formatting.

I wanted to add an SSH key to a new minimal Debian VM install, but attempting to add the key resulted in a No such file or directory error.

sudo cat id_rsa.pub >> .ssh/authorized_keys
cat: id_rsa.pub: No such file or directory

The error was the result of the non-existent authorized_keys file which is where SSH key happens to be stored.

If we look inside the ~/.ssh directory you will notice the missing authorized_keys file.

ls ~/.ssh
known_hosts

To be able to store the SSH key create the missing authorized_keys in the right location and with the right permission.

Move to the directory where key files are stored for the user.

cd ~/.ssh

Create necessary file.

touch authorized_keys

Assign permission to file.

chmod 600 authorized_keys

Copy SSH key to authorized_keys file.

cat id_rsa.pub >> .ssh/authorized_keys

Optional, but I recommend removing the key since it’s no longer needed.

rm id_rsa.pub

Restart the service.

sudo service ssh restart

How to Print on an Envelope with LibreOffice

Printing on an envelope with LibreOffice is actually easy, the hardest part being handling the envelope after printing is done.

Here’s what you will need:

  • LibreOffice Writer
  • Regular envelop(mine is a type #10)
  • Printer(Mine is a Samsung laser printer)

Obviously before starting the the tutorial insert the envelope on your printer paper tray, the position may vary depending on your printer. In my printer the envelopes are loaded sideways. Also keep in mind that laser printers will warm the envelope glue which will become somewhat sticky, just make sure that once the envelope is out of the printer you separate the flap to prevent it from sticking to the envelope permanently.

Printing on Envelopes

Open LibreOffice Writer and click on Insert > Envelope

A new window opens. There are two boxes where you will input the typical information that goes into an envelope. The Addressee information goes on the top and the sender information on the bottom.

On the top of the window click on the Format tab, this tab allows you to select the envelope type. Note: In my case I use envelope type #10 commonly received in the mail.

Change any field you consider necessary. When done click on Insert. This will insert the envelope information into a document.

Now you can once again review the information(again), if you spot any mistakes you can still make changes. If everything is accurate click on the Printer icon to print the information in the envelope.

And here is the result.

If you have any comments use the section below to leave one. Thank you.

SSH Permission Denied (publickey)

Had a peculiar problem last week where the computer at home I use to pull backups from a remote VPS could not longer SSH into the remote system.

user@deb7h:~$ ./vps-01-backup-www.sh
Permission denied (publickey).
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(605) [Receiver=3.0.9]

After looking at directory permissions on both systems and user credentials as the possible source of the problem I came across this post where it recommends that permission for the private key file be set to 600.

chmod 600 ~/.ssh/id_rsa

The change in permission worked, perhaps the file had too high of a permission number which in not allowed.

As to how this happen I have no idea, but I probably must have carelessly changed the permission at some point. This happen in a Debian Wheezy system.

How to Split Files with the Split command in Linux

Split is a useful Linux command used to split files into chunks of various sizes. The Split command is a straight forward utility all you do is specify the target size of each chunk in bytes (-b) followed by the name of the file to be split.

split -b 200m -d ubuntu-12.04.2-server-amd64.iso

The 657MB Ubuntu ISO was split into four chunks. Notice the incremental numbering.

x00  x01  x02  x03

To join all the files back together we use another utility, cat will look for all files starting with X*, regroup them, and output the results in to the file ubuntu-12.04.2-server-amd64.iso.

cat x* > ubuntu-12.04.2-server-amd64.iso

Split is a simple utility that can split files of any size into more manageable chunks. I regularly use split when I am forced to download files over unreliable connections and with no possibility of transfering with Rsync.

Reference

http://linux.die.net/man/1/split