piwik

dimarts, 21 de maig del 2013

How to enable USB to the virtual machines on Virtual Box

This is the error we get when we want to go to "Settings".
VirtualBox is not currently allowed to access USB devices. You can change this by adding your user to the 'vboxusers' group

We just need to issue the following command in order to add the current user to vboxusers group.

sudo usermod -aG vboxusers josep

Where "josep" is our current user.
Right after that, we'll need to log out and log back in to see the changes applied.

dimecres, 15 de maig del 2013

Hidden menu bar in Firefox

Newer version of Firefox come with a single "Firefox" menu button, to switch between old-style and new format:
Right click on an empty section of the Tab strip, and either select or deselect "Menu bar" in the pop-up menu.

Source: https://support.mozilla.org/en-US/kb/what-happened-to-the-file-edit-and-view-menus

dimarts, 14 de maig del 2013

Llibreria h264enc necessaria per a codificar en el Kdenlive

El cas és que quan instal·les l'editor de vídeo Kdenlive et cal una llibreria per a poder codificar els vídeos als formats MPEG-4, h264

libffmpeg
libffmpegthumbnailer4
ffmpeg
libx264-85

libxvidcore4
libxvid
h264enc
mencoder
libmlt++1
libmlt++-dev

diumenge, 12 de maig del 2013

How to deploy an rsyslog central server in GNU/Linux


Rsyslog Central Server

Server side

The package we are gonna need to get installed is rsyslog-ng, available through main software distribution application for every distro.
The layout for our central syslog server is going to be the following:


on the server side we only need to modify /etc/rsyslog.conf by uncomment two modules and adding some rules:




#################
#### MODULES ####
#################

$ModLoad imuxsock # provides support for local system logging
$ModLoad imklog   # provides kernel logging support (previously done by rklogd)
#$ModLoad immark  # provides --MARK-- message capability

# provides UDP syslog reception
#$ModLoad imudp.so
#$UDPServerRun 5514
#$UDPServerAddress 172.16.65.163

# provides TCP syslog reception
$ModLoad imtcp.so
$InputTCPServerRun 5514

We will define also a template to generate the logs from remote servers depending on the IP, and also if the process that generates the log matches with one of the processes we want, we will create a separate syslog file preceded by process name.

##############
##Templates###
##############
# This one is the template to generate the log filename dynamically, depending on the client's IP address.
$template externalsyslog,"/home/backup/rsyslog_server/%fromhost-ip%/syslog.log"
$template TraditionalFormat,"%timegenerated% %fromhost-ip% %syslogtag%%msg:::drop-last-lf%\n"

$template filterByProgramName,"/home/backup/rsyslog_server/%fromhost-ip%/%programname%_syslog.log"

if $programname == 'process1' then ?filterByProgramName;TraditionalFormat
if $programname == 'process2' then ?filterByProgramName;TraditionalFormat
if $programname == 'process3' then ?filterByProgramName;TraditionalFormat
if $programname == 'process4' then ?filterByProgramName;TraditionalFormat
if $programname == 'process5' then ?filterByProgramName;TraditionalFormat
if $programname == 'process6' then ?filterByProgramName;TraditionalFormat
if $programname == 'process7' then ?filterByProgramName;TraditionalFormat
if $programname == 'process8' then ?filterByProgramName;TraditionalFormat

# Log all messages to the dynamically formed file. Now each clients log (172.16.65.166, 172.16.65.167,etc...), will be under a separate directory which is formed by the template FILENAME.
*.* -?externalsyslog;TraditionalFormat

We must grant the right permissions to the directory where rsyslog will be writing its logs. syslog:syslog

Clients

We must forward the syslog messages to server's IP.

#Forward log to remote server
*.* @@172.16.70.3:5514
#Forward log to localhost
*.* @@localhost:514


Logrotate

Linked to syslog server we had set logrotate to rotate the logs weekly. That is why we added the following entries to /etc/logrotate.d/rsyslog

Here we are rotating all the logs generated by different processes from every client. For example, for 172.16.65.161 we are going to be rotating syslog.log,  process2_syslog.log, process3_syslog.log, process4syslog.log, process1_syslog.log

root@ZNNH003:~# cat /etc/logrotate.d/rsyslog
/var/log/syslog
{
rotate 7
daily
missingok
notifempty
delaycompress
compress
postrotate
reload rsyslog >/dev/null 2>&1 || true
endscript
}


/home/backup/rsyslog_server/127.0.0.1/syslog.log
{
rotate 7
daily
missingok
notifempty
delaycompress
compress
postrotate
reload rsyslog >/dev/null 2>&1 || true
endscript
}
/home/backup/rsyslog_server/127.0.0.1/process4_syslog.log
{
rotate 7
daily
missingok
notifempty
delaycompress
compress
postrotate
reload rsyslog >/dev/null 2>&1 || true
endscript
}
/home/backup/rsyslog_server/127.0.0.1/process3_syslog.log
{
rotate 7
daily
missingok
notifempty
delaycompress
compress
postrotate
reload rsyslog >/dev/null 2>&1 || true
endscript
}

dilluns, 29 d’abril del 2013

How do I get the full path to display in Nautilus?


How can I get the full path to display in Nautilus so I can copy it to the clipboard and/or type a path manually?


Ctrl+L


Source: http://ubuntuforums.org/showthread.php?t=1653259

diumenge, 24 de febrer del 2013

Removing Joomla plugin using phpMyAdmin

After moving my joomla website from the previous hosting provider to the new one, I had ran into many troubles, I got it fixed, after all, and the next issue that stopped me was some installed plugins weren't working, I wasn't even able to uninstall them, so the last chance was going to phpMyAdmin and removing one row from jos_plugins table, I just removed the one that belonged to the specific plugin I wanted to remove, then I installed the plugin back.

It worked great! 

dimarts, 12 de febrer del 2013

How to install KVM on Debian

Since I need it for training purposes, RHCSA, I am going to install the Red Hat based virtualization platform on Debian. Choosing that platform is good if your station support virtualization, KVM, for Intel version we should check out cpuinfo file using the following command:
grep --color vmx /proc/cpuinfo
For AMD based processor will follow with this:
grep --color svm /proc/cpuinfo
The needed packages for setting up the system are:
aptitude install qemu-kvm libvirt-bin virtinst kvm virt-viewer virt-manager

Now we only need to get the user we want to use VM added to libvirt and kvm groups:
adduser ouruser libvirt
adduser ouruser kvm