[HOW TO] set default program in Ubuntu?

In this article I will show you how to set default program in Ubuntu?

1. Go as below:
$sudo vi /usr/share/applications/default.list

2. Then you change as you want.
Example you must be changed the OpenOffice is default:

Original file:

[Default Applications]
application/csv=wps-office-wps.desktop
application/excel=wps-office-wps.desktop

application/ogg=rhythmbox.desktop
application/oxps=evince.desktop
application/pdf=evince.desktop
application/postscript=evince.desktop
application/tab-separated-values=libreoffice-calc.desktop
application/vnd.lotus-1-2-3=libreoffice-calc.desktop
application/vnd.ms-xpsdocument=evince.desktop
application/vnd.rn-realmedia=totem.desktop
application/vnd.sun.xml.base=libreoffice-base.desktop
application/vnd.sun.xml.calc=libreoffice-calc.desktop
application/vnd.sun.xml.calc.template=libreoffice-calc.desktop
application/vnd.sun.xml.draw=libreoffice-draw.desktop
application/vnd.sun.xml.draw.template=libreoffice-draw.desktop
application/vnd.sun.xml.math=libreoffice-math.desktop
application/vnd.sun.xml.writer=libreoffice-writer.desktop
application/vnd.sun.xml.writer.template=libreoffice-writer.desktop
application/vnd.sun.xml.writer.global=libreoffice-writer.desktop
application/vnd.oasis.opendocument.database=libreoffice-base.desktop
application/vnd.oasis.opendocument.formula=libreoffice-math.desktop
application/vnd.oasis.opendocument.graphics=libreoffice-draw.desktop
application/vnd.oasis.opendocument.graphics-template=libreoffice-draw.desktop


Now you change follow:
[Default Applications]
application/csv=libreoffice-calc.desktop
application/excel=libreoffice-calc.desktop

application/ogg=rhythmbox.desktop
application/oxps=evince.desktop
application/pdf=evince.desktop
application/postscript=evince.desktop
application/tab-separated-values=libreoffice-calc.desktop
application/vnd.lotus-1-2-3=libreoffice-calc.desktop
application/vnd.ms-xpsdocument=evince.desktop
application/vnd.rn-realmedia=totem.desktop
application/vnd.sun.xml.base=libreoffice-base.desktop
application/vnd.sun.xml.calc=libreoffice-calc.desktop
application/vnd.sun.xml.calc.template=libreoffice-calc.desktop
application/vnd.sun.xml.draw=libreoffice-draw.desktop
application/vnd.sun.xml.draw.template=libreoffice-draw.desktop
application/vnd.sun.xml.math=libreoffice-math.desktop
application/vnd.sun.xml.writer=libreoffice-writer.desktop
application/vnd.sun.xml.writer.template=libreoffice-writer.desktop
application/vnd.sun.xml.writer.global=libreoffice-writer.desktop
application/vnd.oasis.opendocument.database=libreoffice-base.desktop
application/vnd.oasis.opendocument.formula=libreoffice-math.desktop
application/vnd.oasis.opendocument.graphics=libreoffice-draw.desktop
application/vnd.oasis.opendocument.graphics-template=libreoffice-draw.desktop




[HOW TO] fix Error were found while checking the disk drive for /.

In my company, we use the Linux as primary OS.

Sometimes user get the problem and they do not know what's happen?

Here I show the example.

Tomorrow user start the computer and get the error:
Error were found while checking the disk drive for /.
Press F to attempt to fix the errors, I to ignore, S to skip mounting, or M for manual recovery.

How to fix?

$sudo vi /boot/grub/grub.cfg

Now find the line similar to change: ro rootflags=sync to rw rootflags=sync

linux /boot/vmlinuz-3.13.0-24-generic root=UUID=[bunch-of-numbers] loop=/ubuntu/disks/root.disk ro rootflags=sync quiet splash

Save and reboot.

 
 
 

[HOW TO] solving .dmrc and $HOME permission error

Hello Everybody,

The last week, co-worker told me that her PC can not logging. It got the pop-up at screen logging:

User's $HOME/.dmrc file is being ignored. THis prevents the default session and language from being saved. File should be owned by user and have 644 permissions. User's $HOME directory must be owned by user and not writeable by other users.

1. What is the .dmrc file?
The .dmrc is an intialization file which the system checks during session logon. Specifically, gnome checks the file for any specific language or session information it has not located elsewhere. While often the file is blank exceept for the basic header data, it may contain a specific language to use at session startup. Below is an example. The plain text is the default entry, the bold text is what would be added to begin the session with a specific language.

2. What does it mean?
The system detected an error in the ownership and/or permissions of the $HOME folder or the .dmrc file. You will still be able to gain access to your user account and have administrative (sudo) rights if you are in the admin group.

3. How to fix?

a .dmrc file should be owned by user.
$sudo chown username /home/username/.dmrc

b. set 644 permission
$sudo chmod 644 /home/username/.dmrc

noted: when this command is run that you may get a message "unable to access /home/user/.gvfs This is not a problem and references the .gvfs is a virtual file system.
umount /home/username/.gvfs
rm -r /home/username/.gvfs

c.
$sudo chown username /home/username

d. And must not be writable by other:
$sudo chmod 755 /home/username