How to , and other stuff about linux, photo, php … A linux, photography blog. To remember some linux situation, and fix them quickly.

May 24, 2012

FreeBsd bash tab completion

Filed under: Linux — Tags: , , , , — admin @ 10:23 am

Hello
Today I have to work on a system with FreeBSD7.0-RELEASE-p5 . Well after login I nottice that tab autocomplete don’t work. Hmm this in linux is quite handy. So .. after a little search I see that I didn’t use bash but sh.
So to check your shell run this command:
echo $SHELL

If you see something like this
/bin/sh

you may want to switch to bash.
chsh -s /usr/local/bin/bash

After relogin the tab completion should work.

May 21, 2012

How to disable from console “Ubuntu 12.04 has experienced an internal error” message

Filed under: Linux — Tags: , , , , , , — admin @ 3:06 pm

Well this appear on lates lubuntu, and on latest Ubuntu. After a time this error is showing up on monitor.
So how to fix this ?
Sorry, Ubuntu 12.04 has experienced an internal error
This error is reported by apport service on ubuntu.
So to disable it just edit /etc/default/apport and modify the value of enable from 1 to 0

sudo vi /etc/default/apport

After modification the file should look something like this

# set this to 0 to disable apport, or to 1 to enable it
# you can temporarily override this with
# sudo service apport start force_start=1
enabled=0

Error “Xext not found”

Filed under: Linux — Tags: , , , , — admin @ 3:01 pm

Well today I was trying to upgrade a ffmpeg on a server with libspeex / x264 / faac / librtpm .
Everything was ok until I have this error
Error “Xext not found”
So how to fix this ?
yum install libXext-devel
is the solution for this problem.

After this I encountered another problem
ERROR: Xfixes not found
the fix for this is
yum install libXfixes-devel
This fixex are for Centos

May 18, 2012

How to start X program from cron

Filed under: Linux — Tags: , , , — admin @ 1:29 pm

Hello

Well today I have to make a little script that close a chromium erase the cache and start it again.

Bellow is the script


#!/bin/bash
ps aux|grep 'chromium-browser'|awk {'print $2'}|xargs kill -9
/bin/rm -rf /home/user/.cache/chromium
/bin/sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' /home/user/.config/chromium/Default/Preferences
DISPLAY=:0 /usr/bin/nohup /usr/bin/chromium-browser  &

If you will have something like

No protocol specified Can't open display :0

First of all check if you are runing the script as  user . Because if you are root won’t work.

« Newer Posts

Powered by WordPress