--------------------------------------------------------------------------------- Jan 30, 2012 How to clear the Java cache. This happens in Ubuntu > 11.04 /usr/bin/javaws -Xclearcache --------------------------------------------------------------------------------- Sept 14, 2011 how to mount a ntfs disk do $ sudo fdisk -l (to find out where it is) $ sudo mkdir /media/mydata $ sudo ntfs-3g /dev/(disk drive where fdisk pointed to) /media/mydata --------------------------------------------------------------------------------- Sept 11, 2010 Worked in Lucid. How to create a separate virtualized copy of the software system in case you screw things up with it: ubuntu@ubuntu:~$ sudo mkdir /mnt/root ubuntu@ubuntu:~$ sudo mount -t ext4 /dev/sda4 /mnt/root ubuntu@ubuntu:~$ sudo mount -t proc none /mnt/root/proc ubuntu@ubuntu:~$ sudo mount -o bind /dev /mnt/root/dev ubuntu@ubuntu:~$ sudo chroot /mnt/root /bin/bash Then fix whatever you need to. --------------------------------------------------------------------------------- Jun 20, 2010 In Karmic, allow ability to dim screen. 1. Edit grub start configuration /boot/grub/menu.lst to include i915.modeset=0 in the kernel line, for example: title Ubuntu 9.10, kernel 2.6.31-22-generic uuid 21b36af0-8e1c-4649-bbb2-41cde72f1481 kernel /boot/vmlinuz-2.6.31-22-generic root=UUID=21b36af0-8e1c-4649-bbb2-41cde72f1481 ro quiet splash i915.modeset=0 initrd /boot/initrd.img-2.6.31-22-generic quiet 2. then run: xrandr --output LVDS --set BACKLIGHT_CONTROL native --------------------------------------------------------------------------------- Jun 20, 2010 How to fix compiz-youtube incompatibilities: Disable compiz or keep pressed right button while using youtube icons. --------------------------------------------------------------------------------- Dec 3, 2009 How to start synergy server and client. The server: bostonterrier-[/etc]> synergys -f --address 137.138.26.60:30000 --config /etc/synergy.conf where -f means do not start as deamon, :30000 is the port of the host (137.138.26.60 = bostonterrier) and synergy.conf is a config file containing something like: section: options screenSaverSync = true end section: screens slc4: ubuntu: end section:aliases slc4: bostonterrier ubuntu: ecarrera-laptop end section: links slc4: left=ubuntu ubuntu: right=slc4 end For the client: ecarrera-laptop-[~]> synergyc -f bostonterrier:30000 ---------------------------------------------------------------------------------- Nov 9, 2009 In order to export certificates from a browser to a different one, go to Preferences->Advanced->Certificates and export them. ---------------------------------------------------------------------------------- July 23, 2009 Command line quick change in a list of files example: cmslpc07-[panchos_code/submit2uaf]> foreach k ( `grep -r "yumiceva" * | awk -F ":" '{print $1}'` ) foreach? sed -ie 's#yumiceva\@fnal.gov#ecarrera@fnal.gov#g' $k foreach? end ---------------------------------------------------------------------------------- June 13, 2009 In Jaunty, after the sound is gone when coming from Suspend/Hybernate do: $ sudo alsa force-reload -------------------------------------------------------------------------------- May 5, 2009 How to change the colors of the prompt in your shell (tcsh): #Custom Prompt settings set prompt = "\n%{\033[1;31m%}%B%m-[%c2]> %b%{\033[0m%}" #This is the key. Google it! #Star with \n% #{\033[34m%} color signal 34:blue, 1:31 is brown #%B make bold - %b stop bold #%m host till the first . #%c2 currect dir display depth 2 -------------------------------------------------------------------------------- May 5, 2009 In order to change the colors of the folders and files: 1. $> cp /etc/DIR_COLORS ~/.dir_colors 2. edit the .dir_colors file following the instructions therein -------------------------------------------------------------------------------- April 4, 2009 In Ubuntu Intrepid Ibes, in order to manipulate the exposure, brightness, etc of my Quickcam from Logitech, i did: 1. Download xawtv combo 2. Use the command: $> v4lctl setattr Gain 30 in order to set acceptable values. Other values are Exposure for example. 3. This settings will be gone upon powercycle of the machine so they need to be adjusted everytime the webcam is used. -------------------------------------------------------------------------------- March 24, 2009 How to translate the keys in file ~/.ssh/known_hosts : In Ubuntu, this file is cryptic so we need these commands in order to translate (or delete) keys. 1- This will delete the entry for the host $ ssh-keygen -R [hostname or IP] 2- This will display the entry $ ssh-keygen -F [hostname or IP] -------------------------------------------------------------------------------- January 19, 2009 How to run a root macro with arguments: $> root -l 'eraseme.C("hola")' | |__ watch that there is no spaces here. -------------------------------------------------------------------------------- January 19, 2009 In order to search for books in SPIRES do: find dk books and a dk: desy keyword :-) -------------------------------------------------------------------------------- January 19, 2009 How to remove jobs that cannot be deleted by qdel: Try this on d0mino01,02,03 $> purge_job #.d0cabsrvX.fnal.gov where # is the job number and X is the cabsrv number (1,2) -------------------------------------------------------------------------------- January 19, 2009 In order to locate files in Linux, it is always necessary to do: $> updatedb first -------------------------------------------------------------------------------- January 19,2009 How to check the tags of a package in CVS CVS history -Tan -------------------------------------------------------------------------------- January 19, 2009 How to use C++ debugger gdb: For example, for debugging CAFE code: $> gdb cafe gdb> run configs/config.config see error and then you can ask: gdb> where -------------------------------------------------------------------------------- January 19 2009 I seem to always forget this command. In order to find files in Linux: - For current directory and any subdirectory $> find -name 'mypage.html' - Any file in root dir or subdirs $> find / -name 'file.html' - Also you can use $> find -name 'file*' ------------------------------------------------------------------------------- June 22, 2008 After changing the password in Ubuntu Hardy Heron, the keyring manager prompts to enter a password. This is because it uses a different password and it is not updated automatically when you change your account password. The solution is to go to System->Preferences->Encryption and Keyrings and change the password there. In Ubuntu Intrepid Ibex, this changed to Applications->Accesories->Passwords and Encryption Keys. Do: Open a terminal run "seahorse" from the command line - under "Edit" select "Preferences" - click on "login" in the "Password Keyrings" box - click on "Change Unlock Passoword" - change your password and save... In Karmic: - right click in the first/only folder that appears and change password ------------------------------------------------------------------------------------- May 26, 2008 How to add number to lines in REVTEX4 (line numbering) in latex 1. Download "lineno" package from the web. 2. Add \RequirePackage{lineno} BEFORE the \documentclass statement 3. Add \linenumbers wherever you want the numbering to begin. ------------------------------------------------------------------------------- May 26, 2008 How to get eps files compiling a latex file. For example, how to wrap around a table so it can be viewed as an image. Capture tables, figures in eps. Use the dvips command: dvips -Ppdf -E -o ------------------------------------------------------------------------------- May 26, 2008 How to use dvips to make a proper letter size pdf document You have to use % dvips -Ppdf -t letter ------------------------------------------------------------------------------- May 26, 2008 To install CERN's ROOT in Ubuntu 8.04 (Heron) I went to: http://mirror.phy.bnl.gov/debian-root/ubuntu/ and followed the instructions there. It was successfully installed despite the error in the signature verification. ------------------------------------------------------------------------------- May 26, 2008 How to kerberize your ubuntu machine to work at FNAL. These instructions worked for Heron. 1. Download/install package ssh-krb5 2. Downaload/install package krb5-user 3. Edit /etc/krb5.conf to work with FNAL.GOV. You can get the configuration file here: http://www.fnal.gov/docs/strongauth/krb5conf.html. or get it from a clued0 machine which has one already working (recommended). IMPORTANT NOTE: I first moved /etc/krb5.conf to /etc/kerb5.conf.default. 4. Done, it should work now without any hazzle. 5. In lucid lynx ubuntu 10.04, I had to add the line "allow_weak_crypto = true" to the [libdefaults] in /etc/krb5.conf ------------------------------------------------------------------------------------------------------------ April 17, 2008 How to kill vncserver (how to kill vnc server): do vncserver -kill ocala-clued0:1 (where 1 is the number of the display) If this does not work do: 1) ps -ef (to check Xvnc session pid) 2) kill -9 "Xvnc pid" 3) delete .X1-lock file under /tmp and .X1 file under /tmp/.X11-unix then after that can start new Vnc session for number 1. 4)and i also deleted the /home/user/.vnc/server:1.log and server:1.pid files it is tedious to do all these steps... ------------------------------------------------------------------------------------------------------------ April 17, 2008 How to start and access vncserver 1. start vnc server at the remote machine ocala-clued0-[~]> vncserver You get a message like: New 'ocala-clued0:1 (ecarrera)' desktop is ocala-clued0:1 Starting applications specified in /home/ecarrera/.vnc/xstartup Log file is /home/ecarrera/.vnc/ocala-clued0:1.log 2. Port = 5900 + Display# (1 in our case, but use 2 because for some reason I messed up port 5901...mmh) In order to tunnel into a kerberized machine like ocala-clued0 do: dell-laptop-[~]> ssh -L 5901:localhost:5901 ocala-clued0.fnal.gov Keep this window open. 3. Do: dell-laptop-[~]> vncviewer localhost:1 You will be prompted for a password (not sure exactly why, i must have entered sometime ago: C*************) and voila! ------------------------------------------------------------------------------- ----------------------------------------------------------------------------------- February 21, 2008 When updating openssh or when updating libraries ralted, these errors pop up: E: post-installation script returned error exit status 1 and E: ssh-krb5: dependency problems - leaving unconfigured The problem is that the config file at /etc/ssh/sshd_config has the modified lines #GSSAPIAuthentication no #GSSAPICleanupCredentials yes not commented out. But apparently the configuration needs these lines off. So what I did is to comment these lines out and run: sudo dpkg --configure -a again to configure the packages. It seems that it was successful. ------------------------------------------------------------------------------- February 21, 2008 For configuring a package or to see errors in aconfiguration use command: sudo dpkg --configure -a dpkg is a tool to install, build, remove and manage Debian packages. ------------------------------------------------------------------------------- September 7, 2007 In Ubuntu Feisty, to restart NetworkManager after it hangs, do: sudo /etc/dbus-1/event.d/25NetworkManager stop sudo /etc/dbus-1/event.d/25NetworkManager start to get it working again. ------------------------------------------------------------------------------------------------------------