Showing posts with label howto. Show all posts
Showing posts with label howto. Show all posts

Saturday, January 29, 2011

Useful Collection of Linux Server Tutorials to Configure Different Services

1) Linux Home Server Howto:
A Superb collection of howtos which explain howto configure different services like FTP, SSH, NTP etc.on linux. Gives very useful commands and sample output to show how to get information, change settings, sample config files and relevant amount of background information to make it customizable for your specific needs.
2) Linux Home Networking Quick Tutorials:

Similar super collection of tutorials on different aspects of networking on linux.

Both these sites complement each other well and are more usable when used parallely.

Tuesday, December 28, 2010

Howto Speed Up Your Work Using Linux Command Line Tools

See Also:

 

Using Multiple User Profiles in FireFox

See Also:


Howto Setup FireFox4 beta 8 on Linux Fedora Core 14

1) Backup your current Firefox 3 profiles
tar -cvzf $HOME/mozilla-firefox-profiles-backup.tar.gz $HOME/.mozilla/firefox/

2) Change to root user for below actions:

3) Add repositories for downloading FireFox4 for FC14:
yum --nogpgcheck install http://rpm.livna.org/livna-release.rpm http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

## Remi Dependency on Fedora 14 ##
# These below repos didn't work out for me got error message saying system-release >=15 required for
# rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-rawhide.noarch.rpm
#rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-rawhide.noarch.rpm

## Fedora 14 ##
rpm -Uvh http://rpms.famillecollet.com/remi-release-14.rpm

Install Firefox4:
yum --enablerepo=remi list firefox4
yum --enablerepo=remi install firefox4

Create different Profile for Firefox4:
firefox --ProfileManager (Create 2 profiles "Default User" and "FF4")

Start Firefox with FF4 profile using command:
firefox4 -P FF4

Or start Firefox 3.6.x with command:
firefox -P 'Default User'

Reference:
http://www.if-not-true-then-false.com/2010/install-firefox-4-on-fedora/
http://www.fedorafaq.org/#installsoftware

Note: Found what I needed was the above steps. Got most of them from these above 2 sources. Either of them singly didn't work out for me so clubbing together the total install steps into this post

Sunday, November 7, 2010

Remote Debugging with GDB

Remote debugging:
Connecting to remote target
    a) (gdb) target remote /dev/ttyb
   # serial-device
    b) (gdb) target remote host:port
    c) (gdb) target remote protocol:host:port
    d) (gdb) target remote | middleman-command   # gdb talks to a middleman command

Transfer files:
    remote put hostfile targetfile

    remote get targetfile hostfile
    remote delete targetfile

    (gdb) load filename    #   this command is used instead of 'run' in case of remote debugging
    (gdb) break
    (gdb) step
    (gdb) continue
    (gdb) detach
    (gdb) disconnect

a) Remote gdbserver on target with gdb on host (Need O.S. for this):
     target> gdbserver /dev/com1 emacs foo.txt   
    target> gdbserver host:2345 emacs foo.txt   
    target> gdbserver --attach /dev/com1 pid

    # Run a wrapper for the debugee program on the target-side
    target> gdbserver --wrapper env LD_PRELOAD=libtest.so -- :2222 ./testprog
   
    #Connect to the target gdbserver from my host gdb
    $ gdb myprogram

    (gdb) target remote myhost:9999
            0x00007f215893ba60 in ?? () from /lib64/ld-linux-x86-64.so.2
    (gdb) b main
    (gdb) continue

   # Send commands to gdbserver using the monitor command
    monitor help      # List the available monitor commands.
    monitor set debug 0 | 1      # Disable or enable general debugging messages   
    monitor set remote-debug 0|1    # Disable or enable debugging messages of the remote protocol
    monitor exit

   See Also: Remote Configuration
   More in-depth internal look at Remote Protocol

b) Remote Stub:  Used on Embedded devices without an O.S.

Blogs:
1) http://blog.flameeyes.eu/2010/02/20/remote-debugging-with-gdb-part-2-gdb
2) http://www.gentoo.org/proj/en/qa/backtraces.xml

Saturday, October 23, 2010

Debugging with GDB's Cheat-Sheet of Commonly Used Options

Gdb:
Compiling a program for debugging:
    g++ -ggdb -O0 hello.cpp   # 
    g++ -g3 -O0 hello.cpp       # -g3 compiles debugging info for preprocessor macros and no optimization

Running a program under the debugger without arguments
$> gdb myProgram

Setting the program arguments:
   a)  $> gdb --args myProgram  10 20 30 40
   b)  (gdb) start 10 20 30 40  # sets temporary breakpoint at main() and calls run.
   c)  (gdb) file myProgram
        (gdb) run 10 20 30 40
   d)   (gdb)  set args 10 20 30 40
         (gdb) show args
        (gdb) run
    e) $> gdb myProgram core
    f) $> gdb -tui myProgram core  # start vim/emacs ide for debug session

Tuesday, October 12, 2010

Steps towards Technical Mastery

How do you know if you've become a Master in your field?

Is there any method to learn things quickly in any field?
How do you avoid stagnation and mediocrity after becoming competent in your field?
How do you become a Master?

Take software for example: How do you become a Master in it?

These are exactly the questions which have been pushing me to seek answers.
Well now that I've got some kind of grip on this quest I'm able to give some of the answers.
Or at the very least point the way.

Short Answer: You'll know it when you get there!!
Long Answer: You'll see the Sign-Posts as you move towards achieving Mastery. Read on for the gory details.