Skip to content

Category: Configuration

where files really are on thuban2: /var/share (But not so fast for /usr/share/astro/ !)

e.g.  /var/share/data/psrdata

and /var/share/home/jweisber
(note that when I first log in to thuban2, I go to a wrong  /home jweisber  )

–joel 20220804

(But not so fast for mirzam’s /usr/share/astro/ “real” location on thuban2:

when I did a “mount” command on mirzam on 20231231, I discovered that

/usr/share/astro/ on mirzam is really on thuban2’s /var/share/astro_centos7/    !  )

–joel 20231231

tl;dr:  this stems from our upgrade from centos6 to 7. The directory still occupying thuban’s
/var/share/astro/ is a carcass from centos6 days!

To edit much of IDL source incl say coyote: must be on thuban2 on root and centos7

Because mirzam was down tonight I used idl on canopus instead. In trying to run some idl galactic magnetic field idl programs on canopus, I kept hitting an obscure error on coyote’s cggreek routine which makes greek letters for plots.  Googling it I found that an idl 8.6.1 (as on canny) error prevented old cggreek from working.  (It worked ok forever on mirzy, which has I think idl 8.7)

So I installed the new cggreek from github to thuban2’s /var/share/astro/idleshare/coyote.  but this didn’t work!  why?  because i had to install it onto /var/share/astro_centos7/idleshare/coyote   Note because of access issues, one can not install directly onto /usr/share/astro on mirzy or canny, but must instead go to thuban2/var/share/astro_centos7/ as above (and see below).

by the way i used su cp etc etc on thuban 2 to overcome permission issues on canny or mirzy themselves, but prev post shows that su – on thuban2 might be easier

adjusting screen lock duration

in very top right of screen, on banner is an icon that is a circle, broken on top with a dot in middle of break.  hit it!  >>Joel Weisberg (or your name here)>>Account Settings.
Look on far left of resulting popup at the “Details” column which has a left arrow next to it.
Hit the left arrow to open up the “settings” column and scroll ‘way down to, and select “privacy.”
Then hit <cntrl>screenlock and you can select from a menu of “lock screen after blank for
<? minutes>.

–Joel. (Yes what a pain! This was really hard to figure out because it is so buried.)

kate text editor “feature” under konqueror centos7: hard to open more than one file simultaneously

JMW uses Konqueror rather than nautilus file manager under centos7. This “feature” may appear only with above config, but anyway:

if I open a file with kate it’s fine.

if i open a second, the first disappears.  only one shows on desktop and on bottom bar listing all open files.  I can toggle between them on the document tab of left sidebar, but only one at a time!

FIXES:

  1.  View>>split view and then in the document tab on left sidebar, select  each of the TWO (max) files to show in a SINGLE split window.
  2. After opening one, click on new window (control n) and a second (empty) independent window will open up. In that second empty window, you can then navigate with file>>open menu  to second desired file and open it.  This will be my favored approach

I spent a good length of time reading the manual (useless – it tells what kate can do but not how!!!!!!!!!!!!!!!!!!!!!!!!!) and some blogs and it looks like there is no way to make it automatically put every document in a separate window.  So one of the above “features” will have to do.

–Joel

control-click on a vnc session from a mac

Without control-(mouse) click, a lot of functionality is lost.  I have finally figured out how to geve the equivalent of it on a mac, when running a vncviewer window on the mac.

On the mac, go to apple>>system preferences>>Trackpad>>Secondary click.

Under the Trackpad pane;’s “Secondary Click” are:
–A check box –   check it.
–A pulldown menu under “Secondary Click” where you can choose what action will represent the control-click. I chose “click in bottom left corner.”

And indeed, when I click trackpad in lower left corner on a VNCviewer session, the vnc session responds as if I had hit control-click.

setting up your centos7 desktop after machine was upgraded to that os

These notes are mostly from Bruce. The original is at /docs/centos7/

Centos 7 Gnome UI configuration
====================================================================================================

CentOS 7 comes with some UI changes from the centos6 experience that you may wish to adjust.

See below for concrete examples below for commonly changed settings.

Generally speaking, there are 4(!) tools that allow you to adjust aspects of your UI environment. 3
via the System Menu (Upper Left corner of your screen) and 1 via the ‘gsettings’ shell CLI.

Determing which of these 4 tools provides the setting you want to change can be challenging. It’s
often easiest just to google for “centos 7 change <???> settings” to find out which one[s] to use
for the given setting you want to change.

The 4 ways to change the UI:

1) “Applications > Tweaks > XXX”

This brings up the ‘Gnome Tweak Tool’ that lets you set a bunch of things.

Example:

Applications > Tweaks > Keyboard & Mouse >

let’s you map the Caps Lock key to an additional Ctrl key (see below)

2) “Applications > System Tools > Settings > XXX”

Example:

Applications > System Tools > Settings > Privacy > Screen Lock

3) “Applications > System Tools > dconf Editor”

This is a bare-bones editor that enables you to get/set the same tree of settings that can be
manipulated by the ‘gsettings’ CLI below, which is a superset of what can be changed via the
Gnome Tweak Tool above.

org/gnome/desktop/screensaver/lock-delay
org/gnome/desktop/interface/text-scaling-factor

4) The ‘gsettings’ Shell (Terminal Window) command:

This is the shell get/set CLI for the dconf Editor above

Examples:

$ gsettings get org.gnome.desktop.screensaver lock-delay
uint32 300
$ gsettings set org.gnome.desktop.screensaver lock-delay 600
$ gsettings get org.gnome.desktop.screensaver lock-delay
uint32 600
$

Sources:

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/desktop_migration_and_administration_guide/gsettings-dconf

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/desktop_migration_and_administration_guide/browsing-gsettings-values-for-applications

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/desktop_migration_and_administration_guide/configuration-overview-gsettings-dconf

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/desktop_migration_and_administration_guide/browsing-gsettings-values-for-applications

 

====================================================================================================
Specific examples
====================================================================================================

—————————————————————————————————-
Put App shortcuts on the desktop
—————————————————————————————————-

You can click-and-drag any of the app icons from any submenu of the main ‘Applications’ menu to the
desktop and then launch it from there.

—————————————————————————————————-
Put App shortcuts on the ‘top panel’
—————————————————————————————————-

I haven’t found a way to do this yet.

—————————————————————————————————-
Shrink Desktop Icon size
—————————————————————————————————-

Desktop Icons are stupidly large. Fix with

# gsettings set org.gnome.nautilus.icon-view default-zoom-level small

—————————————————————————————————-
Font sizes used on the screen are oversized
—————————————————————————————————-

Make fonts smaller via

Applications>Accessories>Tweaks>Fonts>Scaling Factor -> 0.90

—————————————————————————————————-
Make menu clock show the Date and Seconds
—————————————————————————————————-

Applications > Tweaks > Top Bar

Under ‘Clock’ header

Controls how clock appears in screen’s top menu bar

Date [on|off]
Seconds [on|off]

—————————————————————————————————-
Configure Startup Applications
—————————————————————————————————-

You can specify what applications you want to have launched at login.

Applications > Tweaks > Startup Applications

Select the apps you want to run at startup.

—————————————————————————————————-
Make ‘Caps Lock’ key an additional ‘Ctrl’ key
—————————————————————————————————-

Very useful for emacs users.

NOTE: Make sure Caps Lock is not active when you do this!

Applications > Tweaks > Keyboard & Mouse >

Under ‘Keyboard’ heading, select the ‘Additional Layout Options’ button.

In the ‘Additional Layout Options’ window that pops up, select the ‘Caps Lock Behavior’ ‘triangle’
button and then select ‘Caps Lock is also a Ctrl’.

—————————————————————————————————-
Adjust the screensaver lock timer
—————————————————————————————————-

The screensaver lock timer is very aggressive. To adjust, open “Applications > System Tools >
Settings > Privacy > Screen Lock”

In the ‘Screen Lock’ window you can select the ‘Lock screen after blank for’ value from ‘Screen
Turns Off’ to a number of minutes, such as 1, 2, 5, or 30 minutes (but not anything between 5 and 30
minutes which is odd).

If you want to set the timer to values between 5 <-> 30 minutes, you can use the ‘gsettings’ CLI.

Here’s how to do it via ‘gsettings’:

From the terminal (to set sleep timeout to 10 minutes / 600 seconds,
then require login after 15 minutes / 900 seconds):

gsettings set org.gnome.settings-daemon.plugins.power sleep-display-ac 600
gsettings set org.gnome.settings-daemon.plugins.power sleep-display-battery 600
gsettings set org.gnome.desktop.session idle-delay 600
gsettings set org.gnome.desktop.screensaver idle-activation-enabled ‘true’
gsettings set org.gnome.desktop.screensaver lock-enabled ‘true’
gsettings set org.gnome.desktop.screensaver lock-delay 900

—————————————————————————————————-
Set prefs for Nautilus (File Manager)
—————————————————————————————————-

Open ‘Applications > File Manager’ from the menu in the Upper Left of your screen.

The Nautilus File Manager should open.

In the top menu bar you should now see the ‘Files’ menu item

From the ‘Files’ menu, select ‘Preferences’

—————————————————————————————————-
Set prefs for Konqueror (File Manager): Joel notes that konqueror file manager is back, after being missing from centos6.  I like konqueror much more than nautilus (it shows link targets, a particular issue of mine.)  So I set it up on centos7.  Rather than telling you all the miriad of settings I needed to select and change, how about you just ask me to tell you all the settings if you are interested (ie if you are frustrated with nautilus)
—————————————————————————————————-
—————————————————————————————————-
Update Firefox UI “Experience”
—————————————————————————————————-

When you launch Firefox it will ask you if you want to update your ‘experience’. Say ‘yes’ and it
will relaunch but show the latest UI.

—————————————————————————————————-
Configure the GV.printCommand:
—————————————————————————————————-

GV’S print command dialog window has a type-in labeled ‘print command’ and it’s automagically
populated with the string ‘lpr’. However you can change that string to ‘ps2pdf %s – | lpr’. You
can also change the default print string from ‘lpr’ to whatever you want in GhostScript options, but
that would break printing of non .ps files.

To change the default print string in ‘gv’, select:

State->Setup Options

… Look for the Print Command field, and change the value from
‘lpr’ to ‘ps2pdf %s – | lpr’ (w/o the single quotes).

The change is saved to ~/.gv as the line:

GV.printCommand: ps2pdf %s – | lpr

Ssh security

Directions from Bruce. (BDUFFY 2021-02-17. )Thanks Bruce! Slightly updated by Joel. These were specifically for setting up to ssh to new mirzam, but are relevant for any new host.

Remove old mirzam entries from your ~/.ssh/known_hosts file  (It looks like very long lines of gibberish. A hostname or its internet number [ie 137.22.301.5] starts each line.)

The next time you ssh into to an astronet machine, ssh will ask you

(base) bduffy66924:~ bduffy$ ssh bduffy@mirzam.physics.carleton.edu
The authenticity of host ‘mirzam.physics.carleton.edu (137.22.6.129)’ can’t be established.
ECDSA key fingerprint is SHA256:nersU93cf8F5ucysog/Rn2OIbSabknw10hpw5uXFs3o.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘mirzam.physics.carleton.edu’ (ECDSA) to the list of known hosts.
bduffy@mirzam.physics.carleton.edu: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
(base) bduffy66924:~ bduffy$

See ./astronet-server-ssh-public-keys.txt

2021 05 17:  JMW does not know what directory ^ this is in.

Also, I had to add the authorized_keys file to one of my home macs’ .ssh directory in order to get all the way in to canopus.  See email from Bruce on 2021 05 17 for more details.

change default postscript viewer (and other apps too) in nautilus file manager

to change default postscript viewer (or many other apps in nautilus) go to

/home/jweisber/.local/share/applications and
open mimeapps.list with kate or another text editor.

Go to default applications category (in mine it is the bottommost of 3 categories) and change the postscript viewer to

application/postscript=kde4-okularApplication_fb.desktop. if you’d like to change it to okular

I find okular great for a number of reasons – it will print the name of displayed file on the banner, show thumbnails of multiple pages, and more.  Evince is another nice one.  The default was gv which is ok but . . .

(I stole that from the top list which gave about 5 options, presumably the ones that appear in the nautilus menu when you go to file>>open with

–Joel

ATNF PSR catalog from the command line

It is possible to access the ATNF catalog from the command line. Then various unix commands may be used on the output to create tailored data. The catalog software is now in /data/psrdata/psrcat. There is a README there that gives directions on how to use it.

Note that it accesses a database file on disk which may or may not be the latest version!

Also note that you need not supply the db_file parameter if you desire that it default to the location given in the environment variable PSRCAT_FILE    (you may find the value of that variable by typing

printenv PSRCAT_FILE

if you got your .cshrc from me (Joel) relatively recently, you will probably get
/usr/share/astro/psrhome/psrcat/psrcat.db

I have linked that locataion to the psrcat.db file that is “actually” in /data/psrdata/psrcat

so when i type psrcat -v from that directory, I indeed get the current catalogue version, v1.57:

“Software version: 1.49
“Catalogue version number = 1.57”

I may or may not update the catalog in the future.


Note also that the psrchive suite now accesses the same catalog through a link.  That is, the only file in

/usr/share/astro/psrhome/psrcat is a link to the above /data/psrdata/psrcat/psrcat.db

(OK I also did the same with glitch.db)