Friday, November 16, 2012

.profile vs. .bashrc

From "man bash"
Quote:
When bash is invoked as an interactive login shell, or as
a non-interactive shell with the --login option, it first
reads and executes commands from the file /etc/profile, if
that file exists. After reading that file, it looks for
~/.bash_profile, ~/.bash_login, and ~/.profile, in that
order, and reads and executes commands from the first one
that exists and is readable.
Quote:
When an interactive shell that is not a login shell is
started, bash reads and executes commands from ~/.bashrc,
if that file exists.
In other words, /etc/profile is run when a user logs in. ~/.bashrc is run for other shells (Ie opening an xterm)

http://www.linuxquestions.org/questions/linux-general-1/etc-profile-v-s-etc-bashrc-273992/

Thursday, October 18, 2012

SVN Branching and Merging

    A basic well-written tutorial: 
    http://nedbatchelder.com/text/quicksvnbranch.html
     More advanced stuff:
    1. You branch.
    2. Someone else changed T0 on trunk. Sequence in trunk: T0
    3. You make the change T1 on your first branch. Sequence in Branch: T1
    4. You create a new branch from trunk at T2; it contains change T0. Then you merge your changes from your prior branch (the yellow arc — a Bunny Hop) into your new branch. This brings change T1 into your second branch after change T0. Sequence in your branch: T0, T1
    5. You make change T3 in your branch. Sequence in your second branch: T0, T1, T3
    6. Someone else makes change T4 in trunk. They committed to trunk first; they win. Sequence in trunk T0, T4
    7. You make your third branch, at time T5. It includes changes T0, T4 in that order. You merge all your changes from the previous branch — this means you have to do the merging necessary to make changes T1 and T3 blend in correctly after T0, T4. But you get to do this in a workspace, off of a branch, nicely isolated from trunk. It is usually pretty easy. Sequence in the branch is now T0, T4, T1, T3
    8. With no other overlapping changes between when you cut this branch and now (between T5 and T6), you merge your branch into trunk. Because all of the changes in this branch take place after the already committed changes in trunk, the merge goes smoothly.
    http://designbygravity.wordpress.com/2009/10/19/what-mother-never-told-you-about-svn-branching-and-merging/
     

    Thursday, September 13, 2012

    Remove word "chapter" in a latex report

    Remove word "chapter" in a latex report

    \documentclass{report}
    \usepackage{titlesec}
    \titleformat{\chapter}
      {\normalfont\LARGE\bfseries}{\thechapter}{1em}{}
    \titlespacing*{\chapter}{0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}
    \begin{document}
    \chapter{Introduction}
    \section{Section}
    \end{document}
    
    
    http://tex.stackexchange.com/questions/10326/how-to-set-the-chapter-style-in-report-class
    
    

    Friday, August 31, 2012

    Linux Lost Internet Connection

    Linux renew ip command

    The -r flag explicitly releases the current lease, and once the lease has been released, the client exits. For example, open terminal and type the command:
    $ sudo dhclient -r
    Now obtain fresh IP:
    $ sudo dhclient
    There is no need to restart network service. Above command should work with any Linux distro such as RHEL, Fedora, CentOS, Ubuntu and others.

    On a related note you can also try out the following commands:
    # ifdown eth0
    # ifup eth0
    # /etc/init.d/network restart

    OR
    # /etc/init.d/networking restart 

    Source: http://www.cyberciti.biz/faq/howto-linux-renew-dhcp-client-ip-address/

    OR

     $ sudo dhclient eth0

    Source: http://askubuntu.com/questions/2901/unmanaged-network-icon-network-manangement-disabled

     

    Tuesday, July 17, 2012

    Employ drop caps

    http://inpics.net/tutorials/writer2/spec7.html

    Friday, June 22, 2012

    PDF editing soft: Xournal

    http://www.webupd8.org/2011/02/highlight-text-or-annotate-pdf-files-in.html


    Warning: this program is not known to work on some versions (works fine for me on 32- and 64-bit 10.04

    How to Install Foxit

    Paste these commands into the terminal:

    Download Foxit

    wget -c http://mirrors.foxitsoftware.com/pub/foxit/reader/desktop/linux/1.x/1.1/enu/FoxitReader_1.1.0_i386.deb

    Install the .deb

    sudo dpkg -i FoxitReader_1.1.0_i386.deb
    (or whatever version you've just downloaded)

    If you've got a 64-bit machine, you'll need to:

    sudo dpkg -i --force-architecture FoxitReader_1.1.0_i386.deb
    n.b. -- this works fine for me, though I have installed a few 32 bit libraries.

    Remove the original archive

    After you test out that Foxit is working properly, you can remove the original .deb file you downloaded with the first command
    rm FoxitReader_1.1.0_i386.deb
    It should perhaps be noted that the 1.1 version of FoxitReader, which is the one for which 32-bit binaries are available (June 2011), does not have the annotation features of the current Windows version which is version 5.0. You are limited to viewing the pdf, copying text and making an image of the pdf which you can do with other native Linux pdf readers.

    https://help.ubuntu.com/community/Foxit

    Friday, May 18, 2012

    Sync under linux

    Getting to know rsync

    The basic syntax for rsync is simple enough -- just run rsync [options] source destination to copy the file or files provided as the source argument to the destination.
    So, for example, if you want to copy some files under your home directory to a USB storage device, you might use rsync -a /home/user/dir/ /media/disk/dir/. By the way, "/home/user/dir/" and "/home/usr/dir" are not the same thing to rsync. Without the final slash, rsync will copy the directory in its entirety. With the trailing slash, it will copy the contents of the directory but won't recreate the directory. If you're trying to replicate a directory structure with rsync, you should omit the trailing slash -- for instance, if you're mirroring /var/www on another machine or something like that.
    In this example, I included the archive option (-a), which actually combines several rsync options. It combines the recursive and copy symlinks options, preserves group and owner, and generally makes rsync suitable for making archive copies. Note that it doesn't preserve hardlinks; if you want to preserve them, you will need to add the hardlinks option (-H).
    Another option you'll probably want to use most of the time is verbose (-v), which tells rsync to report lots of information about what it's doing. You can double and triple up on this option -- so using -v will give you some information, using -vv will give more, and using -vvv will tell you everything that rsync is doing.
    rsync will move hidden files (files whose names begin with a .) without any special options. If you want to exclude hidden files, you can use the option --exclude=".*/". You can also use the --exclude option to prevent copying things like Vim's swap files (.swp) and automatic backups (.bak) created by some programs. 

    This and More  at https://www.linux.com/news/enterprise/storage/8200-back-up-like-an-expert-with-rsync

    Thursday, March 22, 2012

    launch application and close console

    Way 1:

    $ nohup MyCommand

    Way 2:

    $ MyCommand &
    $ exit

    http://www.linuxquestions.org/questions/linux-general-1/how-to-launch-an-app-in-terminal-and-keep-it-running-after-i-close-terminal-368739/

    Saturday, February 25, 2012

    Re: Remove startup applications

    Re: Remove startup applications

    Maybe it comes a little bit too late, but I'll still give it a try...
    Try to type :
    Code:
    locate kmix
    You should find an autostart file :
    /usr/share/autostart/kmix_autostart.desktop
    which you can modify (or delete, maybe saving it first) in order for Kmix not to be launched with KDE.

    Friday, February 24, 2012

    Nvidia drivers for Ubuntu 11.10 Oneiric

    You can update your drivers with x-swat ppa and to install Nvidia card latest drivers use this ppa.

    To install/Update Nvidia card drivers open Terminal (Press Alt+F2 and type: gnome-terminal) and copy the following commands in the terminal:
    sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
    sudo apt-get update
    sudo apt-get install nvidia-current
    When installation complete restart your PC. Now to check the installation is successful Press Window/Super key and type: nvidia x server settings and open it.

    That's it Enjoy.

    http://www.noobslab.com/2011/09/nvidia-drivers-for-ubuntu-1110-oneiric.html

    Tuesday, February 21, 2012

    No hyphenation patterns were loaded for the language

    http://tex.stackexchange.com/questions/1972/no-hyphenation-patterns-were-loaded-for-the-language

    You may have to install spanish language support for TeX on your operating system. For instance, on Debian or Ubuntu it means to install texlive-lang-spanish I guess.

    Afterwards it may be necessary to rebuilt the format files, for instance by

    fmtutil --all

    at the command prompt or the package manager of your TeX distribution.

    I suggest you add some information to your question regarding operating system and TeX distribution.

    However, this topic in the UK TeX FAQ may help you: Using a new language with Babel. It deals with this warning message and shows ways how to fix that.

    Online Citation Conversion

    http://www.kromosoft.com/resources/citationconversion.php

    Friday, January 27, 2012

    Transfer Mozilla FireFox settings from old to new computer

    It is possible to transfer all your Mozilla FireFox settings, bookmarks, passwords etc. from your old computer to your new computer.

    To move your settings, you will need to locate your Mozilla FireFox profile folder on both the old and new computer. You can then copy them from the old computer to your new computer.

    Locate profile folder

    The profile folder is stored in Firefox\Profiles\xxxxxxxx.default, where xxxxxxxx is a random string of 8 characters.
    OSUsual profile path
    Windows XP/2000 C:\Documents and Settings\[User Name]\Application Data\Mozilla\Firefox\Profiles\xxxxxxxx.default
    Windows Vista C:\users\[User Name]\AppData\Roaming\Mozilla\Firefox\Profiles\xxxxxxxx.default
    Windows 95/98/Me C:\WINDOWS\Application Data\Mozilla\Firefox\Profiles\xxxxxxxx.default
    Linux ~/.mozilla/firefox/xxxxxxxx.default/
    Mac OS X ~/Library/Application Support/Firefox/Profiles/xxxxxxxx.default/

    Copy files

    You can copy the files from one profile folder to another even between computers. You can also use this to make a backup of your Mozilla FireFox settings.

    Tuesday, January 24, 2012

    Manual disk partitioning guide for Kubuntu 11.04

    http://www.linuxbsdos.com/2011/05/12/manual-disk-partitioning-guide-for-kubuntu-11-04/

    Depending on the contents of the hard disk in the computer, that step will look similar to the one in this image. To create partitions manually, the option to choose is, well, “Manual.”

    The objective here is to create the following partitions:

    /boot, the boot partition. This is where programs critical for booting the system will reside.
    /, the root directory. The bulk of the programs used for running the system will be installed here.
    Swap, unformatted disk space for use as virtual memory.
    /home, the partition where your home directory will be located. In the course of using the system, files and folders you create will reside in various folders here.

    To start creating partitions, just click on the free space. The “Create Partition” window will open.

    The first partition to create will be mounted at /boot. When setting up an LVM-based system using an Alternate Installer ISO image, the default disk space allocated to /boot is 258 MB. However, only about 22 MB of that is used, so anything thing between that size range will do. For this tutorial, the default will be used. The mount point will, of course, be /boot. The default file system is ext2. OK.

    With the first partition out of the way, click on the free space again.

    This time we want to create the partition for Swap space. The suggested size is 2000 MB, which is just about the default if the installation disk is about 100 GB. Select “swap area” from the “Use as” dropdown menu. OK.

    The third partition will be mounted at /, the root directory. The default journaling file system on Kubuntu 11.04 is ext4. You may stick with it or choose another journaling file system available. A new installation of Kubuntu 11.04 takes up about 3 GB of disk space, so anything above that will do. OK.

    This is the last partition to be configured and it will be mounted at /home. You may assign all available disk space to it. OK.

    With all the partitions configured. You may continue with the rest of the installation. Keep in mind that GRUB 2, the boot loader, will be installed in the Master Boot Record (MBR) of the disk. The next article on Kubuntu 11.04 will show how to dual-boot with Windows 7.