Tracking user access to machines

Quick way not very detailed but it gives you a clue $ last nJoy ! 🙂 (I get shorter and sweeter 🙂 )

Starting vnc on Display 0 ( local display ) from a remote ssh session

i.e. You wnet home need your desktop have ssh no vnc !! Here is the easy solution.. Install x11vnc. $ DISPLAY=localhost:0 x11vnc & connect to the display using vnc et voila ! BTW Teamviewer also USED TO WORK but no longer in ver 8 so thanks VNC for not being obsolete.. nJoy 🙂  

Monitoring a bottleneck with strace

If let’s say Mysql is slow at performing a task you can check what is the bottleneck using strace to attach to the process. <span style="color: #00ff00;">$ ps -ef|grep -i mysql</span> Identify the process id then <span style="color: #00ff00;">$ strace -cp &lt;pid&gt;</span> Leave it 10 seconds or a minute then ^C. That will tell you where…

Start Teamviewer from an ssh session remotely

So you remote deskptop rebooted and teamviewer did not run on startup as it does not do in Linux for some strange reason: Connect with ssh ( putty) Then run DISPLAY=`localhost`:0 teamviewer& Njoy 🙂 !

Enable VMWare time sync from command line

Virtual machines and NTP do not go easily well together. Machines paused for extended periods tend to loose the ntp sync since the difference grows too much.   Also from VMware Docs the following info might be clarificatory: Do not configure the virtual machine to synchronize to its own (virtual) hardware clock, not even as…

SSH through HTTP proxy

This article explains how to connect to a ssh server located on the internet from a local network protected by a firewall through a HTTPS proxy. Requirement are : Your firewall has to allow HTTPS connections through a proxy You need to have root access to the server where ssh is listening Configure the ssh…

How to install MySQL on CentOS

Here are the steps of what you need to do in order to install and setup MySQL on a new server. We’ll prepare a fresh CentOS 6 system (64 bit) for use as a database server. All you need is access to an SSH client and your server root credentials.   Preparing the System The…

Failed to run gitk: Error in startup script

Gitk is a great tool for working with Git. Unfortunately after setting up git and X11 forwarding I got this error when running gitk. The error can easily be fixed by installing dejavu-sans-fonts. yum install -y dejavu-sans-fonts The result : Voila !

Php pecl config error on centos

When installing php PECL On CentOS/RHEL (+cPanel) installations, if you get a “checking whether the C compiler works… configure: error: cannot run C compiled programs”, you may need to remount the /tmp and /var/tmp with exec permissions first: $ mount -o remount,exec,suid /tmp $ mount -o remount,exec,suid /var/tmp Then: $ pecl install {package} And, don’t forget…

locate: can not stat () `/var/lib/mlocate/mlocate.db’

Run updatedb first.  You can run it manually from the command line. updatedb It should have scheduled itself as a cron job when you installed slocate.  If you just installed slocate, it will not have run yet.  Otherwise, make sure you have a cron daemon running and that there is an updatedb task scheduled.  Also,…