Category Archives: Ubuntu

Ubuntu 14.04.4 Server installation notes – Security and Weather

Overview
Needed to install a new Ubuntu Server for a long-term project of creating a DIY Security Monitoring System and DIY Weather Station. The primary outcome (security and weather aside) is learning – Ubuntu, SQL, C Programming, Networking, Wireless Communication, etc). The following are general notes, prior to adding anything related to Security Monitoring or Weather.

Downloading Ubuntu Server

Integrating resources for action support (Book, Forums, Google Search)

Getting the .ISO onto bootable DVD

Main Account username and password

Root-level access to my own account

Modifying the IP Address to be static

Access via Putty (SSH)
Did a search on my own site to review how I did this in the past — http://www.paulgarth.com/2015/11/22/remote-into-ubuntu-desktop-acer/

Updates

Closing the lid and keeping server running
Sudo SU — to get access to root level
vi /etc/systemd/logind.conf
Modified this line to end in “ignore” – HandleLidSwitch=ignore
To save and exit, it is “: and then wq!” — had to be in Insert Mode to edit (i) and then Escape before saving.
Note: Ensure to remove the leading “#” (because that comments it out)
Restart with – restart systemd-logind
Now I can close lid and servers stays on — good for stacking devices…

Updating Ubuntu Laptop Software and Salutis error

Desired Outcome:
My Acer Mini Laptop with Ubuntu Desktop needs to be updated. I’d like to use Terminal vs the Software Update application. Need to know what commands. Also, there was a message about issues with salutis.net. Note: I did a web-search and have copied from various forum entries (http://askubuntu.com/questions/222348/what-does-sudo-apt-get-update-do)

Q: What is the terminal command to update on Ubuntu?
A: sudo apt-get update
Note: This command downloads the package lists from the repositories and “updates” them to get information on the newest versions of packages and their dependencies. It will do this for all repositories and PPAs.
Note: Used to re-synchronize the package index files from their sources. The indexes of available packages are fetched from the location(s) specified in /etc/apt/sources.list. An update should always be performed before an upgrade or dist-upgrade.

Q: What is the terminal command to upgrade?
A: sudo apt-get upgrade Note: This command will fetch new versions of packages existing on the machine if APT knows about these new versions by way of apt-get update.
Note: Used to install the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list. Packages currently installed with new versions available are retrieved and upgraded; under no circumstances are currently installed packages removed, nor are packages that are not already installed retrieved and installed. New versions of currently installed packages that cannot be upgraded without changing the install status of another package will be left at their current version. [Emphasis mine] An update must be performed first so that apt-get knows that new versions of packages are available.
Note: apt-get dist-upgrade will do the same job which is done by apt-get upgrade, plus it will also intelligently handle the dependencies, so it might remove obsolete packages or add new ones.

Q: What happens when I run “sudo apt-get update”
A: An error at the bottom re: Salutis
N: Ignoring file ‘salutis.net’ in directory ‘/etc/apt/sources.list.d/’ as it has an invalid filename extension

Q: What is Salutis?
A: I think it’s no longer supported, so ideally is uninstalled/removed from Ubuntu
XREF http://ubuntuforums.org/showthread.php?t=954267
Note: Here’s some comments from author — http://ubuntuforums.org/showthread.php?t=954267
Note: Author said, Salutis Connect is not supported anymore. Use Network Manager instead.

Q: What is Network Manager?
A: Here is a link that explains and how to install, etc — https://help.ubuntu.com/community/NetworkManager
Note: Network Manager aims for Network Connectivity which “Just Works”. The computer should use the wired network connection when it’s plugged in, but automatically switch to a wireless connection when the user unplugs it and walks away from the desk.

Q: Is it installed or still running? What’s the reference to the filename extension?

Q: Do I have to remove it?
A: Ideally, so I don’t get errors when doing update commands

Q: Is this affecting the update/upgrade?

Q: Do I now need to do the upgrade, now that I’ve updated
A: Yes, but resolve Salutis first

Q: What is current version of Ubuntu?
A: lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
Note: sudo apt-get update referenced “Trusty”. According to web-site – Ubuntu 14.04.3 (Trusty Tahr) is current
XREF to: http://www.ubuntu.com/download/desktop

Q: What does Salutis-Connect do?
A: Salutis-connect tries to use udevcontrol which in 8.10 is replaced by udevadm.
Note: Salutis-Connect was written by Rudolf Adamkovicfor purpose of Internet Modem connectivity, I believe.
Note: It’s not longer supported.

Q: What does salutis-connect.prerm do?

Q: What does udevcontrol reload_rules do?
A: Here’s a link to some info on udevcontrol — http://www.tutorialspoint.com/unix_commands/udevcontrol.htm
udevd listens to kernel uevents and passes the incoming events to udev. It ensures the right event order and takes care, that events for child devices are delayed until the parent has finished the device handling. udevcontrol can dynamically set the log level of udevd. Valid values are the numerical syslog priorities or their textual representations: err, info and debug.

Q: What does udevadm control –reload-rules do?
A: udevadm expects a command and command specific options. It controls the runtime behavior of systemd-udevd, requests kernel events, manages the event queue, and provides simple debugging mechanisms.

Q: What is recommended fix?
A: See here from forum posts:
sudo gedit /var/lib/dpkg/info/salutis-connect.prerm
Note: I got an error, possibly because of gedit error: XDG_RUNTIME_DIR not set in the environment.
(gedit:10371): Gtk-WARNING **: cannot open display:
Note: did a CD into directory and then: vi salutis-connect.prerm — can’t find file
Find line with: udevcontrol reload_rules
Replace with: udevadm control –reload-rules

Find same line within sudo gedit /var/lib/dpkg/info/salutis-connect.postinst and replace as above
Note: Can’t find file either
After this, you should be able to uninstall salutis-connect normally.

Q: How to remove Salutis-Connect?
A: See this
sudo apt-get update
Note: I had already done this
sudo apt-get upgrade
Note: OK with same error re: Salutis
apt-get purge salutis-connect
Note: Following came back:
Reading package lists… Done
Building dependency tree
Reading state information… Done
N: Ignoring file ‘salutis.net’ in directory ‘/etc/apt/sources.list.d/’ as it has an invalid filename extension
N: Ignoring file ‘salutis.net’ in directory ‘/etc/apt/sources.list.d/’ as it has an invalid filename extension
E: Unable to locate package salutis-connect
paul@paul-netbook:/var/lib/dpkg/info$

Q: What are the files within /etc/apt/sources.list.d/ ?
A: http://askubuntu.com/questions/82825/do-files-at-etc-apt-sources-list-d-need-to-have-an-extension-list
Note: Names of files in /etc/sources.list.d must end in .list for lines in the files to be taken as specifying software sources that ought to be used. Otherwise, the files may be taken to have a different meaning. The .list.save files are some kind of work/backup files:

NAME sources.list – Package resource list for APT

DESCRIPTION

The package resource list is used to locate archives of the package distribution system in use on the system. At this time, this manual page documents only the packaging system used by the Debian GNU/Linux system. This control file is /etc/apt/sources.list.

The source list is designed to support any number of active sources and a variety of source media. The file lists one source per line, with the most preferred source listed first. The format of each line is: type uri args The first item, type determines the format for args. uri is a Universal Resource Identifier (URI), which is a superset of the more specific and well-known Universal Resource Locator, or URL. The rest of the line can be marked as a comment by using a #.

SOURCES.LIST.D

The /etc/apt/sources.list.d directory provides a way to add sources.list entries in separate files. The format is the same as for the regular sources.list file. File names need to end with .list and may only contain letters (a-z and A-Z), digits (0-9), underscore (_), hyphen (-) and period (.) characters. Otherwise APT will print a notice that it has ignored a file if the file doesn’t match a pattern in the Dir::Ignore-Files-Silently configuration list – in this case it will be silently ignored…

Q: What files do I have in my directory?
A: salutis.list, salutis.list.save, google-chrome.list.distUpgrade, salutis.list.distUpgrade, salutis.net
Note: Within the file salutis.list, there is a comment made about Karmic:
# deb http://repository.salutis.sk/production ./ # disabled on upgrade to karmic

Q: Is there another forum post about Salutis
A: Yes. http://ubuntuforums.org/showthread.php?t=1003643
Note: The reference to http://repository.salutis.sk/production is bad. The address has been removed, is temporarily out, or has been changed. It should be commented out or removed from your sources.list

Q: Look again at the error
A: N: Ignoring file ‘salutis.net’ in directory ‘/etc/apt/sources.list.d/’ as it has an invalid filename extension
Note: Maybe answer is to just remove the salutis.net file from the directory
Note: Content of file is: deb http://ppa.launchpad.net/salutis/ubuntu intrepid main
Note: Appears that during Karmic upgrade, the comment had happened in various files.

Q: How do I remove a file (salutis.net)
A: sudo rm salutis.net

Q: How to check for error after delete file?
A: sudo apt-get update
Note: No error
A: sudo apt-get upgrade
Note: No error, but mention of packages no longer needed and:
The following packages were automatically installed and are no longer required:
account-plugin-windows-live compiz-plugins-extra fonts-arphic-uming
fonts-vlgothic gwibber-service hyphen-en-us libgnome-desktop-2-17 libmpdec2
libupstart1 linux-headers-3.13.0-43 linux-headers-3.13.0-43-generic
linux-image-3.13.0-43-generic linux-image-extra-3.13.0-43-generic
python-argparse
Use ‘apt-get autoremove’ to remove them.

sudo apt-get autoremove

Note: Following message, where I opted for keep local file
A new version of /boot/grub/menu.lst is available, but the version â
â installed currently has been locally modified. â
â â
â What would you like to do about menu.lst? â
â â
â install the package maintainer’s version â
â keep the local version currently installed â
â show the differences between the versions â
â show a side-by-side difference between the versions â
â show a 3-way difference between available versions â
â do a 3-way merge between available versions (experimental) â
â start a new shell to examine the situation

Note: Msg that said, “W: Operation was interrupted before it could finish”, but leaving as is for now

RESOLVED: Fixing Adobe error (Error: BrokenCount >0) within Ubuntu Netbook

Overview:
This error was self-inflicted as I remember the computer was shutdown during an upgrade. Focus being on Adobe.
Error message shows up when doing upgrade and there is a also a StopSign at the top of the screen.
Desired Outcome:
Fix whatever is ailing the system so I can continue getting updates/patches, etc
Next Actions:
sudo apt-get update
-Came back at the end with, “N: Ignoring file ‘salutis.net’ in directory ‘/etc/apt/sources.list.d/’ as it has an invalid filename extension
Someday posted this in a forum: You probably have some package that has loads of dependencies. To have a look, type sudo aptitude. That should let you see the problem…
-Sounds correct, as I think there is an issue with a dependency regarding Adobe Flash
-System came back with “Suggest 5 keeps”. Ended up clicking “G” which seemed to be the right thing to do — Update/Resolve packages.
-Note: During this process, it failed with this message “Errors were encountered while processing: adobe-flashplugin. e: Sub-process /usr/bin/dpkg returned an error code (1). A package failed to install”
-Note: Within Aptitude, I searched for “adobe-flashplugin”. Came back with Adobe Flash Player plugin Version 10> This package will download… I clicked on “G” to download/install/remove pkgs. Came back with: dpkg: error processing adobe-flashplugin (–remove): subprocess installed pre-removal script returned error exit status 2. No apport report written because MaxReports is reached already postinst called with argument ‘abort-remove’ dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: adobe-flashplugin
-Found this link: http://askubuntu.com/questions/100463/adobe-flashplugin-conflicts-with-flashplugin-downloader-error-while-trying-to
-I ran “sudo apt-get remove flashplugin-downloader” and got back — Package flashplugin-downloader is not installed, so not removed. It recommends running “apt-get -f install” because there are several unmet dependencies: Firefox: Breaks: adobe-flashplugin and other errors about file called salutis.net within /etc/apt/sources.list.d
-Ran “sudo apt-get -f install” as the system and the boards appear to be recommending this and got — Following extra packages will be installed – firefox firefox-globalmenu; Suggested packages: latex-xft-fonts; The following packages will be removed – adobe-flashplugin; The following packages will be upgraded: firefox firefox-globalmenu. After running, same errors as before — no change.
-Tried this command from another board: sudo apt-get remove –purge flashplugin-installer (which came back with the error that it wasn’t installed, but there are unmet dependencies).
-This board post maybe close — http://support.mozilla.org/en-US/questions/926213
I followed the idea of going to mozilla.org and downloading latest firefox, which is version 13.0.1. Clicked on Open with Archive Manager (default). Reading Archive… Extracted to new folder — FireFox13; Clicked on Updater (Note: I think that’s the right thing to do); Note: Not very clear on what to click to run the installer to upgrade FireFox; Restarted — still on FireFox 12; Went into Ubuntu Software Center; Something about repairing package manager before I can install/upgrade — still coming back within error about adobe-flashplugin
-I love it how people say “I installed manually” but don’t say how they did that — I found http://www.liberiangeek.net/2012/04/download-and-install-firefox-manually-in-ubuntu-12-04-precise-pangolin/. I attempted to remove FireFox Web Browser within Ubuntu Software Center and of course got the package system is broken. It did come back with: firefox: Depends: libgcc11 (>=1:4:1.1) but 1:4.6.3-1ubuntu5 is installed. Recommended to remove any extensions. Removed UbuFox extension for Firefox – mentioned that it enables searching for missing plugins from ubuntu software catalog. Same error – package system is broken.
-This site may be something — http://ubuntuforums.org/showthread.php?t=1974285
-Tried going to this site — get.adobe.com/flashplayer — 11.2.202.236 Some message about Adobe Flash Player 11.2 will be the last version to target Linux as a support platform. Adobe will continue to provide security backports to Flash Player 11.2 for Linux — I think this means when I’ve fixed this issue I need to find something that doesn’t rely on Adobe. Downloaded, but the readme file assumes a deeper knowledge of placing files, than I currently have.
-This link is getting closer to what may have happened — http://askubuntu.com/questions/144152/ubuntu-upgrade-breaks-firefox
Edit the following file with root permission (e.g. sudo vim):
/var/lib/dpkg/info/adobe-flashplugin.prerm
Go to the line:
set -e
Delete the line. Save the file and reissue your upgrade commands. (I actually proceeded to remove and re-add flash and Firefox.)
N.B. caveat emptor: the fix may have side-effects I haven’t seen yet but I’ve survived a week.
Explanation:
The problem is the adobe-flashplugin “prerm” (pre-remove) script expects update-alternatives to exit cleanly. Our (I had the same problem) systems aren’t exiting cleanly there. The fix says ignore the error and keep going.
-Note: I commented out the “set -e”; update-manager -d (which run upgrade manager, and said I could only do a partial upgrade, which I attempted);
– https://bugs.launchpad.net/ubuntu/+source/adobe-flashplugin/+bug/412944
-After attempting again the partial upgrade, considering I had commented out the “set -e”, I still got the error: Could not install ‘adobe-flashplugin’ subprocess installed pre-removal script returned error exit status 2
-Note: Within the directory /var/lib/dpkg/info there are various files: adobe-flashplugin.postinst; adobe-flashplugin.prerm; adobe-flashplugin.list; adobe-flashplugin.prerm.save; adobe-flashplugin.md5sums
-Note: doing a nano adobe-flashplugin.postinst and commenting out the “set -e”. Note: I had to do “sudo su – ” to get into root
-Note: This time I was root and I think I actually save to this file -=- /var/lib/dpkg/info/adobe-flashplugin.prerm — I commented out the “set -e” and confirmed. To get into root — sudo su –
-NOTE: Freakin progress now that I did the “set -e”… After the removing adobe-flashplugin it gave a bunch of update-alternatives: error: no alternatives for iceape-flashplugin… Still gave error about: N: Ignoring file ‘salutis.net’ in directory… (See error above).
Note: These commands work in Ubuntu with “remove” vs “uninstall
sudo apt-get uninstall –purge adobe-flashplugin — ran ok
sudo apt-get uninstall –purge adobe-flash-properties-gtk – unable to locate package
sudo apt-get uninstall firefox – ran ok
sudo apt-get install firefox – ran ok
sudo apt-get install flashplugin-installer – ran ok
Note: So far so good, but the fact is that I don’t really understand what I’m doing — just following directions. I’ll add to my Read/Review list to go deeper into this stuff.
Note: Flash Plugin installed.
-Ran Firefox and confirmed version 13.0.1
-The StopSign went away — awesome…
-Went into Ubuntu Software Center – clicked in top right on “Updates Available” — The software on this computer is up to date. That means that when I ran the partial upgrade it completed all necessary updates.
-Went back into terminal and checked /var/lib/dpkg/info and the there is only one file now for adobe-flashplugin.prerm.save

Upgrading Ubuntu Netbook to the latest – 10.10

I was just randomly going to the www.ubuntu.com site to see what’s been happening and now I see that they’re up to version 10.10 for all version.

Need to go to: http://www.ubuntu.com/netbook

I have 10.4 LTS on my Acer Netbook, so I’m going to upgrade to 10.10, which looks very slick.

Looks like even cleaner UI, Social Networking interfaces, and improved Video Editor. The Video Editor may also be fun to play with — not sure if I can attach hard-drive via Netbook USB, but we’ll see about that later.