Cannot boot using live CD in grub rescue mode I think I destroyed my laptop using fdisk. I had an unallocated part of my hard drive from an old Windows install. I tried to get it back for my Ubuntu, but I lost everything somehow.

My screen shows the following:

error: no such partition.
Entering rescue mode...
grub rescue> ls
(hd0)

grub rescue>

I can't even boot from the installation CD. Nothing works. What can I do to make my laptop boot up using the live CD?

To me, this looks like your computer is set up such that your HD is the first boot device. If that's the case or if you're unsure, you should check in your BIOS if your CD / DVD drive is set before the HD in the boot order.


Xfinity tv not using pipelight flash I have ubuntu 14.04 with pipelight installed.  When I try to watch videos on xfinitytv.comcast.net, it says i'm using flash 11.2.  When I go to the adobe site, it tells me I'm using 15.  Why do some sites think I'm using 11.2 while others think 15?

Update:  I thought it might be because it looked at my user agent and knew I was using linux, so I switched it to

Mozilla/5.0 (Windows NT 6.1; rv:23.0) Gecko/20131011 Firefox/23.0

but that didn't work either.

These are instructions for getting xfinity to work in Linux, without a VM or Playonlinux. Playonlinux was slow and crashed for me. I am sharing these instructions since setting this back up after I upgraded my system took too long.

The solution for xfinity on Linux is Firefox + Pipelight + UA override.

Assume Firefox is installed. No Silverlight in Chromium or Chrome, so that will not work.
Install Pipelight (pipelight.net/cms/installation.html)
Install x64 Flash (assuming you're using a 64 bit machine)

sudo pipelight-plugin --unlock x64-flash
sudo pipelight-plugin --enable x64-flash

Install Silverlight

sudo pipelight-plugin --unlock silverlight
sudo pipelight-plugin --enable silverlight

Change to Windows user agent

Since this is all I will use Firefox for, make the change for everything and permanant. See How to Change Your Browser’s User Agent Without Installing Any Extensions on How-To Geek.

  Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1

Verify Windows user agent, Silverlight version, Flash version. OS does not matter. Visit this address:
http://xfinitytv.comcast.net/computer
Enjoy xfinity on Linux!

I followed these instructions to replace the 11.2 flash extension with the pipelight flash.  It's buggy, but it works.


nm-applet does not work Ubuntu 14.04 The network manager nm-applet has disappeared from the unity panel of my Ubuntu 14.04. When I try to run it from the commas line, I receive an error:

$ nm-applet
nm-applet-Message: using fallback from indicator to GtkStatusIcon

(nm-applet:6409): nm-applet-WARNING **: Could not find ShellVersion property on org.gnome.Shell after 5 tries

I do not know if it is directly related but ever since this, running System Settings-> Network does not display 'Mobile Broadband' even though the datacard is connected to the system. The datacard does not work any more.

EDIT:
The following command as suggested by user 'mkayaalp' also gives an error:

$ nm-applet --shell-debug
nm-applet-Message: using fallback from indicator to GtkStatusIcon

(nm-applet:6848): nm-applet-WARNING **: Could not find ShellVersion property on org.gnome.Shell after 5 tries
nm-applet-Message: PID 0 (we are 6848) sent signal 2, shutting down...

(nm-applet:6848): GLib-CRITICAL **: Source ID 107 was not found when attempting to remove it

EDIT2:
The problem of the icon for nm-applet not appearing on the unity panel is not unique to it. This problem also persists for 'Psensors' even though in options it is set to show on the unity panel.

P.S.: Searching on google and on askubuntu.com mainly brings up results regarding Lubuntu 14.04.

I'm afraid both messages look unrelated to your problem with Mobile Broadband connection.

nm-applet-Message: using fallback from indicator to GtkStatusIcon

simply means that a Gnome Panel was not found and it is using the status icon instead.

nm-applet-WARNING **: Could not find ShellVersion property on org.gnome.Shell after 5 tries

This message means that it tried to get the version of the Gnome Shell from DBus but failed for 5 attempts. On my system, there is no org.gnome.Shell service. But you apparently have and there is something wrong with it.

One thing you might want to try is running it as:

nm-applet --shell-debug

This should remove that second message, but I doubt it will resolve the broadband issue.

EDIT: I should mention that both these messages are not errors.

The following means that SIGINT was delivered and applet is exiting, which is what happens when you hit Ctrl+C in the terminal.

nm-applet-Message: PID 0 (we are 6848) sent signal 2, shutting down...

For next message, see this bug. It is GLib warning and not an error. nm-applet gives the same messages on my system (except for the dbus related message) and it works.

(nm-applet:6848): GLib-CRITICAL **: Source ID 107 was not found when attempting to remove it

Since you say the same thing goes for psensors, I am convinced that your problem is not nm-applet. It looks like your systray is missing. Try to run the following minimal python script for creating a status icon and see if anything shows up:

#!/usr/bin/env python
import pygtk
import gtk

i = gtk.StatusIcon()
i.set_from_stock(gtk.STOCK_INFO)
i.set_visible(True)
gtk.main()

Put this in a file and name it test.py. Execute chmod +x test.py and ./test.py. You might need to install python-gtk package, if not installed.

Try reinstalling nm-applet:

sudo apt-get remove nm-applet

sudo apt-get install nm-applet


Ubuntu isn't playing dvd Same DVD is playing in windows, but ubunut(16.04) isn't displaying any media. /media/ directory is empty. It contains video only.

i had tried these commands but it didn't work.

sudo apt-get install libdvd-pkg
sudo apt-get install libdvdcss libdvdread4 libdvdnav4
sudo apt-get install gstreamer0.10-plugins-good
sudo apt-get install gstreamer0.10-plugins-base
sudo apt-get install vlc
sudo regionset /dev/sr0
sudo regionset

Any help would be appreciated.

I think that the order of commands is important.  The command to install the libdvd(css/read4/nav4) should have come first, and then the libdvd-pkg install command should have been issued.

The simple thing is to try:

sudo dpkg-reconfigure libdvd-pkg


Can't install Ubuntu 12.10 with USB I've downloaded the .iso file (ubuntu-12.10-desktop-i386.iso), and then used Unetbootin to make my 16Gb Kingston pendrive a live-USB. Then I restart my notebook (samsung r580) and access the BIOS. I select the option to boot from USB, and restart again. The options screen appears. So far, everything is fine.

I choose Install Ubuntu, then I select the language and then I try to select install alongside an existing W7. Here is where I have trouble. Clicking "continue" restarts the system, and the option screen appears again and again and again.... What am I doing wrong?

Oh, I also did the checksum, it's just fine.

EDIT

Ok, I've tried several options in the BIOS (enable/disable Legacy OS Boot and Large Disk Access Mode) and... still not working

I went to test the Live version and tried installing from there. It asked me to unmount partitions, I selected no, and that wouldn't allow me to install inside Windows 7, so I went back and selected yes, showing me again that option. Then I selected the 'Something else' option and there I saw the following info:

sda ATA SAMSUNG HM321HI

sda1  ntfs  16106MB   12447MB   Windows Recovery Environment (loader)

sda2  ntfs  104MB     35MB      Windows 7 (loader)

sda3  ntfs  151928MB  75593MB

sda4  ntfs  151930MB  3221MB

I know these are the partitions of the HDD, sda3 and sda4 being C: and D: respectively. These 4 partitions are ntfs formated, maybe this is what is wrong? Do I have to format sda4 with FAT32 or something? Add a new partition so sda4 becomes a loader sector?

For the guy that says I should use Universal USB installer, I have the same problem with it, it restarts for ever. Thanks anyway.

UPDATE

Following @Sand Dust's comment, I did have 4 partitions, so using the installer I could set the sda4 partition (D:) as free space (un-allocated?)

After reading a lot (lol), I've created 3 partitions manually: / (30GB ext4), /swap (6GB) and /home (96GB ext4). And then... finally! install begun.

However, after restarting, it goes straight to Windows.... right now I'm in the live version and I see the / and /home directories, so I guess the install process went just fine.

What's wrong this time? Could it be something about GRUB? I'm gonna keep reading...

So, finally got it solved. The aim of the question was that I couldn't install from the Live-USB, because it restarted over and over again. The problem was the partition of the HD (in Ubuntu terms, the sda device). It had 4 partitions, as @Sand-Dust mentioned, and all 4 of them were primary, with only one of these partitions empty, so there was nowhere to install Ubuntu (since from what I learned, it needs at least 2 partitions to install). The solution then was to ¿un-allocate? the partition sda4 (D:) and create 3 partitions in this now empty free space, all of this partitions being logical. You can do this with the installer, under the 'Something Else' option.

So after this, I've got Ubuntu intalled, but when restarting, it didn't show me the OS options, and started Windows... instead of messing with the GRUB, or Boot Repair, I chose to re-install Ubuntu, and now I'm writing from it.

Thanks for the comments and help.

Did you format the USB as Fat32? For the boot to work properly, it has to be Fat32.

Also, make sure that there are no CD's, other USB's or something like that connected.


How do I prevent telnet from timing out? Is there a way to disable a telnet session from my desktop to a server from timing out, ever. This should be done from the client if at all possible.

Does it have to be telnet? Using plain telnet is highly discouraged due to it not being very secure.

If you can use SSH, it has two features that will help you: TCPKeepAlive (which is enabled by default, so no need to use it) and ServerAliveInterval (which is disabled by default, so enabling this may help you).

From the man page (man ssh_config):

 ServerAliveInterval
         Sets a timeout interval in seconds after which if no data has
         been received from the server, ssh(1) will send a message through
         the encrypted channel to request a response from the server.  The
         default is 0, indicating that these messages will not be sent to
         the server, or 300 if the BatchMode option is set.  This option
         applies to protocol version 2 only.

To use this on a one-time basis:

ssh -o 'ServerAliveInterval=30' your-server.com

To use it always, add ServerAliveInterval 30 to your .ssh/config file:

Host *
  ServerAliveInterval 30


How can I have a Very secure Ubuntu Desktop system How can I have a Very secure Ubuntu Desktop system and where is the best place online to learn about hardening Linux, not just Ubuntu?

Basic rules of computer security: strong passwords, have a firewall set up, don't click on something you're not sure about, and don't log in as admin/root unless you 100% have to.

Viruses aren't as much of a problem on linux as on windows, but social engineering in emails, javascript in browsers, and malicious links are still there.

Among other things, set up an admin password on your router; see my answer on this question.

A good place to start learning about security is the movie "Blackhat", now in theaters (yes, seriously). There's also learning from other perspective, from intruder's perspective. You can search online for tutorials on basic pentesting/ethical hacking and books.

Here's some of my favorite sources to start you off on reading about security.

cyberciti blog
security.stackexchange.com
https://serverfault.com/
Ubuntu Wiki

well. . . . when it comes to linux, it is already secure. it has it's own built in firewalls to keep "sensitive" documents from being touched. if you want more security, i would go with something like Avast for ubuntu. you can get the installation file from the website and then you need to download WINE and or WINE Tricks. when you finish downloading avast, right click over the file and click on "run in WINE." from there it's just a matter of registering either the free version or just buy a protection plan. This is if you wanted something like Avast. i am also putting a link to 5 of the best antivirus programs for ubuntu.

Top 5 AntiVirus programs for Ubuntu

Now, for the firewall. You also need to make sure you have a firewall, not just antivirus. I will post two links for the firewall. one is to 'harden' Ubuntu's built-in firewall and the other is for other firewall software that you can download (mind you, they are the best as well, and FREE!!!!).

How to configure Ubuntu built-in firewall

http://tecmint.com/open-source-security-firewalls-for-linux-systems/


How to highlight just the name (not the extension) for renaming? Is there a way to turn it off so that when you're renaming a file, it doesn't highlight the extension?

Use something else than Nautilus' List View mode. It works fine in the Compact View and Icon View modes. Apparently it's a regression: https://bugzilla.gnome.org/show_bug.cgi?id=627110

Update:This is now fixed in the development version of Ubuntu 11.10 (Nautilus 3.0.1.1).

to get only name without extension:

${var%.ext}

where ".ext" is extension

following a test script. to effect changes alter the commented line

for name in `find ./path -iname "*pattern*.ext" `; do
    new_name=${name%.ext}newextension
    if [ "$new_name" != "$name" ]; then
        echo “$name => $new_name”
        # mv “$name” “$new_name”
    fi
done


Lutris doesn't work when I try to install it $ sudo apt install lutris
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
 lutris : Depends: python3-evdev but it is not installable
          Depends: cabextract but it is not installable
          Depends: fluid-soundfont-gs but it is not installable
          Depends: mesa-utils but it is not installable
          Recommends: gvfs-backends
          Recommends: libwine-development but it is not installable
          Recommends: winetricks but it is not installable
          Recommends: libc6-i386 but it is not going to be installed
          Recommends: lib32gcc1 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Here is the message that it gives me.
I already tried to upgrade my system.

0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

i was able to solve this by installing build-essential following
https://railsblogs.rohityadav.in/2019/06/e-package-aptitude-has-no-installation.html

follow the steps in the link until the last(install aptitude)
restart
apt-get update followed by apt-get upgrade followed by apt-get dist-upgrade
and then sudo apt-get install --fix-missing lutris

there is no need to use aptitude


How can I boot from a 16 Gb pendrive with some old BIOS? I need to boot Ubuntu in a computer (computer A) with no CD. I have a 16 Gb pendrive with a live Ubuntu version. The pendrive works in at least two newer computers. Computer A boots from a 2Gb pendrive right. So it's likely a BIOS issue.

But it's quite inconvenient to always carry two pendrives, how can I made the older computer boot from the bigger drive?.

Notes:

Repartitioning the drive doesn't seen to work.
I noticed than the 16 Gb pendrive is seen like a external zip drive by the BIOS, while the smaller one is seen as a Hard Disk. Likely related.

Very often you can run in to problems with high-capacity usb-sticks and old hardware, most of the time the it is only BIOS that seems to be the problem. So if the BIOS can be upgraded then try that.

The only other solution (afaik) is to kickstart usb-booting from a floppy-disk, and that is not really an alternative to carrying two sticks.

If you are interested in the floppy method you should look at the grub documentation, and this brief guide on how to dd the precompiled image for pendrivelinux, after writing the disk you might have to edit the grub-config file on there.

The best way to create a USB multiOS bootable is with Yumi and has to be on FAT 32.

Firstable add the unlisted ISOs , and secondary the main ISOs example Ubuntu 11.04 x86, Ubuntu 11.04 x64.


Why does Grub2 break EVERY time I update my laptop? I'm running Ubuntu 11.04. I just don't understand it. It doesn't matter if it is a kernel upgrade, or an Adobe Flash update. The next time I restart my computer Grub2 breaks. All I get is a blinking "_". Then I have to boot into a live CD, mount my FS, run

sudo grub-setup -d /media/FS_NAME_HERE/boot/grub /dev/mapper/isw_blah_blah_blah

and then restart, then run

sudo update-grub.

It only happens when there is an update. Because if I don't run anything, and I make sure to run sudo update-grub after I reinstall it then I can restart as many times as I want--but only until I update something else.
I'm 70% sure everything still works after I install something new. If it'll help I'm running a Sony Vaio Z. There are 2 solid state chips on board that are in a raid0 array. I've never had this problem before I just switched back to Ubuntu.

Sometimes when the system is updated, it configures grub again. As I could see, you use a RAID array. You have to reinstall grub in the MBR of your array. That done, I don't think you will keep having this problem. Try BootRepair:

http://www.webupd8.org/2011/06/boot-repair-fix-ubuntu-boot-issues.html

or, you just try something else [ trust me ist's even better ]

https://wiki.ubuntu.com/LightDM


Installing Ubuntu on Mac using Bootcamp Am currently running Ubuntu 11.10 on Mac using Parallels. Its only 2 days that am using Ubuntu, am quite impresses with the OS features. Am now planning to install the OS using bootcamp in Mac. I would like to know more about the following

Is it possible to install Ubuntu on Mac using bootcamp.
If Yes(#1), can I install using the ISO file or do I need setup CD for the same.
Whats the ideal configuration required to install Ubuntu 11.10 (HDD space, Memory)
After installation, how do I connect to internet.

Any assistance is highly appreciated.

I would keep using it as a virtual machine until you get more confident within the OS.

A longer but easier/safer method of installation is to install Bootcamp then Windows, then use the Ubuntu installer in windows to share the Bootcamp space. You could also then delete the windows data and reclaim the space.

Here is a guide after getting windows into to install ubuntu:
http://www.makeuseof.com/tag/how-to-safely-dual-boot-windows-and-linux-with-wubi-installer/
Its for an older version but should still apply

If you want to go the true dual boot method on OSX, read up:
https://help.ubuntu.com/community/MactelSupportTeam/AppleIntelInstallation
AND BACKUP, especially when messing with EFI

You can just install the Ubuntu 11.10 ISO file and burn it to a USB drive and then reboot and install Ubuntu through the partitioning option.


How to create a non-nat access point with nmcli? I am trying to create what is essentially a home router with nmcli. I would like the client devices that connect to be on the same subnet regardless of whether they connect with ethernet or wifi. However when I create my wifi hotspot it creates its own subnet behind a nat. So the devices on the Ethernet are not able to access the devices that are connected via wifi.

The command I am using to create the wifi hotspot is

nmcli c add type wifi ifname wlan0 con-name test autoconnect no ssid test -- 802-11-wireless.mode ap ipv4.method shared 802-11-wireless.band bg 802-11-wireless.channel 6 802-11-wireless-security.key-mgmt wpa-psk 802-11-wireless-security.psk MyPassword

I have tried several things to get this working.

First i tried to switch the ipv4.method to auto, however this forces the connection to never start. Then I tried to create a bridge between Ethernet and the WiFi, however it looks like ap mode does not support bridges in Ubuntu. Everyone, seems to be setting up just a natted access point.

Does anyone have an idea how I can set up an access point that does not create its own nat and subnet?

Your command is not correct.
Try this

nmcli c add type wifi ifname wlan0 con-name test autoconnect no ssid test
nmcli connection modify sentinel 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli connection up test


Boot repair: “GRUB is still present. Please try again ” message is displayed while reparing the boot with ubuntu 18.04.5 LTS I have tried running boot-repair on my laptop and am receiving the message "GRUB is still present. Please try again."
Below is the URL to paste from boot-repair
http://paste.ubuntu.com/p/Tght56pCRP/
Thank you for the help!

you should run gparted and format the boot drive and have the boot-repair reinstall grub. you can backup the drive if you are afraid of losing any info there. Mostly you got nothing to worry about though, I've done it many times and grub can be installed again with boot-repair on that drive.
Note: you may want to go to gparted again after to set the boot flag for the boot drive. you can do it after you format or before you start as well just as an extra step. can't hurt to check it after because sometimes the flag is not added and the system does not boot just because of that even though the repair is done.


Ubuntu 18.04 How to bypass "Auto suspend" while network traffic? I am using ubuntu as NAS with Samba connected via Ethernet on my router to organize photos and movies. Automatic suspend is on after 15 minutes idle and it's working fine. It's also working fine when pressing a button to awake or via wol magic packets thru a client. I am using my laptop, 3-4 mobile phones, a tablet, and a pc to save photos and family documents as window or android clients to the server. I connect via wifi to the server for watching movies.
The problem is that the server is suspending while I am watching (streaming) a movie. (vlc or kodi). Everything else is working fine!
I want the server to suspend when idle and NO network traffic.
How to do this?

Installed: ubuntu 18.04.1 lts. Gnome 3.28.2.
AMD® Ryzen 3 2200g, 8gm ram, boot:ssd128gb, 3tb toshiba (data and movies)

Here first main website and second explained for use NAS. I used in my desktop, this daemon works fine.
Development major was for server, but as I mentioned It work in desktop.

https://github.com/languitar/autosuspend
https://blog.ja-ke.tech/2020/05/30/nas-automation.html


Is it safe to manually perform 'apt-get update' 's operation? I am trying to keep one my systems up-to-date. The intended target is Not Connected to the internet. Am trying to get all the needed info from another machine with internet access.

After a bit of study, I found a way to achieve this. Can you please tell me if this is correct & safe?

  Here is my understanding of the apt-get process..

  First, we run the command 'apt-get update' : This connects to all the repositories mentioned in the '/etc/apt/sources.list'.. And,
  downloads all the Packages.gz files like
  (in.archive.ubuntu.com/ubuntu/dists/trusty/main/binary-amd64/Packages.gz)
  & saves them in a similar name under '/var/lib/apt/lists' (for the
  above mentioned url the corresponding file is
  in.archive.ubuntu.com_ubuntu_dists_trusty_main_binary-amd64_Packages)
  Then, when we run 'apt-get upgrade' (or) 'apt-get install pkg_name', this checks the locally installed package list with the local meta-data
  downloaded & stored at '/var/lib/apt/lists'. And, then gets the
  download url from that & asks for user confirmation before downloading
  & installing the required packages.

This is my plan to keep the isolated machine up-to-date..

Get the list of packages to download from the /etc/apt/sources.list conf file at the target machine..
Download the meta-data files Packages.gz at another machine..
Copy these files to target machine's /var/lib/apt/lists under appropriate filename.
Run the apt-get --print-uris upgrade (or) apt-get --print-uris --yes install pkg_name to get the list of all the packages needed for that machine.
Download these packages again at the second machine.
Copy them to the target machine.
Run the dpkg -i pkg_list to install all the missing packages.

I am able to achieve my goal using this process.

My question is : Is this correct & reliable? Or is there an easier way to achieve this?

This should work in theory, but I have two ideas regarding that:
Copy the downloaded debs to /var/cache/apt/archives/ instead of installing them with dpkg -i. Thats where apt checks for packages and downloads them to.
And probably even better: Check out apt-zip:

APT-ZIP is a package to update a non-networked computer using apt and a (removable) media (harddisk, USB key, ZIP drive...)
The apt-zip-list and apt-zip-inst commands simplify the upgrade process of a non-networked Debian host using apt , by using (preferably high-capacity) removable media, like a ZIP or USB drive.
apt-zip-list produces two files. One is a `fetch´script (supporting wget backends, in a modular, extensible way) that can be used on another host (maybe not running a Debian system with good connectivity to the Internet) to fetch packages previously selected in dselect(8) or indicated in the command line and then install the packages on your Debian box; the other apt-zip.options saves the options used by apt-zip-list to indicates to apt-zip-inst what action to perform and/or which packages to install.

Short answer is No.

What you are saying is an Ubuntu running without internet which in itself is pretty bad because you don't get OTA Updates for your version and your bugs will not get removed and neither will repository support be available.

This is not recommended for Ubuntu as it will have you running on a flavor that is not supported by the community. I only mention this because many smaller (not less important updates) are not available in the lists folder so will not be installed on your system.

As for actually doing it you could change the sources file at /etc/apt/sources.list to point to a location in your system.

However, like i said this is not going to help you cause what you are doing is trying to update your Ubuntu which would technically not be happening. But you could still Partially update Ubuntu using what i said above.

As for whether there is a better way to do this: not without a network connection, i don' mean an internet connection but a "network connection' that is, 2 of your computers connected with a LAN cable so here you could point the sources.list file to the network address of your connected computer which then points any incoming connections to the correct server (basically mirroring) but here too you need an internet connection on the second computer so.... for your situation still nothing.


How to remove nodejs from Ubuntu 16.04? Steps to replicate:

Ubuntu 16.04 xenial (x86-64)

sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm

I want to uninstall nodejs and npm and have seen several posts which suggest this is the most common way:

sudo apt-get purge --auto-remove nodejs

However, this produces a prompt which seems to reference dependencies which, if they were removed, sound like they would cause problems.

What is the best way to "undo" the install of nodejs and npm?

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  gyp* libboost-python1.58.0* libjs-inherits* libjs-node-uuid*
  libjs-underscore* libssl-dev* libssl-doc* libuv1* libuv1-dev*
  linux-headers-4.4.0-18* linux-headers-4.4.0-18-generic*
  linux-headers-4.4.0-21* linux-headers-4.4.0-21-generic*
  linux-image-4.4.0-18-generic* linux-image-4.4.0-21-generic*
  linux-image-extra-4.4.0-18-generic* linux-image-extra-4.4.0-21-generic*
  linux-signed-image-4.4.0-18-generic* linux-signed-image-4.4.0-21-generic*
  node-abbrev* node-ansi* node-ansi-color-table* node-archy* node-async*
  node-block-stream* node-combined-stream* node-cookie-jar*
  node-delayed-stream* node-forever-agent* node-form-data* node-fstream*
  node-fstream-ignore* node-github-url-from-git* node-glob* node-graceful-fs*
  node-gyp* node-inherits* node-ini* node-json-stringify-safe* node-lockfile*
  node-lru-cache* node-mime* node-minimatch* node-mkdirp* node-mute-stream*
  node-node-uuid* node-nopt* node-normalize-package-data* node-npmlog*
  node-once* node-osenv* node-qs* node-read* node-read-package-json*
  node-request* node-retry* node-rimraf* node-semver* node-sha* node-sigmund*
  node-slide* node-tar* node-tunnel-agent* node-underscore* node-which*
  nodejs* nodejs-dev* npm* python-configobj* python-pycurl* python-pyexiv2*
  python-pyexiv2-doc*
0 to upgrade, 0 to newly install, 72 to remove and 0 not to upgrade.
After this operation, 631 MB disk space will be freed.
Do you want to continue? [Y/n]

Edit:

This is the output from sudo apt-get purge nodejs:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gyp libboost-python1.58.0 libjs-inherits libjs-node-uuid libjs-underscore
  libssl-dev libssl-doc libuv1 libuv1-dev linux-headers-4.4.0-18
  linux-headers-4.4.0-18-generic linux-headers-4.4.0-21
  linux-headers-4.4.0-21-generic linux-image-4.4.0-18-generic
  linux-image-4.4.0-21-generic linux-image-extra-4.4.0-18-generic
  linux-image-extra-4.4.0-21-generic linux-signed-image-4.4.0-18-generic
  linux-signed-image-4.4.0-21-generic python-configobj python-pycurl
  python-pyexiv2 python-pyexiv2-doc
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  node-abbrev* node-ansi* node-ansi-color-table* node-archy* node-async*
  node-block-stream* node-combined-stream* node-cookie-jar*
  node-delayed-stream* node-forever-agent* node-form-data* node-fstream*
  node-fstream-ignore* node-github-url-from-git* node-glob* node-graceful-fs*
  node-gyp* node-inherits* node-ini* node-json-stringify-safe* node-lockfile*
  node-lru-cache* node-mime* node-minimatch* node-mkdirp* node-mute-stream*
  node-node-uuid* node-nopt* node-normalize-package-data* node-npmlog*
  node-once* node-osenv* node-qs* node-read* node-read-package-json*
  node-request* node-retry* node-rimraf* node-semver* node-sha* node-sigmund*
  node-slide* node-tar* node-tunnel-agent* node-underscore* node-which*
  nodejs* nodejs-dev* npm*
0 to upgrade, 0 to newly install, 49 to remove and 0 not to upgrade.
After this operation, 27.6 MB disk space will be freed.
Do you want to continue? [Y/n]

As seen from the output of:
sudo apt-get purge nodejs

it is only removing node related packages i.e. relevant packages, nothing more.
On the other hand, when you do:
sudo apt-get purge --auto-remove nodejs

it is essentially doing:
sudo apt-get purge nodejs
sudo apt-get autoremove

and the removal of the gyp, linux-headers-4.4.0-18-generic etc packages are actually triggered by autoremove as they were installed as dependencies and no longer needed by any installed package, presumably because the main package has been removed.
So it is perfectly fine in this context to run:
sudo apt-get purge --auto-remove nodejs

If you are too paranoid, you can do it in two steps: first purge nodejs:
sudo apt-get purge nodejs

and then remove the orphan dependencies (till now, if any):
sudo apt-get autoremove

I had this challenge when working on an Ubuntu 20.04 machine with Nodejs.
For me, I had to run the following commands to remove nodejs and all of it's dependencies.
This is to remove nodejs and it's dependencies:
sudo apt-get purge nodejs

This is to remove any dependencies that are still left after removing nodejs
sudo apt-get autoremove

This is to remove the nodejs repository from the /etc/apt/sources.list.d directory:
sudo rm -rf /etc/apt/sources.list.d/nodesource.list*

Update your package repository list:
sudo apt-get update

Confirm if the node executable is still available in your machine:
which node

That's all.
I hope this helps


Installing Ubuntu Lost Windows As I was installing bunt on a system which already had Windows 7, I lost my windows 7 booting option. Now I cannot boot.
this is the RL I got after running boot-repair.
http://paste.ubuntu.com/p/nVKKymyP3M/

How can i recover my windows?

Also posting the outpt when I run commonds like os-prober and fdisk -l

root@ubuntu:/home/ubuntu# os-prober

/dev/sda1:Windows 7 (loader):Windows:chain

root@ubuntu:/home/ubuntu# fdisk -l

Disk /dev/loop0: 1.5 GiB, 1587904512 bytes, 3101376 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disklabel type: dos

Disk identifier: 0xabcc1cd3

Device     Boot     Start        End    Sectors   Size Id Type

/dev/sda1              63       2047       1985 992.5K 42 SFS

/dev/sda2  *         2048     206847     204800   100M 42 SFS

/dev/sda3          206848  524290047  524083200 249.9G 42 SFS

/dev/sda4       524290048 1953523119 1429233072 681.5G  7 HPFS/NTFS/exFAT

Partition 1 does not start on physical sector boundary.

Disk /dev/sdb: 14.7 GiB, 15724707840 bytes, 30712320 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: dos

Disk identifier: 0x001e9453

Device     Boot Start      End  Sectors  Size Id Type

/dev/sdb1  *     2048 30712319 30710272 14.7G  c W95 FAT32 (LBA)

if you made no partition when installing ubuntu, then you must have deleted windows completely so there is no other solution than reinstall windows.
The problem is if you reinstall windows you will lose the ubuntu grub, so install windows, and then install ubuntu, when you do that there is an option that says, "install ubuntu with windows" there is where you have to say yes, then it shows you how big do you want the partition, your set it as you like, and then install it. Now it should work well.


Will Linux Kernel 3.5 be coming to 12.04? I'm wondering if Kernel 3.5 or 3.6 will be available for Ubuntu 12.04 when the Kernel is officially released?

The Ubuntu Kernel team will be providing packages of all the kernels from the next 3 Ubuntu releases for 12.04. You can get the details on that here:

https://wiki.ubuntu.com/Kernel/Release/Rolling

These kernels will be named like this:

  linux-image-current- - always points to the the most recently released kernel, e.g., 12.10, 13.04, etc.

They will be available in the package manager but by default your 12.04 installation will use 3.2.x unless you specifically install one of these kernels.

As far as 3.5 itself, you can now use the hardware enablement stack:

sudo apt-get install linux-generic-lts-quantal xserver-xorg-lts-quantal

For all future kernel releases, you can always find the latest builds of the upstream kernel here:

http://kernel.ubuntu.com/~kernel-ppa/mainline/
How can I install a newer kernel?

However these packages are for testing and you probably shouldn't use them unless you need to or you know what you are doing.

Open the terminal and run the following commands to install Kernel 3.5.0 at your own risk for 32-bit/i386 systems:

sudo add-apt-repository ppa:upubuntu-com/kernel-i386
sudo apt-get update
sudo apt-get upgrade

or

sudo apt-get install linux

For 64-bit/amd64 systems, you can install with these commands:

sudo add-apt-repository ppa:upubuntu-com/kernel-amd64
sudo apt-get update
sudo apt-get upgrade

or

sudo apt-get install linux

Restart now your system to finish the installation. Then, check your current kernel version with this command:

uname -r

To remove Linux Kernel 3.5 and restore the previous kernel, run this command:

sudo apt-get purge linux-image-3.5.0-030500-generic


my windows os not showing when i try to create a dual boot I tried to install linux in another partition with my other os being windows but when the option for installing grub appeared it said they was no  other os on my system. How do i rectify this or what  error occurred for this to happen?

GRUB2 does not recognizes Windows Vista/7/8/10 boot loader. But you really don't need to.

Even so, you can install Ubuntu's distros without lose any data: just select the installation type option "something else" and resize the Windows partition (If you don't have enough space for Linux yet). Then, you can create the necessary partitions: a Swap partition with the same size as your RAM memory, and at least one ext4 partition to mount "/"... you can even set two partitions; one for the system (mount point "/") and one for the data (mount point "/home").

Now you can install without worrying about losing data. But once you get your Ubuntu installation you won't be able to boot Windows... don't dispair: you can fix it by using Lilo, a program that allows you to restore Windows MBR (Master Boot Record):

sudo apt-get update
sudo apt-get install lilo
sudo lilo -M /dev/sda mbr

Of course, you must be sure that your physical hard drive is "/dev/sda" (if you only have one Disk, it must be this... else, you can use Disks utility to verify).

Then reboot, and you will be able to boot Windows (but only Windows). Now it's time to restore Linux boot (yes, another restore): donwload and install EasyBCD (http://neosmart.net/EasyBCD/); an application to manage multiple boots. Here you can add a new entry on the boot list for Ubuntu (selecting GRUB2) and aiming to the ext4 partition where Linux is installed, and you can even decide what OS will be the default option. Don't be afraid, just make a backup of the MBR... EasyBCD allows you to. It have a very intuitive interface. You won't have any problem to use it, I hope.

It can happen, too, that some crazy future update on Ubuntu restore de GRUB2 original boot... then you won't be able to boot Windows; once again, don't dismay: this can be fixed using Lilo...

sudo lilo -M /dev/sda mbr

Abraham Medina.


Ubuntu 18 LTS, Upgrade Processor may affect Operating System? I had build new CPU with
Keep Motherboard Same
GIGABYTE GA-A320M-S2H AMD A320 AM4 MAX-32GB DDR4 Micro ATX PCIE16
Processor Replacement:
AMD Ryzen 3 2200G with Radeon Vega 8 Graphics Desktop Processor 4 Cores up to 3.7GHz 6MB Cache AM4 Socket (YD2200C5FBBOX)
Now I had bought "AMD Ryzen 7 2700" Octa Core new processor, like to replace
Problem Domain
Do I need to reinstall ubuntu operating system in case I change processor only ?
Note: Correct in case I explain wrong way.

Ubuntu Auto Check

Some people in forum indicate hardware auto check when boot and according it accept, so no need reinstallation of ubuntu.

Kernel!

Some people indicates due to kernel is tidy with hardware, so reinstall required.

Opinion

I found linux/ubuntu new upgrade of kernel auto managed hardware do all stuff and on operating system boot up / restart it automatically organize.

Yes. without reinstall CPU can be change, just power off and replace CPU and reboot operating system will works.


Widevine problems in Chrome and Firefox on Ubuntu 19.10 I am having problems streaming some TV sites (ITV Hub, BritBox) on Ubuntu 19.10 in Chrome. This is a recent problem that has only recently started, a few weeks ago there was no problem streaming these sites. I regularly update my system and if is therefore very likely that an update is responsible and I only noticed  days or weeks later.

I have started to look at the possibility that Widevine DRM is resonsible after James Shade Ubuntu 19.10 some drm content not streaming noted that-.

  The problem is the same in Firefox (72.0.1) and Chrome (79.0.3945.130)
  (with DRM enabled in both). I note that both ITVPlayer and BritBox are
  getting an error 400 from a call to
  itvpnp.live.ott.irdeto.com/Widevine/getlicense as the page loads (this
  returns with a successful 200 response in Windows). This was all
  working fine in December

I have looked at the folder /opt/google/chrome/WidevineCdm and found this manifest.json file.I notice that there is no Linux entry under "platforms-OS" surely there should be.

{
      "manifest_version": 2,
      "update_url": "https://clients2.google.com/service/update2/crx",
      "name": "WidevineCdm",
      "description": "Widevine Content Decryption Module",
      "version": "4.10.1610.0",
      "minimum_chrome_version": "68.0.3430.0",
      "x-cdm-module-versions": "4",
      "x-cdm-interface-versions": "10",
      "x-cdm-host-versions": "10",
      "x-cdm-codecs": "vp8,vp09,avc1,av01",
      "x-cdm-persistent-license-support": false,
      "x-cdm-supported-encryption-schemes": ["cenc","cbcs"],
      "icons": {
        "16": "imgs/icon-128x128.png",
        "128": "imgs/icon-128x128.png"
      },
      "platforms": [
        {
          "os": "win",
          "arch": "x86",
          "sub_package_path": "_platform_specific/win_x86/"
        },
        {
          "os": "win",
          "arch": "x64",
          "sub_package_path": "_platform_specific/win_x64/"
        },
        {
          "os": "mac",
          "arch": "x64",
          "sub_package_path": "_platform_specific/mac_x64/"
        }
      ]
    }

There is a file called "libwidevinecdm.so under /opt/google/chrome/WidevineCdm/_platform_specific/linux_x64 but I cannot read it.

I would really appreciate any help with this.

X86 = Intel (Wintel) Architecture 32 bit
X64 = Intel (Wintel) Architecture 64 bit
at a guess Mac64 = Apple Intel architecture 64 bit

Unless you have a Sun server, or something IBM your machine will be one of these architectures (there is no hardware specifically designed for Linux (yet).

I don't think this will impact the DRM.

An experiment might be to try running  Chrome as sudo (might pipe clean a rights "writer" somewhere).

https://unix.stackexchange.com/questions/175967/how-to-run-google-chrome-as-root-in-linux


14.10 Software Updater Crashing I am aware that a few questions are around about this. But mine is somewhat different. First, it shows Software Updater has crashed ( different from other errors posted here ). A crash report is sent to Ubuntu every time. Also unlike in other reports, Ubuntu Software Center is working fine ( thankfully ).

I use to get away with

sudo apt-get update

and

sudo apt-get upgrade

on terminal and get most of the updates without problem. But even after trying these commands ( and sudo apt-get update after that ), when I run Software Updater, I can still see an update for Ubuntu base ( see screen shot below )

It will be nice if someone knows

A solution to fix the crashing issue.
A way to update Ubuntu base via Terminal.

I have only part answer to this question as of now.

Use commands

sudo apt-get update

sudo apt-get dist-upgrade

These should update almost every component in your setup.

Since there are bug reports and last one seems being fixed as well. I hope these 3 commands at some point will fix the issue of GUI crashing as well.


"physical block size is 2048 bytes, but Linux says it is 512" when formatting USB - How to create a bootable USB without this error I was using:

dd  if=/path/to/my/ubuntuiso/ubuntu.iso  of=/dev/sdb1  bs=4M  &&  sync

In order to create bootable Ubuntu USB drives on older Ubuntu versions. It was working perfectly. Sometimes I used the Startup Disk Creator program, which  worked well.

But when I use the same methods on Ubuntu 16.04 LTS, I get some warnings while formatting it afterwards.

The installation media works as expected, but when I try to format that USB stick after my work is done, I get the following warning :

The partitioning of that Pendrive looks strange :

And it also shows my 16GB pendrive as 64GB.

After struggling a lot with Gparted, I will somehow format it. But Why is it happening like this ?? Is there any better methods of creating bootable Ubuntu in 16.04 ?

EDIT : there is a related question here. But my question is not about how to format it properly. My question is "How to create a bootable USB without that errors." & "Wht are the causes of that error"

A command-line method to make a live USB for UEFI systems

Please note: this deletes all data on the target device.

Install prerequisite:

sudo apt-get install p7zip-full

Assuming the target USB is at /dev/sdb

(please check first with lsblk or gnome-disks or sudo fdisk -l and be sure you know what you are formatting)

Make sure the device has no mounted filesystem and unmount it if necessary, for example:

udisksctl unmount -b /dev/sdb1

Destroy existing partition table:

sudo sgdisk --zap-all /dev/sdb

Create new GPT:

sudo sgdisk --new=1:0:0 --typecode=1:ef00 /dev/sdb

Format as FAT32:

sudo mkfs.vfat -F32 /dev/sdb1

Check it:

sudo fdisk -l /dev/sdb

Should output something like:

Device     Start      End  Sectors  Size Type
/dev/sdb1   2048 15663070 15661023  7.5G EFI System

Mount the drive and extract iso onto it, replacing 'name-of-iso' with the actual filename of the iso you downloaded earlier

sudo mount -t vfat /dev/sdb1 /mnt
sudo 7z x name-of-iso -o/mnt/

Unmount

sudo umount /mnt

Now reboot & enjoy Ubuntu ^_^

(Here's where I originally learned to do this.)

I had the exact same problem, even on a brand new SSD. I used Linux Mint 18.1 and  Ubuntu 16.04 LTS ISO versions. No matter how many times I redownloaded the ISO's, rewrote the ISO's and did all tthe steps suggested above to resolve the error mention, it just wouldn't go away. Strangely I did have Mint 18.1 installed and wanted to do fresh install but then encountered the error.
I even used the same USB sticks & SSD to install Windows 10, then rewrote the same USB disks AGAION with Ubuntu 16.04/Mint 18.1 and install failed.
My opinion is that there was either fault with the ISO file or my particular hardware not compatible.
I wasted several HOURS of my life.

** SOLUTION:
Downloaded Ubuntu 17.04 ISO & installed. Worked fine on the exact same hardware, same USB drives/sticks where Ubuntu 16.04 wouldn't have any of it.****


how to verify that sbin/init isn't infected? for sometime chkrootkit has been showing sbin/init as being infected with SuckIt rootkit. early this year when the warning first appeared a quick google search indicated that it was most likely a false positive.

I did a check again today and again chkrootkit says sbin/init is infected.

A few articles suggested that one could verify sbin/init with RPM.

i installed rpm and tried the command :

  rpm -qf /sbin/init

and it returned:

  file /sbin/init is not owned by any package

i also read somewhere that /sbin/init is supposed to be a syslink (although that was for a different distro) and on my system /sbin/init appears to be an executable file.

the command,

  ls -l /sbin/init

returns the following:

  -rwxr-xr-x 2 root root 252080 Jul 18 15:18 /sbin/init

is there anyway i could verify that /sbin/init hasnt really been infected?

I am running ubuntu 14.04 LTS on my laptop (not connected on a lan)

thank you.

EDIT:

i installed and ran rkhunter

its check against the "SuckIt" rootkit was negative, however it later reported:

  Performing additional rootkit checks
      Suckit Rookit additional checks                          [ Warning ]

and,

Checking the local host...

  Performing system boot checks
    **Checking for local host name                             [ Found ]
    Checking for system startup files                        [ Found ]**
    Checking system startup files for malware                [ None found ]

  Performing group and account checks
    **Checking for passwd file                                 [ Found ]**
    Checking for root equivalent (UID 0) accounts            [ None found ]
    Checking for passwordless accounts                       [ None found ]
    Checking for passwd file changes                         [ None found ]
    Checking for group file changes                          [ None found ]
    Checking root account shell history files                [ None found ]

  Performing system configuration file checks
    **Checking for SSH configuration file                      [ Not found ]
    Checking for running syslog daemon                       [ Found ]**
    Checking for syslog configuration file                   [ Found ]
    Checking if syslog remote logging is allowed             [ Not allowed ]

  Performing filesystem checks
    Checking /dev for suspicious file types                  [ Warning ]
    Checking for hidden files and directories                [ Warning ]

Rootkit checks...
    Rootkits checked : 292
    Possible rootkits: 1
    Rootkit names    : Suckit Rookit (additional checks)

Should i be worried?

UPDATE:
after looking at the rkhunter log i found out that the reason it has been warning against a possible suckit infection was because there were more than one hard links to /sbin/init, which was my own doing. after removing the additional hard link rkhunter reports a clean system.

so basically it's just chkrootkit reporting Suckit infection which is a possible false positive.

You can check the integrity of /sbin/init by installing the "debsums" package and running debsums -c.

This will check all files on the system and tell you if they've been modified since they were installed from their .deb files (if they came from .deb files).

If it comes back without reporting any changes, /sbin/init hasn't been modified.

If you want to check a particular package specifically without examining the whole system (which will generate a lot of I/O and may take time), you can find out what package it's in using dpkg -S /path/to/filename, for example:

# dpkg -S /sbin/init
upstart: /sbin/init

This tells you the file was installed by the "upstart" package (on 14.04 at least).

You can then use dpkg --verify upstart and it will tell you if any files have been modified from the base upstart .deb.

clamav will probably detect this virus?, don't know how to clean files though. You probably need to start a recovery session, mount the live cd manually. Copy init off the cd onto your hard disk.


Ubuntu 14.04 Desktop Sharing (VNC) encryptiom / auth problem I know this has been discussed, but I can not find a permanent fix.

I enabled desktop sharing, unchecked "manually approve every access", set a password, and I'm trying from the local network, or via SSH port forwarding as I don't like to permanently open ports from the router.

All the VNC clients I tried say either "Unsupported auth method." "Unknown encryption type". I can see the connection is arriving to my computer with tcpdump, but the clients don't know Ubuntu's method.

A usable workaround is typing in "gsettings set org.gnome.Vino require-encryption false" any time I'm going to remotely access. This means no encryption, but I'm running through a SSH tunnel, so I already have encryption.

I also tried the dconf thing, but I don't understand how to do it. (on the net I found that I need to disable remote access with dconf and set a password there, and whatever).
Does anyone know a fix, or maybe a VNC client that knows how to deal with Ubuntu's built in remote desktop server?

My response is probably very late for you, nevertheless it may help you if you haven't found another solution already.  The 100% vino compatible VNC client you can use is vinagre.  I am using it for years.  You can find it in the repos.  :)

p.s.  Vino is the name of the default VNC server in Ubuntu.


Django installed, but can't import django in python I've installed Django multiple ways, via apt-get and pip install. They all say I have the most recent version of Django. Now whenever I run python in Terminal and type in import django, I receive

ImportError: No module named django

However, when I run django-admin --version I receive

1.4.3

I know it's installed, but why is python not finding the django module?

python is not finding django because it's not on its path. You can see the list of paths python looks for modules like this:

$ python
>>> import sys
>>> sys.path

You can import django if you find the location it is installed, and add that location to python's path, for example like this:

$ PYTHONPATH=/path/to/django/parent/dir python
>>> import django  # should work now

But your real problem is that something's wrong with your python installation. If you have installed both python AND django using apt-get, then django should certainly be on python's path without dirty hacks like above.

That said, when working with Django, your best bet is to NOT use apt-get but create a virtual environment using virtualenv (you can install virtualenv itself using apt-get), and install Django and other modules your Django site might need using pip within the virtual environment. That way you can have multiple Django projects side by side, with precisely the Python modules and versions it requires. It's just a few extra steps to do, but definitely worth it and will save you from much frustration in the future.

I've got this problem when I renamed the project folder in PyCharm.

Terminal tab stopped getting into the Virtual Environment (venv folder). To fix that, I went to the Settings -> Project -> Project Interpreter and changed the folder there.
Django "disappeared". django-admin --version did not respond. To fix, I did pip install django within the venv.

It helped.


Detect and mount devices I upgraded Ubuntu today and everything works smooth except that Ubuntu doesn't detect any other storage devices. My / and /home partitions work fine, but my other partitions are just not detected. I wouldn't mind, except the same problem goes with USB sticks.

When I plug in a USB stick, the light goes on, but the computer detects nothing. Just to be clear, my mouse and keyboard are connected via USB and work fine.

Any idea how to solve this issue? None of the suggestions I found on the internet have any effect.

Solution 1: Try the Disks program (if you run Ubuntu with a GUI).
(check that the gnome-disk-utility package is installed)
(make sure that udisk2 package is installed)
Hit SUPERA to open the Application Lens and type Disks in the Search Applications field.
(SUPER is probably the key with the Windows icon.)
In Disks you can play with the automount options.
For example:

You have to click on the little icon with the two gears and choose 'Edit Mount Options'.

Solution 2: Using the CLI (for a headless installation)
Step 1. Check the blockdevices and the file systems that are assigned to those block devices.
lsblk

Here you see the blokdevice sdb with partition /sdb1. But it's not mounted. There's no file assigned to it.
Step 2. What kind of device is sdb?
sudo lshw

or
sudo lshw | less

So the USB stick - the block device /sdb - has the logical name /dev/sdb. And the FAT32 filesystem on that stick has the logical name /dev/sdb1.
Step 3. Mounting the USB-stick
We will mount /dev/sdb1 to /media/usbstick
sudo mkdir /media/usbstick

sudo mount -t vfat /dev/sdb1 /media/usbstick

Read the manpage of mount for other options.
Step 4. Did it work?
lsblk

Yes, we can see that the filesystem on the USB stick is mounted to /media/usbstick
Addendum : if there are no logical names like /dev/sdb, you should first create them.  See this information about setting up and controling loop devices with the losetup command

I too had similar situation where my pen drive became invisible.

I solved it by  using the Ubuntu utility program named Disks. Inside the disk tool, the pen drive was visible. I clicked on the gear icon inside disk(make sure that you have selected the correct device) and the used the format partition option with FAT (compatible with all systems and devices)


Segmentation fault in aptitude On our 64 bit Lubuntu 14.04 system, aptitude has started crashing with a bunch of scrolling errors, ending up with a seg fault.

*** Error in `aptitude': free(): invalid next size (fast): 0x00007fccc4012c50 ***

Googling hasn't turned up this error in relation to aptitude so I'm at a loss as to how to proceed.  I don't use the program frequently, so I am not sure when the problem started.  I know it was functional when I installed the system.

AlexGreg suggested a reinstall...at first I did just that with synaptic, with no joy.  But doing a "complete removal" in synaptic, then installing the package, did work.

Ive been having this problem for a few months now, and while its not a solution, Ive worked around it by installing synaptic for my package management instead.

If that doesn't work, you can manually install .deb's with alien


How to upgrade Ubuntu? How can I upgrade my distribution of Ubuntu to the latest version? I am running 14.04 currently.

Any help is appreciated.

You can manually update your Ubuntu by running the following commands in a Terminal ( Ctrl+Alt+T ):

sudo apt-get update
sudo apt-get upgrade

Additionally you can run:

sudo apt-get dist-upgrade

Use Software & Update, se the mid tab Updates, Se the notify at bottom, chose Notify me "for Any new vertion" Then you will be asked if you want to upgrade to 14.10 !
or use terminal sudo apt-get update followed by 'sudo apt-get upgrade'
Happy Ubunting.


MythTV cannot connect to database I'm new to Ubuntu, just installed Mythbuntu 12.04.3 (64-bit) from an iso (single fontend/backend combo). Seemed to instal fine, rebooted my machine only to find I was faced with a screen asking for country and language information (fine; UK, English).

However, the next screen says 'MythTV cannot connect to database' and I am presented with a form (one of two), which already contains data (hostname, password...) so change nothing. I click next (to get to screen two of two) again change nothing (both check boxes are left unticked) and click finish. This sends me back to the original country/language screen.

Is there a fault with the install? Have I missed something in the install/instructions? Is there a way of fixing this?

Appreciate your answers.

Edit your /etc/mysql/my.cnf and /etc/mysql/conf.d/mythtv.cnf files so that the bind address is your server address (the local network address) and not the loopback address (127.0.0.1).

Once you reboot it should connect.  If you're unsure what the password is, nano /etc/mythtv/mysql.txt -- the password is in there.

I have had the same problem and the only solution I have found is to install mythbuntu.  There seems to be some sort of a secret mythtv sect that requires a magic decoder ring or special handshake or something in order to give up the answer to this oft-asked question. I have a mythbuntu installation running and it does work but I have never been able to get mythtv to work on an existing desktop.


Canon printer won't print PDF files I am stumped with this situation. I have a new Canon Pixma MG5300 inkjet printer which is connected via USB. Anything else than PDF works perfectly fine: Ubuntu printer test page, LibreOffice files, web pages, Gimp images.

But it won't print any PDF file, from any PDF-viewer app.

When I print a PDF file, the printer wakes up just as usual, and the display shows "processing" as usual. But the output tray does not open (it usually does), and after a few seconds the display just goes back to idle. The file disappears from Ubuntu's print queue just as if it had been printed.

I've tried removing the printer and letting the computer rediscover and reinstall it.
I'm using default printer settings.
I've installed a number of PDF viewer apps from the Software Center, just to rule out that the built-in document viewer is to blame.
I've tried with a wide variety of PDF files -- some generated by SimpleScan, some downloaded from the Internet.
The printer also has a WIFI interface, so I've tried installing it as a WIFI printer and use that instead of via USB. No difference.

What can I do to troubleshoot this?

Ubuntu 13.10 detects and correctly identifies the printer, and provides drivers for it. I have not tried to find alternative drivers yet.

A little research shows that Canon releases a Debian printer driver. The release date is 2011 so I am unsure that it would be any better than the driver in Ubuntu 13.10 though.

Downloads for MG5300 series (select OS = "linux"):
http://www.canon.co.uk/Support/Consumer_Products/products/Fax__Multifunctionals/InkJet/PIXMA_MG_series/PIXMA_MG5350.aspx
(This page says MG5350 but the listed drivers are for the whole MG5300 series.)

Direct download link:
http://www.canon.co.uk/Support/Consumer_Products/products/Fax__Multifunctionals/InkJet/PIXMA_MG_series/PIXMA_MG5350.aspx?DLtcmuri=tcm:14-863341&page=1&type=download

There's also this scanner driver, but it might not be needed because SimpleScan works fine already:
http://www.canon.co.uk/Support/Consumer_Products/products/Fax__Multifunctionals/InkJet/PIXMA_MG_series/PIXMA_MG5350.aspx?DLtcmuri=tcm:14-863345&page=1&type=download

Simple solution.

Download Adobe Reader (it's free) and then you can print from there.

You can also control which pages to print, orientation etc.


How do you set the title of the active gnome-terminal from the command line? Is there a way to set the gnome-terminal title from within the terminal itself without having to right click on the tab. Something like:

active-terminal --title "Foo"

There was a related question previously with an answer that almost lets you do this: How to change Gnome-Terminal title? but that doesn't set the gnome-terminal tab title only the window title.

The following will set the terminal's title to "New terminal title":

echo -en "\033]0;New terminal title\a"

You will probably also have to change the environment variable PS1, first though, otherwise your changes won't show up because it will reset the title after each command. The default .bashrc that ships with Ubuntu contains the following line:

PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"

... the "\e]0;" code tells it to write everything up to the "\a" in both the title and icon-name properties. You need to remove that and set it to something like this (i.e. without the \e]0; code):

PS1="${debian_chroot:+($debian_chroot)}\u@\h \w\a$ "

Then any changes that you make with the above echo command will change the terminal title. If you're going to use this a lot, you can throw it into a function in your ~/.bashrc file:

set_term_title(){
   echo -en "\033]0;$1\a"
}

Then you can just set the title to "kittens" from the command line by doing:

set_term_title kittens

(You have to restart bash though after editing .bashrc, for your changes to take effect)

In Ubuntu 12.10 ( I am not sure about previous versions) there is the following line in  default .bashrc:

If this is an xterm set the title to user@host:dir
 case "$TERM" in
 xterm*|rxvt*)
 PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
  *)
;;
esac

Therefore, to have the title in the form  you want, you have just to edit the value of PS1 at this part. If you want, for example, to have the title as the name of the current directory just change  \u@\h:  to \w to \W


Can I use 14.04 MongoDB Packages with 16.04? Unfortunately the official Ubuntu package for MongoDB is still stuck on 2.6, which is ancient at this point (this bug didn't get picked up for vivid, wily or xenial).

MongoDB has not yet released a package for 16.04 (Xenial), so how can I use the 14.04 (Trusty) packages to install MongoDB 3.2+ on 16.04?

It's a bit of a hack but yes, this can be done. There is an undocumented step needed to actually start the service and (weirdly enough) unless you want to futz around with upstart job conversion manually, you need to install the Ubuntu mongodb package first, then remove it so that you have a usable service.  A straight install of the MongoDB packages will not give you a working service on a fresh 16.04.

Update - July 2016: The official fix for this (adding support for 16.04 to the packages) has been completed in the 3.3 dev branch as part of SERVER-23043 - and has been released as a backport in the 3.2 series as part of 3.2.7.  Hence, if you are using 3.2.7+ you do not need to do this and the official MongoDB package install should just work.

In any case, after doing the add/remove, follow the usual instructions for 14.04, summarized here:

# install the Ubuntu package (to get the service set up correctly)
sudo apt-get install mongodb
# Now remove it and continue with the MongoDB instructions
sudo apt-get remove mongodb
sudo apt-get autoremove
# import key
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
# add trusty repos
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
# update apt
sudo apt-get update
# install the MongoDB package
sudo apt-get install -y mongodb-org

The install succeeds, and thanks to the Ubuntu package we have all the pieces needed for a service, but attempting to start the service will initially fail:

$ sudo service mongodb start
Failed to start mongodb.service: Unit mongodb.service is masked.

Fixing this is not too hard:

$ sudo systemctl unmask mongodb
Removed symlink /etc/systemd/system/mongodb.service.

Now we can enable/start the service, get its status etc.

$ sudo service mongodb enable
$ sudo service mongodb start
$ sudo service mongodb status
● mongodb.service - LSB: An object/document-oriented database
   Loaded: loaded (/etc/init.d/mongodb; bad; vendor preset: enabled)
   Active: active (running) since Thu 2016-04-14 16:40:35 IST; 7s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2849 ExecStart=/etc/init.d/mongodb start (code=exited, status=0/SUCCESS)
 Main PID: 1593 (code=exited, status=0/SUCCESS)
    Tasks: 13 (limit: 512)
   Memory: 51.9M
      CPU: 100ms
   CGroup: /system.slice/mongodb.service
           └─2861 /usr/bin/mongod --config /etc/mongodb.conf

Success - and we get a nice pointer to the active config file (which is in the old key=value format, see here for examples in the newer recommended YAML format).

Note: There will actually be two config files /etc/mongod.conf and /etc/mongodb.conf thanks to slight differences between the two packages we have installed.  The now-active service points to the old-format one by default /etc/mongodb.conf - you can switch by moving/copying the mongod.conf to mongodb.conf if you so wish, or simply edit the file directly.

Once started, to test, connect to the database with the mongo shell:

$ mongo
MongoDB shell version: 3.2.5
connecting to: test
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
    http://docs.mongodb.org/
Questions? Try the support group
    http://groups.google.com/group/mongodb-user
Server has startup warnings:
2016-04-14T16:40:34.962+0100 I CONTROL  [initandlisten]
2016-04-14T16:40:34.962+0100 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2016-04-14T16:40:34.962+0100 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2016-04-14T16:40:34.962+0100 I CONTROL  [initandlisten]
2016-04-14T16:40:34.962+0100 I CONTROL  [initandlisten]
2016-04-14T16:40:34.962+0100 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2016-04-14T16:40:34.962+0100 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2016-04-14T16:40:34.962+0100 I CONTROL  [initandlisten]
2016-04-14T16:40:34.962+0100 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2016-04-14T16:40:34.962+0100 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2016-04-14T16:40:34.962+0100 I CONTROL  [initandlisten]

If you wish to get rid of the THP warnings, check out this answer.

If you have already installed it, remove mongodb by:

sudo apt-get remove mongodb
sudo apt-get autoremove

Try with recommendation on digitalocean https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04


Copying multiple specific files from one folder to another I have a large folder of pictures (thousands), and I have a long list of files, by exact file name, that I need to copy to another folder. I want to know if there is a way I can select several specific files from this folder, by name, and copy them to another folder, using the terminal, without copying them individually?

Simply copy multiple files at once from command line
There are several ways you could achieve this. The easiest I have seen is to use the following.
cp /home/usr/dir/{file1,file2,file3,file4} /home/usr/destination/

The syntax uses the cp command followed by the path to the directory the desired files are located in with all the files you wish to copy wrapped in brackets and separated by commas.
Make sure to note that there are no spaces between the files. The last part of the command, /home/usr/destination/, is the directory you wish to copy the files into.
or if the all the files have the same prefix but different endings you could do something like this:
cp /home/usr/dir/file{1..4} ./

Where file1,file2,file3 and file4 would be copied.
From how you worded the question I believe this is what you're looking for but it also sounds like you might be looking for a command to read from a list of files and copy all of them to a certain directory. If that is the case let me know and i'll edit my answer.
Dealing with duplicates with python
So I wrote a little python script that I believe should get the job done. However, I am not sure how well versed you are in python (if versed at all) so I will try explaining how to use this script the best I can and please ask as many questions about it as you need.
import os,sys,shutil
### copies a list of files from source. handles duplicates.
def rename(file_name, dst, num=1):
    #splits file name to add number distinction
    (file_prefix, exstension) = os.path.splitext(file_name)
    renamed = "%s(%d)%s" % (file_prefix,num,exstension)

    #checks if renamed file exists. Renames file if it does exist.
    if os.path.exists(dst + renamed):
        return rename(file_name, dst, num + 1)
    else:
        return renamed

def copy_files(src,dst,file_list):
    for files in file_list:
        src_file_path = src + files
        dst_file_path = dst + files
        if os.path.exists(dst_file_path):
            new_file_name =  rename(files, dst)
            dst_file_path = dst + new_file_name

        print "Copying: " + dst_file_path
        try:
            shutil.copyfile(src_file_path,dst_file_path)
        except IOError:
            print src_file_path + " does not exist"
            raw_input("Please, press enter to continue.")

def read_file(file_name):
    f = open(file_name)
    #reads each line of file (f), strips out extra whitespace and
    #returns list with each line of the file being an element of the list
    content = [x.strip() for x in f.readlines()]
    f.close()
    return content

src = sys.argv[1]
dst = sys.argv[2]
file_with_list = sys.argv[3]

copy_files(src,dst,read_file(file_with_list))

This script should be relatively simple to use. First off, copy the above code into the program gedit (should be pre-installed in Ubuntu) or any other text editor.
After that is complete, save the file as move.py in your home directory (it can be any directory but for ease of instruction lets just use the home directory) or add the directory the file is contained in to your PATH. Then cd to your home directory (or whatever directory you saved move.py in) from the terminal and type the following command:
python move.py /path/to/src/ /path/to/dst/ file.txt

This should copy all of the files that are listed from the source directory to the destination directory with duplicates taking the format pic(1).jpg, pic(2).jpg and so on.
file.txt should be a file that lists all the pictures you would like to copy with each entry on its own separate line.
In no way should this script effect the source directory, however just make sure to enter the correct paths to the source and destination directory and the worst that could happen is you copy the files to the wrong directory.
Notes

This script assumes that all of the original pictures are in the same
directory. If you want it to check sub directories as well the script
will need to be modified.
If you accidentally mistype a file name, the script will spit out the error
"file does not exist" and prompt you to "press enter" to continue and the script will continue copying the rest of the list.
Don't forget the trailing / on both the path to the source
directory and path to the destination directory. Otherwise the script
will spit an error back at you.

Having hit this a few times, my solution is a small script to cp everything into a folder so it looks exactly like I want the archive (folders and all), then cd <folder_to_be_zipped> and zip -r ../<zip_file_name>.zip . and I will end up with a .zip where I want it, having exactly the structure I want.
Another way is to use multiple zip commands such as:
cd <parent_of_directory> && zip -r /path/to/archive.zip directory/* && \
cd <folder_with_files> && zip /path/to/archive.zip addfile1 addfile2 addfile2;

Samples courtesy of: https://wpguru.co.uk/2018/12/how-to-add-files-to-an-existing-zip-archive-on-macos-and-linux/


How to remove fade effect when "Hiding all normal windows" with CTRL+ALT+D shortcut (show desktop)? I'm using Unity on 12.10, with most of the Compiz Effects disabled.
I'd like to remove the fade effect when using the CTRL + ALT + D default shortcut to show the desktop.
The effect consists in fading out the active windows and fading 'em in when they get focus again.
I couldn't find anything in CCSM or dconf to set the value of the fade effect to zero.

Similar functionality of hiding all windows and showing the desktop is right now provided by several plugins: Show Desktop, Fade to Desktop and Ubuntu Unity Plugin, that seem to conflict with each other. Among those you'd of course choose Unity Plugin if you are using Unity, but it has no configurable option to control the fadeout.

More about the current status of the problem an proposed fixes here - https://bugs.launchpad.net/compiz/+bug/1063171 and here - https://bugs.launchpad.net/unity/+bug/1067534.

The simplest workaround I have found so far that allows to achieve the requested effect is to go to Ubuntu Unity Plugin -> Switcher and disable Show minimized windows in switcher in CompizConfig Settings Manager. Obviously not a very elegant solution, but those like starting showdesktop after unityshell with gconf, proposed in bug 1067534 have been explicitly forbidden in bug 1063171 and will remain such until Unity 7 or compiz 0.9.9.0.

I am unsure how to disable that specific effect but if you want to disable all compiz effects (by going into ow graphics mode) you should do the following:

gedit ~/.xprofile

Then enter the text export UNITY_LOW_GFX_MODE=1

Logout then log back in

To check if this worked enter in the command glxgears -info

The output should look something like

GL_RENDERER = Gallium 0.4 on llvmpipe (LLVM 3.1, 128 bits)

GL_VERSION = 2.1 Mesa 9.1-devel

GL_VENDOR = VMware, Inc.

I hope this helps. Not quite the answer you are looking for but this should do it


Why can't I install Ubuntu or Wubi on a Windows Dynamic Disk? I've been trying to install 12.04 for a while now, I'm running on Windows 7 and I already made the partition (it's dynamic). I've tried booting from a disc and also the Windows installer. I haven't tried used any repair-boot programs or anything. Every time I tried to load from either, I get an error:

command=C:\windows\sysnative\bcdedit.exe /set {03f9077f-661f-11e1-845a-d08b36406c3d} device partition=U;

retval=1

stderr=An error has occured setting the element data.
The request isn't supported

stdout=

Then after that, it makes a log file with information that I don't understand.

If it is simply due to the fact of it being a dynamic partition, someone please help.
If it is more extensive, anyone with details on possible solutions or definite ones please express them.

Note: Wubi is Ubuntu installed onto a Windows drive via the Windows installer

Neither Ubuntu nor Wubi will boot from a dynamic disk
Neither Ubuntu's bootloader GRUB nor Wubi's bootloader GRUB4DOS can recognize a Microsoft dynamic disk/volume/partition (SFS), and so they cannot boot from it; there is no sense in installing either when you won't be able to boot.
You have three options:

Convert the dynamic disk to basic (backup all data first!), after which you can install Wubi or dual-boot with Ubuntu.
Add another hard disk to your system, install Ubuntu on it and set your system to boot from it; you can choose to boot Windows or Ubuntu from the GRUB menu at startup
Keep the disk as is, and run Ubuntu in a virtual machine, such as Virtualbox or VMWare Player.

I am not expert , but I think you have Firewall or antivirus that prevent to execute command,

Also you might find this link useful rather than windows installer (wubi.exe).
http://www.linuxbsdos.com/2012/05/17/how-to-dual-boot-ubuntu-12-04-and-windows-7/


Ubuntu 14.04 does not start since I stopped BleachBit process My Ubuntu 14.04 does not start. The logo appears but it proceeds no further.

When I choose Advanced Options for Ubuntu in the GRUB menu, I reach this menu:

What should I do?

You can do it through recovery mode

restart the machine

press shift continous until start with recovery mode

select advance mode

then select recovery image enter it

follow the process

after reboot

you machine working fine


Software Update: This requires installing packages from unauthenticated sources When trying to install packages through the software updater on Ubuntu 14.04.1 LTS I get following error:

It's about these packages:

I have selected following settings from where to install updates from:

I have run following commands:

sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade

sudo apt-get update gives following output:

Reading package lists... Done
W: GPG error: https://download.01.org trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A902DDA375E52366
W: Duplicate sources.list entry http://dl.google.com/linux/chrome/deb/ stable/main i386 Packages (/var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_binary-i386_Packages)

sudo apt-get upgrade gives following output:

The following packages have been kept back:
  libegl1-mesa libegl1-mesa-drivers libgbm1 libgl1-mesa-dri libgl1-mesa-glx
  libglapi-mesa libgles1-mesa libgles2-mesa libosmesa6 liboxideqt-qmlplugin
  liboxideqtcore0 libwayland-egl1-mesa libxatracker2 linux-generic
  linux-generic-pae linux-headers-generic linux-headers-generic-pae
  linux-image-generic linux-image-generic-pae oxideqt-codecs
  python-cupshelpers system-config-printer-gnome
0 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.

UPDATE

With question How do I deal with "unauthenticated sources" errors in the Software Center?

issueing following commands:

sudo apt-get clean
cd /var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get clean
sudo apt-get update

still gives following output:

Reading package lists... Done
W: GPG error: https://download.01.org trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A902DDA375E52366
W: Duplicate sources.list entry http://dl.google.com/linux/chrome/deb/ stable/main i386 Packages (/var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_binary-i386_Packages)

Followed the second answer:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A902DDA375E52366
sudo apt-get update

but receive following error:

W: Duplicate sources.list entry http://dl.google.com/linux/chrome/deb/ stable/main i386 Packages (/var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems

and apt-get update doesn't correct the problem

You could run:

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

Hi best is that whenever you face this problem use the terminal to know what actually stopping it so open terminal and use below command
sudo apt-get clean
sudo apt-get update

Update command will show you the URL or Package which is creating a problem, generally this is due to unreliable package like when I ran this I got below error on terminal
W: GPG error: http://dl.google.com/linux/chrome/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 78BD65473CB3BD13
W: The repository 'http://dl.google.com/linux/chrome/deb stable InRelease' is not signed.

So it mean http://dl.google.com/linux/chrome/deb was potential harmful for my computer and that is where you then need to UNCHECK this from update setting panel OR you can update your installation  file.


Caught in loop when trying to login after upgrade from 14.10 to 15.04 After an otherwise uneventful upgrade from 14.10 to 15.04 I cannot login. When I provide my password the screen flickers briefly and I am back at the login screen.

I have checked permissions on .Xauthority and they are set correctly.

I have also tried creating a new user, but the same problem persists.

Before reverting to the login screen I momentarily see an alert box "System program problem detected." I do not know if this is relevant to the issue.

My /var/log/lightdm/x-0.log contains this as the last line:

error setting MTRR (base = 0....) Invalid argument (22)

I fixed this problem by removing the nvidia drivers

sudo apt-get remove --purge nvidia-*
sudo apt-get install ubuntu-desktop

You can try this first, here is a link. Ubuntu gets stuck in a login loop

If worse comes to worse you can remake the live USB. I would recommend Unetbootin as it really easily helps you to make it. The links for Unetbootin is here http://unetbootin.sourceforge.net/. And the one for Ubuntu is here .http://www.ubuntu.com/download/desktop.

When you go back with the new USB, you can reinstall cleanly for sure that way.

Hope this helps. Good Luck!


download.01.org certificate verification failed - CRLfile missing? So I had intel-Linux-graphics-installer on my computer
but lately when I

 sudo apt-get update

I get the following error

Err https://download.01.org trusty/main amd64 Packages
server certificate verification failed.
CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

Tried reinstalling intel-linux-graphics-installer but nothing happend.
And various solutions found here on askubuntu.com on certificates problems but didnt end up anywhere.

Any ideas on how to get that CRLfile?
Also is this problem on my side or on the servers side?

You can download the certificate manually with openssl and add it into your local trusted certificates:

echo -n | openssl s_client -connect download.01.org:443 | \
  sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | \
  sudo tee '/usr/local/share/ca-certificates/download_01_org.crt'
sudo update-ca-certificates

add this line to your /etc/apt.conf file :

Acquire::https::download.01.org::Verify-Peer "false";


Problem with nvidia driver - display not working properly after install I'm trying to do a fresh install of the latest lts ubuntu (14.04) on an old Dell Inspiron 6400 with a nvidia geforce 7300 video card.

Everything is going good with the installation, except that ubuntu is using by default the nouveau display driver (xserver-xorg-video-nouveau). The problem with this driver is that every graphic animation is really slow, just moving a window around is a pain.

So, I installed the correct driver from nvidia (for this card, I believe the correct version is nvidia-304). When I'm starting ubuntu, I access the log in screen without problem. But after that, the desktop won't load correctly. The background image is good, but everything else look terrible and won't work correctly.

This image is what I get

How can I solve this?

Thanks

I have the same problem with nvidia 7300 go in laptop Acer Aspire 5635WLMi. The driver indicate from Nvidia as the correct one is the v. 304. This driver works rigth in Ubuntu 12.04 but does not work in Ubuntu 14.04.
This is a big problem for users of nvidia 7300 go in laptops.


apt-get update stuck: Connecting to security.ubuntu.com When I run apt-get update on my machine it gets stuck at:

100% [Connecting to security.ubuntu.com (2001:67c:1562::15)] [Connecting to archive.canonical.com (2001:67c:1360:8c01::16)]

I have made no recent changes to the system and use my home network which worked fine previously.

I can't explain why it switched to using IPv6.
I have IPv6 set to ignore for the wireless network:

Ouput of ip addr:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
   valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
   valid_lft forever preferred_lft forever
2: mlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 4c:0b:be:22:0a:b4 brd ff:ff:ff:ff:ff:ff
inet 192.168.2.106/24 brd 192.168.2.255 scope global dynamic mlan0
   valid_lft 1814086sec preferred_lft 1814086sec
inet6 ::d5:b551:28db:2789:225/64 scope global temporary dynamic
   valid_lft 604483sec preferred_lft 85483sec
inet6 ::d5:4e0b:beff:fe22:ab4/64 scope global mngtmpaddr dynamic
   valid_lft 604779sec preferred_lft 86379sec
inet6 fe80::4e0b:beff:fe22:ab4/64 scope link
   valid_lft forever preferred_lft forever

This worked for me, courtesy of Zach Adams (https://zach-adams.com/2015/01/apt-get-cant-connect-to-security-ubuntu-fix/):

  Turns out this is an issue where
  connecting over IPv6 on some servers causes them to get stuck at this
  point. The fix is really simple.

Open /etc/gai.conf

Under the line

# For sites which prefer IPv4 connections change the last line to

Uncomment the following line by removing the #:

# precedence ::ffff:0:0/96 100

  This will allow you to still use IPv6 but sets IPv4 as the precedence
  so that apt-get won’t get stuck.

Other solutions did not help ... in my case I created an aws ec2 instance Ubuntu 18.04  using

Auto-assign Public IP -> no pick disable

after trying all suggested solutions I threw up my hands and killed that and created a new ec2 instance using

Auto-assign Public IP -> yes  Use subnet setting (Enable)

and it worked fine ... apt-get update && apt-get upgrade are happy now


How to install 64-bit .deb file on a 32-bit machine? I have Ubuntu 14.04. I recently downloaded Viber. The Viber .deb file has 64-bit architecture. I want to install it on my computer, but my computer only supports 32-bit.

The output of running lscpu is as follows:

Architecture: i686
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: 0,1
Thread(s) per core: 1
Core(s) per socket: 2
Socket(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 23
Stepping: 10
CPU MHz: 2800.000
BogoMIPS: 5586.12
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 2048K

Provided that your hardware support 64-bits, which does:

  CPU op-mode(s): 32-bit, 64-bit

and the package was prepared to use multiarch, which is also true:

 dpkg -I viber.deb
 new debian package, version 2.0. <--- here
 size 57046082 bytes: control archive=8024 bytes.
       0 bytes,     0 lines      0
    1210 bytes,    29 lines      control
    9475 bytes,    33 lines   *  copyright
    7404 bytes,    85 lines      md5sums
      39 bytes,     2 lines   *  postinst             #!/bin/bash
     800 bytes,    35 lines   *  preinst              #!/bin/bash
     500 bytes,    24 lines   *  prerm                #!/bin/bash
 Package: viber
 Version: 4.2.2.6
 Section: non-free/net
 Priority: extra
 Architecture: amd64 <---- and here

you could just install the necessary 64-bit libraries and binaries which are dependency of the package (which is none, more about that later) that you need to run the application, with virtual zero performance impact. In my case, I just installed the package just fine:

$ sudo dpkg --add-architecture amd64
## adding 64-bits architecture package, in my system I didn't need to
## but it's likely you have
$ sudo apt-get update # this downloads the package list for amd64 arch
$ sudo dpkg -i viber.deb
Selecting previously unselected package viber.
(Reading database ... 268703 files and directories currently installed.)
Preparing to unpack viber.deb ...
Unpacking viber (4.2.2.6) ...
Setting up viber (4.2.2.6) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for gnome-menus (3.13.3-1) ...
Processing triggers for mime-support (3.56) ...
Processing triggers for desktop-file-utils (0.22-1) ...

And then started running into problems...

The package managers decided that they should not list any dependency for their package,

 Installed-Size: 141336
 Conflicts: Viber (<< 4.2.2.6)
 Replaces: Viber (<< 4.2.2.6)
 Maintainer: Viber Media Inc <support@viber.com>

which they actually need:

ldd /opt/viber/Viber | grep 'not found'
    libXcomposite.so.1 => not found
    libxslt.so.1 => not found
    libxml2.so.2 => not found
    libgstreamer-0.10.so.0 => not found
    libgstapp-0.10.so.0 => not found
    libgstbase-0.10.so.0 => not found
    libgstinterfaces-0.10.so.0 => not found
    libgstpbutils-0.10.so.0 => not found
    libgstvideo-0.10.so.0 => not found
    libsqlite3.so.0 => not found

so you must find and install the libraries missing manually! This is easy if you know the correct tools. apt-file comes handy here, also http://packages.ubuntu.com functionality "Search the contents of packages" comes fine also. But I went ahead and searched for them:

These files are already installed in my system, you only need to copy the package name, the one before the colon that ends with amd64. You should copy the package names as they are:

dpkg -S $(ldd /opt/viber/Viber | awk '{print $3}' | grep -vP 'not|viber')
libc6:amd64: /lib/x86_64-linux-gnu/libpthread.so.0
libc6:amd64: /lib/x86_64-linux-gnu/libdl.so.2
libc6:amd64: /lib/x86_64-linux-gnu/librt.so.1
libstdc++6:amd64: /usr/lib/x86_64-linux-gnu/libstdc++.so.6
libc6:amd64: /lib/x86_64-linux-gnu/libm.so.6
libgcc1:amd64: /lib/x86_64-linux-gnu/libgcc_s.so.1
libc6:amd64: /lib/x86_64-linux-gnu/libc.so.6
libx11-6:amd64: /usr/lib/x86_64-linux-gnu/libX11.so.6
libxext6:amd64: /usr/lib/x86_64-linux-gnu/libXext.so.6
zlib1g:amd64: /lib/x86_64-linux-gnu/libz.so.1
libgl1-mesa-glx:amd64: /usr/lib/x86_64-linux-gnu/libGL.so.1
libxrender1:amd64: /usr/lib/x86_64-linux-gnu/libXrender.so.1
libglib2.0-0:amd64: /lib/x86_64-linux-gnu/libglib-2.0.so.0
libglib2.0-0:amd64: /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
libxcb1:amd64: /usr/lib/x86_64-linux-gnu/libxcb.so.1
libglapi-mesa:amd64: /usr/lib/x86_64-linux-gnu/libglapi.so.0
libxdamage1:amd64: /usr/lib/x86_64-linux-gnu/libXdamage.so.1
libxfixes3:amd64: /usr/lib/x86_64-linux-gnu/libXfixes.so.3
libx11-xcb1:amd64: /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1
libxcb-glx0:amd64: /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0
libxcb-dri2-0:amd64: /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0
libxcb-dri3-0:amd64: /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0
libxcb-present0:amd64: /usr/lib/x86_64-linux-gnu/libxcb-present.so.0
libxcb-sync1:amd64: /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1
libxshmfence1:amd64: /usr/lib/x86_64-linux-gnu/libxshmfence.so.1
libxxf86vm1:amd64: /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1
libdrm2:amd64: /usr/lib/x86_64-linux-gnu/libdrm.so.2
libpcre3:amd64: /lib/x86_64-linux-gnu/libpcre.so.3
libffi6:amd64: /usr/lib/x86_64-linux-gnu/libffi.so.6
libxau6:amd64: /usr/lib/x86_64-linux-gnu/libXau.so.6
libxdmcp6:amd64: /usr/lib/x86_64-linux-gnu/libXdmcp.so.6

These I didn't had them installed, which I obtained using ldd /opt/viber/Viber | grep 'not found' | awk '{printf "%s$\n", $1}' | apt-file search -x -a amd64 -f - | sed 's/\:/:amd64:/':

$ ldd /opt/viber/Viber | grep 'not found' | awk '{printf "%s$\n", $1}' | apt-file search -x -a amd64 -f - | sed 's/\:/:amd64:/'
libgstreamer-plugins-base0.10-0:amd64: /usr/lib/x86_64-linux-gnu/libgstapp-0.10.so.0
libgstreamer-plugins-base0.10-0:amd64: /usr/lib/x86_64-linux-gnu/libgstinterfaces-0.10.so.0
libgstreamer-plugins-base0.10-0:amd64: /usr/lib/x86_64-linux-gnu/libgstpbutils-0.10.so.0
libgstreamer-plugins-base0.10-0:amd64: /usr/lib/x86_64-linux-gnu/libgstvideo-0.10.so.0
libgstreamer0.10-0:amd64: /usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0
libgstreamer0.10-0:amd64: /usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0
libsqlite3-0:amd64: /usr/lib/x86_64-linux-gnu/libsqlite3.so.0
libxcomposite1:amd64: /usr/lib/x86_64-linux-gnu/libXcomposite.so.1
libxml2:amd64: /usr/lib/x86_64-linux-gnu/libxml2.so.2
libxslt1.1:amd64: /usr/lib/x86_64-linux-gnu/libxslt.so.1

apt-file was a tease to give me the 64-bit packages so I had to do sudo apt-file -a amd64 update to force it to have the 64-bit file list.

Now, let me explain what is all the above:

ldd /path/to/binary: reads a binary and tells you what are the required libraries, symbols, etc.
dpkg -S: search which packages provide a specific installed file.
awk, sed and grep: are modifying the text stream to process only the interesting parts or show the desired output.
|, $(...): the first allows me to pipe the output of a command to another, and the later allows me to execute/evaluate a command before the main ones gets executed.

TL;dr just install these packages:

sudo dpkg --add-architecture amd64 ## adding 64-bits architecture package
sudo apt-get update
sudo apt-get install libgstreamer-plugins-base0.10-0:amd64 libgstreamer-plugins-base0.10-0:amd64 libgstreamer-plugins-base0.10-0:amd64 libgstreamer-plugins-base0.10-0:amd64 libgstreamer0.10-0:amd64 libgstreamer0.10-0:amd64 libsqlite3-0:amd64 libxcomposite1:amd64 libxml2:amd64 libxslt1.1:amd64 libc6:amd64 libdrm2:amd64 libffi6:amd64 libgcc1:amd64 libgl1-mesa-glx:amd64 libglapi-mesa:amd64 libglib2.0-0:amd64 libpcre3:amd64 libstdc++6:amd64 libx11-6:amd64 libx11-xcb1:amd64 libxau6:amd64 libxcb1:amd64 libxcb-dri2-0:amd64 libxcb-dri3-0:amd64 libxcb-glx0:amd64 libxcb-present0:amd64 libxcb-sync1:amd64 libxdamage1:amd64 libxdmcp6:amd64 libxext6:amd64 libxfixes3:amd64 libxrender1:amd64 libxshmfence1:amd64 libxxf86vm1:amd64 zlib1g:amd64

You also need to install the 64-bit kernel.

If you are running 32bit system use

sudo dpkg --force-architecture -i viber.deb

link: How to Install Viber on Ubuntu 13.10, 32bit


Where can I order a CD of Ubuntu? I live off grid, have only a slow dial-up internet, and only have power when running generator, (at this time), which means power about 4 hours a day.
Can I get just one copy of 12.04 without downloading?

Since 2011, ShipIt, the old Canonical service that allows you to get free Ubuntu CDs has closed. However, you can still buy one (Canonical Free softwares are definitively not free as in free beer).

However, it seems that some local communities continues to provide the shipment service for free. Use the Ubuntu Local Communities website to find a team near of your country.

I recommend you simply download it instead of picking up a disk it would be less time wasting but if you really want a disk well here is the link

http://shop.canonical.com/product_info.php?products_id=976

and then when you wanna upgrade to raring just do it from the software updater and put alert me of all new os updates instead of just the stable ones


piping grep to another grep doesn't work as expected I'm using grep on Ubuntu Desktop 20.04.

I want to get player movements from  gnuchess game by using grep each turn.
The first command i used is this :

gnuchess -mq | grep -a "Black ([0-9][0-9]*) : [0-9][0-9]*. [a-z][0-9]" | grep "[a-z][0-9]"

for the first grep, if movements are 'e3' and 'e5', the output is :

Black (1) : 1. e5

I expect the second grep give me e5 but it doesn't. Output is blank.

Yet when i redirect gnuchess output to a file and use the same command it works and shows e5.
Why?

Edit:

The problem was with output buffering.
Added my answer below.

turning off output buffering did the work.

gnuchess -mq  | stdbuf  -o0  grep -a "Black ([0-9][0-9]*) : [0-9][0-9]*. [a-z][0-9]" | grep -o "[a-z][0-9]"

For more information: this

grep returns the whole line where it finds a match, so the behaviour you experience is the expected one.

If you are sure that what you want is the fifth token of the string, you can use awk:

gnuchess -mq | grep -a "Black ([0-9][0-9]*) : [0-9][0-9]*. [a-z][0-9]" | awk '{print $5}'

For example: echo 'Black (1) : 1. e5' | grep -a "Black ([0-9][0-9]*) : [0-9][0-9]*. [a-z][0-9]" | awk '{print $5}' returns only e5.


How to install latest version of Gmsh in Ubuntu 14.04.3? I just installed Ubuntu 14.04.3, chosen because right now is the Ubuntu version that will be supported for longest time, and I'd like to install the latest version of Gmsh (version 2.10.1, July 30 2015). I could download a tgz file (from here) but I've read that that kind of installation is not for Linux novice like me. Other ways, like PPA and deb installation files are for older versions of Gmsh or for newer version of Ubuntu (tried that but the installation unsurprisingly fails). Should I upgrade to last non-LTS version of Ubuntu or there is a (feasible for novices) way to install Gmsh 2.10.1 in Ubuntu 14.04.3?

This question is specific about Gmsh/Ubuntu 14.04.3, but my curiosity is more general; is it possible (and how much hard is) to install latest version of a software outside of Ubuntu Software Center and without PPA and deb installation files? (I don't pretend to install a new software on a 10 years old Ubuntu, but at least on the latest LTS version)

The link which you have attached of Gmsh 2.10.1 is a pre-compiled version. It is very simple to use it. Below are the steps. (You need be root!)

Extract ==> tar zxvf gmsh-2.10.1-Linux64.tgz
gmsh-2.10.1-Linux folder (bin and share sub-folders inside) is be created after step 1.
sudo su (enter password)
cp gmsh-2.10.1-Linux/bin/gmsh /usr/bin/
cp -r gmsh-2.10.1-Linux/share/doc/gmsh /usr/share/doc/
cp gmsh-2.10.1-Linux/share/man/man1/gmsh.1 /usr/share/man/man1/

Viola! It's done! You know have the 2.10.1 version of Gmsh.

Check: type gmsh -version in the terminal

2.10.1 should be displayed!