Ubuntu setup and rescue

access the internet

The proxy server gives accounts on the StuyCS network access to the internet. But you must set your account to know where to find our proxy server.

  1. Record the required information on the first page of your notebook, so you can use it in the future when you cannot access these notes:
         address: 149.89.1.30
        
    port: 3128

  2. Close all browsers.

  3. Set the addressing information for your account:

    1. Press the "Super key".
    2. Type network
    3. In the Settings group, select "Network" at the top of the list (not "Network Proxy" lower down).
    4. You should now see a "Network Proxy" bar, with a gear icon at the right-hand side. Click on the gear icon, whether it is labeled "off" or "manual".
    5. Select "Manual"
    6. Paste the address and port into all 4 rows, putting the address into the left column, and the port into the righthand column.
    7. Close the window (no "OK" button" exists).
  4. Check your work by starting a new browser window and browsing to these notes, via the "Ubuntu setup and rescue" link near the top of the class home page.

FireFox is already running

error message

FireFox is already running, but is not responding. To open a new window, you must first close the existing FireFox process, or restart your system.

solution

This solution has a side effect of losing all bookmarks / preferences:

  1. Start a terminal session, via ctrl+alt+t
  2. rm -rf ~/.mozilla

Chromium exhibits a similar problem, but its error message identifies the file to be deleted.

missing task bar and desktop icons

The problem is apparently in one of the config files. So these instructions move all config files to a backup directory. After that, logging out and in again will cause Ubuntu to re-create the corrupted file. After that, one can recover any other config files from the backup directory

Start a terminal session whose working directory is the home directory.

mkdir oldConfig   to make the backup directory

mv .* oldConfig/   to move the config files

Expect two error messages, for failure to move . and ..

reboot, and thereby log out

ctrl+alt+del gives a log-out option

password reset

If you have set your password for logging onto the machines in the computer science labs, but you need it reset, follow these instructions. These instructions apply only to that issue.

These instructions do NOT apply to…

To reset your password for logging onto the machines in the computer science labs:

ssh fails to resolve hostname

symptom

Attempts to use ssh to connect to a computer result in a pause of about 10 seconds, then an error message:
dholmes@cslab1-1:~$ ssh bert.stuy.edu
ssh: Could not resolve hostname bert.stuy.edu: Name or service not known
As of 2019-03-01, the failure happens reliably on a few computers in room 307, including
cslab1-1
cslab1-2
cslab1-6 ?
cslab1-19
There is no prognosis.

workaround

ssh to a machine that works, and do your ssh work from there. You can address such a machine using a local url, like homer.local, as in the following example, in which the commands I typed are shown like this:

dholmes@cslab1-1:~$ ssh homer.local
The authenticity of host 'homer.local (149.89.150.100)' can't be established.
ECDSA key fingerprint is SHA256:DB9F7ozGVzJHPo2CVXYsKaBfrXbFc+48tBMpqggXBvY.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'homer.local' (ECDSA) to the list of known hosts.
dholmes@homer.local's password:
Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-45-generic x86_64)
...
dholmes@homer:~$ ssh bert.stuy.edu
dholmes@bert.stuy.edu's password:

Here is a longer log, showing an attempt to clone a repo from GitHub. Since our git commands use ssh, the same problem and workaround apply. This log shows a failed attempt to clone when logged into cslab1-1 (the pc in room 307 that is nearest the teacher's desk), but success when ssh'ing to homer.local first:

dholmes@cslab1-1:~/temp$ git clone git@github.com:stuyvesant-cs/skeletonsHolmes.git
Cloning into 'skeletonsHolmes'...
ssh: Could not resolve hostname github.com: Name or service not known
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
dholmes@cslab1-1:~/temp$ ssh homer.local
dholmes@homer.local's password:
Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-45-generic x86_64)
...
dholmes@homer:~$ cd temp/
dholmes@homer:~/temp$ git clone git@github.com:stuyvesant-cs/skeletonsHolmes.git
Cloning into 'skeletonsHolmes'...
...
remote: Enumerating objects: 18, done.