Tuesday, February 11, 2014

Installing Aurora/Nightly version of Firefox on openSUSE

- First be sure to get the correct architecture version of Aurora/Nightly for your current Linux system architecture.

You will find the Linux 32 and 64 bits version of Aurora here : http://www.mozilla.org/en-US/firefox/aurora/all/
And Nightly here :
http://nightly.mozilla.org/

- Then uncompress the archive in /opt/aurora or /opt/nightly :
mkdir /opt/aurora && tar -xjvf firefox-29.0a2.en-US.linux-x86_64.tar.bz2 -C /opt/aurora

- Now you can execute your "developer's version" of Firefox with :
/opt/aurora/firefox &

You might experience the following plugin error :
No plugin found or Install Flashplayer : file not found

To resolve this issue you have to do the following on a 64 bits system :
ln -s /usr/lib64/browser-plugins/ /home/USER/.mozilla/plugins

Monday, January 27, 2014

What's the installation date of my Linux system ?

Well there is no "standard way" to know the installation date of you Linux system, so you could use one of these command :
- The idea is to retrieve the creation date of your root filesystem or /boot :
# sudo dumpe2fs -h /dev/mapper/VolGrp00-LogVol00 | grep "Filesystem created:" or # sudo dumpe2fs -h /dev/sda3 | grep "Filesystem created:" Filesystem created:       Mon Oct 29 11:44:51 2012

- Or by showing the oldest package installation date :
# sudo rpm -qa --last | tail -1                  
gpg-pubkey-307e3d54-4be01a65                  Mon 29 Oct 2012 11:45:27 AM CET

- Or the password information of your current user :
# sudo passwd -S user | tail -1 | awk '{print $3}'
10/29/2012

- And finally the creation date of the oldest configuration file/folder :
# ls -lct /etc | tail -1 | awk '{print $6, $7, $8}'
Oct 29 2012

Monday, November 18, 2013

Activate/Deactivate wifi on openSUSE asks for administrator password

I was very annoyed by the behavior of Network Manager in openSUSE 12. Every time I want to enable/disable the wifi and want to automatically connect to my prefered wifi spot, the system asks for the administrator password...

This can be changed by editing the file /etc/polkit-default-privs.local and add :

org.freedesktop.NetworkManager.enable-disable-wifi            yes

then run the command :
# set_polkit_default_privs 

So now current logged user can enable or disable the wifi connection without the administrator password... Enjoy.

Wednesday, November 13, 2013

VIM tips

Vim in read-only mode : view

Did you know that vim has a read-only mode ?
Just use :
# view myfile.txt

Searching for the current word :

In normal mode, move the cursor to any word. Press * to search forwards for the next occurrence of that word, or press # to search backwards.

 Delete "empty" lines : 

Sometime you can be annoyed by "empty" lines which contains no character in your file, to delete them you can use :
:g/^$/d

:g will execute a command on lines which match a regex. The regex is "empty line"  (start with nothing and end with nothing) and the command is :d for delete

Delete "blank" lines : 

Beside "empty" line, you might want to delete lines which contains only whitespaces characters (spaces/tabs) in your file :
:g/^\s*$/d

Visual block editing :

Activate the visual block mode :
CTRL+v
Insert Mode before every line of the block :
SHIFT+i
Apply the insert :
ESC