Tuesday, November 5, 2013

nvidia broken system on hvm

____1_________
Booting into recovery mode
Switch on your computer.
Wait until the BIOS has finished loading, or has almost finished. (During this time you will probably see a logo of your computer manufacturer.)
Quickly press and hold the Shift key, which will bring up the GNU GRUB menu. (If you see the Ubuntu logo, you've missed the point where you can enter the GRUB menu.)
Select the line which starts with "Advanced options".

Select the line ending with "(recovery mode)", probably the second line, something like:

Ubuntu GNU/Linux, with Linux 3.8.0-26-generic (recovery mode)
Press Return and your machine will begin the boot process.
After a few moments, your workstation should display a menu with a number of options. One of the options (you may need to scroll down to the bottom of the list) will be "Drop to root shell prompt". Press Return with this option highlighted.

The root partition is mounted read-only. To mount it read/write, enter the command

mount -o remount,rw /
If you have /home, /boot, /tmp, or any other mount point on a separate partition, you can mount them with the command


mount --all

https://wiki.ubuntu.com/RecoveryMode


_2___________________

Ubuntu 12.04 recovery mode root shell has no internet connection:
Plug it in to the router with an Ethernet cable and run the dhclient eth0 command.

http://askubuntu.com/questions/294199/in-the-recovery-menu-how-do-i-enable-networking-and-then-go-into-the-root-shell

__3______________

I had the same thing happen. Here is how I fixed it:
  1. Switch to a terminal Ctrl+Alt+F1.
  2. Login as your username.
  3. Install linux headers:
    sudo apt-get install linux-headers-generic
    
  4. Uninstall nvidia driver - this depends on which version you installed :
    sudo apt-get remove nvidia-current
    
    or
    sudo apt-get remove nvidia-current-updates 
    
    or
    sudo apt-get remove nvidia-experimental-304
    
  5. Reinstall nvidia driver
    sudo apt-get install nvidia-current-updates
    
    When you do this, it must say something like:
    Building initial module for 3.5.0-17-generic
    Done.
    
    If it says
    Module build for the currently running kernel was
    skipped since the kernel source for this kernel
    does not seem to be installed.
    
    then the problem will not be solved. Do not believe the message. It is not asking for linux-sourceto be install, it does only want the headers but you must install the specific -generic headers for your kernel. Run:
    sudo apt-get install linux-headers-`uname -r`
    
    It will not work with just linux-headers-generic or linux-headers-3.5.0-17 (for example).
  6. If it successfully installs, restart the computer :
    sudo shutdown -r now
    
This should allow the kernel module to compile and install properly. It did for me!

Friday, August 9, 2013

ubuntu 13.04 on low end machines

I'll add two more tips to that. Switch Unity to llvmpipe rendering (low graphics mode) which does more than all other tips combined. Lower the OpenGL rendering quality.
Here's a complete Unity speed-tweak-list for reference:
  • install compizconfig-settings-manager and run it
  • in the OpenGL-plugin set the rendering quality to fast
  • disable the Animations and Fading Windows Plugins completely
  • In the Window Decoration plugin set all shadow values to 0 (or minimal value)
  • enable llvmpipe rendering by running this command
.
echo "export UNITY_LOW_GFX_MODE=1" | sudo tee /etc/X11/Xsession.d/99force-llvm
  • reboot.
http://www.reddit.com/r/Ubuntu/comments/1ci7op/speed_up_unity_on_old_hardware/c9hmam8

Monday, August 5, 2013

Best SSH options for X11 forwarding

By SAMAT JAIN
May 8, 2006 - 2:09am

Many versions of SSH, including the extremely common OpenSSH, provide support a feature known as “X11 forwarding.”

Say on you are on one computer running an X server. You want to be able to run a GUI program on another computer (to, say, access files on it), but display the program on the computer you’re sitting at. SSH’s X11 forwarding lets you do this easily in one command, without having to worry about firewalls and permissions.

But it’s a bit slow. There are several options to SSH that you can use to make things faster.

The “-c” option allows selection of cipher for a connection. The default AES cipher is extremely slow: you can get much better performance out of the arcfour and blowfish ciphers. I’ve noticed arcfour to perform the best, but there have been legitimate complaints in the cryptography community about whether or not it is “secure.” If your paramount concern is security, go with blowfish, as it can be just as fast.

The “-C” option enables compression for an SSH connection. On anything but LAN links, compression can make a big difference. SSH performs packet-based compression. That is, it can only compress the data immediately available to it, whatever may be contained in the packet it is currently processing. This immediately limits how much compression can be done, and results in bad compression ratios. But it is usually better than nothing.

All this can be incorporated into a simple bash alias:

alias ssh-x='ssh -c arcfour,blowfish-cbc -XC'

To run a program “xterm” on machine “baz.example.com” but display its GUI on the local machine, simply run:

ssh-x baz.example.com xterm


http://blog.samat.org/2006/05/08/best-ssh-options-for-x11-forwarding

Tuesday, July 23, 2013

LaTeX: Line and Page Breaking

LaTeX Line and Page Breaking


The first thing LaTeX does when processing ordinary text is to translate your input file into a string of glyphs and spaces. To produce a printed document, this string must be broken into lines, and these lines must be broken into pages. In some environments, you do the line breaking yourself with the \\ command, but LaTeX usually does it for you. The available commands are
  • \\ start a new paragraph.
  • \\* start a new line but not a new paragraph.
  • \- OK to hyphenate a word here.
  • \cleardoublepage flush all material and start a new page, start new odd numbered page.
  • \clearpage plush all material and start a new page.
  • \hyphenation enter a sequence pf exceptional hyphenations.
  • \linebreak allow to break the line here.
  • \newline request a new line.
  • \newpage request a new page.
  • \nolinebreak no line break should happen here.
  • \nopagebreak no page break should happen here.
  • \pagebreak encourage page break.

\\

 \\[*][extra-space]
The \\ command tells LaTeX to start a new line. It has an optional argument, extra-space, that specifies how much extra vertical space is to be inserted before the next line. This can be a negative amount.
The \\* command is the same as the ordinary \\ command except that it tells LaTeX not to start a new page after the line.

\-

The \- command tells LaTeX that it may hyphenate the word at that point. LaTeX is very good at hyphenating, and it will usually find all correct hyphenation points. The \- command is used for the exceptional cases, as e.g.
 man\-u\-script

\cleardoublepage

The \cleardoublepage command ends the current page and causes all figures and tables that have so far appeared in the input to be printed. In a two-sided printing style, it also makes the next page a right-hand (odd-numbered) page, producing a blank page if necessary.

\clearpage

The \clearpage command ends the current page and causes all figures and tables that have so far appeared in the input to be printed.

\hyphenation

 \hyphenation{words}
The \hyphenation command declares allowed hyphenation points, where words is a list of words, separated by spaces, in which each hyphenation point is indicated by a - character, e.g.
  \hyphenation{man-u-script man-u-stripts ap-pen-dix}

\linebreak

 \linebreak[number]
The \linebreak command tells LaTeX to break the current line at the point of the command. With the optional argument, number, you can convert the \linebreak command from a demand to a request. The number must be a number from 0 to 4. The higher the number, the more insistent the request is.
The \linebreak command causes LaTeX to stretch the line so it extends to the right margin.

\newline

The \newline command breaks the line right where it is. The \newline command can be used only in paragraph mode.

\newpage

The \newpage command ends the current page.

\nolinebreak

 \nolinebreak[number]
The \nolinebreak command prevents LaTeX from breaking the current line at the point of the command. With the optional argument, number, you can convert the \nolinebreak command from a demand to a request. The number must be a number from 0 to 4. The higher the number, the more insistent the request is.

\nopagebreak

 \nopagebreak[number]
The \nopagebreak command prevents LaTeX form breaking the current page at the point of the command. With the optional argument, number, you can convert the \nopagebreak command from a demand to a request. The number must be a number from 0 to 4. The higher the number, the more insistent the request is.

\pagebreak

 \pagebreak[number]
The \pagebreak command tells LaTeX to break the current page at the point of the command. With the optional argument, number, you can convert the \pagebreak command from a demand to a request. The number must be a number from 0 to 4. The higher the number, the more insistent the request is.

Back to the main LaTeX page.

Thursday, July 18, 2013

Latex: Opening and Closing quotation marks

Opening quotes are ``and closing quotes are ":
\documentclass{article}

\begin{document}

``Thanks!"

\end{document}
enter image description here

>>>>>> the following proposed solution did not work for me! (NEO)<<<<<<<<<<<<<<<<<<<

For greater control over your quotations (in particular, for your concrete "search and replace" problem), you could consider using the csquotes package:
\documentclass{article}
\usepackage[english]{babel}
\usepackage[autostyle]{csquotes}

\begin{document}

\enquote{Thanks!}

\end{document}
a

Latex: commonly used symbols

This article will provide a short list of commonly used LaTeX symbols. 

Operators

SymbolCommandSymbolCommandSymbolCommand
\pm\pm\mp\mp\times\times
\div\div\cdot\cdot\ast\ast
\star\star\dagger\dagger\ddagger\ddagger
\amalg\amalg\cap\cap\cup\cup
\uplus\uplus\sqcap\sqcap\sqcup\sqcup
\vee\vee\wedge\wedge\oplus\oplus
\ominus\ominus\otimes\otimes\circ\circ
\bullet\bullet\diamond\diamond\lhd\lhd
\rhd\rhd\unlhd\unlhdUnrhd.gif\unrhd
\oslash\oslash\odot\odot\bigcirc\bigcirc
\triangleleft\triangleleft\Diamond\Diamond\bigtriangleup\bigtriangleup
\bigtriangledown\bigtriangledown\Box\Box\triangleright\triangleright
\setminus\setminus\wr\wr\sqrt{x}\sqrt{x}
x^{\circ}x^{\circ}

Relations

SymbolCommandSymbolCommandSymbolCommand
\le\le\ge\ge\neq\neq
\sim\sim\ll\ll\gg\gg
\doteq\doteq\simeq\simeq\subset\subset
\supset\supset\approx\approx\asymp\asymp
\subseteq\subseteq\supseteq\supseteq\cong\cong
\smile\smile\sqsubset\sqsubset\sqsupset\sqsupset
\equiv\equiv\frown\frown\sqsubseteq\sqsubseteq
\sqsupseteq\sqsupseteq\propto\propto\bowtie\bowtie
\in\in\ni\ni\prec\prec
\succ\succ\vdash\vdash\dashv\dashv
\preceq\preceq\succeq\succeq\models\models
\perp\perp\parallel\parallel\|\|
\mid\mid
Negations of many of these relations can be formed by just putting \not before the symbol, or by slipping an n between the \ and the word. Here are a few examples, plus a few other negations; it works for many of the others as well.
SymbolCommandSymbolCommandSymbolCommand
\nmid\nmid\nleq\nleq\ngeq\ngeq
\nsim\nsim\ncong\ncong\nparallel\nparallel
\not<\not<\not>\not>\not=\not=
\not\le\not\le\not\ge\not\ge\not\sim\not\sim
\not \approx\not\approx\not\cong\not\cong\not\equiv\not\equiv
\not\parallel\not\parallel\nless\nless\ngtr\ngtr
\lneq\lneq\gneq\gneq\lnsim\lnsim
\lneqq\lneqq\gneqq\gneqq
To use other relations not listed here, such as =, >, and <, in LaTeX, you may just use the symbols on your keyboard.

Greek Letters

Lowercase Letters
SymbolCommandSymbolCommandSymbolCommandSymbolCommand
\alpha\alpha\beta\beta\gamma\gamma\delta\delta
\epsilon\epsilon\varepsilon\varepsilon\zeta\zeta\eta\eta
\theta\theta\vartheta\vartheta\iota\iota\kappa\kappa
\lambda\lambda\mu\mu\nu\nu\xi\xi
\pi\pi\varpi\varpi\rho\rho\varrho\varrho
\sigma\sigma\varsigma\varsigma\tau\tau\upsilon\upsilon
\phi\phi\varphi\varphi\chi\chi\psi\psi
\omega\omega

Capital Letters
SymbolCommandSymbolCommandSymbolCommandSymbolCommand
\Gamma\Gamma\Delta\Delta\Theta\Theta\Lambda\Lambda
\Xi\Xi\Pi\Pi\Sigma\Sigma\Upsilon\Upsilon
\Phi\Phi\Psi\Psi\Omega\Omega

Headline text

Arrows

SymbolCommandSymbolCommand
\gets\gets\to\to
\leftarrow\leftarrow\Leftarrow\Leftarrow
\rightarrow\rightarrow\Rightarrow\Rightarrow
\leftrightarrow\leftrightarrow\Leftrightarrow\Leftrightarrow
\mapsto\mapsto\hookleftarrow\hookleftarrow
\leftharpoonup\leftharpoonup\leftharpoondown\leftharpoondown
\rightleftharpoons\rightleftharpoons\longleftarrow\longleftarrow
\Longleftarrow\Longleftarrow\longrightarrow\longrightarrow
\Longrightarrow\Longrightarrow\longleftrightarrow\longleftrightarrow
\Longleftrightarrow\Longleftrightarrow\longmapsto\longmapsto
\hookrightarrow\hookrightarrow\rightharpoonup\rightharpoonup
\rightharpoondown\rightharpoondown\leadsto\leadsto
\uparrow\uparrow\Uparrow\Uparrow
\downarrow\downarrow\Downarrow\Downarrow
\updownarrow\updownarrow\Updownarrow\Updownarrow
\nearrow\nearrow\searrow\searrow
\swarrow\swarrow\nwarrow\nwarrow
(For those of you who hate typing long strings of letters, \iff and \implies can be used in place of \Longleftrightarrow and \Longrightarrow respectively.)

Dots

SymbolCommandSymbolCommandSymbolCommandSymbolCommand
\ldots2\ldots 2\vdots\vdots\cdots 2\cdots 2\ddots\ddots
(The '2's after \ldots and \cdots are only present to make the distinction between the two clear.)

Accents

SymbolCommandSymbolCommandSymbolCommand
\hat{x}\hat{x}\check{x}\check{x}\dot{x}\dot{x}
\breve{x}\breve{x}\acute{x}\acute{x}\ddot{x}\ddot{x}
\grave{x}\grave{x}\tilde{x}\tilde{x}\mathring{x}\mathring{x}
\bar{x}\bar{x}\vec{x}\vec{x}
When applying accents to i and j, you can use \imath and \jmath to keep the dots from interfering with the accents:
SymbolCommandSymbolCommand
\vec{\jmath}\vec{\jmath}\tilde{\imath}\tilde{\imath}
\tilde and \hat have wide versions that allow you to accent an expression:
SymbolCommandSymbolCommand
\widehat{3+x}\widehat{3+x}\widetilde{abc}\widetilde{abc}

Others

SymbolCommandSymbolCommandSymbolCommand
\infty\infty\triangle\triangle\angle\angle
\aleph\aleph\hbar\hbar\imath\imath
\jmath\jmath\ell\ell\wp\wp
\Re\Re\Im\Im\mho\mho
\prime\prime\emptyset\emptyset\nabla\nabla
\surd\surd\partial\partial\top\top
\bot\bot\vdash\vdash\dashv\dashv
\forall\forall\exists\exists\neg\neg
\flat\flat\natural\natural\sharp\sharp
\backslash\backslash\Box\Box\Diamond\Diamond
\clubsuit\clubsuit\diamondsuit\diamondsuit\heartsuit\heartsuit
Spadesuit.gif\spadesuit\Join\Join\blacksquare\blacksquare
\S\S\P\P\copyright\copyright
\pounds\pounds\overarc{ABC}\overarc{ABC}(it works)\underarc{XYZ}\underarc{XYZ}(it works)

Command Symbols

Some symbols are used in commands so they need to be treated in a special way.
SymbolCommandSymbolCommandSymbolCommandSymbolCommand
\textdollar\textdollar\&\&\%\%\#\#
\_\_\{\{\}\}\backslash\backslash
(Warning: Using \$ for \textdollar will result in &#036;. This is a bug as far as we know.)

European Language Symbols

SymbolCommandSymbolCommandSymbolCommandSymbolCommand
{\oe}{\oe}{\ae}{\ae}{\aa}{\aa}{\o}{\o}
{\OE}{\OE}{\AE}{\AE}{\AA}{\AA}{\O}{\O}
{\l}{\l}{\ss}{\ss}\text{!`}!`
{\L}{\L}{\SS}{\SS}\text{?`}?`

Bracketing Symbols

In mathematics, sometimes we need to enclose expressions in brackets or braces or parentheses. Some of these work just as you'd imagine in LaTeX; type ( and ) for parentheses, [ and ] for brackets, and | and | for absolute value. However, other symbols have special commands:
SymbolCommandSymbolCommandSymbolCommand
\{\{\}\}\|\|
\backslash\backslash\lfloor\lfloor\rfloor\rfloor
\lceil\lceil\rceil\rceil\langle\langle
\rangle\rangle
You might notice that if you use any of these to typeset an expression that is vertically large, like
(\frac{a}{x} )^2
the parentheses don't come out the right size:
(\frac{a}{x})^2
If we put \left and \right before the relevant parentheses, we get a prettier expression:
\left(\frac{a}{x} \right)^2
gives
\left(\frac{a}{x} \right)^2
\left and \right can also be used to resize the following symbols:
SymbolCommandSymbolCommandSymbolCommand
\uparrow\uparrow\downarrow\downarrow\updownarrow\updownarrow
\Uparrow\Uparrow\Downarrow\Downarrow\Updownarrow\Updownarrow

Multi-Size Symbols

Some symbols render differently in inline math mode and in display mode. Display mode occurs when you use \[...\] or $$...$$, or environments like \begin{equation}...\end{equation}, \begin{align}...\end{align}. Read more in the commands section of the guide about how symbols which take arguments above and below the symbols, such as a summation symbol, behave in the two modes.
In each of the following, the two images show the symbol in display mode, then in inline mode.
SymbolCommandSymbolCommandSymbolCommand
\sum  \textstyle\sum\sum\int  \textstyle\int\int\oint  \textstyle\oint\oint
\prod  \textstyle\prod\prod\coprod  \textstyle\coprod\coprod\bigcap  \textstyle\bigcap\bigcap
\bigcup  \textstyle\bigcup\bigcup\bigsqcup  \textstyle\bigsqcup\bigsqcup\bigvee  \textstyle\bigvee\bigvee
\bigwedge  \textstyle\bigwedge\bigwedge\bigodot  \textstyle\bigodot\bigodot\bigotimes  \textstyle\bigotimes\bigotimes
\bigoplus  \textstyle\bigoplus\bigoplus\biguplus  \textstyle\biguplus\biguplus

Examples

  • x^y is the same as x^{y}, producing x^y .
  • x_y is the same as x_{y}, producing x_y .
  • However, x^10 is not the same as x^{10}. The former produces x^10 instead of x^{10}.