Saturday, 14 November 2015

Ubuntu 10.04 up : xorg.conf - missing? generate one!


  1. Re: /etc/X11/xorg.conf - missing?

    yes; xorg.conf in 10.04 is no longer the standard... you can generate one.. it will use it when it's there.


    here's how to do that;


    Code:
    Switch to a tty ( press ctrl+alt+f1 (f2,f3 etc)
    login with your username and password.

    stop gdm with
    Code:
    sudo service gdm stop
    then generate a xorg.conf with
    Code:
    sudo Xorg -configure
    this will create a xorg.conf.new in your home directory)
    move the auto-generated xorg.conf.new to /etc/X11/xorg.conf


    Code:
    sudo mv xorg.conf.new /etc/X11/xorg.conf
    Make changes you want to try
    Code:
    sudo nano /etc/X11/xorg.conf
    and start gdm again with

    Code:
    sudo service gdm start
    When your thread it solved: go to thread tools > Mark this thread as solved
    for SIS 771/671 use xcompmgr to have transparent terminals. just load it at startup.

    And then they asked: what's a pbkac error?
  2. #3
    landog is offlineFirst Cup of Ubuntu
    Join Date
    Aug 2010
    Beans
    2

    Re: /etc/X11/xorg.conf - missing?

    Wow. Thanks!
  3. #4
    mhgsys's Avatar
    mhgsys is offline100% Pure Ubuntu
    Join Date
    Jun 2008
    Location
    Netherlands
    Beans
    Hidden!

    Re: /etc/X11/xorg.conf - missing?

    Your welcome

Friday, 13 November 2015

selective backup using find, grep, cpio

I find this script helpful to make fast backup copy of my unix/linux system.
What made the script special (at least to me) is that it will run across on SCO Unix, SUN Solaris and LINUX os.

cd /
find . -depth -print | \
 grep -v "files/dirs to be skipped" | \
 cpio -ovBc > /dev/st0

cpio utility is quite versatile and easy to use. pls refer to cpio mans for features.

================================================

I have several PCs and notebooks and Android phones from which I do e-banking transactions.. such as paying bills, paying creditcard, buying things from ebay, transfer money to studying kids etc etc... Every transaction's receipt is important... to keep track of which is which money is involved... but they are on several devices! ( i dont want to use cloud's drive : not now as yet).


to find all non-pdf files and put them into a text file my-non-pdf :

# find /home -depth -print | grep -v ".pdf" > my-non-pdf
   


to find all     pdf files and put them into a text file mypdf :

# find /home -name "*.pdf" > mypdf


oohhhh sambung lain kali.... coz dinner is ready,  wife is waiting for me.. :)

You could do this through find command,
find /public_html -mindepth 1 -iname "*.pdf" -type f > output-file
Explanation:
/public_html     # Directory on which the find operation is going to takesplace.

-mindepth 1      # If mindepth is set to 1, it will search inside subdirectories also.

-iname "*.pdf"   # Name must end with .pdf.

-type f          # Only files.

A related problem:

Speeding up a Shell Script (find, grep and a for loop)

Hi all,

I'm having some trouble with a shell script that I have put together to search our web pages for links to PDFs.

The first thing I did was:


Code:
ls -R | grep .pdf > /tmp/dave_pdfs.out

Which generates a list of all of the PDFs on the server. For the sake of arguement, say it looks like this:

file1.pdf
file2.pdf
file3.pdf
file4.pdf

I then put this info into an array in a shell script, and loop through the array, searching all .htm and .html files in the site
for the value:


Code:
# The Array
pdfs=("file1.pdf" "file2.pdf" "file3.pdf" "file4.pdf")

# Just a counter that gets incremented for each iteration
counter=1

# For every value in the array
for value in ${pdfs[@]}
do

# Tell the user which file is being searched for, and how far along in the overall process we are.
echo "Working on $value..."
echo "($counter of ${#pdfs[*]})"

# Add what is being searched for to the output file
echo "$value is linked to from" >> /tmp/dave_locations.out

# Find all .htm and .html files with the filename we are looking for in, and add it to the output file
find . -name "*.htm*" -exec grep -l $value {} \; >> /tmp/dave_locations.out

# Adding a space afterwards
echo " " >> /tmp/dave_locations.out

# Increment the counter.
counter=`expr $counter + 1`

done

This does work.

However, our site is huge (1491 PDFs, and a whole lot of .htm and .html pages). Each iteration through the loop
takes around about 55 seconds. I've calculated that this shell script will take 6 days to complete.

Does anyone please know of a better (and significantly faster) way of doing this?

Any help would be greatly appreciated. I'm a bit of a unix newbie, and it took me hours just to get this far.
Sponsored Links

Thursday, 12 November 2015

how to install etherape on Centos

Provides

  • config(etherape) = 0.9.12-1.el6.rf
  • etherape = 0.9.12-1.el6.rf
  • etherape(x86-32) = 0.9.12-1.el6.rf

Download

Download etherape-0.9.12-1.el6.rf.i686.rpm Download etherape-0.9.12-1.el6.rf.i686.rpm for CentOS 6
from the Repoforge (RPMforge) repository.
------------------------------------------------------------

Using RepoForge

First download the appropriate rpmforge-release package for your distribution:
Then you can use rpm or yum to install the downloaded package. The package installation will enable the RepoForge repo for subsequent use via yum.
More detailed instructions and recommendations are available on the CentOS wiki.
Hints:
  • Use cat /etc/redhat-release to find which release of EL you are using
  • Use uname -a to find your processor architecture
  • Use rpm -ivh package-filename to install the rpmforge-release package (also works with URLs)
  • You can use wget or curl to download the package using one of the above links if needed (for example on a server with no X Window)
  • Then you can use yum to install the available packages from the RepoForge repo, e.g. yum install --enablerepo=rpmforge-extras`
  • Afterward, you can disable accidental updates from the repo by setting enabled = 0 in the repo definition file in /etc/yum.repos.d/

------------------------------------------------------------

Install Howto

  1. Download the latest rpmforge-release rpm from
    http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/
  2. Install rpmforge-release rpm:
    # rpm -Uvh rpmforge-release*rpm
  3. Install etherape rpm package:
    # yum install etherape
     

    Anda akan dapat spt ini:

    root@centosm ~]# yum install etherape

    1. Loaded plugins: fastestmirror, refresh-packagekit, security
      Setting up Install Process
      Loading mirror speeds from cached hostfile
       * base: repo.apiknet.co.id
       * epel: kartolo.sby.datautama.net.id
       * extras: mirror.axarva.co.id
       * nux-dextop: li.nux.ro
       * rpmforge: mirror.oscc.org.my
       * rpmfusion-free-updates: free.nchc.org.tw
       * rpmfusion-nonfree-updates: free.nchc.org.tw
       * updates: kartolo.sby.datautama.net.id
      rpmforge                                                 | 1.9 kB     00:00    
      rpmforge/primary_db                                      | 2.7 MB     01:03    
      Resolving Dependencies
      --> Running transaction check
      ---> Package etherape.x86_64 0:0.9.13-1.el6.rf will be installed
      --> Finished Dependency Resolution

      Dependencies Resolved

      ================================================================================
       Package          Arch           Version                 Repository        Size
      ================================================================================
      Installing:
       etherape         x86_64         0.9.13-1.el6.rf         rpmforge         825 k

      Transaction Summary
      ================================================================================
      Install       1 Package(s)

      Total download size: 825 k
      Installed size: 3.1 M
      Is this ok [y/N]: y
      Downloading Packages:
      etherape-0.9.13-1.el6.rf.x86_64.rpm                      | 825 kB     00:17    
      Running rpm_check_debug
      Running Transaction Test
      Transaction Test Succeeded
      Running Transaction
        Installing : etherape-0.9.13-1.el6.rf.x86_64                              1/1
        Verifying  : etherape-0.9.13-1.el6.rf.x86_64                              1/1

      Installed:
        etherape.x86_64 0:0.9.13-1.el6.rf                                            

      Complete!
      [root@centosm ~]#  
    2. [root@centosm ~]#  etherape
       
       
      Note: etherape will run as with root permission! 
       
      # sudo etherape
       will be ok.
      
      
      ENJOY!

Wednesday, 11 November 2015

Mondo: How to Backup RedHat/Centos/Debian/Ubuntu Linux Systems Using Mondo Rescue

Mondo Rescue is an open source and backup tool that allows you to easily create backup of complete system to CD, DVD, Tape, USB devices, Hard Disk, and NFS. Its create Clone/Backup ISO Image. And we can easily restore that ISO into another system. If your data will loss or system gets crash, then you will be able to restore entire system data from backup media.
backup

Step #1: Download MondoRescue Repository

First we download MondoRescue Repository for your Linux OS distribution version using following command:
 
 

Step # 1.1:

# cd /etc/yum.repos.d/

Step # 1.2:

On CentOS/RHEL
## For CentOS/RHEL 6 - 64-Bit ##
# wget ftp://ftp.mondorescue.org/rhel/7/x86_64/mondorescue.repo

## For CentOS/RHEL 6 - 32-Bit ##
# wget ftp://ftp.mondorescue.org/rhel/6/i386/mondorescue.repo

## For CentOS/RHEL 6 - 64-Bit ##
# wget ftp://ftp.mondorescue.org/rhel/6/x86_64/mondorescue.repo

## For CentOS/RHEL 5 - 32-Bit ##
# wget ftp://ftp.mondorescue.org/rhel/5/i386/mondorescue.repo

## For CentOS/RHEL 5 - 64-Bit ##
# wget ftp://ftp.mondorescue.org/rhel/5/x86_64/mondorescue.repo

## For CentOS/RHEL 4 - 32-Bit ##
# wget ftp://ftp.mondorescue.org/rhel/4/i386/mondorescue.repo

## For CentOS/RHEL 4 - 64-Bit ##
# wget ftp://ftp.mondorescue.org/rhel/4/x86_64/mondorescue.repo
On Debian
## For Debian 6 ##
# wget ftp://ftp.mondorescue.org/debian/6/mondorescue.sources.list
# sh -c "cat mondorescue.sources.list >> /etc/apt/sources.list" 

## For Debian 5 ##
# wget ftp://ftp.mondorescue.org/debian/5/mondorescue.sources.list
# sh -c "cat mondorescue.sources.list >> /etc/apt/sources.list" 
On Ubuntu/Linux Mint
# wget ftp://ftp.mondorescue.org/ubuntu/`lsb_release -r|awk '{print $2}'`/mondorescue.sources.list
# sh -c "cat mondorescue.sources.list >> /etc/apt/sources.list" 

Step #2: Install MondoRescue

After downloading MondoRescue Repository, run following command to install MondoRescue.
On Centos Linux
# yum install mondo
On Debian Linux
# apt-get update 
# apt-get install mondo

Step #3: Creating Cloning or Backup ISO Image of System

After installing Mondo, Run “mondoarchive” command from “root” user. Then follow steps according to screenshot that shows how to create Backup/Clone in ISO based backup media of your full system.
# mondoarchive
First you need to choose the backup media and press Enter.
mondo
Please enter the full path name to the directory for your ISO Images and press Enter.
mondo_1
Now select the type of compression type like: bzip2, gzip, lzo & lzma and press Enter.
mondo_2
Now select the compression level and press Enter.
mondo_3
Please enter how large you want each ISO image in MB (Megabytes) and press Enter.
mondo_4
Please give the name of ISO image filename and press Enter.
mondo_5
Please add the filesystems to backup (separated by “|“). The default filesystem is “/” means full backup.
mondo_6
Please exclude the filesystem that you don’t want to backup like /tmp.
mondo_7
Please enter your temporary directory path or select default one.
mondo_8
Now enter your scratch directory path or select default one.
mondo_9
If you would like to backup extended attributes. Just press “enter“.
mondo_10
It will found full path name of your Kernel.
mondo_11
If you want to Verify your backup, then Click “Yes“
mondo_12
If you want to proceed the backup then click on “Yes”.
mondo_13
Creating a catalog of “/” filesystem.
mondo_14
Dividing filelist into sets.
mondo_15
Backing up filesytem. It may take a couple of hours, please be patient.
mondo_16
Backing up big files.
mondo_16
Running “mkisofs” to make ISO Image.
mondo_17
Verifying ISO Image tarballs.
mondo_18
Finally, Mondo Archive has completed. Please hit “Enter” to back to the shell prompt.
mondo_19

Step #4: Check Log File.

See details of backup run in MondoRescue log file:
# tailf /var/log/mondoarchive.log
....
DBG2: [Main] mondoarchive.c->distro_specific_kludges_at_end_of_mondoarchive#133: Restarting magicdev if necessary
DBG2: [Main] mondoarchive.c->distro_specific_kludges_at_end_of_mondoarchive#137: Restarting autofs if necessary
DBG2: [Main] mondoarchive.c->distro_specific_kludges_at_end_of_mondoarchive#141: Restarting supermounts if necessary
DBG2: [Main] mondoarchive.c->distro_specific_kludges_at_end_of_mondoarchive#145: Unmounting /boot if necessary
DBG3: [Main] libmondo-tools.c->unmount_boot_if_necessary#1221: starting
DBG3: [Main] libmondo-tools.c->unmount_boot_if_necessary#1229: leaving
INFO: Time finished: Mon Sep 14 22:03:35 2015

INFO: Mondo Archive has finished its run. Please press ENTER to return to the shell prompt.
INFO: See /var/log/mondoarchive.log for details of backup run.
INFO: running: umount -d /mnt/cdrom > /tmp/mondo.tmp.bTBlKQ/mondo-run-prog-thing.tmp 2> /tmp/mondo.tmp.bTBlKQ/mondo-run-prog-thing.err
INFO: --------------------------------start of output-----------------------------
INFO: umount: /mnt/cdrom: not mounted
INFO: --------------------------------end of output------------------------------
INFO: ...ran with res=256
DBG1: [Main] ../common/newt-specific.c->finish#436: Calling newtSuspend()
Enjoy it!

About Author


Dennis R | Website | Twitter

How To Install VLC On CentOS 6/7




How To Install VLC On CentOS 6/7

VLC media player (commonly known as VLC) is a portable, free and open-source, cross-platform media player and streaming media server written by the VideoLAN project. VLC media player supports many audio and video compression methods and file formats, including DVD-Video, video CD and streaming protocols. It is able to stream media over computer networks and to transcode multimedia files.

The default distribution of VLC includes a large number of free decoding and encoding libraries, avoiding the need for finding/calibrating proprietary plugins. Many of VLC’s codecs are provided by the libavcodec library from the FFmpeg project, but it uses mainly its own muxer and demuxers and its own protocols implementations. It also gained distinction as the first player to support playback of encrypted DVDs on Linux and OS X by using the libdvdcss DVD decryption library.

For EL7:
Install  EPEL   from   http://www.unixmen.com/install-epel-repository-centos-rhel-7/
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm

For EL6:
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm

Now:
yum update
yum  install vlc

===============================================

I ve downloaded VLC on my CentOS 6.
When I play a video by double clicking on finder, or using the vlc command in terminal, it shows a black screen. Sound works fine though.
Do you have any idea what could cause this problem?
3 Answers


up vote 1  
down vote          
Actually I solved with options, not code.
Tools --> preferences --> Video and uncheck Accelerated video output(Overlay).
:D So simple;;



My VLC version is 2.0.5 just installed with CentOS6.4. My problem was no sound and or picture.

To get sound I did as advised:
  1. Tools > Preferences > Video
  2. Uncheck Accelerated video output (Overlay).
To get video:
  1. Tools > Preferences > Video
  2. Change video output to X11 video output (XCB).


Saturday, 20 December 2014

i like this post. a reply from "anti-jibaok" in chedet.cc
-------------------------------------------------------------------------------------

( by anti-jibaok)
December 18, 2014 at 2:04 PM | Permalink

To.., ‘immoralequivalence’…,

You said – “…The Quran recognise Israel belong to the Jews….” Please be advised that, you are dead WRONG…! Period…! And, from where did you get such a finding to come with such a conclusion..? How dare you quote from the Quran but you come-up with your silly version and interpretation of the Quran.
Anyway, do you know the difference between the ‘Israelites’ (Bani Israel) and the ‘Jews’ (Yahud).., huh..? Was prophet Moses (Musa a.s.) an Israelite or a Jew..? Was prophet David (Daud a.s.) or King Solomon (Sulaiman a.s.) ever a ‘Jew’. The true Israelites follow ONLY the Torah. Did they ever follow the ‘Talmud’..? Or did the Talmud ever existed during their times..? You tell us.., OK..!?

However, the Jews (who adhere to the teachings of Judaism) follow the Talmud. Thus, the Jews and the Talmud are somewhat synonymous.., however the Israelites are synonymous with ONLY the Torah. Similarly, the Christians are synonymous with the Bible.., while the Muslims are synonymous with the Quran but are also required to believe only (but not to adhere) in the Torah (Taurat), the Psalms (Zabur) and also the New Testaments (Injil). Do you understand..?
So again, I ask you.., do you know the difference between an ‘Israelite’ and a ‘Jew’..!? Can you show us all where those Israelites (Bani Israel) are today..? Show us where are they now..? Again, may I remind you that in essence the Israelites ARE NOT the Jews. OK..!?

So, if you postulate that (after the Israelites’ Exodus from Egypt) the Holy Land (the ‘Promised Land’) was given by God Almighty to the Israelites (Bani Israil), as long as they keep dearly to their faith and the Covenant with God Almighty.., then you are correct if that was what you has said. OK..!?

Nonetheless, God Almighty did NOT ever give The Holy Land to the ‘Jews’. Why so..? Well, because during the time of the covenant, the Jews did NOT yet ever existed. So, do you think that the Jews (by faith and race) and the Israelites are one and the same..? You tell us. So, where is that ‘Divine Title Deed’ as you say that God Almighty had given to the Jews (via the message of the Quran)..? Show us all the precise surah or verse, if you dare to do so…, OK..!?

Then again, from where did the Jews come from.., and also to where did the true Israelites (Bani Israel) disappeared to, till this very day..? You tell us..! So again, your silly opinion that…, “… Quran recognise Israel belong to the Jews…” is a great lie and distortion of the highest degree.

In fact, some of those Jews who adhere to the Torah have vehemently declared that the Jews are NOT supposed to return to The Holy Land, as explained in this video URL below:-
https://www.youtube.com/watch?v=nMQ9C6vni0w (NY City: 10,000+ Jews Against Israel)
https://www.youtube.com/watch?v=awCOSRg-gks (Jews Against Zionism & The Rothschild)
—-
Furthermore, apparently fools like you cannot also even tell the difference between the Zionists and the Jews. Are the Zionists and the Jews synonymous.., do you think..? You tell us…, OK..?
Thus, be advised that the Zionist state of Israel had never-ever been given back to the true Israelites. Instead, it was totally hijacked and stolen (almost a hundred years ago) from the Palestinian Arabs by those despicable International Bankers, i.e. The Rothschild via a single piece of scribbled paper known as.., ‘The Balfour Declaration’..! Did you ever realise that..? And.., here is the full explanation as per this video, below:-
https://www.youtube.com/watch?v=HhFRGDyX48c (Benjamin Freedman’s 1961 Speech at the Willard Hotel)
So, was it the Quran (as you say) that recognises Israel as belonging to the Jews, or was it The Balfour Declaration that has made Israel as the state for those contemptible Banksters.., i.e. the Zionist-Rothschild..? What say you.., huh..?
—–
You also said that – “…The British before giving Merdeka (to Malaya) made sure there was a governing infrastructure…” However, you fail to realise that the Malay States had never-ever belonged to the British for them to give it back to give its people. Neither was India had ever belonged to the British only to be given back to the Indians, Pakistanis or Bangladeshi. Similarly, the Palestine had never-ever belonged to the British.., but only to be handed-over to those culpable International Bankers.., i.e. the Zionist-Rothschild.
Do you understand the meaning of ‘Colonialism’ and ‘Imperialism’..? However, as ruthless as the Japanese were (during World-War 2), at least the Indonesian people got their independence from the Japanese (just before the end of World War-2).., but they did not get their independence from their Imperialist and Colonial Masters.., i.e. The Dutch. Did you ever realise that..?
Thus.., it was not for the British to give back Malaya back to its people, when it was NOT theirs in the first place, to give away..! Similarly, the land in the Palestine had never-ever belonged to the British to give it away to whomsoever they want to give it to. Do you understand..!?
—–
By the way, leaders do not flock to LKY for his unadulterated world view. Only filthy & despicable lackeys of those Zionist snakes would flock around LKY, because he was ‘successful’ enough in turning that tiny island into becoming their Far-Eastern Banking & Financial Outpost as the ‘Little Israel’ for those insidious Zionist cum Western forces.
So, is there not an iota of truth from what has been said here..?
Cheerio for now.., dude.

P.S.> Please do not try too hard to be a ‘Jibaok’. You may regret it.., I tell you.

(Pls visit chedet.cc)

Thursday, 6 November 2014

Malaysia can be proud of its highway system

I REFER to the article “High five for this highway” (The Star, Nov 5) by June Wong.


Malaysia can be justifiably proud of the North-South Expressway. Many other countries, including New Zealand where I come from, would love to have such a magnificent highway.

I have been coming to Malaysia for many years now and would really like to live here permanently, but that is another story.

During my time in this country I have travelled extensively and enjoyed using both the highways and local roads.

Over the past three years I have had the privilege of showing many of my New Zealand family and friends around this country and, without exception, their comments have been favourable, with some of them coming back again for a second and even third time.

You are quite right in saying that going off the highway you get to see more of rural Malaysia and kampungs and villages. I do this often with my visitors and they and I enjoy the scenery very much.

I know most people here do not like having to pay toll and, if I’m honest, I would prefer not to as well. But these magnificent facilities don’t come cheap and they have to be paid for. As a visitor I have not paid taxes so I feel its OK to pay toll to use the highways.

On my many travels I see many (fast) Singapore cars on the highways and I feel it is quite proper for them to pay for this privilege as well.
After all there are no opportunities for Singaporean drivers to race their cars, illegally I might add, in their own country.

Also, petrol is relatively inexpensive here. In my country taxes on petrol are very high and the roads and few motorways are funded from these taxes.
The cheapest petrol in New Zealand equates to RM5.50 per litre of which something in the order of 80% is taxes.

I believe that funding roads this way is unfair to many who only use minor roads in the part of the country that they live in but are contributing to expensive road projects in areas they might never visit. I firmly believe in the principle of user pays.

As for the R&R stops, here I part company with you … many of my visitors think that a stop at an R&R is an outing on its own. And I confess to liking them too.
I agree that the food can be somewhat limited but again compared to other countries I have visited the facilities on offer are world-class, especially the toilets.

On a few occasions the facilities have not been up to scratch as it were, but this is often on busy weekends.

As I said at the beginning, Malaysia has a highway system of which it can be justifiably proud.


PETER MARSHALL
Kuala Lumpur

Shared from: 

Letters

Published: Friday November 7, 2014 MYT 12:00:00 AM
Updated: Friday November 7, 2014 MYT 7:33:14 AM
The Star Online