June 11, 2012 0

Getting texworks and bibtek (.bib files) to work

By in Uncategorized

Easiest way is to use latexmk from repository

In texworks latexmk needs to be setup. A guide can be found here:
http://code.google.com/p/texworks/wiki/AdvancedTypesettingTools#latexmk
In texworks go to edit->preferences->typesetting
under “processing tools” add latexmk and add teh arguments found in the link above (repeates here):

-e
$pdflatex=q/pdflatex $synctexoption %O %S/
-pdf
$fullname

You need to add them one at a time

June 8, 2012 0

Getting pgfplots from ppa on ubuntu newer than lucid

By in latex, ubuntu, Ubuntu 12.04

To get pgfplots you can use the ppa by johannes Reinhardt
ppa:johannes-reinhardt/ppa
but the newers build of pgfplots is for lucid so if you are on a newer ubuntu you need to change the release name from e.g. precise to lucid in the software manager. Another way is to manually add

deb http://ppa.launchpad.net/johannes-reinhardt/ppa/ubuntu lucid main
deb-src http://ppa.launchpad.net/johannes-reinhardt/ppa/ubuntu lucid main

to /etc/apt/sources.list
and to get the key by:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5FBD6912

now you can apt-get update and install pgfplots

Tags:

June 7, 2012 0

ubuntu 12.04 64 bit install java

By in java, ubuntu, Ubuntu 12.04

To install java requires 5 steps

  1. Download java
    http://java.com/en/download/index.jsp
    choose the linux x64
  2. unpack
    tar -xvf <downloaded file>
  3. move to desired directory(assume /usr/local/java)
  4. maybe chown -R root:root /usr/local/java
  5. add /usr/local/java/bin to path and set environment variable CLASSPATH to /usr/local/java/lib by adding to .profile:
    # add java bin to path
    PATH="/usr/local/java/bin:$PATH"
    # set java classpath
    CLASSPATH="/usr/local/java/lib"

test by running
java -version

 

June 7, 2012 0

ubuntu 12.04 enable hibernation

By in linux, ubuntu, Ubuntu 12.04

Following this worked:

http://askubuntu.com/questions/94754/how-to-enable-hibernation-in-12-04

create/edit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla with:

sudo gedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

and insert


[Re-enable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

 

June 6, 2012 0

Ubunt 12.04 login screen reappears after messing with xorg.conf

By in linux, ubuntu, Ubuntu 12.04, Xserver

After messing with Xorg.conf I could no longer login on my usual account. The guest account however still was able to login and I could login through terminals (Alt – Ctrl – F1).

The problem got fixed when I deleted:

~/.Xauthority

and rebooted

June 4, 2012 0

prevent script/command from terminating when user logs out

By in linux

To prevent script or command from terminating when user logs out use
nohup COMMAND
output is directed to nohup.out in home directory

June 4, 2012 0

monitor network in terminal/shell

By in linux

the utility

iftop

seems to be doing a pretty good job monitoring network trafic

June 4, 2012 0

using rsync for backup

By in rsync

use rsync to backup content and ensure that files deleted on source is not deleted on destination but copied to backup directory

example

rsync --verbose --progress --stats --compress --recursive --times --perms --links --delete --backup --backup-dir=../backup\ of\ deleted\ content/ --exclude=backup-dir/ rsync\ source/ rsync\ dest/current\ nas\ content/

The –exclude=backup-dir/ is properly not needed

 

If you are not interested in moving deleted files from the source to a backup directory but just want to ensure that files that have been transferred one from the source to destination are not deleted on a subsequent execution of the rsync script then remove all with backup and the flag –delete

e.g.

rsync --verbose --progress --stats --compress --recursive --times --perms --links rsync\ source/ rsync\ dest/

May 23, 2012 0

using rsync to copy files

By in linux, rsync

rsync options

to get rsync to report progress: –verbose –progress –stats

if copying over network use compression and secure transfer: –compress –rsh=/usr/bin/ssh

tell rsync to copy recursively: –recursive

keep file timestampts: –times

keep permissions: –perms

copy symbolic links: –links

instruct rsync to delete files on the remote location that isn’t present on the source: –delete

to exclude files by a patterns: –exclude “<exclude patterns>” (eg. –exclude “*.bak”) Additional patterns can be specified by adding another –exclude parameter

example command:

sudo rsync –verbose –progress –stats –compress –recursive –times –perms –links /home/thomas/Ph.D/sommerskole/ /media/KBM_BioSysTek/tgi/Storage\ Filer\ findes\ ikke\ andre\ steder/sommerskole/

to copy all files and folders in …Ph.D/sommerskole to  …Storage\ Filer\ findes\ ikke\ andre\ steder/sommerskole/

sudo is necessary in this example to write to /media

To instruct rsync to remove files from the source that have been sucessfully transfered add: –remove-source-files

rsync man page states this about –remove-source-files: sender removes synchronized files (non-dir)

using –remove-source-files have not been tested

EDIT: –remove-source-files have been tested with

sudo rsync –verbose –progress –stats –compress –recursive –times –perms –links –remove-source-files /home/thomas/Ph.D/sommerskole/ /media/KBM_BioSysTek/tgi/Storage\ Filer\ findes\ ikke\ andre\ steder/sommerskole/

All files are removed but directories remain

Tags:

May 16, 2012 0

change ring tones and message tones on Samsung galaxy S

By in Android

http://www.androidpit.com/en/android/forum/thread/427141/How-do-I-set-my-mp3-as-a-ringtone-on-the-Samsung-Galaxy-S