Showing posts with label Debian Wheezy. Show all posts
Showing posts with label Debian Wheezy. Show all posts

Monday, May 25, 2015

Upgrade from Debian Wheezy or install Debian Jessie in a clean way

Upgrade from Debian Wheezy or install Debian Jessie in a clean way?

Back up all the important data first.

My situation is that I have a personal computer I can work on. I also have a hard disk to back up the data.

I chose to install Debian Jessie in a clean way. I read the release notes. Many differences exist between Debian Wheezy and Jessie.

If I upgrade from Wheezy, I need to handle issues such as old config files.

Sometime later when I encounter problems, I will not be able to tell easily if it is a problem of upgrading or a problem of installing Debian Jessie.

Upgrading can cause more issues in my opinion.

It is best to install in a clean way.

Back up.
 
Format the / partition and other system partitions as ext4. Install Debian Jessie.


Tuesday, May 6, 2014

Customize command prompt

Here is a way to customize the command prompt:


user_name@debian:~$ echo $PS1
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$
user_name@debian:~$ PS1="$ "



user_name@debian:~$ nano ~/.bashrc

Add this line:

export PS1="$ "



Press Ctrl + x

Press y

Log out and log in.


The command prompt will become "$ ".



Reference

http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html

Stop the desktop indexing service

The following commands help you to stop the desktop indexing service.

$ tracker-preferences

$ tracker-control -r



Remove default LibreOffice on Debian 7.5

This is the way to remove the default version of LibreOffice on Debian 7.5.

# aptitude purge libreoffice         \
libreoffice-base         \
libreoffice-base-core         \
libreoffice-calc         \
libreoffice-common         \
libreoffice-core         \
libreoffice-draw         \
libreoffice-emailmerge         \
libreoffice-evolution         \
libreoffice-filter-binfilter         \
libreoffice-filter-mobiledev         \
libreoffice-gnome         \
libreoffice-gtk         \
libreoffice-help-en-us         \
libreoffice-impress         \
libreoffice-java-common         \
libreoffice-math         \
libreoffice-report-builder-bin         \
libreoffice-style-galaxy         \
libreoffice-style-tango         \
libreoffice-writer        

Use a simple table to separate words

Here is what I think about using tables:

1. Use a table but don't draw a line to separate some words. 
2. As far as possible, use a simple table. Complex tables may not work all the time. Beautiful borders may not work.

I have used different versions of LibreOffice Writer. I could not be sure if a shape I drew would be displayed in exactly the same way.

To me, it is not the best practice to draw a line among words to separate them.

The best practice is to draw a table.

Shapes may move to different positions when you open the file in another version of LibreOffice.

To play safe, use a table.

In LibreOffice, press

Table -> Insert -> Table

This is also an issue in Microsoft Office Word. The same shape may not be in the same place. In Word, press

Insert -> Table

It is more likely that people using future versions of the word processing software can view the same table.

rpcbind can be removed when not sharing files

rpcbind does not help me to do common tasks. I don't share files. Removing it should speed up the process of shutting down or restarting.

# aptitude purge rpcbind

Count the number of words in LibreOffice Writer

How do I count the number of words in LibreOffice Writer?

There are two ways.

1.
Tools -> Word Count



2.
Look at the word count field in the Status bar.
Double-clicking on the word count field.

PDF in LibreOffice

How do I make a PDF file in LibreOffice?


There are two ways.

1.
File -> Export as PDF... -> Export

2.
Export Directly as PDF on the Standard toolbar

Monday, May 5, 2014

Hard disk partition

For my work, I partition my hard disk like this:


/boot      500 MB       primary partition      Ext4
/swap     32 GB          primary partition      Ext4
/        120 GB         primary partition        Ext4
/home      the rest of the hard disk    logical partition    Ext4

I mainly store files. /home gets the most of the space.

There should be enough space for the programs. There should also be enough space for the boot loader of GRUB in /boot.

Partitioning the hard disk is good for backing up, e.g. by Redo Backup and Recovery.


Ext4 is the most useful for my work

Ext4 is the file system I am using. It is stable. I like it because of its stability. Other file systems appear to be too new.

It is better to use Ext4 instead of the other file systems such as Btrfs.

Btrfs is too new and can cause serious problems as some people suggested that it would be hard or impossible to delete files when the disk was full.

Retain most video quality in WebM

Let's loot at:

$ avconv -qscale 1 -i  x.mpg x.webm


The command above keeps the best quality available.


I turned a MPG file of about 300 MB into a WebM file of about 20 MB. I kept most of the video quality. The sound was good.

Please note that -qscale 1 should be the best quality.



Check the WebM file for the quality.

To me, WebM files are good for not-so-important videos, e.g. the video quality is not that important.



If the same images or similar images appear for more than five seconds, a WebM file seems to show the clear images, e.g. people's faces are shown clearly if their images last for five seconds or more in the video, or if these faces form a large part of the screen.

Thursday, May 1, 2014

Missing Microsoft Windows menu entry in GRUB after upgrading Debian Linux to 7.5

Update:

Back up your files first.

You could consider:

$ update-grub
 


 This appears to solve my problem of missing Windows entry in the menu.

-------------------------------------------------------------------

I am talking about dual-booting Debian and Windows. Something has to be done before and after upgrading.

The following problem affects upgrading to Debian 7.5.


After upgrading, I check my version of Debian. I type:

# cat /etc/debian_version
7.5




Please back up all your important files before doing anything else.


Please back up this:

/boot/grub/grub.cfg


Then, type:

# aptitude update && aptitude -y safe-upgrade


This removes the menu entry of Microsoft Windows.


To get back the menu entry, type:

# nano /boot/grub/grub.cfg

Add the menu entry, e.g.

### BEGIN /etc/grub.d/30_os-prober ###


###################################

menuentry "Windows 7 (loader) (on /dev/sdb1)" --class windows --class os {
        insmod part_msdos
        insmod ntfs
        set root='(hd1,msdos1)'
        search --no-floppy --fs-uuid --set=root A49C0A294A0ABD4B
        chainloader +1
}

### END /etc/grub.d/30_os-prober ###


To save the file, press Ctrl + x.

Look for this menu entry in your backup of grub.cfg.

Then the menu entry of Windows should be shown.




Monday, April 21, 2014

Emotional icons

The command below helps to install the fonts for displaying emotional icons or emoji. Emotional icons are also called emoticons.

# aptitude install ttf-ancient-fonts

Restart the web browswer such as Chrome or Firefox. Restart LibreOffice or OpenOffice.

Restart the computer.

The emoticons should be shown.

Examples of symbols and emoji:

https://drive.google.com/file/d/0B_ZD8gM2F8i_d0Qza29RdVpHdGM/edit?usp=sharing

Please view this file with LibreOffice.

Wednesday, April 16, 2014

LibreOffice Writer desktop shortcut


If you need a desktop shortcut to start LibreOffice, save this file as LibreOffice Writer.desktop in /home/name of user/Desktop.


#!/usr/bin/env xdg-open

[Desktop Entry]
Type=Application
Name=LibreOffice Writer
Exec='/opt/libreoffice4.2/program/swriter'
Terminal=false
Icon=/usr/share/app-install/icons/libreoffice-writer.png



Google Chrome desktop shortcut in Gnome 3

Here is my way of creating a Google Chrome desktop shortcut in Gnome 3:

Create a file called Google Chrome.desktop in /home/name of user/Desktop:



#!/usr/bin/env xdg-open

[Desktop Entry]
Type=Application
Name=Google Chrome
Exec='/opt/google/chrome/google-chrome'
Terminal=false
Icon=/opt/google/chrome/product_logo_256.png



Save the file. Double-click on the file.


http://www.youtube.com/watch?v=-7slN_kAoeY&feature=youtu.be


Monday, April 14, 2014

Save disk space with small WebM files

I converted a WMV file into a WebM file.

In the WebM file, I saw some minor flashes in the video from time to time. I did not need a very good resolution. The flashes were okay because the original WMV file showed blurred images in the video.

The sound was important to me. The sound was good in the WebM file. I could hear the same quality. I heard no noticeable difference.

The first file was in Windows Media video (video/x-ms-wmv) format. Its size was 127.9 MB (127937010 bytes).

The second file was in WebM video (video/webm) format. Its size was 18.8 MB (18802685 bytes).

127.9 - 18.8 = 109.1MB

I deleted the WMV file. I saved 109.1MB of hard disk space.

I tried another file conversion from File A to File B:

File A:
Windows Media video (video/x-ms-wmv)
104.5 MB (104465142 bytes)

File B:
WebM video (video/webm)
20.0 MB (20016930 bytes)

104.5 - 20.0 = 84.5MB

I deleted the WMV file again. I saved 84.5MB of disk space.


I attempted another file conversion from File C to File D:

File C:
Windows Media video (video/x-ms-wmv)
135.5 MB (135529100 bytes)

File D:
WebM video (video/webm)
19.8 MB (19809968 bytes)

135.5 - 19.8 = 115.7MB

I deleted the WMV file. I saved 115.7MB of disk space.

A WebM file could help me to save some hard disk space.

"libav-tools" was the necessary package to do the file conversion.

The command was:

$ avconv -i NameOfFile.wmv NameOfFile.webm

Find files

The commands below handle UTF-8 characters.


According to the size

To find files, the following command can be used. This command is going to list the names of files and the size of files matching a criterion (+100000k or larger than 100000k).

$ find . -type f -size +100000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'



According to the file extension



$ grep . -r -i --include \*.doc

Here, it looks for files with the file extension .doc.


For Terminal to display UTF-8 characters, the correct font should be installed, e.g. fonts-arphic-ukai for displaying Chinese characters.



References

http://stackoverflow.com/questions/12516937/grep-but-only-certain-file-extensions

http://www.cyberciti.biz/faq/find-large-files-linux/

Sunday, April 6, 2014

Sharp enlarged font

There are different ways of doing things.

An enlarged font is sharp, for example, when a font size is set to 80 in LibreOffice on Debian Linux.

It is necessary to turn on ClearType on Microsoft Windows to make the font look sharp.


Reference:

http://windows.microsoft.com/en-us/windows/make-text-easier-read-cleartype#1TC=windows-7


Change the default font in Gnome 3


Here is the way to change the default font:

Go to Advanced Settings, click on Fonts. Type the name of the font and use the Down Arrow Key to select the font. Click on Select.