Tag Archive

amateur astronomy awk bash b[e] supergiant cartoon conference convert evolved star exoplanet fedora figaro fits fun galaxy iraf large magellanic cloud latex linux lmc machine learning magellanic clouds massive star matplotlib meteor mypaper paper peblo photometry planet pro-am pyraf python red supergiant scisoft skinakas observatory small magellanic cloud smc spectroscopy starlink talk ubuntu university of crete video x-ray yellow hypergiant

Fixing GPG error “NO_PUBKEY”

In Debian, Ubuntu and similar distros that use the APT (Advanced Package Tool – which is a set of tools for managing Debian packages / applications), to update the system you need to run:

sudo apt update

This will read all repositories (as they are listed in /etc/apt/sources.list and under /etc/apt/sources.list.d/) and checks if everything is correct (e.g. if the links are working and these sites / repositories are trusted sources to install from). So by doing this in my system I got the following:

Hit:1 https://repo.skype.com/deb stable InRelease
Hit:2 http://security.debian.org/debian-security buster/updates InRelease
Hit:3 http://deb.debian.org/debian buster InRelease
Hit:4 http://deb.debian.org/debian buster-updates InRelease
Err:1 https://repo.skype.com/deb stable InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1F3045A5DF7587C3
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://repo.skype.com/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1F3045A5DF7587C3
W: Failed to fetch https://repo.skype.com/deb/dists/stable/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1F3045A5DF7587C3
W: Some index files failed to download. They have been ignored, or old ones used instead.

In this case there is an error with respect to Skype. The systems does not have the public key for this package, so it complains and prevents the system from downloading something which is not secure (and something that we want!).
At the same time this means that I didn’t do something correctly when installing Skype (and to be honest … I do not remember what I did!). Anyway, the proper procedure is a two-step process:

1. Add the repository under the /etc/apt/sources.list.d/ as a separate file,e.g. by:

echo "deb [arch=amd64] https://repo.skype.com/deb stable main" | sudo tee /etc/apt/sources.list.d/skype-stable.list

(adding the repository to /etc/apt/sources.list is actually equivalent – the only difference being that you need to edit that file while it is more convenient, especially for automated scripts, to create a new file under sources.list.d/)

2. Then, the second step is to download the GPG public key that verifies the repository. To do that we can simply:

sudo apt-key adv --fetch-keys https://repo.skype.com/data/SKYPE-GPG-KEY

and we will get:

Executing: /tmp/apt-key-gpghome.fD2Z003jib/gpg.1.sh --fetch-keys https://repo.skype.com/data/SKYPE-GPG-KEY
gpg: requesting key from 'https://repo.skype.com/data/SKYPE-GPG-KEY'
gpg: key 1F3045A5DF7587C3: public key "Skype Linux Client Repository " imported
gpg: Total number processed: 1
gpg: imported: 1

(This is similar or better of doing:

wget URL -O - | apt-key add -


curl URL | apt-key add ).

This adds the GPG key in the /etc/apt/trusted.gpg file, and now if we try again to update the system we will see no error or warning.

Hint: to see all the contents of the trusted.gpg file just type: apt-key list !

Replacing repositories for old Ubuntu versions

Ok, I may be outdated regarding my Ubuntu version, but there are two reasons for this (fairly good from my point of view!): (i) I did not like the appearance of Ubuntu 11, and (ii) I have everything set up working in 10.10 than I do not want to change (at least before I finish my PhD).

But that does not come without a cost… I was trying to install IRAF but I was facing a problem like (similar to this error):

The following packages have unmet dependencies:
gfortran : Breaks: gfortran-4.4 (> 4.4.1) ...
E: Broken packages

But when I went on to install gfortran (manually, although the script that was running the IRAF installation should automatically find and install dependencies). Even when I tried the solution provided to the previous link (remove gcc g++ and reinstall them) i was still getting the same error (Broken packages). I played around the software sources (repositories) to see if anything was getting wrong there and I notice that, actually, the did not respond (it couldn’t “Fetch”).

When I looked at the repositories (http://archive.ubuntu.com/ubuntu/dists/) there were nothing for the 10.04, so that’s why it couldn’t locate anything. It was just a matter of a few minutes to find out the solution: older releases that are not supported move to the archive server: http://old-releases.ubuntu.com .

Following the instructions (from the post):
(i) edit the /etc/apt/sources.list and change archive.ubuntu.com to old-releases.ubuntu.com, performed with:

sudo sed -i -e 's/archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list

(ii) update with

sudo apt-get update && sudo apt-get dist-upgrade

solved the issue with the repositories and the installation of IRAF proceeded smoothly.

VStar conflicts with java used

VStar is a multi-platform variable star visualisation and analysis tool, developed under the CitizenSky project and the AAVSO. Its use is straightforward if java is installed. But you should be carefull what java you are using…

I tried to use VStar in two different machines running Ubuntu 10.10 64bit and Fedora 14 32bit and the first impression was that everything was set. The visualization of the data and the phase plot (epoch folding) were working but the analysis tool DCDFT (date-compensated discrete Fourier transform) was not! After some discussion with the author of the program David Benn it was found that IcedTea (a java environment) was used to run the program which “is not fully 1.6 compliant, possibly in terms of some of the Swing libraries“. So, as only the Oracle Java has been really tested, it is strongly advised to install this version in order to run the program without any issues.

Installing Oracle’s Java is simple, as there is a guide for this. A fast note of this is the following steps:

1. Download the Linux self-extracting file named jre_6u3_linux_i586.bin, or similar  (source page).

2. Make this file executable (type: chmod +x jre_6u3_linux_i586.bin).

3. Create, if it doesn’t exist, the directory /usr/java (type: mkdir /usr/java – for this we need to be root) if we want to install java in the whole system, else place it under the home directory.

4. Run the self-extracting binary (type: ./jre-6u3_linux_i586.bin). After accepting the license, the installation proceeds and finishes when “Done” is displayed.

5. We can verify the installation by checking if jre1.6.0… sub-directory is listed under the /java directory.

Then we can select VStar to open with this java environment and start digging into the light-curves!

Installing matplotlib-1.1.0 in Ubuntu 10.10 (64bit)

Ubuntu 10.10 includes matplotlib-0.99 in their repositories, which is not the latest one, so you don’t get the latest cool features (like gridspec)! But as I need some of its features I decided to go on and install the latest version matplotlib-1.1.0, only 20 days after its launch !

First of all it cannot be found in any debian repositories and Ubuntu 11.10 includes the 1.0.1 version (though I found some debian packages but it is either in “testing” mode or unstable). So the only solution seemed to build it from scratch …

After some search a reliable post was found and by following the commands matplotlib-1.1.0 was successfully built and installed. After downloading the latest version for matplotlib, untar it into a directory (it can be safely deleted afterwards) and follow these commands:

In order to build you need to install:
sudo apt-get install build-essential
and these dependencies:
sudo apt-get install python-dev python-scipy libfreetype6-dev libpng12-dev zlib1g-dev
[the last 3 libraries “libgtk2.0-dev python-gtk2-dev python-wxgtk2.8” found in the original post are not really needed, the libgtk2.0-dev & python-gtk2-dev were not included and python-wxgtk2.8 was already installed]

As it is stated in the post by Tim Teatro

” To see what we’re getting and why, read on.

  • python-dev needed pretty much any time you build pacakges for Python.
  • python-scipy OR python-numpy matplotlib is made to interface with these. Even if you don’t use them in your programs, it is part of the matplotlib backed, since the numerics are very efficient compared to plain Python.
  • libfreetype6-dev is a high-quality font engine.
  • libpng12-dev for raster images
  • zlib1g-dev for compression
  • libgtk2.0-dev is the GUI toolkit I prefer, since I generally use Gnome. If you prefer Qt or Tk or otherwise, read the INSTALL file included with the matplotlib tarball. The compile script will try detect your preferred GUI toolkit, so just install the developer package for your preferred toolkit.
  • python-gtk2-dev to interface GTK with Python.
  • python-wxgtk2.8 wxWidgets is a higher level library for developing GUIs. The python-wxgtk2.8 package is a Python implementation of wxWidgets using GTK for the back-end.”

To finalize the procedure:
python setup.py build
sudo python setup.py install

The installation of the new matplotlib version can be found at /usr/local/lib/python2.6/dist-packages/ . If there is no error when running matplotlib but still you cannot see any plot then probably the backend must change. Go to the matplotlibrc file and edit the backend:
cd /usr/local/lib/python2.6/dist-packages/matplotlib/mpl-data/
sudo gedit matplotlibrc &

and find the keyword backend and change it accordingly. The value that worked for me was WXAgg.

Useful stuff: commands for matplotlib  / running a script with keyword ––verbose-helpful (check what is printed)

Installing IRAF on Ubuntu

Installing IRAF can always be a huge problem. Many pages exist explaining all the necessary steps to install it but I have never tried to follow these (like Rubab’s tutorials for 32 and 64 bit Ubuntu/Debian, Michael Hutchinson’s tutorial for 64 bit Ubuntu – these tutorials explain how to install 32 bit IRAF in 64 bit machines). Instead there is a great work done by Fernando Ávila, who provides files to install everything in a couple of minutes!

So, someone can use either the iso file (worked great with Ubuntu 8.10, 32bit) or use the bash script along with the associate files (download the files in folder deb/ and the iraf.tar.gz). The last procedure (running the script) worked great with Ubuntu 10.10, 64bit, and now I …enjoy IRAF!

UPDATE (28/Jan/2013): the separate directory containing the above files does not exist any more – but the iso files are updated including all necessary material (universe and multiverse repositories should be enabled to correctly handle the needed dependencies and if not the installation cannot proceed).

UPDATE (25/Jan/2017): The previous link to Fernando Avila’s page is not correct any more, but there is a new link that includes all necessary files (found under “Linux+Astronomia”).

UPDATE (21/Aug/2018): The update we were expecting! Finally IRAF can be installed as a native package, simply as “apt install iraf”.
Thanks to Ole for this!

Period04 and .sh files

If you have any difficulty to find it just go here: Period04

“Period04 is a computer program especially dedicated to the statistical analysis of large astronomical time series containing gaps. The program offers tools to extract the individual frequencies from the multiperiodic content of time series and provides a flexible interface to perform multiple-frequency fits.”

For Ubuntu linux users download Period04 package with Java, which is a .sh (shell file).

Run the file either at a terminal like:

$ sh filename.sh


$ bash filename.sh

either make it an executable and run it as:

$ chmod +x filename.sh
$ ./filename.sh

During installation the preferred folder path and the initial setup is at /user/bin/ which is local only (this means that you have to go the this folder and run the program like ./period04). If you want to make it global (to have access to the program by simply typing period04 at the terminal) you just have to delete the file from /user/bin/ and make a link (or a copy) to the program at the (root) /bin folder.

Lost sticky notes in Ubuntu!

Just happened on Ubuntu 8.10 (intrepid ibex)… 🙁

“If disk usage reaches 100%, when you exit your gnome session, all your sticky notes will be erased. Next time you log in, they’re all gone.”

link source