Skip to content

Carleton Astronet Admin Log Posts

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.

Show if a file is a link in Nautilus File Manager (but not whence [target])

Recently I discovered the following two ways to show if a file is a link in Nautilus List View. Sadly I have not been able to find a way for list view to show the link target, which Nautilus used to do. (For an individual file, one can determine it via File >> Properties .)

  1.  In list view , each file has an icon on far left, and a link superimposes onto that icon a “badge” that is a curvy arrow. The trouble is that this is faint, which is why I never noticed it before!  After a long time of trying to change the default badge for a link to something more noticeable, I gave up. I can do it for an individual file, but not for the class of all files having a link.
  2. FInally I figured out how to  denote all files that are actually links  in the list view, via the unix “permissions”  which include a leading ℓ if it is a link.  I think this is how:
    edit>>preferences>>list columns pane: I now place checks next to:
    Name
    Size
    Date  Mod
    Group
    Owner
    Permissions
  3. Sadly, I have not found a way for the list view to automatically show the link target (i.e. the name of the file that each link is attached to), as it used to. That is, I cannot create a column showing this information in the list view. As noted above, for an individual file, one can determine it via File >> Properties .)

pgplot is in multiple locations! caution!

We have been moving from centos6 (32bit OS) to centos7 (64bit OS)

One of the big things I had to do was make sure that pgplot and cpgplot would work on centos7

I now see (as I had already vaguely thought) that there are multiple pgplots in multiple places.So user beware!

As of 2021 Feb 12, we have (on thuban2 disk system) a
/var/share/astro/ which was used by centos6
/var/share/astro_centos7/ is to be used by centos7 after we upgrade the desktops to centos7. Note that at that time, /var/share/astro_centos7/ will look to the desktops as if it is the “default” /usr/share/astro/ thanks to Bruce’s wizardry. 

/var/share/astro:

As of right now, I have found pgplot in the following 3 directories:under /var/share/astro/:

[jweisber@thuban2 astro]$ pwd
/var/share/astro
[jweisber@thuban2 astro]$ find ./src/pgplot | wc
795 8745 77769

[jweisber@thuban2 astro]$ pwd
/var/share/astro
find ./psrhome/src/pgplot | wc
796 796 30909 mostly from 1990s

[jweisber@thuban2 astro]$ pwd
/var/share/astro
[jweisber@thuban2 astro]$ find ./psrhome/pgplot |wc
33 33 873 from 2016 by Yuping, some executables and libs

See also one 32 bit pgplot dirs and/or files under /var/share/astro/: (whereas astro_centos7 below has heaps)

[jweisber@thuban2 astro]$ pwd
/var/share/astro
[jweisber@thuban2 astro]$ find ./psrhome/psrchive-Carleton-install -ls  | grep pgplot_32bits | wc
32 352 4042 (2015 yuping files in ./psrhome/psrchive-Carleton-install/pgplot_32bits/)


/var/share/astro_centos7:

I have also found pgplot in the following 3 directories under /var/share/astro_centos7/:[jweisber@thuban2 astro_centos7]$ pwd
/var/share/astro_centos7
[jweisber@thuban2 astro_centos7]$ find ./src/pgplot | wc
795 795 24504 (files mostly from 1990s)
(apparently identical to standard old /var/share/astro/)

/:[jweisber@thuban2 astro_centos7]$ pwd
/var/share/astro_centos7
[jweisber@thuban2 astro_centos7]$ find ./psrhome/src/pgplot  | wc
798 798 30977 (files mostly from 2021 Feb [a few days ago!])

[jweisber@thuban2 astro_centos7]$ pwd
/var/share/astro_centos7
[jweisber@thuban2 astro_centos7]$find ./psrhome/pgplot |wc
284 284 7421 from 2021 mainly .o files dated Feb (recently) probably what I got running on phasshare, though rather skinny in number of files!

See also a ton of various 32 bit pgplot dirs and/or files under /var/share/astro_centos7:
First under ./psrhome32:
[jweisber@thuban2 astro_centos7]$ find ./psrhome32 -ls | grep pgplot | less
–A few files under ./psrhome32/pgplot_32bits/ , mostly dated Nov 8-9 2020 (which is the date many of them were copied to the   64 bit virtual  test machine “phasshare”)
–Pretty many under ./psrhome32/src/tempo2/, also dated 2020 Nov for same reasons as stated above.
—./psrhome32/src/pgplot/ which has tons of mostly 1990s files and a few from Nov 8
—./psrhome32/pgplot/  A bunch of almost entirely .o files, mostly dated Nov 8 for reasons given above
–the famous ./psrhome32/src/psrchive/packages/pgplot.csh which we eventually used in order to successfully build (pgplot make and other scripts and especially cpgplot make and other scripts) on phasshare, also dated Nov 8

Now under ./psrhome/psrchive-Carleton-install/pgplot_32bits/:
[jweisber@thuban2 astro_centos7]$ find . -ls | grep 32bits | less
./psrhome/psrchive-Carleton-install/pgplot_32bits/  has lots of files owned by Yuping  from 2015.

Yuck! They’re proliferated all over /var/share/astro_centos7!

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

idl unix-like commands – see also 2023 11 03

OK.  idl has some built-in unix-like commands, but then others require a ‘$’ beforehand  which I think summons the unix shell.  The various unix-like commands that an idl user might like are a mixture thereof, so see below whether or not there is a $  (See also a third option, spawn, below.):

cd, ‘/data/psrdata/   note no $ : this is a native idl command made to look like its unix cousin

pwd                         ”       ”   ”     ”        ”  (This and previous command often go together ,
since this one returns the “present working directory” which should
verify that your cd command did as you wished! (There is supposedly a
way to get the idl prompt to show the pwd but I haven’t yet figured it out.)

printd or popd or pushd are all native idl directory-oriented commands made to look like their unix cousins (or in printd case, just print the current directory name – no unix cousin exists.)

$ls     Needs the dollar sign which I think invoked the unix shell.

The idl spawn command can also be useful: 

spawn,’ls -als | grep arecibowapp’ is a way to do the idl version of the unix  ls with flags, and even then pipe it into another command. This looks like the most flexible!.

spawn,’ps aux’  ditto

 

clear firefox cache cleanly to free up space and not overflow quota

A cleaner way to free up firefox cache space, was provided by Mike Tie via Bruce Duffy.

I noticed I couldnt log in to carleton email via astronet firefox and these guys said it was because of a carcass in cache. So this is the procedure for clearing cache, which can also often bring a user’s space down below their quota limit:

Firefox has cached the old info, and now you need to clear the firefox cache. To do that, Launch firefox, click the three bars in the upper right corner of the firefox window, click Preferences, click the lock icon (middle left of the window), scroll down to “Coookies and Site Data”, click on “Clear Data…”, make sure both items are checked, and click “Clear”, and then click “Clear Now”.

shutdown and reboot

One needs to be root or have sudo privileges to do this:

sudo shutdown -rv 2

-rv  2 means :

r is restart after shutdown;

v means verbose

2 means in 2 minutes