Skip to content

Carleton Astronet Admin Log Posts

to select VERTICALLY (column mode) in vi or vim or kate editors

suppose you want to select a column (or more) in a file?

in vi or vim:

1. select a corner of desired region

2.  contol v  (start Visual block)

3. move cursor to opposite corner and

4. you will see the desired box highlighted!

5. then do what you will with that highlighted region. eg  d(elete)

6. to paste it elsewhere, move cursor to desired location and p(aste)

(Note if I tried y(ank) instead of d, I got full lines in buffer rather than desired box)

Added 2018 Jul 29: For kate, cntrl-shift-b enables similar block mode for delete at least.  However, multiple write doesnt come until v 4.12 and we seem to have v3.4. –jmw

-Joel (from Nina Gusinskaia , University of Amsterdam Pannekoek Institute)

 

How to configure Oklular to show a document’s file name in its titlebar instead of the document’s “title property”

By default, the version of Okular available to CentOS 6 does not show the viewed document’s filename in the Okular window titlebar, but rather the value of the “Document Title” property embedded in the document being viewed. This is bad news because the Document Title property is usually set to the name of the app that created the document, making it difficult to tell multiple documents generated by the same app apart.

You can force Okular to set it’s window titlebar value to the name of the file being viewed by editing the file ~/.kde/share/config/okularpartrc and appending this line to the ‘[General]’ section:

DisplayDocumentTitle=false

When you finish, the file will end up looking like this:


[General]
UseKTTSD=false
DisplayDocumentTitle=false

 

Thanks Bruce!

Login Hangs After CentOS/RedHat Kernel Update

June 15, 2015

A second incident of login getting hung after kernel update is found. The first incident was reported on Aug 2, 2014. As usual when users type in user name and password at the login window and hit login the login process gets frozen and cannot get to the desktop. It appeared to only affect tsch (using .cshrc) users.

The solution is to hit ctrl-c and then rm .history to get rid of the .history file. Note that if you do it from ssh, it might cause the host to reboot.

Canopus and Algol got updated over the weekend to kernel version 2.6.32-504.23.4.el6.x86_64. Hence it seems like it is only affecting these two hosts.

-Yuping & Bruce

compile pgplot in 32bits

Since we decided to compile the computing programs in 32 bits to ensure consistencies, pgplot should be compiled in 32 bit as well so that those programs can call it. The build notes are in

/usr/share/astro/psrchive/00READMECarleton

 

The compatibility libraries (with the yum commands) that I had to pull in (which Bruce had a copy):

yum install compat-libgfortran-41.i686
yum install libICE-devel.i686

yum install glibc-devel.i686

yum install zlibrary-devel.i686

yum install libpng-devel.i686

yum install xorg-x11-server-devel.i686

yum install compat-libstdc++-33.i686

yum install compat-libstdc++-296.i686

yum install libxcb-devel.i686

yum install libxcb-devel.i686

yum install zlib-devel.i686

yum install libX11-devel.i686

 

-Yuping

mingw64-pkg-config.x86_64

I installed mingw64-pkg-config.x86_64

It seems like it need to pull in its sister package e2fsprogs before compiling dump by typing in the /root/ directory

$ git clone git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git

$./configure –enable-elf-shlibs

$ make

$ make check

$ make install

$ make install-libs

which puts the binary file in /usr/bin or /usr/local/…

then go to the dump source file, type

http://surf.ml.seikei.ac.jp/~nakano/dump-restore/dump-restore-mini-HOWTO.en.html

Compiling Old fortran programs(&link pgplot) on 64-bit system

This post is for the old fortran computing programs (except TEMPO)

The moral of the story to compile those old programs in 32-bit on the 64-bit machines, because I could not find any documentation online re how f77 compiles differently in 64-bit and 32-bit. However, we do know that programs compiled in 64 bit behave differently from those compiled in 32-bit (for example the size of some data type are different). Therefore, on the 64-bit machines we should force compile these old programs in 32-bit to ensure consistency. The steps are as follows.

1. Make sure that your $PGPLOT_DIR environmental variable points to /usr/share/astro/psrchive/pgplot_32bits

2. Look at the make file. Add “-m32” to FFLAGS (meaning force compile in 32 bit for fortran) and make sure that the f77 step says f77 $(FFLAGS)     in order that the FFLAGS be invoked.

Make sure that the LIBS line have all of the following especially $(PGPLOT_DIR)

LIBS = -L$(PGPLOT_DIR) -lpgplot -L/usr/X11R6/lib -lX11 -lpng

Then we should be fine

–Yuping

—————————————————————————-

Pulling in additional 32-bit compat library when the compiler complains about not having it:

Do a google search to see what packages provide those libraries (theoretically “yum provides filename” should work but I never succeed on our computer. Useful stuff is “yum search keyword” which search through the available packages. Always pick the package ending with i686 (which stands for 32-bit) and devel if available

for example I see -lz and google tells me zlib is what I need. I run “yum search zlib” and just pick the one with “devel” and “i686″(meaning 32 bit). So I will type “sudo yum install zlib-xxxx-devel-i686

determine the libraries / files that an executable is using!!

ldd   <path/executablename>  lists what libraries it is looking for (or currently using)

ltrace <executablename programarguments>   traces what executable is doing with libs and other stuff and if it gets stuck there’s your problem.  (Note this actually runs program which is why input params are needed)

strace <executablename programarguments> show files opening and closing. This also requires running the program. Since the output is extremely lengthy you might want to save it to blablabla.txt by

$strace -o blablabla.txt <executablename programarguments>

If you want to just trace specific system calls (for example open,read since you are interested in what the program is using) you can type

$strace -e open,read <executablename programarguments>

This will give only open and read calls.

-Yuping Huang

Firefox: Run it on a host even if it you have it open on another – Bruce

Firefox setting for users who’s home dir lives on NFS – Bruce Duffy May 2013

Here’s how to tell Firefox that your homedir is sitting on an NFS filesystem:

This update (10.8) also fixes the following bug:

* In certain environments, storing personal Firefox configuration files
(~/.mozilla/) on an NFS share, such as when your home directory is on a
NFS share, led to Firefox functioning incorrectly, for example, navigation
buttons not working as expected, and bookmarks not saving. This update
adds a new configuration option, storage.nfs_filesystem, that can be used
to resolve this issue.

If you experience this issue:

1) Start Firefox.

2) Type “about:config” (without quotes) into the URL bar and press the
Enter key.

3) If prompted with “This might void your warranty!”, click the “I’ll be
careful, I promise!” button.

4) Right-click in the Preference Name list. In the menu that opens, select
New -> Boolean.

5) Type “storage.nfs_filesystem” (without quotes) for the preference name
and then click the OK button.

6) Select “true” for the boolean value and then press the OK button.
(BZ#809571, BZ#816234)

All Firefox users should upgrade to these updated packages, which contain
Firefox version 10.0.8 ESR, which corrects these issues. After installing
the update, Firefox must be restarted for the changes to take effect.