SSH no password connection: ssh -XYC
olga@pktloginNOSPAMPLEASE.phy.tu-dresden.de
origin -->
http://www.linuxproblem.org/art_9.html
How to do it:
First log in on A as user a and generate a pair of authentication keys. Do not enter a passphrase:
a@A:~> ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/a/.ssh/id_rsa):
Created directory '/home/a/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/a/.ssh/id_rsa.
Your public key has been saved in /home/a/.ssh/id_rsa.pub.
The key fingerprint is:
3e:4f:05:79:3a:9f:96:7c:3b:ad:e9:58:37:bc:37:e4
a@A
Now use ssh to create a directory ~/.ssh as user b on B. (The directory may already exist, which is fine):
a@A:~> ssh
b@B mkdir -p .ssh
b@B's password:
Finally append a's new public key to
b@B:.ssh/authorized_keys and enter b's password one last time:
a@A:~> cat .ssh/id_rsa.pub | ssh
b@B 'cat >> .ssh/authorized_keys'
b@B's password:
From now on you can log into B as b from A as a without password:
a@A:~> ssh
b@B
A note from one of our readers: Depending on your version of SSH you might also have to do the following changes:
Put the public key in .ssh/authorized_keys2
Change the permissions of .ssh to 700
Change the permissions of .ssh/authorized_keys2 to 640
New location of working analysis:
/home/olga/IKTP/HiLum/ROOTStuff/try/bin
git instructions
sudo apt-get install git git-gui
emacs .gitignore
git init
git status
git add src cmake
CMakeLists.txt
git status
to delete: rm -rf
CMakeFiles -r
emacs .gitignore
To commit: git commit
git config --global user.email
olga.novgorodova@tu-dresdenNOSPAMPLEASE.de
git config --global user.name olga
git commit
GUI vertion: gitk
changed for printing - to bring it back for IKTP printing.
sudo emacs -nw client.conf
Mounted IKTP windomain:
olga@olga-ThinkPad-T410s:~$ sudo mount -t cifs //windomain.iktp.tu-dresden.de/e-labor/ /home/olga/E-Labor -o username=olga
Synchronize data from laptop to CERN:
rsync -a .
olga@lxplusNOSPAMPLEASE.cern.ch:/afs/cern.ch/work/o/olga/TB_Protvino_rsync/try
rsync -a . /media/TRANSCEND/IKTP/ROOTStuff/try/.
How to: Double vector in
ROOT *
/media/KINGSTON/IKTP/Hits_tree/klass.c (h) is here
If you have such declaration in header file:
vector<vector
> *hittile_energy;
If you try to print it out do rereferencing of the vector:
for (Long64_t jentry=0; jentry<10;jentry++) {
Long64_t ientry = LoadTree(jentry);
if (ientry < 0) break;
nb = fChain->GetEntry(jentry); nbytes += nb;
std::cout << "entry: " << jentry << std::endl;
std::cout << "i-size: " << hittile_energy->size() << " " << std::endl;
for (size_t i =0; i < hittile_energy->size(); ++i) {
std::cout << "j-size: " << (*hittile_energy)[i].size() << " " << std::flush;
for (size_t j =0; j < (*hittile_energy)[i].size(); ++j) {
std::cout << "["<<i<<";"<<j<<"]=" << (*hittile_energy)[i][j] << "GeV @" << (*hittile_eta)[i][j] << "," << (*hittile_phi)[i][j] << "," << (*hittile_side)[i][j] << "sample" << (*hittile_sample)[i][j] << " " << std::flush;
}
std::cout << std::endl;
}
std::cout << std::endl;
}
For header file input after includes:
#ifdef MAKECINT
#pragma link C++ class vector<vector >+;
#pragma link C++ class vector<vector >+;
#endif
How to fix fit function "resolution"
fit_function->SetNpx(5000);
How to connect to E-labor
less /etc/passwd | grep olga
less /etc/group | grep olga
sudo mkdir E-Labor
sudo mount -tcifs //windomain.iktp.tu-dresden.de/IKTP$/E-Labor /home/E-labor -o username=olga,uid=1000,gid=1000
How to configure a CERN printer // ubuntu Scientific Linux (4,5)
I successfully configure the printer near by our office (40-rd-hpcor) in buntu using CUPS.
CERN
open a webbrowser
goto localhost:631
goto administration
choose "add printer" (or something similar depending on your cups-version and language settings)
choose "other network printers (...) LPD"
lpd://12-1-cor.print.cern.ch/12-1-cor (replace 12-1-cor appropriately for other printers)
the rest is straight forward … choosing the driver you might have several good-looking options … try out what's best (or ask aunt G)
for 12-1-cor I recommend (and tested) the driver which is also recommended in cups. for debian it is installed with the hplip package
change the printersettings to tell cups that a duplex unit is installed
Print in DESY or TU Dresden
create or correct next file as root :
sudo emacs /etc/cups/client.conf
#for TU Dresden IKTP
ServerName 141.30.85.67
#for DESY HH
cups-hep.desy.de
restart cups service:
sudo /etc/init.d/cups restart
Unexplained Segmentation fault
In case of work with arrays - sometimes memory used have to be increased by next command:
ulimit -s 500000
cc| | | | | | | |
[largrod4] /home/rod4[largrod4] /home/rod4 > /sbin/route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.123.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 192.168.3.1 0.0.0.0 UG 0 0 0 eth1
> /sbin/route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.123.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 192.168.3.1 0.0.0.0 UG 0 0 0 eth1
Fingerabdruckleser
Fingerprint GUI (libfprint)
Auf der Seite des Fingerprint GUI PPA ist eine Liste der unterstützten Leser zu finden. Bei der Identifikation des eingebauten Lesers hilft der Befehl
lsusb
Zu installieren sind folgende Pakete aus dem Fingerprint GUI PPA:
libbsapi
policykit-1-fingerprint-gui
fingerprint-gui
sudo add-apt-repository ppa:fingerprint/fingerprint-gui
sudo apt-get update
sudo apt-get install libbsapi policykit-1-fingerprint-gui fingerprint-gui
Wichtig: zur Deinstallation bitte unbedingt die Hinweise auf der PPA-Seite beachten!
Technische Details finden sich über die Projektseite bzw. im Step-by-Step- Manual. Die Benutzung ist im User Manual beschrieben.
Sollte man beim Registrieren eines Fingers in einer "Scan Loop" landen und einen Fingerprint Reader von Upek mit der USB ID 147e:2020 verwenden (z.B. im T530 verbaut), dann kann es nötig sein, zu den oben genannten Schritten noch ein weiteres Repository einzubinden, das eine dafür angepasste libbsapi enthält:
sudo add-apt-repository ppa:fingerprint/fingerprint-gui-experimental
sudo apt-get update
sudo apt-get upgrade
* Emacs triks for formatting *
Emacs - remove rectangle - CtrlX - r k
Add in some rectangle shape - CtrlX r t and type what to put inside.
To format all spaces and tabs in emacs - !!!! - CtrlX h --> will select all --> then press CtrlAlt Tab
* *
ssh olga@lxplusNOSPAMPLEASE.cern.ch
vncserver -geometry 1920x1150 :3
on the laptop itself:
vncviewer -via lxplus.cern.ch lxplus0219:3
or this geometry --> -geometry 1350x700
install: TightVNC
vncviewer --help
TUDresden grid certificate:
- 28.08.2013 How to set network though the gateway
/etc/resolv.conf -
search desy.de
nameserver 131.169.40.200
nameserver 131.169.194.200
/sbin/route
sudo /sbin/route del default gw ......
sudo /sbin/route add default gw 192.168.4.251
- 22.08.2013 How to send programm in backup
here are two examples:
a) nohup ./program > out 2>&1 &
b)program > out 2>&1
^z
jobs
disown %
- 22.08.2013 Solved problem with space on windows7 at lenovo TUD computer
There was "RRBackup" folder in the /media/sda2 drive - corresponding to the C: disc it keeps the backup of 26 Gb hidden from the user.
In the save mode one can see this folder, but it is locked even for administrator and you can not see files and to delete.
Ubuntu did not start on lenovo.
We opened knoppix and deleted this folder by command:
>rm -rf RRbackups
Now I have 36 Gb free. Restarting of computer showed no difference in work on the PC up to now.
20Gb was cut from the disk and converted to extendable disk and ubuntu was installed without problem over it.
- 19.08.2013 Solved problem with emacs in ubuntu
After lookin in the internet found easy and good solution, which involved creating the file ~/.Xdefaults with the line
Code:
emacs*font: 7x14
and then running
Code:
xrdb -merge ~/.Xdefaults
I tried it in the ssh directly and in my own laptop plus I put the last command to .bashrc - works.
TUD Latex Presentations
To make latax presentation I downloaded beamer from - http://tu-dresden.de/service/publizieren/cd/4_latex/index.html
I saved it in the Desktop/TUD_latex folder, changed file bspBeamer.tex and to create the dvi file just run latex over this file. The output file I just converted to pdf and watched, I got the pdf of the presentation in TUD style. I have to keep it like this.