A few useful unix commands to start with
cd
a_directory
- (change directory) move to the specified directory
mkdir a_directory - make a
new directory
ls
- list the files in the present directory
cp old_file new_file - copy a file
mv old_file new_file - rename or move a file
less
file
-
shows the content of a text file, one page at time; you
get next page by pressing the space bar and quit the program
by pressing q. h gives you help and more useful commands.
lp
file
- write out a file on the printer
lp -d copls -
write out a file on the colour printer
firefox&
-
starts a web browser; goto http://www.teokem.lu.se/~ulf/Methods
for further instructions
rm
a_file
- remove a file
rmdir a_directory - remove
a directory
exit
- close a window
man
command
- gives you information (help) about command
kill -9 process_number - kill a proces
xemacs&
-
opens a text editor, which is reasonably self
instructive. In particular, it is very useful to copy or
remove rectangular areas. You do this by marking the rectangle
from the left upper corner to the lower right corner and then
press ctrl-x r k (rectangle kill). You paste a rectangle by
puting the mouse in the desired position of the upper right
corner and the press ctrl-x r y (reactangle yank).
You open a new window by on the K in the lower left corner,
then select terminals and a proper terminal (e.g. shell).
Write . .profile in the new terminal to make it look normal
(note the two dots, with a blank in between).
You lock the screen by pointing on the lock in the lower
right corner.
File system
Four directories are special:
. means the
current directory
.. means the parent
directory (one step up)
~ means your home directory.
You can also go to your home directory by writing cd
without any argument.
- means the last directory you
visited.
Thus,
cp ../file .
copies file from the parent directory to the current directory.
The file system is hierarchically arranged in directories,
starting from the directory /.
You can either specify the actual name of the directory or the
file (e.g.
/teo/ulf/file; If you double-click on the Esc
key, the system completes the name of the file or directory if it
can be unambigously determined) or give the name relative your
current directory (e.g.
../../Directory/file or
~/Directory/file).
Characters and keys
Note that unix is case sensitive, so that the file apa
is different from APA and Apa.
Some keys are special:
* is a wildcard key; it corresponds to any number of any
characters. It can be combined by other characters, e.g. file*apa
& starts a job in the background (i.e. you write job&
)
Ctrl-P repeats the last command (and the commands before than if
you repeat it; the arrow-up does the same thing on most
keyboards).
!com - repats the latest command starting with "com"
Mouse
You can copy and paste in and between windows by marking
something with the left mouse button and then paste it with the
middle mouse button. In some applications the text ends up where
you click. In others (e.g. in the unix window) it ends up at the
cursor position.
A much more detailed tutorial can be find in
http://bioinfo1.mbfys.lu.se/kurs/uNix.html or in
http://www.redhat.com/support/docs
http://www.redhat.com/support/docs/faqs/rhl_general_faq
.
Ulf 28/3-01
Some useful data
- signe = 130.235.29.7
- The home page is now on mimer in
/Share/Ulf
cd /Users/ulf/public_html/Methods
scp *.html teok-ury@mimer.teokem.lu.se:/Share/Ulf/Methods
(blinka)
You can edit your own home page by typo3
Log into
http://www.teokem.lu.se/typo3
with your Lucat id
- old: www:
in order to edit your home page you should login (via ssh) to the machine
oldwww.teokem.lu.se (130.235.1.7) (instead of www.teokem.lu.se), and edit
files in your public_html/ directory.
VV 25/9-13
You must copy all files to mimer first (from gefion to
mimer (on gefion) and then from oldwww to mimer, on
oldwww).
Some pdb viewers
- rasmol
- VMD
- Coot
- Maestro
- Molden
- avogadro
- xyzviewer (/home/lili/Bin/XYZViewer_097.jar; move atoms by
hand)
Some useful Unix/Linux commands
- Install new commands on ubuntu linux:
apt-get install command
apt-cache search command
ctrl-alt-F1/F2 goes out of KDE
ctrl-alt-F7/F8 goes in again
- acroread -- read a .pdf file (on Ubuntu, use
okular instead)
- alt-tab - toggle around different open windows
- apt-cache search x11-dev - search for the libraries
x11-dev (root needed)
- apt-get install libx11-dev - install the libraries libx11-dev
(root needed)
- awk
http://www.vectorsite.net/tsawk.html
wc -l file | awk '{print "# Nr of data points: "$1}';
awk '{s+=$1}END{print s}' file - sums all entries in
column #1
awk '/best:/ {print $3,$3-$7}' file
awk 'NF==0 {i=0;next} /BOND/ {i=1;next} /ANGLE/ {i=2;next}\
/DIHED/ {i=3;next} /IMPRO/ {i=3;next}\
i==1 {printf
"%-6d\t6\t%9.4f\t10.0\t%s\n%-6d\t16\t%9.4f\t0.01\t%s\n",NR,$2,"%8.3f",NR,$3,"%10.5f"}\
i==2 {printf
"%-6d\t10\t%9.4f\t5.0\t%s\n%-6d\t22\t%9.4f\t1.0\t%s\n",NR,$2,"%8.3f",NR,$3,"%8.3f"}\
i==3 {if($3!=0) printf
"%-6d\t19\t%9.4f\t0.1\t%s\n",NR,$3,"%8.3f"}' frcmod.hemts
Print every second line in a file (change 2 to 10 for every tenth line):
awk ' NR % 2 ==0 {print; }' <filename>
Calculate average energy:
grep EPtot water_prod1.out | head -n -2 | awk '{if(NR>5000)sum+=$9}END{printf "%14.6f\n",sum/(NR-5000)}'
- (Open)Babel - a converter for molecular modeling data
files
For example:
babel -icif file.cif -opdb file.pdb
sudo apt-get install openbabel
To get started type babel -H
see more on http://openbabel.sourceforge.net/
- batch queing system:
qsub file
qdel id
qstat
showq
- bc -l -- calculator
- bz2 format:
bzip2 file
bunzip2 file.bz2
tar -jxvf file.tar.bz2
- cc - C-compilator (gcc finns, ej installerad)
- /CDROM
- cerius2 /teo/msi/molcas.log - Tutorial for molcas GUI
in cerius2
- chemtool:
Jag hittade ett bra programm att rita kemiska struktur.
Man kan läsa in pdb, rotera den och sedan exportera till Xfig för att jobba
vidare:
http://ruby.chemie.uni-freiburg.de/~martin/chemtool/
Den ingår i Debian 'stable' package som jag har här hemma.
- chime - available on the pc, not on sgi
- chmod -R +rX * - make all files readable and all directories
executable
- convert - converts graphics files
- core files: dbx <abs_path_to_the_program>; where - to
find out where the program crashed
- ctrl-alt-F1/F2 - switch to screen 1 or 2, turn off graphical
interface
ctrl-alt-F8/F7 turns on graphical interface again
- cut -f2,4-6 file - cut out columns 2, 4, 5, and 6 from file to
stdout
cut -c2,4-6 file - cuts out characters (f is fields)
- desktop: to change the desktopprogram:
switchdesk KDE
Multiple desktops: System Setting - Desktop Behaviour - Virtual
Desktops
- dircolors - determine the colours of files in ls
- disk recovery - do not use Aurora - poor service and lying
- dos2unix - changes the line endings from windows to linux
format
- du -sh
- dvd-burner (on skade = in Daniel's room), 4.7 GB:
growisofs -Z
/dev/dvd -r -J -D
/directory/to/be/written
- dvips <dvi fil>; lp <ps fil> - outdvi -ps
- dvips -t landscape -t a4 <fil> - ks ldpe
- dvips -f dvi_file >ps_file
- emacs and xemacs (editors)
- embla: cat /etc/motd
- enscript <flags> <text_file> - writes the
file on the printer after some formatting
enscript --help - gives the possible options
enscript -r -fCourier7 <text_file> - writes a wide
text file in landscape format
- eps: You can get coordinates from ghostview. 0 0 is the lower
left corner.
To convert ps to eps, add
%!PS-Adobe-2.0 EPSF-1.2
%%BoundingBox: 0 290 480 760
- eps2eps oldfile newfile - progarm to clean eps files
- extundelete - undelete files on ext3 or ext4 file systems (not
so powerful)
- f77 - fortran compilator
- f90 -64 program.f90 The 64 bit option is used to handle large
arrays.
- files:
/etc/lilo.conf - configuration
/proc/meminfo - shows the physical memory size
(alternative = top)
- find * -name <name> -print
- for ((i=0;i<=40;i++)) do
...
done
or
for x in Hid Hip ; do
...
done
- /free on signe - free computers
- ftnchek
- /teo/thor/bin/forchk
- /teo/thor/bin/understand_f77
- /teo/thor/bin/flint
- /teo/thor/bin/xlint
- ftp transfer directories, etc:
gftp (graphical)
You normally need to use shh2 protocol
- garmquota
- gimp - picture editing program (also xv and
convert)
http://manual.gimp.org/
- grace The 2D data plotting/analysis program "Grace" has been
installed. It is based on the (now discontinued) "xmgr" program,
well known to many of you. It will run on Mandrake 9.2+ and
RedHat machines, and is started with the command:
xmgrace
The ancient "xmgr" remains, of course, but be aware that while
Grace reads xmgr files, the reverse will not work! For more
information, see http://plasma-gate.weizmann.ac.il/Grace
- grep med or: grep -E 'xxx|yyy' or egrep -e 'xxx|yyy'
grep -A5 pattern file - gives the 5 next lines after pattern
grep -B5 pattern file - gives the 5 lines before pattern
more advanced grep:
echo $i | tr
-d '\n' ; grep -B 1 '$end' energy | head -1 | tr -d '\n'; echo ' ' |tr
-d '\n' ; grep -c "convergence criteria satisfied after"
logd
- gr_osview -a visar alla processer
- groff -man <fil.man> -- omvandlar man fil till ps
fil
- gs - show ps fil; alt showps, ghostview
- ghostview - visa ps fil (best; here you can get coordinates
for bounding box directly).
You can also view a pdf file.
- h-index: ISI - tab We of Science - search for an author -
create citation report (on line just above first article on the
very right)
- Hard drive
mkfs /dev/... build a ext2 file system on the disk (reformat a
disk; it must not be mounted)
mkdir /backup6
mount /dev/sdd3 /backup6
chown ulf.teokem /backup6
vi /etc/fstab
/dev/sdd3 /backup6 ext2 defaults,rw 0 0
mount /backup6
mount -a forces mounting of all disk
that should be mounted (use this if /gersemi is not mounted on gefion or
any other computer).
hfsplus on Mac OK
vfat or ntfs on Windows
ext2-4 on linux
cfdisk /dev/sdd3 - partition a disk
mke2fs - writes a file system (-j gives ext3 journaling)
mkfs.ext4 -c -c /dev/...
- hdparm -tT /dev/sde1 -- measure the speed of the disk
Typical result:
/dev/sdc1:
Timing cached reads: 33540 MB in 2.00
seconds = 16789.27 MB/sec
Timing buffered disk reads: 380 MB in 3.01 seconds =
126.09 MB/sec
- hinv - Visa memory etc for datorn
- homepage of the department, source /var/www/htdocs (but you
do not have read permission there)
- html: To get Swedish letters right: set (directly after <head>)
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8">
- if [ $a = "0.00" -o $a = "0.05" ]; then v=0 ; else v=1 ; fi
- ifconfig - gives lot of information, e.g. MAC number (ether on
Mac) and ipaddress (getmac on windows; command prompt; ipconfig /all; look for Ethernet adapter Ethernet)
- info - gives a whole book of information
- kde desktop
If you get problems with it: move the directory ~/.kde to
~/.kde-backup and logout-login again
- keyboard settings in settings - input devices - keyboard -
layout, click on +
- kill -9 pid - kill job with pid
kill -stop %1 - stop a job
kill -cont %1 - continue to run a stopped job
- latex commands:
latex file (using file.tex)
bibtex file (using the files specified in file.tex)
latex file
xdvi file
dvi2ps
bst files are found in:
signe:/usr/freeware/lib/texmf/bibtex/bst
garm:/usr/share/texmf/bibtex/bst/misc
- latex2html - convert latex to html text
- limit - shows limitations on memory, stack, etc.
- limit stacksize 400000 kbytes (or unlimited) -- set
limit; systune can be needed sometimes
echo 2147483648 >/proc/sys/kernel/shmmax
The system-wide limits can be changed. Look into
/etc/security/limits.conf
- lp - print on normal printer
lp -dcolps : print on the colour printer
lp -dhp4500 - the colour printer at Bo J
lp -dps -c -o number-up=2 is appropriate to write out pdf
articles in 71% reduction.
lp -dps -c -o number-up=2 -o sides=two-sided-short-edge
lp -dps -c -o sides=two-sided-long-edge
lp -dcolps -c -o sides=one-sided
- login: If you cannot login because the graphical interface
does no show you name among the users do:
ctr-alt-F1 (or F2)
It closes down the graphics and allows you to log in with any
user name and id.
- ls --colour - ls with colour coding of files (cf.
command dircolors)
ls -v - gives a better sorting of files (especially on
linux)
ls --ignore-'s --ignore=#*#' -- ignores backup files
- lunarc:
Location of bio files on alarik: /lunarc/nobackup/projects/teobio
projinfo -y
qsub, qstat, qdel
sbatch, squeue, scancel, scontrol
- lyx - word processor for latex ;
manual: www.lyx.org
- mac-adress
On PC:
- mailbox in netscape (see netscape)
- make -f <make-fil> <program> - if the
make-filen is not called make
- maple
- mathematica (no longer available)
- matlab
- Maximising windows - turn off in System Settings - Desktop
ehaviour - Screen Edges
- mc (midnight commander) - quit the program with text string
"exit"
- mkf2c to create the appropriate wrappers for C code
- mpg file on Mac: VLC (freeware): http://www.videolan.org/vlc/download-macosx.html
- /sw/molcas/default
- /sw/molcas/latest
- molden
/usr/local/bin/molden
/usr/local/bin/moldenogl
- molmol - graphic display of protein structures
- sudo mount /dev/sde1 /backup6
the name (sde1) can be fround by dmesg:
[101917.722471] sde: sde1
/backup6 must exist
- sudo mount -a --- mount al files in
/etc/fstab
- netscape automatically download *.pdf files
Edit: Preferences: Navigator: Application
Find the row: Portable Document Format
Insert /usr/local/bin/acroread %s
More suggestions, see below
File: Compact Folders - to remove trash
- netscape mail:
chose POP3 i preferences and signe.teokem.lu.se as incoming as
well as outgoin mail server (user ulf)
- netscape lock file location:
/home/ulf/.mozilla/default/6yogqf9c.slt/lock
- netscape alternatives: firefox (browser) and thunderbird
(mail)
- Nätverket på laptop startas om med:
/etc/rc.d/init.d/network restart
- okular - new pdf viewer on Ubuntu Linux
- /opt/openoffice.org2.0/program/soffice (on gefion)
- PC you can get character #xxx by pressing alt and the number
xxx
- pmount /dev/sde1 (try to mount without being root; dev name
can be seen by dmesg)
- public key
ssh-keygen
creates ~/.ssh/id_dsa and id_rsa (the latter is the public key)
This did not work on Linux 2013, only on Mac.
- Pymole - good program for pictures
Instructions: http://www.pymolwiki.org/index.php/Publication_Quality_Images
Command to get a high-resolution picture:
png filnamn.png
Alignment and RMS of two structures:
fit (struct1 and resi 1-3), (struct2 and resi 1-3)
- concatenate pdf and ps files with ghostscript:
gs -dNOPAUSE
-sDEVICE=pdfwrite -sOUTPUTFILE=new.pdf -dBATCH XXXX.pdf
XXXX.pdf <XXXX.ps XXXX.ps etc.>
You may combine PDF and postscript files using GhostScript. The
files to be combined are specified in the order required in the
final PDF document. The name of the resulting file is specified
by -sOUTPUTFILE=.
Ghostscript requires that you supply the outputfile name.
- qdel -k <jobid>
- qprt - formats a text file for the printer This command
does not work on SGI; use enscript instead
(print &l1O &a4L(8U(s0p16.67h8.5v0s0b3T
; cat $1 ; print '
' ) | qprt -B'nn' -P'pcl2' -w129 -v8 -l95 -b0 -t0
-i2 -
(cf. command /teo/ulf/Bin/lwulf)
- qsub <job>
- qstat
- qstat -a
- paste file1 file2 - paste the content of file2 line-wise after that
of file1, separated by a tab (can be changed by -d " "); more files can
be used
- pdfLaTeX - convert latex to pdf
- pdf
pdfjoin filnamn1 filnamn2 filnamn3 --fitpaper false --paper
a4paper --outfile allt.pdf
Join several pdf files to one (and set A4 format)
- printer settings: /var/spool/lp/settings/ps.
Ex:
-FontSize 7 -P Option3 True -P Option4 10Meg -P PageSize A4 -P
Duplex DuplexNoTumble
New linux: Configuration - printing - XPP X Printing Panel
22 chars/inch; 14 lines/inch; all margins 16 pt
On linux: Configuration - printing - KUPS - select printer -
instances - select default - settings
Double sided: point at the printer icon on desktop and select
properties.
Printers: colps, hp4500.
- printf formats:
%-6d = fortran i6
%9.4f = fortran f9.4
%s =
string (fortran a)
\t = tab
\n = new
line (fortran /)
text = written as it
is (fortran 'text')
- ps: You show ps files with gs, showps, or ghostview
90 rotate (rotates by 90 degrees; other measures also
possible)
100 100 translate (translates in x/y direction which you
will need to fix it to the place}
Make sure to put it behind the bounding box (the stuff with the %)
-
ps2eps -f -R + -g -s a4 input.ps output.eps
Rotate ps and convert to esp. Good for plots from gnuplot.
- ps2epsi - convert ps file to eps file + bit map
- ps2pdf - convert ps to a pdf file
- Python
python3 is better than python
If you get module errors like
ModuleNotFoundError: No module named 'scipy'
then run (at least on Mac):
pip3 install scipy
- r <part_of_command> - gives the last command
starting with the given characters
On linux (bash) ! has the same function
- renice -n 19 <pid> : set nice -19 on a
running job
- redirection of elog file:
2> file or 2>&1
- scp file.source
user@destination:file.destination - secure
copy
- Screencast-O-Matic - record teaching presentation from
powerpoint
- scribus - good program to make posters
- sed 's/a/b/' file >newfile
substitute a to b in file
-i overwrites file instead of creating a new file
's/a/b/g' replaces all
occurrences on each line, not only the first one
take every third line:
sed -n "1~3 p" file
take every second line, starting from the second:
sed -n 2~2p file
insert a line before a certain line
sed '/$coord/i $esp_fit kollman/' file
delete the first line of file
sed -i -e "1d" file
delete the last line of file
sed -i -e "$d" file
delete lines with word REMARK:
sed '/REMARK/d' file
- setxkeymap SE - ger svenskt keyboard
- sftp - secure ftp
- showps - visar ps fil; alt gs
- showcase - presentations program (som PowerPoint)
- Source-Navigator " ... is a source code analysis
tool. With it, you can edit your source code, display
relationships between classes and functions and members, and
display call trees. You can also build your projects, either
with your own makefile, or by using Source-Navigator's build
system to automatically generate a makefile."
see more on http://sourcenav.sourceforge.net/index.html
To start this program, you only need to type snavigator
&
or create an icon with a link to /opt/bin/snavigator
if you feel more a graphical-oriented person.
- ssh
Normally it is best to use ssh -X to allow X-applications to
work.
The alternative is to use ThinLinc, see below (works with Mac).
keeping connection via ssh:
add to the $HOME/.ssh/config file
host *
ControlMaster auto
ControlPath ~/.ssh/ssh_mux_%h_%p_%r
Now you can open another terminal, and ssh and scp commands will
not ask for the password.
if you use mimer
using something like: ssh -J teok-vve@mimer valera@idun
will allow you to go immediately to your computer (especially
nice with combination to
the previous advice)
VV 18/3-20
- sshfs ulf@milleotto.lunarc.lu.se:/disk/global/ulf Milleotto
unmount with
fusermount -u mountpoint
- spartan - only on tjaste
- spdbv - SwissPDBViewer
http://www.expasy.ch/spdbv/mainpage.htm
- StarOffice: if disk is full; look at /var/tmp on oin
- sysinfo -vv - ger serial number
- systune rlimit_stack_max 805306368; reboot - sets a new
maximum limit for stack
- systune rlimit_rss_max 805306368; reboot - sets a new maximum
limit for memory
- Problems with running out of memory and swapping can be solved
by:
perl -e '$a[100000]=0;'
Increase the number of zeros until you get out of memory.
This should empty the swap space.
It did not solve problems when I tested it (e.g. changepdb
Killed).
- talloc -l 1G file - allocates 1 GB of data in file
- tar - make an archive
tar -xv file - extract the archive
tar -cvf archive_name directories - make an archive
- teo@signe,teoguest
- terminal: double click: Edit Profile "Shell", Mouse,
Characters: @-./_~?&=%+#
- testdisk - undelete files on a fat file system. Very powerful
- time command - gives the time to run a command
- time machine: marienas ulf F (ML 14/3-18)
1. Gå til System opsætning —> Time Machine
—> Disable automatic backup
3. Find din backup fil (*.sparsebundle) og slet den. Det kan tage lidt tid!
4. Gå til System opsætning —> Time Machine
—> Enable automatic backup
- /home/roos/Bib/teokem.bib
- /usr/local/teTeX/bin/texi2html
- ThinLinc is a software to simplify remote ssh X-terminal
export.
It is free to download from http://www.cendio.com/downloads/clients/.
Then you can connect to any computer and use X applications.
It works nicely with Macs, e.g. with rasmol.
- tiff:
convert filnamn -colorspace CMYK -compress LZW nyttfilnamn.tif
Convert pictures to figg with cmyk and LZW compression - the
best format for publication.
- timeslave -H signe - satter klocka efter signe (maste
vara root)
- timex - ger timing for foljande kommando
- /dev/tape
- Toolbar: stack tasks: Task Manager Settings - General -
Grouping and Sorting - Manally - By program name
- ulimit -s 102400 -- set the stack size to
100 MB, needed for statpt on Platon
- uname -R -- gives the version of the
operating system
- unix2dos - change line endings from unix to dos format
- unrar e x.rar -- extract an rar file
- vi
Set the function of the tab button:
:set tabstop=3 expandtab softtabstop=0 shiftwidth=3 smarttab'
:set number (get line numbers)
Replace a word:
- :s/foo/bar/ replace the first occurrence of the
word foo on the current line with the word bar.
- :s/foo/bar/g replace all occurrences on the current line.
- :%s/foo/bar/g replace all occurrences in the current file.
- :%s/foo/bar/gc ask before each
attempt to replace.
- vim - vi-like editor that can manipulate coloumns with cursor
arrows after ctrl-v
- vi :.,$-1d -- means delete from cursor to the penultimate
line
- www: The home page is now on mimer in /Shared/Ulf, see below
- X
startx - starts the windows manager
ctrl-alt-backspace - kills it
- xdrawchem - program to draw 2D molecules (struture formulae)
XDrawChem "... is a two-dimensional molecule drawing
program for Unix operating systems. It is similar in
functionality to other molecule drawing programs such as
ChemDraw (TM, CambridgeSoft). It can read and write MDL
Molfiles, and read ChemDraw text and binary files, to allow
sharing between XDrawChem and other chemistry applications,
and it can create images in popular formats like PNG and EPS.
"
see more on http://www.prism.gatech.edu/~gte067k/xdrawchem/
>From the command line xdrawchem &
Only with Mandrake-9.1 !!!
Jfr chemtool
- xdvi - show a dvi file.
- xfig - ritprogram; jfr chemtool
- xgrap; xgrapsc; screen dump; does not work
- xmaple
- xmgr - plot program; see also grace
- xv - image editing software; c.f. gimp and convert
- xxdiff - diff program for graphical files (linux) (alt.
fldiff, mgdiff)
ldd xxdiff
Other alternatives: Meld, Kompare
- winterm -name <namn> - ger nytt fonseter med namn
- yppasswd - change your password
- MSWord -> html: http://www.wvWare.com/wvOnlineDemo.html
- MSWord -> pdf: make a ps file and convert it to pdf by
ghostscript of ps2pdf
- $# Number of arguments
$0 Shell script name
$1 First argument
$@ All arguments
Some Linux information
You can change your keybord configuration by /usr/sbin/kbdconfig
(sometimes only arrow buttons works here)
It can also be changed in the file /etc/X11/XF86Config-4
The mouse configuration can be changed by /usr/sbin/mouseconfig
File systems:
ext2: old Linux
ext3: new Linux (journalising)
vfat: Linux compatible with windows 95/NT
Gersemi
The fileserver is installed (VV 26/1-18).
in order to NFS mount it:
/etc/fstab should have:
gersemi:/disk /gersemi nfs defaults 0 0
and you should create /gersemi directory, of course...
Then
sudo mount -a
Due to security - all computers (IP addresses) with nfs access
should be set - so, currently, only gefion can access gersemi.
if you give me the list of IP addresses - I will set them up.
KUbuntu Linux - change setup
- K-icon - Computer - System settings - Workspace appearance -
Window decorations - Plastic
- System settings - Workspace behavior - Screen edges - Uncheck
Maximize windows by dragging them to the top of the screen
- System settings - Window behavior - Window behavior - Titlebar
actions - Titlebar double-click - Lower
- Konsole - Settings - Configure current profile - Appearance -
Black on light yellow
- Konsole - Settings - Configure current profile - Advanced -
Characters considered part of a word when double clicking -
remove ":"
New Mac
Instructions from Mikael: https://github.com/teokem/guides
Use Migration assistant to update all files (No, I used TimeMachine)
Install first
XCode (from App Store)
Macports (from https://www.macports.org)
XQuarz (search on internet; needed for x-windows applications; not
mentioned by Mikael any longer; seems to apply only to Mac OS
10.5-7)
Programs can be installed by Homebrew brew .
brew search program
brew install program
Many MacOS applications can be installed with the --cask
keyword from the
command line with brew:
brew install --cask xquartz firefox libreoffice zoom
Before, we used MacPort (Xcode needed) instead.
Mikael recommends you NOT to install both.
If you do anyways, make sure the brew directory (/opt/homebrew/bin
) is first in your PATH variable.
port search program
sudo port install program
port puts the install files in /opt/local/bin
xemacs (only ports, but failed for new Mac)
Finally managed to download a usable version from
https://emacsformacosx.com
pymol also failed for the same reason
conda install -c schrodinger pymol
rasmol
gimp
xxdiff
gfortran
molden
Install by finding dmg files on internet
Firefox
Adobe Acrobat Reader
LibreOffice (Vanilla can be bought in AppStore; Does not
work)
SeaMonkey
MsWord (from LU, see Mikael's page)
Mendeley (does not work in Word)
Muscore
Maestro (fungerar inte)
To get Fortran: install the latest version of gcc (e.g. sudo port
install gcc7)
brew install gfortran
On the M1 you can run x86 binary command line tools through
Rosetta emulation. This is done automatically and in the
background. To see if a file is arm or x86, use file <executable>
Wacom
PainterEssentials
VPN (to be able to use LU services, e.g. get pdf files) LU support -
Nätverk/VPN; note that use costum install, only VPN) Now:
FortiClient
After a system update, you typically have to update Xcode and
MacPort and then reinstall all programs again,
Copying files from local disk on Lunarc
Följande text är tagen från Lunarcs User's Guide och gäller för
Platon. På Alarik ska motsvarande fil heta
$SNIC_TMP/slurm_save_files, dvs. "slurm" istället för "pbs", och där
kopieras filer/kataloger även på slavnoder.
Saving local files
If a job is terminated prematurely, for example, if it exceeds the
requested walltime, the files on the local disk (in $SNIC_TMP) will
be lost. Files that would still be useful can be listed in a special
file $SNIC_TMP/pbs_save_files. Filenames are assumed to be relative
to $SNIC_TMP and should be separated by spaces or listed on separate
lines. These files will be copied to $PBS_O_WORKDIR regardless
whether the job ends as planned or is deleted, unless there is a
problem with the disk or node itself. For parallel jobs, only files
on the master node will be
copied. Note that this feature is unique to Lunarc.
Magnus 12/9-12
Backup of /home
Subject /home daily backup
From Francesco Aquilante
Date: Mon, 08 Mar 2004
Hi everybody,
backups of your home directories are now available on signe.
Those are only "incremental" backups, taken daily (during
the night),
thus they only contain files which have been modified within the
last 24 hours.
The backups are located in /garmhome/backup on www.
Each directory on this filesystem is named Garm-xxxxxxxx
where xxxxxxxx indicates the date of backup (yesterday's backup, for
instance
is named Garm-20040308). In each of these directories you will find
the file
$USER.tar.gz which corresponds to the daily backup of
your home directory (as long as
you modified any file that day... actually the day before that date,
to be precise!).
OBS!!! The filesystem that hosts the backups is mounted as
read-only. This means that if you want
to operate on the archives (extract, for instance) you need to copy
them somewhere else (scp from www is allowed).
As a rough estimate, you should be able to recover files directly on
this filesystem if modified
not earlier than 1 month ago. If you need older versions of your
files as well as files that
have not been modified within last month, then you should contact me
in order to recover them from the tapes.
backups of your home directories are now available on signe.
Those are only "incremental" backups, taken daily (during
the night),
thus they only contain files which have been modified within the
last 24 hours.
Regards,
-francesco
Date: Fri, 20 Sep 2002 11:35:37 +0200
From: "Francesco 'Roos Guest'" <francesco@signe.teokem.lu.se>
Subject: no more "tilda files" using vi editor
Hejsan Teo,
there has been a lot of gossip about these annoying backup files
generated after any minor saved change in the text using vi editor.
Finally, Ifound out how to get rid of this "clever" default. It is
very easy indeed. Just looking at the man page
of vi, I've been guided to the file
/usr/share/vim/vimrc
copying this file in my home dir. with the name .vimrc and making
the following "brutal" changes
"if has("vms")
" set
nobackup " do not
keep a backup file, use versions instead
"else
" set
backup "
keep a backup file
"endif
set nobackup
thus commenting that conditional statement and setting the default
tonobackup,"tilda files" disappeared !!
Likewise, you avoid the stupid indent default by the following
change:
"set
autoindent " always
set autoindenting on
set noautoindent
setenv MP_SET_NUMTHREADS 2
/etc/aliases
There exist a default .profile in /etc/profile.
/teo/etc/profile
The mail services seems to work as it should. If you want your mail
from garm to be re-directed to signe you must create a '.forward'
file in your home directory on garm. In that file you write on
the first row:
username@signe.teokem.lu.se
For those of you who are interested in using Swedish letters, make
the following modification in netscape.
When you have netscape running, go to the edit menu and choose
preferences/Mail and Groups/Messages/more options
under the square with 'send messages .....'
klick on 'using the "quoted printable"......'
The default maxium memory usage for a single processor in IRIX is
512 MB
To get beyond 512MB one needs to increase the kernel
parameter shmmax to the desired level.
You then need to re-build the kernel and reboot with this new
kernel.
Date: Mon, 30 Sep 2002 10:29:50 +0200
From: "Francesco 'Roos Guest'" <francesco@signe.teokem.lu.se>
Subject: Helper Applications in Netscape... thus on-fly PDF and more
!!!
Hi everybody,
Some of us (not Valera!) were looking for the way to open a PDF or
PS file
while browsing the net with Netscape. One of the simplest ways to do
it is to configure the "Helper Applications" :
Edit -> Preferences -> Navigator -> Helper
Applications -> New Type
I suggest you to add the following MIME types (be sure to specify
them according to the scheme!)
Regards,
-francesco
APPLICATION
---------------------------------------------------------------------
PDF
application/pdf
/usr/bin/xpdf
PS
application/postscript /usr/bin/ggv
DVI
apllication/x-dvi
/usr/bin/xdvi
XLS
application/vnd.ms-excel /usr/bin/gnumeric
DOC
application/msword
/usr/bin/kword
BMP
image/bmp
/usr/bin/kview
MPG
video/mpeg
/usr/X11R6/bin/xmovie
----------------------------------------------------------------------
For further information see also the following and related pages:
http://fredrik.hubbe.net/plugger.html
http://linux-sxs.org/mozillaonlinux.html
http://www.adobe.com/support/techdocs/142ba.htm
Lycka till,
/Francesco
You can now retrieve your own files yourself. The procedure is very
simple:
1) login on signe
2) > export DISPLAY=your.display
3) >nwrecover
This will give you a graphical interface were you can mark the file
you wish to recover.
You will be able to retrieve files that are several months old. The
first backup available through nwrecover is a full backup taken on
the 19th.
nwrecover will prompt you weather you'd like to overwrite the
existing file or not.
If not it will put the file in the same location with a .R
extension.
The latest ssh2 has been installed in ssh1 compatibility mode,
meaning there should be no problem with login to and
scp (use the command scp2 -1) from machines running only ssh1.
ex. scp. if I want to copy a file from embla to my directory on
my local temp1 disk
scp2 -1 username@embla:/usr/people/username/filename
/temp1/username/
NOTE : Remember to take away all you alias and so on concerning
location of ssh, ssh1, ssh2.
You just have to type ssh and automatically the correct ssh is
used.
ROOT 30/5-01
lp -dps -c -o number-up=2 -o sides=two-sided-short-edge
lp -dps -c -o sides=two-sided-long-edge
Making the presentation using a projector without a laptop.
(c) Juraj Raab & Valera Veryazov, 2004
Stage I. Preparing the presentation
Prepare your presentation in ps or pdf format, Login to
pc.teokem.lu.se (uid scanner)
convert t.pdf -size 1024x768 a%02d.jpg or
convert t.ps -size 1024x768 a%02d.jpg
To rotate portrait-oriented slides to landscape type
convert a*.jpg -rotate "90<" %02d.jpg
rm a*.jpg
(landscape pictures will be intact)
Stage II. Moving the presentation to memory stick
The card reader is plugged into the machine 'lage', in the same
room where the Windows machine is (non smoking room).
Mount the card reader
mount /mnt/reader No longer needed.
mkdir /mnt/reader/Ulf
cp *.jpg /mnt/reader/Ulf
umount /mnt/reader
Stage III. Performing the presentation
Plug the memory stick into the projector. Press the Menu button,
navigate to the Picture Viewer mode. Navigate into your directory
on the memory stick, come to the first slide, 'enter', select
'Full Screen'. Use cursor keys 'left' and 'right' on the remote
control for navigation.
Stage IV. After the presentation
Take out the card, plug it back to the reader, mount it again and
remove your presentation from the card. Leave the card in the reader
for others to use.
A small addition to these instructions for users of OpenOffice/StarOffice.
Pdf files from OpenOffice/StarOffice seems to have some small
problem with convert, so first use
pdf2ps on your pdf then use convert on the ps file and everything works fine.
pdf2ps myfile.pdf
(this gives myfile.ps)
This is a short instruction how to set up Thunderbird as a default
mail program.
1. run gconf-editor
2. Navigate to /desktop/gnome/applications/url-handlers/mailto
3. edit the "command" field and change it's value to "thunderbird %s"
"enabled" should be checked, "needs_terminal" unchecked.
Valera 081104
Hi,
after several years of wondering why we needed to have a windows
machine in order to
use the scanner, somebody solved the riddle...
The almost "Fil. Mag." Kristoffer Lundgren has finally got the
scanner working under
linux (Slackware) and he is now going to explain you how to use it:
First you log in as user "scanner" with the password xxx (notice
the upper case on the password).
Then you start XSane by clicking the icon on the desktop (which has
a Beer icon associated with it thanks
to Francesco) and start scanning. First aquire a preview, then do
the
real scan when you have marked what
areas to scan etc. XSane allows quite a few more adjustments, but
for that read the manual.
Save your file/picture somewhere under /temp1. To reach the
picture/s from your workstation, simply
use scp, ie
kristoffer@hugin: scp scanner@pc:/temp1/my_pic.ending .
Got to know:
1) Only from our network it is possible to reach pc.teokem.lu.se but
not the other way around.
Btw, the only user is "scanner"
2) It is possible to reboot the machine to Windows (freshly
reinstalled with service pack2).
OBS!! unless unavoidable, if you restart the computer under
windows UnPlug the network cable!
3) /temp1 is readeable also under Windows, so it can be used
to
transfer files to and from that machine !!
4) the only account under windows is "Guest" and is passwordless
5) besides the OS itself, the only softwares installed under Windows
are acrobat and firefox
Finally,
to prove that the scanner works, we attach a sample picture. As you
can see, it seems that under Linux
the scanner works fine and can even make people look younger ...
upon request!
Glad Påsk,
Kristoffer & Francesco 050323
Hi,
as the webserver of TeoKem has been moved from signe to a new machine,
you might want to move your personal webapages to the new location.
How to do it?
tar -cvf pub.tar public_html
scp pub.tar
ulf@mimer:/home/ulf
ssh mimer (special password)
ssh www (same password as on
local system)
scp mimer:pub.tar .
tar -xvf pub.tar
No: now you have to login to www (via mimer) and scp from there
directly to your local computer.
scp
ulf@gefion.teokem.lu.se:/home/ulf/public_html/Methods/* .
1) create a tar-ball (zipped) of your public_html directory contents
on signe:/teo/$user/public_html/
2) scp this file to mimer
3) from mimer: ssh
www
(www is the new webserver,
accessible through ssh only from mimer)
4) on www:
scp mimer:mytarball .
mkdir public_html
5) extract to content of the tar-ball in your public_html
So the location of your webpage will simply
be at /home/$user/public/html
Best regards,
-francesco 050328 and 29
bup ska vara exekverbar
nobup är listan med kataloger som utesluts (gäller även
underkataloger),
ska ligga i din hemkatalog (eller så ändrar du platsen i bup)
mvh patrik
Dear Teo,
I was asked (several times) about a problem with configuration of
thunderbird as a default mail program.
Without such set up - if you click on a mail link in firefox - a
strange screen with 'evolution' configuration
appears..
So, this is an instruction:
In Firefox's Location (URL) Bar, enter
"about:config"
and then press <enter>
# With the cursor in the body of the resulting page, <right-click> the mouse.
# From the pop-up menu, select "New".
# From the next pop-up menu, select "String".
# In the pop-up dialog box "Enter preference name", enter
"network.protocol-handler.app.mailto" (without quotes), and click
"OK"
(You might wish to cut-and-paste that phrase to ensure correct spelling).
#
In the pop-up dialog box "? network.protocol-handler.app.mailto",
enter "/usr/bin/thunderbird"
Best,
Valera
(070102)
#!/bin/sh
#======================================================================
#
# Shell script that does full/incremental backups /home/$USER
# revision 020318
#
#======================================================================
#
# Setup
#
SCP='no'
HOST='atle'
USER="patrik"
SDIR="/home/$USER"
TDIR="/backup"
RDIR="/biobig/patrik/laptop-backup"
TIME="$SDIR/.bup_time"
DATE=$(date "+%Y%m%d.%H%M%S")
if [ -r "$TIME" ]
then
TARGET="$TDIR/backup.$DATE.inc.gz"
MODE="inc"
else
TARGET="$TDIR/backup.$DATE.full.gz"
MODE="full"
fi
#
# Save some dot files
#
cd $SDIR
for file in `/bin/ls -F -d .[a-z]* .[A-Z]* | grep -v '/' | sed 's/\*//' | sed 's/@//'`
do
cp $file "Save/x$file"
done
#
# Create list
#
LIST=""
cd $SDIR
for x in `/bin/ls -a`
do
if [ "$x" = 'Install' ]
then
:
elif [ "$x" = 'Cache' ]
then
:
else
LIST="$LIST$x "
fi
done
#
# Print information
#
echo "Source directory: $SDIR"
#echo "Target directory: $TDIR"
echo "Target file: $TARGET"
echo "List: $LIST"
#
# perform backup
#
if [ "$MODE" = 'full' ]
then
cd $SDIR
echo "Backup mode: Full"
echo "Wait ..."
find $LIST -type f | tar -cz -X $SDIR/nobup -T - -f $TARGET
touch $TIME
else
cd $SDIR
echo "Backup mode: Incremental"
echo "Wait ..."
find $LIST -type f -newer $TIME | tar -cz -X $SDIR/nobup -T - -f $TARGET
touch $TIME
fi
ls -l $TARGET
#
# Copy to server, if possible
#
if [ "$SCP" = 'yes' ] ; then
scp $TARGET $LOGNAME@$HOST:$RDIR
ssh $HOST -l $LOGNAME ls -l $RDIR
else
if [ -w "$RDIR" ] ; then
echo "Copying $TARGET to $RDIR ..."
cp $TARGET $RDIR
fi
fi
#
# Done
#
exit 0
.
..
Install
*.mp3
*.ogg
.Trash
Cache*
klblf0p0.default
.shosts
.thumbnails
Patrik, 070619
Hej på er
Här följer en samling blandade tips och tricks jag samlat på mig under åren här.
Program som nämns nedan är:
ps2eps
convert (imagemagick)
pdfjoin
openoffice
pymol
scribus
eps2eps
Rotera ps och konvertera till eps
ps2eps -f -R + -g -s a4 input.ps output.eps
bra för att ta hand om eps från gnuplot
Konvertera bilder till tiff med cmyk och LZW kompression - bästa format för publicering
convert filnamn -colorspace CMYK -compress LZW nyttfilnamn.tif
Sammanfoga flera pdf-filer till en enda i bestämd ordning och gör till a4 samtidigt
pdfjoin filnamn1 filnamn2 filnamn3 --fitpaper false --paper a4paper --outfile allt.pdf
Hur man skapar numrerade formler i Openoffice Writer
skriv "fn" först på en rad, tryck sedan F3.
kommandon för högupplöst bild för tryck i pymol (konverteras sedan lämpligen med convert till tiff)
ray 3000x4000 (eller nåt sånt)
png filnamn.png
gör alignment och beräkna rmsd av två strukturer av samma molekyl i pymol
skriv följande kommande med de residue ids du vill aligna och
struct1 och struct2 är namnen på de två strukturerna i pymol
fit (struct1 and resi 1-3), (struct2 and resi 1-3)
Göra posters grafiskt
använd programmet scribus
Rensa epsfiler till renare filer
eps2eps filnamn.eps nyttfilnamn.eps
Program för att hålla reda på projekt, anteckningar, tips m.m.
Zim (desktop wiki)
The ps printer has problems
printing certain PDF files. When this happen the cue to the printer
locks and one can't print. So please try to print
PDF's on a different printer.
If you can't print with lp -dps filename try the following.
Go to the following address
http://ps.teokem.lu.se/hp/device/this.LCDispatcher?nav=hp.Print
and follow the instructions.
Jimmy Heimdal, 080904
Subject:
Multi-Machine
Dear All!
The new Printer/Scanner/Copier is now installed and ready to be
used, the default settings might be changed later so it is a
good idea to do printer profiles on your computer.
It is five times more expensive to print in colour than BW, so
please only use colour if you really need it.
The printer has the IP 130.235.71.66 and is called Ricoh Aficio
MP C5501 PS and if you have the user rights to do so you can now
add the printer to your computer.
I will print some easy How-To and put on the wall for guidance,
but everything is pretty straightforward.
When you scan and send as mail the sender is scanner@fkem1.lu.se and
the subject isMessage from "RNP0026731BCCFA".
For your convenience I advice you to add your address to the
address book so you do not have to write it every time.
Settings for scanning can be changed on the screen, Scan
Settings situated in the upper left corner.
You can save to folder but not USB or SD card, please tell me if
you like to have this feature, personally I find scan to E-mail
easier to use.
To add you address on the scanner:
In the left row press the physical button marked '123' (the
first button),
From now on use the On-Screen Menus.
Press 'System Settings',
Press 'Administrator Tools' (to the right) and then Address Book
Management in the left sub meny,
Then press 'New Program' (to the right) and then add information
by pressing Change for Name, Key Display and also 'Select Title'
so you easily can find you address. e.g.for Hirst this button is
GH.
Press OK (upper right corner)
Then press E-mail (top and middle), Change and write you E-mail
address.
Press OK twice, and then Exit three times.
Kind regards
Christopher Hirst (via Ingrid 15/4-11)
If you have any
problems I suggest that you contact Per-Olof or Valera. /
Torbjörn
New Laptop
Move from old haddisk
MacPorts (Xcode?)
xemacs
rasmol
gimp
xxdiff
gfortran
firefox
OpenOffice
snood
Stellarium
Fastest Free YouTube Downloader
MsOffice
New account
mimer
/temp4
csh
xxdiff (fldiff)
sshfs
vim
rasmol
gimp
Please, remember to set up an account on mimer, make directories
on the /temp and /away disks, install the programs we usually
miss: csh, xxdiff, sshfs, and vim, and update vi.
Problems with emacs fonts
add
emacs*font: 7x14
to ~/.Xdefaults
and execute
xrdb -merge ~/.Xdefaults
Tips from Valera (18/3-20)
1. keeping connection via ssh.
edit $HOME/.ssh/config file
and add:
host *
ControlMaster auto
ControlPath ~/.ssh/ssh_mux_%h_%p_%r
Now you can open another terminal, and ssh and scp commands will not ask for the password.
2. if you use mimer
using something like: ssh -J teok-vve@mimer valera@idun
will allow you to go immediately to your computer (especially nice with combination to
the previous advice)
If you want to forward graphical applications, use ssh -X -J ...
3. using thunderbird client to read e-mails. Since some of you asked me about alternatives for webmail.
Install thunderbird and create a new email account,
set incoming mail server: imap.lu.se
port 993, security SSL/TLS
Outgoing server: smtps.lu.se
port 587, security STARTTLS
password - normal (thunderbird autodetects this)
User name: LucatID@lu.se (e.g. teok-vve@lu.se), and your usual password
Good commands to tidy up
gzip -r *
rmtilde
chmod -x *.gz
chmod -x */*.gz
chmod -x */*/*.gz
chmod -x */*/*/*.gz
chmod -x */*/*/*/*.gz
chmod -x */*/*/*/*/*.gz
chmod -x */*/*/*/*/*/*.gz
chmod -x */*/*/*/*/*/*/*.gz
chmod -x
*/*/*/*/*/*/*/*/*.gz
chmod -x
*/*/*/*/*/*/*/*/*/*.gz
chmod -x
*/*/*/*/*/*/*/*/*/*/*.gz
chmod -x
*/*/*/*/*/*/*/*/*/*/*/*.gz
chmod -x
*/*/*/*/*/*/*/*/*/*/*/*/*.gz
chmod -x
*/*/*/*/*/*/*/*/*/*/*/*/*/*.gz
find * -name gradient.gz
-delete
find * -name g1.gz -delete
find * -name
diff_dft_density.gz -delete
find * -name
diff_dft_oper.gz -delete
find * -name diis_errvec.gz
-delete
find * -name diis_oldfock.gz
-delete
find * -name diff_densmat.gz
-delete
find * -name diff_fockmat.gz
-delete
find * -name dens_cao.gz
-delete
find * -name force1.gz
-delete
find * -name force2.gz
-delete
find * -name job.[0-9]*.gz
-delete