Heating, projecting and lid closing problems in Ubuntu Gnome 15.04

Please refer
Ubuntu 12.x on HP Pavilion g6-1d21dx and as suggested, the way now would be to try using a Live CD both 15.10 Ubuntu Gnome and 15.04/15.10 Ubuntu (standard version with Unity) and to see if these problems get resolved in any of these versions.

Refer What is the correct way to install proprietary ATI Catalyst Video Drivers (fglrx) directly from AMD? on installation notes. It does not cover 15.04 at this moment.

The link below shows how to install proprietary binary drivers as well.
https://help.ubuntu.com/community/BinaryDriverHowto/AMD?action=show&redirect=BinaryDriverHowto%2FATI


How to use sort on an awk print command?

you can add | sort -k2 to your command. This will sort alphabetically based on the second column.

Example:

$ echo "Lebron James 23
Kevin Durant 35
Kobe Bryant 24
Blake Griffin 32
Dikembe Mutumbo 55" | sort -k2

results in

Kobe Bryant 24
Kevin Durant 35
Blake Griffin 32
Lebron James 23
Dikembe Mutumbo 55


I guess you're looking for something like that app: "Ubi: An unofficial Ubuntu One app for Maemo 5 and other Qt-enabled platforms"

Link: http://ubi.garage.maemo.org/


Unable to login after password change, having home directory encrypted

Change your password back with the passwd command. Then, with and encrypted home directory, you have to change your password with the graphical tools.

This is a security feature to prevent root , or someone with root access, from changing your password and thus accessing your encrypted data.

For additional details see Changing home folder encryption after changing user password


You cannot change the ownership of SAMBA mounts.  You must mount them with the correct UID and GID.

sudo vim /etc/fstab

//servername/sharename  /media/windowsshare  cifs   uid=ubuntuuser,gid=ubuntuuser,credentials=/home/ubuntuuser/.smbcredentials,iocharset=utf8,sec=ntlm   0       0

More information available here


Can't get nginx to run php on ubuntu 16.04 server

Open terminal and run the following command:

gksu gedit /etc/nginx/sites-available/default

this will open your nginx config file. edit it with the following text:

server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;

    root /usr/share/nginx/html;
    index index.php index.html index.htm;

    server_name localhost;

    location / {
        try_files $uri $uri/ =404;
    }

    error_page 404 /404.html;
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
        root /usr/share/nginx/html;
    }

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php7-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

after saving the file run the following command to restart nginx:

sudo service nginx restart


File collision between codeblocks-headers and codeblocks-dev

The codeblock-headers is in process of being removed, but for some reason apt-get won't do that first, you only need to remove it manually then install what you need to install:

sudo apt-get remove codeblocks-headers
sudo apt-get install codeblocks-contrib

I would report a bug to the package maintainers also with the problem.


What Linux Kernel runs Ubuntu 18.04.3 LTS

It is possible because of HardWare Enablement stack.

The search on https://packages.ubuntu.com gives the result:

  Package linux-image-generic-hwe-18.04

  bionic-updates (kernel): Generic Linux kernel image
  5.0.0.25.82: amd64 arm64 armhf i386 ppc64el s390x

You can install this kernel alone with:

sudo apt-get install --install-recommends linux-generic-hwe-18.04

or with Xorg server:

sudo apt-get install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04


bash: :/root/dotnet: No such file or directory

Check your ~/.bashrc there might line(s) mentioning /root/dotnet file or directory

cat ~/.bashrc

If such entry exists then replace it with valid file or directory path instead of /root/dotnet or remove it if unnecessary


Yes, this is a bug.

You can try to install the linux-backports-modules-alsa package and then see if the problem still exists after a reboot.

If that doesn't fix it, please run the following command, and follow the instructions:

ubuntu-bug alsa-base

This will collect info about your audio hardware & software configuration, ask some questions, and submit this to the bugtracker on Launchpad (if you don't have a Launchpad account yet, you will be asked to create one).  Once you are on Launchpad, make sure you add a clear description of the problem.  E.g. if it worked in earlier Ubuntu-versions, pleas tell which one(s).


Thunderbolt display on Macbook Pro Retina 11,1 (13'') w Ubuntu 14.04

It works when you install the drm-intel-next kernel from the mainline ppa. But I observe some fan issues then. see my last question.


Networkmanager shows no Wifi, nor proper ethernet connection

To get Network Manager to take over all interfaces correctly, remove the ethernet settings in /etc/network/interfaces like this:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

Next, return NetworkManager.conf to its default state where managed=false.

Finally, restart Network Manager:

sudo service network-manager restart

It may take a reboot.

As for the wireless, I suggest that you start a new question and include the diagnostic report as described here. My wireless/WiFi connection does not work. What information is needed to diagnose the issue?


How to I stop ubuntu making .Trash folder in each device

If you permanently delete something, it will not create a .Trash folder and put it there. To do this in Nautilus (the default file browser in Ubuntu), simply hold the Shift key while pressing delete. This will bypass the Trash, which is similar to the Recycling Bin in Windows and allows undeleting.

You can also add a Delete right-click command which bypasses trash in Nautilus. To do this, open Nautilus and select Edit -> Preferences. Then click the Behavior tab, and select "Include a Delete command that bypasses Trash".

Also, as Uri Herrera mentioned, you can empty the trash to remove it.


It sounds like the upgrade didn't finish.

To complete the upgrade, boot up, and then at the login screen you'll need to drop to a ttyy (a terminal).

To do that, use the keyboard shortcut Ctrl-Alt-F1.

Login with your username and password, then run the following:

sudo dpkg --configure -a

Let that finish, and then you can reboot by running sudo reboot.

Your system should be back to normal.


Configuring networking with network manager

According to the man page for NetworkManager, " If a default NetworkManager.conf is provided by your distribution's packages, you should not modify it, since your changes may get overwritten by package updates."

IIRC, if you manually create/edit this file, you're obligated to create/edit files elsewhere in /etc. That's not something I'd recommend if you're running Ubuntu Desktop (with Ubuntu Server, you don't have the option to use NetworkManager, and so must manually configure network connections).

Instead, I'd recommend that you remove and reinstall NetworkManager (sudo apt-get purge network-manager will remove any lingering prior-configuration files).


This is a known bug in 12.04 and it has to do with your computer's uptime. Please see this bug:
https://bugs.launchpad.net/ubuntu/+source/conky/+bug/1003727 and subscribe to it if you believe you experience the same thing.
What you can do is to downgrade conky!


Can I  create an installer for a proprietary game?

I can think of two ways in which you can put up an application

A game which is Open Source as per Open Source Initiative definition
Proprietory game whose copyrights is held by you

It would be worth telling how flash is installed on your computer. When you select to install the package flashplugin-nonfree the package actually downloads the flash plugin at that moment and copies the file to appropriate place. This is why this package is not present in main or universe repository

I am not a lawyer, but I think you can create a small application which downloads the game and the serial key. Distributing it would be tricky.

Many games want to control how their software is being distributed. They might not like that you are circumventing their distribution model. They might have ads on their download page.
Even if it won't be illegal, legal department of those companies might want to clock extra hours by showing that they are working to protect the Intellectual property. You might receive a warning letter. Even worse, they might call it "voluntary copyright violation"

It is more of trust. Distros know that Adobe wants flash to be installed everywhere, so Adobe won't come after them. The case of these games is not clear.

My best solution would be to contact those game developers and ask them to put their games in Ubuntu Software Center. That is the safest bet.


How do I kill a kernel thread? And do I really want to do so?

You can not kill kernel threads, or any process that is blocked in the D state, because signals are only delivered when the kernel returns to user mode.  Aside from the technical limitation of signal delivery, killing a thread in the middle of kernel code would corrupt the system as the kernel code may be holding an important resource at the time, such as a spin lock or mutex, and killing it would prevent those resources from being released.

If you have a process that is stuck in the D state for a prolonged period of time, then you have a kernel bug.  See https://wiki.ubuntu.com/KernelTeam/KernelTeamBugPolicies for tips on reporting it.


Create fillable or editable fields in a PDF

I believe OpenOffice Writer can create fillable PDFs, though it may be lacking some features that you may be looking for such as emailing the output.

The basics are:

Create a new OO Writer document
Enable the Forms toolbar: View → Toolbars → Form Controls
Create your form
Export as a PDF

Here's a detailed tutorial:

http://openoffice.blogs.com/forms_fromscratch.pdf

In order to add form fields to an existing PDF, you can install the pdf importer extension for OO writer:

sudo apt-get install libreoffice-pdfimport

I just tested that and it works fine with LibreOffice 3.


I've managed to solve the problem with the help of this thread on ubuntuforums.

The autostart file located here: /etx/xdg/autostart/nm-applet.desktop

contained this certain line:

AutostartCondition=GNOME3 unless-session gnome

I removed it, and now nm-applet shows correctly.


VMware sharing folders between Win7 (host) and Ubuntu (guest)

Make A folder at Desktop & Make a link

Terminal. ln -s /mnt/hgfs/shared-directory ~/Desktop/Name-of-the-folder

You will have shared files with preserved ownership and permissions

Done


auto rip CD with morituri (or launch custom script on CD insert)

There is a dialog in Details which will allow you to run an action on insert:

But it only allows you to select Applications. If Morituri is an application, it should work fine - just select it under Other Applications....

If it does not appear in the selection dialogue, you will have to create an Application launcher file for it. My solution to this would be to create a .desktop file for your script using:

sudo nano /usr/share/applications/morituriCD.desktop

with the following contents (Copy ALL of it, and paste it with Ctrl+Shift+V):

[Desktop Entry]
Type=Application
Name=Morituri CD program
Icon=brasero
Exec=/home/USER/Morituri.sh
Terminal=false
Categories=AudioVideo;DiscBurning;
MimeType=application/x-cd-image;application/x-cdrdao-toc;application/x-cue;application/x-toc;audio/x-scpls;audio/x-ms-asx;audio/x-mp3-playlist;audio/x-mpegurl;application/x-brasero;x-content/audio-cdda;x-content/video-dvd;x-content/video-vcd;x-content/video-svcd;x-content/image-picturecd;
Keywords=morituri;disc;cdrom;dvd;burn;audio;video;
NoDisplay=false

Save with Ctrl+O
, and exit with Ctrl+X

Make sure that Exec= is linked to the correct path, and that the linked executable works. Make sure with:

chmod +x /home/USER/morituri.sh
/home/USER/morituri.sh

You should then get this:

Hope this helps ;-)


Runnning Ubuntu 13.04 on ASUS Laptop with pre-installed Windows 8 and secure boot enabled

The current state of your system is quite unclear, so it's hard to say what the best way to proceed is, except to run additional diagnostics. The Boot Info Script will provide at least some of the relevant information -- but given the number of things you've tried, there will still be some uncertainty about what that script returns. If you run this script and need advice, edit your post to include a link to the RESULTS.txt file that the Boot Info Script returns, and add a comment to this reply to alert me to the new information.

If Windows is booting right now, then there is at least one thing you could try that stands a good chance of working: Install my rEFInd boot manager in Windows. Be sure to install the ext4fs driver (or the driver for whatever filesystem you used for Ubuntu). Depending on your configuration, that may enable you to boot Linux directly by using a rEFInd icon that refers to the Linux kernel (a file with a name that includes the string vmlinuz). If Windows is not booting, you could try rEFInd from a CD-R or USB flash drive. (The rEFInd downloads page includes links to images for both these media.) That might get Windows and/or Linux booting, but I can't make any promises of that.

Another comment: The Boot Configuration Data (BCD) is a Windows-specific boot loader construct. Thus, the fact that you got messages about BCD when attempting to boot Linux is a clear indication that you were not booting Linux. Furthermore, the last I heard EasyBCD was pretty much useless for assisting in dual-boot configurations on EFI systems. Thus, you shouldn't bother with that software. Instead, use the firmware's own boot manager, GRUB, rEFInd, or another boot manager to select which OS to boot.

Right now, the easiest way to deal with Secure Boot is to disable it. If you must boot with Secure Boot enabled, though, it can be done. Theoretically, Ubuntu supports Secure Boot, but I've seen enough problem reports that it's clear that this support is far from perfect. If you use a third-party tool like rEFInd, you'll need to take extra steps to get it working with Secure Boot. The rEFInd documentation includes a page on Secure Boot, so consult it if you want to use rEFInd with Secure Boot. For other boot loaders, I've written a more general page on Secure Boot.


First, install Tomboy notes in Windows ( http://projects.gnome.org/tomboy/download.html ).

Then use your U1 to sync the contents of .local/share/tomboy with the equivalent folder created by the Tomboy app under Windows.

For more information, you can check this similar question Sync Tomboy through Ubuntu One and local folders


Just download the .deb file from Skype website (the following link)

Skype for Linux
Put the file in your home directory from Downloads.
Suppose the file name is skype-version.deb, then run the following command in the terminal

sudo dpkg -i skype-version.deb
Give your password.


How to set up DISPLAY variable for WSL2 of ubuntu 20?

Just use
export DISPLAY=:0.0

You can test it will xeyes.  If you don't have xeyes
sudo apt install x11-apps


Why is internet upload so high when I don't actually upload much?

Note: This answer only addresses some of the desired "Investigative 5W's of Data Uploads".

Use tcpdump to capture all packet traffic, and use some post-processing to extract desired information.

sudo tcpdump -i enp4s0 -w 'ext-%F-%H-%M-%S.bin' -G 3600 -z /home/doug/bin/packet_post_processor2

Where:
my WAN facing interface is enp4s0;
The file names automatically include the date and time (requires an additional package, but I can not recall which);
I'm asking for file rotation once per hour;
Each file be post processed by the packet_post_processor script (2 is for this answer).

The post-processing script:

#!/bin/dash
#
# packet_post_processor2 Doug Smythies. 2017.09.08
#    Edits as required for updated c prgram, and bad sort order.
#    There may be little use in sort by packets count, but for now
#    it remians.
#
# packet_post_processor2 Doug Smythies. 2017.09.01
#    This script will be called from the always running tcpdump.
#    It is called for every binary file rotation.
#    The purpose is to make summary files of things that one
#    may want to investigate in more detail later on.
#
#    This version is for WinEunuuchs2Unix and
# https://askubuntu.com/questions/951783/how-to-find-out-who-is-taking-70-gb-of-data-from-me-each-month
#

#check that the call included the file name, and only the file name, to use.
if [ $# -ne 1 ]
then
  echo "Usage - $0  file-name"
  exit 1
fi

# check that the file actually exists:
if [ ! -f $1 ]
then
  echo "tcpdump binary file $1 does not exist, aborting..."
  exit 1
fi

echo "data extraction 1: All the packets..."
# Note: Using the -e option will ease subsequent bytes per unit time calculations
sudo tcpdump -n -tttt -e -r $1 >all_e.txt

echo "data extraction 2: The outgoing normal packets..."
# Note: We might want to check that something important doesn't get missed here.
# Note: replace the fake IP address with your actual IP address.
grep ": XXX\.XXX\.XXX\.XXX\." all_e.txt | grep Flags >outgoing.txt

echo "data extraction 3: Make a histogram of the destination IP addresses by packets..."
# Note: use field 13
cut -d" " -f13 outgoing.txt | sed 's/.[^.]*$//' | sort | uniq -c | sort -g >outhisto.txt

# Phase 2: Maximum packet count might not mean maximum byte count, so figure out maximum byte count

echo "data extraction 4: Sort the outgoing file by destination IP address."
LC_ALL=C sort -k 13 <outgoing.txt >outgoing.srt

echo "data extraction 5: Now, calculate bytes per IP and bytes per IP/16 and make sorted historgrams"
# Note: There might be some clever awk or whatever way to do this, but I have a c program.
./tcpdump_bytes outgoing.srt outb.txt out16.txt
sort --general-numeric-sort <outb.txt >outhistob.txt
sort --general-numeric-sort <out16.txt >outhistob16.txt

#Leave the intermidiate files, just for now, while we debug.
#
# packet_post_process. End.

The c program called from within the script:

    /*****************************************************************************
*
* tcpdump_bytes.c 2017.09.08 Smythies
*       By sorting the input file before running this program, it can do bytes
*       per IP all on its own, and in one pass through the file. At this time,
*       it is for outgoing only. A future revision will add command line
*       options for incoming and such.
*       Might as well group by 1st 2 IP address bytes at the same time,
*       i.e. for some (not all) of those multiple IP situations.
*
* tcpdump_bytes.c 2017.09.01 Smythies
*       Count the bytes for all the packets in the passed file.
*       See also tcpdump_extract.c, from which this was taken.
*       This program is very quite, just printing bytes, unless there
*       is some error. The idea is that is part of something bigger and
*       therefore extra verbosity would just get in the way.
*
*       Note: The input tcpdump file needs to have been done
*             with the -e option.
*
*****************************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define MAX_LENGTH 2000  /* maximum line length */

void main(int argc, char **argv){

   char in_buffer[MAX_LENGTH];
   char *infile, *outfile1, *outfile2;
   char *index, *index2;
   FILE *inf, *out1, *out2;
   unsigned current_bytes, sip3, sip2, sip1, sip0, sport, dip3, dip2, dip1, dip0, dport;
   unsigned dest_ip, dest_ip_16, dest_ip_old, dest_ip_16_old;
   unsigned num_lines, num_ips, num_16s;
   unsigned long long total_bytes, total_bytes_16;

   switch(argc){
   case 4:
      infile = argv[1];
      outfile1 = argv[2];
      outfile2 = argv[3];
      break;
   default:
      printf("tcpdump_bytes infile outfile1 outfile2\n");
      printf("  parse outgoing bytes per IP out of a sorted tcpdump file where the -e option was used.\n");
      printf("  infile is sorted tcpdump output file; oufile1 is bytes per IP; outfile 2 is bytes per IP/16.\n");
      exit(-1);
   } /* endcase */

   if((inf = fopen(infile, "rt")) == NULL){
      printf("Unable to open input file '%s'\n", infile);
      exit(-1);
   } /* endif */
   if((out1 = fopen(outfile1, "wt")) == NULL){
      printf("Error opening output file '%s'\n", outfile1);
      exit(-1);
   } /* endif */
   if((out2 = fopen(outfile2, "wt")) == NULL){
      printf("Error opening output file '%s'\n", outfile2);
      exit(-1);
   } /* endif */

   total_bytes = 0;
   total_bytes_16 = 0;
   dest_ip_old = 0;
   dest_ip_16_old = 0;
   num_lines = 0;
   num_ips = 0;
   num_16s = 0;

   while((fgets(in_buffer, MAX_LENGTH, inf)) != NULL){       /* do infile line at a time */
      num_lines++;

      if((index = strstr(in_buffer, "), length ")) != NULL){ /* find search string if it is there, then parse the data */
         sscanf(index, "), length %u: %u.%u.%u.%u.%u > %u.%u.%u.%u.%u:",
            &current_bytes,
            &sip3, &sip2, &sip1, &sip0,
            &sport,
            &dip3, &dip2, &dip1, &dip0,
            &dport);
      } else {
         printf("tcpdump_bytes: Got an odd line: %s", in_buffer);
      } /* endif */
      dest_ip_16 = (dip3 << 24) + (dip2 << 16);
      dest_ip = dest_ip_16 + (dip1 << 8) + dip0;
//    printf("debug: B: %u  S: %u.%u.%u.%u.%u  D: %u.%u.%u.%u.%u  %u  %u\n", current_bytes, sip3, sip2, sip1, sip0, sport, dip3, dip2, dip1, dip0, dport, dest_ip, dest_ip_16);

      if(dest_ip != dest_ip_old){
         if(total_bytes != 0){
            fprintf(out1, "%llu %u.%u.%u.%u\n", total_bytes, (dest_ip_old >> 24) & 0xff, (dest_ip_old >> 16) & 0xff, (dest_ip_old >> 8) & 0xff, dest_ip_old & 0xff);
            total_bytes = 0;
         } /* endif */
         dest_ip_old = dest_ip;
         num_ips++;
      } /* endif */
      total_bytes = total_bytes + (unsigned long long) current_bytes;

      if(dest_ip_16 != dest_ip_16_old){
         if(total_bytes_16 != 0){
            fprintf(out2, "%llu %u.%u.0.0/16\n", total_bytes_16, (dest_ip_16_old >> 24) & 0xff, (dest_ip_16_old >> 16) & 0xff);
            total_bytes_16 = 0;
         } /* endif */
         dest_ip_16_old = dest_ip_16;
         num_16s++;
      } /* endif */
      total_bytes_16 = total_bytes_16 + (unsigned long long) current_bytes;
   } /* endwhile */

   /* don't forget to output the last data */
   if(total_bytes != 0){
      fprintf(out1, "%llu %u.%u.%u.%u\n", total_bytes, dip3, dip2, dip1, dip0);
   } else {
      printf("tcpdump_bytes: Something is wrong. Last IP address has no bytes.\n");
   } /* endif */

   if(total_bytes_16 != 0){
      fprintf(out2, "%llu %u.%u.0.0/16\n", total_bytes_16, dip3, dip2);
   } else {
      printf("tcpdump_bytes: Something is wrong. Last IP/16 address has no bytes.\n");
   } /* endif */

   fclose(inf);
   fclose(out1);
   fclose(out2);
   printf("tcpdump_bytes: Done. Processed %d lines and %d IP addresses and %d /16 addresses\n", num_lines, num_ips, num_16s);
} /* endprogram */

Note that some files will get clobbered with the next hours processing. I'll fix that later.

A quick summary of what the post-processing script is doing:
First, the binary tcpdump file is converted to per packet summaries text. Example (my address has been changed to XXX.XXX.XXX.XXX):

2017-05-31 08:10:31.721956 00:22:b0:75:c2:bd > 6c:be:e9:a7:f1:07, ethertype IPv4 (0x0800), length 400: XXX.XXX.XXX.XXX.52779 > 38.113.165.77.443: Flags [P.], seq 1:347, ack 1, win 256, length 346
2017-05-31 08:10:31.826241 6c:be:e9:a7:f1:07 > 00:22:b0:75:c2:bd, ethertype IPv4 (0x0800), length 157: 38.113.165.77.443 > XXX.XXX.XXX.XXX.52779: Flags [P.], seq 1:104, ack 347, win 1026, length 103
2017-05-31 08:10:31.877945 00:22:b0:75:c2:bd > 6c:be:e9:a7:f1:07, ethertype IPv4 (0x0800), length 54: XXX.XXX.XXX.XXX.52779 > 38.113.165.77.443: Flags [.], ack 104, win 256, length 0
2017-05-31 08:10:32.603768 00:22:b0:75:c2:bd > 6c:be:e9:a7:f1:07, ethertype ARP (0x0806), length 42: Request who-has XXX.XXX.XXX.YYY tell XXX.XXX.XXX.XXX, length 28
2017-05-31 08:10:32.630960 6c:be:e9:a7:f1:07 > 00:22:b0:75:c2:bd, ethertype ARP (0x0806), length 60: Reply XXX.XXX.XXX.YYY is-at 6c:be:e9:a7:f1:07, length 46
2017-05-31 08:10:33.643468 00:90:d0:63:ff:00 > 01:00:5e:00:00:01, ethertype IPv4 (0x0800), length 60: 10.197.248.13 > 224.0.0.1: igmp query v2
2017-05-31 08:10:37.448732 00:22:b0:75:c2:bd > 6c:be:e9:a7:f1:07, ethertype IPv4 (0x0800), length 90: XXX.XXX.XXX.XXX.53120 > 91.189.89.199.123: NTPv4, Client, length 48

It is on purpose that an ARP packet pair is included in the example, so show something that would be excluded from further processing.
The annoying IGMP packet from a private LAN IP is from my ISP and will also be excluded from further processing. However, if my ISP ever claims I have gone over my monthly data limit, I'll point to such packets when I say what I will not pay for.
Notice two lengths shown on each line, the first one is bytes on the wire and the second one is payload length. We want bytes on the wire, and this is why we use the -e option with tcpdump.

Second, outgoing packet can uniquely be identified by finding ": XXX.XXX.XXX.XXX.", so extract all outgoing packets, not including ARP and ICMP, using grep.

Third, using space as a delimiter, field 13 is the destination IP address, so use a complicated bunch of piped commands to extract, count, and sort the destination IP address packets.

Forth, sort the outgoing packets by destination IP address.
Fifth, use the c program to calculate bytes per IP and bytes per IP/16 and sort the output into histograms.

Sixth, manually investigate the top IP addresses in an attempt to identify what is going on. Note that very often one can find the related forward lookup DNS inquiry in the tcpdump output.

As an example, I looked at my WAN/LAN data between 2017-05-31 08:09:33 and 2017-08-09 22:13:11 and edited in what I found for the various IP addresses.
First the top few by packet count:

packets IP Address      Added Comment
 299517 91.189.95.84    Ubuntu stuff
 301129 198.38.112.140  Netflix
 306815 17.253.31.206   Apple stuff
 319558 129.97.134.71   Ubuntu stuff (mirror, I think)
 333334 91.189.88.152   Ubuntu stuff
 352141 91.189.88.39    Ubuntu stuff
 353160 209.121.139.153 Telus (Microsoft updates streaming)
 368669 209.121.139.163 Telus (Microsoft updates streaming)
 389928 91.189.88.161   Ubuntu stuff
 396087 23.60.74.158    deploy.static.akamaitechnologies.com (?)
 421259 198.38.112.170  Netflix
 474506 17.253.31.205   Apple stuff
 477706 198.38.109.153  Netflix
 480452 198.38.112.159  Netflix
 540261 198.38.112.173  Netflix
 574592 198.38.112.132  Netflix
 710022 198.38.112.174  Netflix
 728434 209.121.139.144 Telus (Microsoft updates streaming)
 738839 198.38.112.130  Netflix
 883688 198.38.109.171  Netflix
1049778 198.38.112.154  Netflix
2166582 72.21.81.200    Hmmmm ? MCI Communications Services, (Skype, I think)
7512548 13.107.4.50     Microsoft (updates)

Second, the top few by byte count:

Bytes    IP                     Added Comment
32358580 17.253.31.205          Apple stuff
32625068 198.38.112.159         Netflix
34220805 172.217.3.206          Google web crawler
36628021 198.38.112.173         Netflix
37022702 17.188.208.132         Apple stuff
39105254 198.38.112.132         Netflix
40697177 209.121.139.144        Telus Microsoft updates file streaming
48247623 198.38.112.174         Netflix
49537980 64.4.54.254            Microsoft
50358753 198.38.112.130         Netflix
59623846 198.38.109.171         Netflix
71532166 198.38.112.154         Netflix
98480036 207.167.198.18         Telus e-mail stuff
139907010 72.21.81.200          Hmmmm ? MCI Communications Services, (Skype, I think)
210138801 91.189.95.84          Ubuntu stuff
325511064 204.79.197.213        Microsoft (?) msedge.net storage.skyprod.akadns.net
479586878 13.107.4.50           Microsoft (updates)

Notice how, since Netflix, for example, uses many IP addresses, it might fall lower in the ranking than it really should be, if all its IP addresses were treated as one.

Third, the top few /16 groups by bytes count. Notice how Netflix is now the biggest:

107592753 209.52.0.0/16         cache.google.com (for example)
116538884 207.167.0.0/16        Telus e-mail stuff
120769715 17.188.0.0/16         Apple. store-025-failover2.blobstore-apple.com.akadns.net (for example)
139261655 52.218.0.0/16         s3-us-west-2.amazonaws.com (for example) ? Hmmm...
147091123 172.217.0.0/16        Google web crawler
153146532 17.248.0.0/16         p46-keyvalueservice.fe.apple-dns.net. Apple iCloud Drive
183300509 72.21.0.0/16          Skype (I think)
213119564 209.121.0.0/16        Telus Microsoft updates file streaming
333374588 204.79.0.0/16         Microsoft
354346088 91.189.0.0/16         Ubuntu stuff
488793579 13.107.0.0/16         Microsoft (updates)
621733032 198.38.0.0/16         Netflix


I would suggest you downgrade to Ubuntu 14.04LTS. This my solve alot of your "bugs" and issues that you are having with 15.04. However a fresh install of 14.04 is recommended so you would lose any data saved on the current system.


You can try playing with touchpad paremeters via synclient. Just enter synclient in a terminal and see what possible parameters there are. Try changing FingerLow and FingerHigh values by typing synclient FingerHigh=7 etc.


Ubuntu 16.04 with Radeon R7 250 freezes after suspend

Run sudo -H gedit /etc/default/grub and change

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash'"

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor acpi_osi='!Windows 2013' acpi_osi='!Windows 2012'"

Then,

sudo update-grub

Reboot twice!! This worked for me fine.


Cannot open Jupyter Notebook in Ubuntu 18.04

Well, I installed Jupyter notebook only without installing anaconda. It should have worked. But for some reasons beyond my knowledge I wasn't able to run it.

So, as recommended on the official page, I installed Jupyter using anaconda, and since doing so I am now able to successfully run Jupyter notebook using the command jupyter notebook.

Although the problem has now been solved in an alternative way I'd still like to know what my problem was initially, and how I could have solved it.


What is the method to install CryptoTE on 16.04?

The libraries you need (version for Trusty) can be downloaded from here: libwxbase2.8-0 and libwxgtk2.8-0.

Download them both.
Uninstall/Remove the Xenial versions for the libraries so they cause no trouble.
Install the proper version of the libraries for your Ubuntu 16.04.


Unable to patch League of Legends in Ubuntu 15.10

I've experienced the same issue a lot. I worked around it this way:

Quit League of Legends.
Open PlayOnLinux, select Configure then select the LoL drive.
Navigate to the Wine tab.
Click Kill processes and wait for PlayOnLinux to complete the process (a window will pop up for a short time).
Click Windows reboot and again wait for it to complete.
Start League of Legends.

Also make sure that you are using a compatible Wine version. The one installed by PoL, 1.7.44-LeagueOfLegends2, should work. Make sure it is selected in the General tab. If the patcher still doesn't work, remove the POL virtual drive and reinstall LoL in a new virtual drive using the builtin installer script.


It looks like you can do this with ethtool, and make the change permanent by modifying /etc/network/interfaces.

Something like:

auto eth0
iface eth0 inet static
pre-up /usr/sbin/ethtool -s eth0 speed 10 duplex full

There's a page with the info here: https://help.ubuntu.com/10.04/serverguide/C/network-configuration.html


Dual Boot: access Mac OS HD folders from Ubuntu

just launch nautilus as root :

gksudo nautilus

this will give you access to osx files from ubuntu
or from a terminal open up a root shell :

sudo -s;
cd /media

enjoy - Scott Stensland


Does the current Live USB made from Ubuntu 18.04 LTS have persistence?

Persistance is an option selected when a LiveUSB is generated, and a multi-OS tool to do that clearly is http://multibootusb.org/ .


Can do this using /etc/aliases.

(forwardto name eg:prayer) (email address)

then type the command postmap hash:/etc/aliases


Recover single files from backup: past versions can't be found?

I must admit that part of the issue was due to mistyping filenames.

Partial answer:

As you can see above I mistyped .dvi for the extension instead of .vdi. That was the reason for the first attempt being unsuccessful.

In fact I could find an old-enough backup file with the following duplicity command:

$ duplicity list-current-files -t 3D file:///media/user/TOSHIBA\ EXT/backup_home_user | grep .vdi

which succesfully found the file:

Fri Dec  9 09:56:13 2016 home/lorenzo/VirtualBox VMs/VirtXP/VirtXP.vdi

Based on this I tried, again via duplicity:

$ duplicity restore --file-to-restore VirtualBox\ VMs/VirtXP/VirtXP.vdi -t 3D file:///media/user/TOSHIBA\ EXT/backup_home_user ./restoreDir

...which unfortunately led to the request of the "GnuPG Passphrase", which I couldn't remember.

So I stayed with deja-dup and issued the following command again (this time with the correct .vdi extension):

deja-dup --restore VirtXP.vdi

... hence, after selecting the 9-Dec date, the recovery was succesfully completed.

There still remain two questions:

why can deja-dup work without a passphrase, and (how) can I recover it?
why didn't the second attempt (--restore-missing) work? (no wrong filename there)


File transfer from and to BQ Ubuntu phone

If it is connecting your Phone to Laptop, then, try the following:

Goto Dash, and Type Disks and open it.
If you can see your Phone Connected to it, then, select it, goto options and Mount it.

Edit :
If The Laptop detects it, then only you can connect with it.


The Puritine container is not directly modifiable by end-users. In this sense, it's a special container to maintain a base set of core applications on your device.
If you delete puritine's home directory, it should recreate the directory structure the next time an application is launched.
The puritine click is only available on the pre-built images due to its large size. You can recreate a container with all the same applications pretty easily, but to get the original container back you will either need to manually build/install the click or re-flash the device.


Root folder on my Ubuntu 16.04 with an (X)

That's not an error - it's telling you that you do not have permission to read the files in that directory as a normal user as you will see if you click on it.

If you want to see the contents of the directory you must do so as root. In a terminal type:

sudo -i nautilus

You notice that you have to enter your password. Now you have root privilege so you can view, edit and delete anything you want, so you should be careful because you could break your system - you shouldn't use root permission unless you really need to.

When finished, type exit in the terminal to drop privileges.

You can learn more about permissions in Linux filesystems here and from the permissions tag wiki.


Sublime text starts with "sudo sublime" but not "sublime"

Create a symbolic link to use at the command line:

sudo ln -s /opt/sublime_text/sublime_text /usr/bin/sublime

Now, change the ownership of /usr/bin/sublime and ~/.config/sublime-text-3 from root to you:

sudo chown username:username /usr/bin/sublime
sudo chown -R username:username /home/username/.config/sublime-text-3/

Replace username with your actual username.

Now, you should be able to run sublime by just:

sublime


Is there a "top-level' package for Ubuntu 14.04?

Usually it's called ubuntu-desktop. If you are using some other flavour like Kubuntu, Lubuntu, etc., the package would be kubuntu-desktop, lubuntu-desktop, etc.


How can I fix the "Cannot find module 'bplist-parser'" error with PhoneGap?

Simply update the dependencies with npm:

sudo npm update -g

and it will launch:

phonegap

Usage: phonegap [options] [commands]

Description:

  PhoneGap command-line tool.

Commands:

  help [command]       output usage information
  create <path>        create a phonegap project
  build <platforms>    build the project for a specific platform
  install <platforms>  install the project on for a specific platform
  run <platforms>      build and install the project for a specific platform
  platform [command]   update a platform version
  plugin [command]     add, remove, and list plugins
  template [command]   list available app templates
  ...

Source

My pronouns are He / Him


Best most Stable partition layout for Linux

Most likely the issues you had experienced in the past are not due to partition layout as such.  Most likely the bootloader configuration and not using UUID to reference the partitions in fstab.  Those were problems, but those have been solved long ago and I think most modern distro's will use UUID to reference partitions by default now.

I'd simply start with a fresh external HDD, install Ubuntu to it but manually partition the disk when prompted.  Leave space at the end of the drive for NTFS.

Then install Ubuntu.

Later, using gparted you can create an NTFS volume at the end of the drive for use in windows.

You'll need to install the ntfs-3g fuse drivers later to get ntfs support under ubuntu.


What is the Azure VM Image URN for Ubuntu Server 20.04 LTS?

Found a GitHub issue that tells which is the correct URN: https://github.com/Azure/azure-cli/issues/13320#issuecomment-649867249
Looks like the offer and SKU format were changed for 20.04 which is why it could not be found. The correct URN for Ubuntu Server 20.04-LTS is Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest.


Where is Thunderbird in Ubuntu software center? 18.04 Minimal install

It's called Thunderbird Mail and you can search for thunderbird in Ubuntu Software or install it from the terminal with the command:

sudo apt install thunderbird

Lighting is the Mozilla Calendar extension for Thunderbird, based on Sunbird - the Mozilla Standalone Calendar application. It is tightly  integrated with Thunderbird, allowing it to easily perform email-related calendaring tasks. To install lightning type:

sudo apt install xul-ext-lightning


How to change user GID and UID in Ubuntu 13.04?

WARNING: Messing with UIDs and GIDs can be hazardous to your sanity if it all goes pear-shaped. Using any of the scripts that follow is done entirely at your own risk.

Here are the commands to run as root to change the UID and GID for a user. Simply change the variables in angled brackets to match your settings:

usermod -u <NEWUID> <LOGIN>
groupmod -g <NEWGID> <GROUP>
find / -user <OLDUID> -exec chown -h <NEWUID> {} \;
find / -group <OLDGID> -exec chgrp -h <NEWGID> {} \;
usermod -g <NEWGID> <LOGIN>

  usermod and groupmod simply change the UID and GID for their
  respective named counterpart usermod also changes the UID for the
  files in the homedir but naturally we can’t assume the only place
  files have been created is in the user’s homedir.

  The find command recurses the filesystem from / and changes everything
  with UID of OLDUID to be owned by NEWUID and them changes the group
  for the files owned by the OLDGROUP.

  The final usermod command changes the login group for the user.

Source:

Changing UIDs and GIDs for a user


Ubuntu 16.04 KVM + QXL Guest - Can't change resolution

I had this same issue, but I tried so many things that I am not sure what made the difference.  Going in reverse of what I did to get a working solution.

1) In the KVM host, I changed the Video from "QXL" --> "VGA" (worked after this)

2) Updated ~/.config/monitors.xml with:

<monitors version="1">
  <configuration>
    <clone>no</clone>
    <output name="Virtual-0">
      <vendor>unknown</vendor>
      <product>unknown</product>
      <serial>unknown</serial>
      <width>1440</width>
      <height>900</height>
      <rate>59.990913391113281</rate>
      <x>0</x>
      <y>0</y>
      <rotation>normal</rotation>
      <reflect_x>no</reflect_x>
      <reflect_y>no</reflect_y>
      <primary>yes</primary>
      <presentation>no</presentation>
      <underscanning>no</underscanning>
    </output>
  </configuration>
  <configuration>
    <clone>no</clone>
    <output name="Virtual-0">
      <vendor>???</vendor>
      <product>0x0000</product>
      <serial>0x00000000</serial>
      <width>1440</width>
      <height>900</height>
      <rate>60</rate>
      <x>0</x>
      <y>0</y>
      <rotation>normal</rotation>
      <reflect_x>no</reflect_x>
      <reflect_y>no</reflect_y>
      <primary>yes</primary>
      <presentation>no</presentation>
      <underscanning>no</underscanning>
    </output>
  </configuration>
</monitors>

3) Updated /etc/default/grub adding: "GRUB_GFXMODE=1440x900" and then running "sudo update-grub"

4) Using advice from this post ( Reinstall package and its installed dependencies) to reinstall Gnome:

sudo apt-cache depends gnome | grep '[ |]Depends: [^<]' | cut -d: -f2 | tr -d ' ' | xargs sudo apt-get --reinstall install -y

Hope this helps!


How can I show Thunderbird Lightning tasks and events in the Gnome Clock applet?

There's the Thunderbird Addon (Evolution Sync) that should help you with this. It's pretty awesome if you have a simple setup in Thunderbird. (https://addons.mozilla.org/en-us/thunderbird/addon/evolution-mirror/)

I ended up stopping to use this since I had some remote calendars (iCals) from other sites and each time it checked those it would then add another entry to the Evolution calendar. I tried to email the actual maintainer but I got no love. So I went back to the old way of doing that.

Like I said though it's pretty slick in general :)

Good luck!


whereis doesn't locate files, because whereis command is not intended to be used for that.

From whereis manpage

whereis - locate the binary, source, and manual page files for a command

  whereis locates source/binary and manuals sections for specified
  files. The supplied names are first stripped of leading pathname
  components and any (single) trailing extension of the form .ext, for
  example, .c. Prefixes of s. resulting from use of source code control
  are also dealt with. whereis then attempts to locate the desired
  program in a list of standard Linux places.

For more information type man whereis in your terminal to refer the man page. For finding a file you have to use commands like grep, find, locate, etc...


How do I create and use keyboard shortcuts in a Gtk app that I am developing?

Here's some bits of code from one of my Python + Gtk apps, further extended according to the comments to this answer:

self.my_accelerators = Gtk.AccelGroup()
self.entry = Gtk.builder.get_object("entry1")
self.add_accelerator(self.entry, "<Control>b", signal="backspace")
...

def add_accelerator(self, widget, accelerator, signal="activate"):
    """Adds a keyboard shortcut"""
    if accelerator is not None:
        #if DEBUG:
            #print accelerator, widget.get_tooltip_text()
        key, mod = Gtk.accelerator_parse(accelerator)
        widget.add_accelerator(signal, self.my_accelerators, key, mod, Gtk.AccelFlags.VISIBLE)


I'm trying to install Ubuntu on my PC, I put it on USB but nothing happens

Which tutorial did you follow? Did you have any issues in one or more steps?
Basicly the following steps lead to a working Ubuntu:

Download Ubuntu (it's an .iso-file): for most users it's the LTS version
make a bootable USB stick from the .iso-file: sounds hard, but only requires a few clicks; Tutorial for doing it under Windows, Mac, Ubuntu
change the boot order of your PC: You need to tell your PC to boot from the USB stick instead of your hard drive: tutorial
Save changes in BIOS, plug in your brand new bootable USB stick and restart. The Ubuntu-setup should start now and explain you all the rest.


I finally found a way to fix the problem. I used this guide

Download Plop boot manager from here - use plpbt-5.0.14.zip

Assuming it was saved to your Downloads directory, unzip it and copy two files to /boot:

cd ~/Downloads
unzip plpbt-5.0.14.zip
sudo cp plpbt-5.0.14/Linux/plpbt.bin /boot
sudo cp plpbt-5.0.14/Linux/plpcfgbt /boot

Now you need to edit the file /etc/grub.d/40_custom, but you need some of the contents of the file /boot/grub/grub.cfg so open it with your favourite text editor and use it to find something similar to these lines (starting with insmod ext2 and ending with something close to the output of cat proc/cmdline). There may be several entries that are similar (one for each installed kernel):

 insmod ext2
 if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root  4ee1bbce-9d64-44b6-821b-511e06a804e0
 else
      search --no-floppy --fs-uuid --set=root 4ee1bbce-9d64-44b6-821b-511e06a804e0
 fi
 linux   /boot/vmlinuz-4.8.0-27-generic.efi.signed root=UUID=4ee1bbce-9d64-44b6-821b-511e06a804e0 ro  resume=/dev/mmcblk1p3 initcall_debug no_console_suspend intel_idle.max_cstate=1

Copy those lines, and then open /etc/grub.d/40_custom with your favourite text editor, for example

 sudo nano /etc/grub.d/40_custom

And add at the end of the file

menuentry "Plop Bootmanager" {

Then paste the lines from /boot/grub/grub.cfg but change the last one and add a closing } so finally the whole file is something like:

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Plop Bootmanager" {
insmod ext2
 if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root  4ee1bbce-9d64-44b6-821b-511e06a804e0
 else
      search --no-floppy --fs-uuid --set=root 4ee1bbce-9d64-44b6-821b-511e06a804e0
 fi
 linux16 /boot/plpbt.bin
}

Note: if there is a line starting with set root instead of the if/else statements then leave that line, but if there is a line starting with echo, remove it

Make sure you leave at least 2 newlines at the end of the file.

Save, exit, and run

sudo update-grub

And Plop Bootmanager will be added to your GRUB menu.


The following works for me:

sudo apt-get install compiz gnome-themes compizconfig-settings-manager
compiz --replace ccp &

If there are any errors displayed in the terminal, please add the output into your question.


How can I automount my ecryptfs ~/.private directory without logging in?

It's essential that you login at least once, and provide the login passphrase to the system at least once per boot, to mount your encrypted data.  By default, pam_ecryptfs will unmount your data on logout.

The best way to achieve the functionality you want, while still having some measurable amount of security, is to simply remove the automatic unmount flag, which is enabled by default.

Steps:

Login to the server system, and: rm ~/.ecryptfs/auto-umount
Once per system boot, you'll need to logon to the server and provide your login passphrase.  After that, you can logout and use Gnautilus + sshfs and read/write your encrypted data.


Building osmo-qcdiag on Ubuntu 16.04 with libosmocore and libqmi

The answer what works for me is that I had to use a nightly build to get things done to some extent.


Using this solution to rdp in my vm's in AWS and GCE clouds.

To remote desktop your Ubuntu machine, Install xrdp and xfce.

sudo apt-get update && sudo apt-get install xrdp && sudo apt-get install xfce4

Configure xrdp:

Create .xsession in home directory.

echo xfce4-session >~/.xsession

Edit startup file for xrdp (notice that the last line is startxfce4)

nano /etc/xrdp/startwm.sh

Restart xrdp service

sudo service xrdp restart

Log in:

RDP to your remote machine and enter your Ubuntu credentials. You will be able to log in.

Note:

By default, each time you login with xrdp , it starts a new session.

To resume your previous session that you are already using:

edit xrdp.ini file,

sudo nano /etc/xrdp/xrdp.ini

Search the [xrdp] section for the name sesman-Xvnc. (In my case it's [xrdp1]).

Change port value to ask (default is -1), then save and exit.
Restart xrdp server

sudo service xrdp restart

RDP to your remote machine. You will see a login screen:

Log in with username, password and enter port as -1(for the first immediate session after xrdp restart).
Note port number allocated carefully.

Next time use this port number to login to resume session.

Source: Use XRDP to Remote-Access Ubuntu 14.04


SNAP leaves behind some references after removal of NMAP package, causing APT version of NMAP not to be found

Removed SNAPD from my host. Don't need it, don't want it, problem gone!


Broke Okular by deleting all files manually

One of the dependencies was broken. I think it was the libokularcore7 one.

After following the step @steeldriver mentioned in the comment section i.e. using the command:

sudo dpkg -S 'okular' | awk -F: '!a[$1]++ {print $1}'

I was able to reinstall all the dependencies using:

for i in $(sudo dpkg -S 'okular' | awk -F: '!a[$1]++ {print $1}');
do sudo apt-get install --reinstall $i;
done

and then separately reinstall the libokularcore7 using the commmand

sudo apt-get install --reinstall libokularcore7


Cant get back to windows after uninstalling ubuntu

So if I understand, now on your disk drive you got the windows partition but can't boot into it.
Boot into ubuntu live CD and download boot-repair
https://help.ubuntu.com/community/Boot-Repair
It have fixed that problem for me once.


YouTube video choppy on Chrome, fine on Firefox

One thing you can try that solved the issue for me is enabling hardware acceleration.

Here is you how you can do that:

Navigate to chrome://flags in the Chrome URL bar
Click Enable on the Override software rendering list as shown here:

Restart Chrome
Optionally restart your computer

And it should be fixed


Does any new version of iptables support 64bit mark target?

Support for 64bit marks should be supported since iptables-1.2.10 on 64-bit machines. But it doesn't work, at least not in the latest version (1.4.21-2ubuntu2 and kernel 4.2.0-18).

From the Changelog

  iptables v1.2.10 Changelog
   ======================================================================
  This version requires kernel >= 2.4.4
  This version recommends kernel >= 2.4.18

  Bugs Fixed from 1.2.9:

  physdev match: fix new structure layout for kernel > 2.6.0-test8    [ Bart De Schuymer ]
  Better 64bit / 32bit split architecture detection
  IPv6 LOG target: Fix compiler warnings on 64bit
  LOG target: Fix compiler warnings on 64bit
  IPv6 MARK target: Use full 64bit mark on 64bit archs
  MARK target: Use full 64bit mark on 64bit archs
  SAME target: Fix 64bit/32bit splitarch problems
  ULOG target: Fix 64bit/32bit splitarch problems
  conntrack match: Fix 64bit/32bit splitarch problem
  IPv6 limit match: Fix 64bit/32bit splitarch problem
  limit match: Fix 64bit/32bit splitarch problem
  IPv6 mark match: Use full 64bit mark on 64bit archs
  mark match: Use full 64bit mark on 64bit archs
  owner match: Fix compiler warnings on 64bit     [ Martin Jofsefsson ]
  connbytes match: Fix signedness / unsigned issue    [ Martin Josefsson ]
  connlimit match: Fix '/0' netmask   [ David Ahern ]
  ipv6 owner match: fix possibly not zero terminated string
  helper match: fix possibly not zero terminated string
  recent match: fix possibly not zero terminated string   [ Karsten Desler ]
  ICMP match: fix '--icmp-type any' case  [ Harald Welte ]
  CONNMARK target: major update (add mark/mask matching)  [ Henrik Nordstrom ]
  DSCP target: Fix cosmetic help message problem      [ Maciej Soltysiak ]
  string match: Fix iptables-save/restore for ascii strings with spaces   [ Michael Rash ]
  ip(6)tables-restore: Make sure matches are used in the same order   [ Martin Josefsson ]
  ip(6)tables-restore: Fix '--verbose' option
  ip(6)tables-restore: Add '--test' option
  ip(6)tables-restore: Complain about missing 'COMMIT'    [ Martin Josefsson ]
  ip(6)tables-restore: Allow embedding of quote character in quoted strings   [ Michael Rash ]
  libipq: Protect against spoofed queue messages (check if sender is kernel)  [ Harald Welte ]


Ubuntu 12.04 & 13.10 won't boot from USB pen

Try booting from usb second time,
with me every alternate boot attempt with LiveUSB is successful.

Try LiLi USB creator
http://www.linuxliveusb.com/


Can I use an Android phone as webcam for an Ubuntu device?

You can use any android phone as a webcam for your Ubuntu PC by using droidcam.

First download the droidcam app on your android device via the play store

Next install adb on your Ubuntu PC
sudo apt install adb

Follow the instructions to install the droidcam linux client:

On your android phone, enable USB debugging (you need to enable developer mode to do this).

Find the drivers for your device. This page provides links to most manufacturers websites: http://developer.android.com/tools/extras/oem-usb.html#Drivers.
You can also search Google “ADB Drivers for ___”

Plug the device back into computer over USB. If you get a dialog asking “Allow USB Debugging”, you need to tap OK.

Open DroidCam and select the USB option. On the phone you may get a dialog asking “Allow USB Debugging”, you need to tap OK.
Sometimes you need to open “USB Options” from the notification area on the device and pick “PTP” mode for that to show up.

For more information on how to set up droidcam, click here

To use your android phone as a microphone, check out WO Mic.
To install the linux client see this.
You will also need to download the WO Mic app from the playstore.
Theoretically you can use both WO Mic and Droidcam in conjunction to turn your android device into a webcam with a microphone.


How to find the .desktop files for pinned applications in the Unity launcher?

If you want to know which applications are pinned currently (from other launcher icons, which are also shown in the launcher) , you can use gsettings

Open a terminal and use this command

gsettings get com.canonical.Unity.Launcher favorites

This command gives me the output below, (the exact output may differ)

['nautilus-home.desktop', 'firefox.desktop', 'libreoffice-writer.desktop', 'libreoffice-calc.desktop', 'libreoffice-impress.desktop', 'ubuntu-software-center.desktop', 'gnome-terminal.desktop', 'wimaxcmgui.desktop', 'synaptic.desktop']

The .desktop files are with the exact name in the output. But, you may not see the name though.

You can use cp command to copy them in some other directory.

First use this command to get a variable list with the list of .desktop files which are pinned.

export list=`gsettings get com.canonical.Unity.Launcher favorites | grep .*.desktop | tr "[]\'," " "`

Then copy those files in your Desktop.

cd /usr/share/applications && cp $list ~/Desktop && cd

Hope this will help. You now have the .desktop files which are pinned in your desktop.


How do I set up GRUB in a USB to boot into an IMG?

Format the usb as vfat, or if you want a persistant partition let me know and I'll add those instructions too later:

fdisk /dev/sdb #if the usb is listed as sdb
    d
    n
    p
    1
    <enter>
    <enter>
    t
    c
    w
mkfs.vfat /dev/sdb1
mkdir /mnt/temp; mount /dev/sdb1 /mnt/temp
mkdir /mnt/temp2; mount -o loop /path/to/the/ISO.iso

Copy everything over:

rsync -avhP /mnt/temp2/* /mnt/temp

Install grub:

grub-install --no-floppy --root-directory=/mnt/temp /dev/sdb

Then just make your grub.cfg. Shouldn't be too difficult. Or you just just leave it blank and boot with grub commands if you want. Each time you try to boot it though it'll take something along the lines of:

linux /boot/vmlinuz
initrd /boot/initrd.img boot=casper cdrom-detect/try-usb=true


bcmwl-kernel-source broken Manual fix, Breaks in the future?

No, the driver won't break on kernel upgrades any more. It is a dkms driver. It will build with new kernels automatically.
So unless the system is upgraded to some new major kernel version, the driver should work. But we all hope that Canonical will upgrade the driver properly in the repos next time.


Ubuntu Desktop boots, but Ubuntu Server doesn't

X220 should be supported I'd imagine, and I've typically seen the server build to install easier than the desktop so surprised it's causing issues. A couple of things to check is whether the BIOS is set to legacy or UEFI (I believe both should be ok, but on the older hardware might be better to use the legacy option - press F2 or Enter on a Thinkpad I believe). Also always good to just try re-flashing the boot media. Since it's showing the whole install process likely not the issue, but recreating the USB disk is always a good sanity check (I think Ember is getting popular or you can just run dd if= of=/dev/ bs=64k).


How to natively turn off internal microphone(mic)?

Well the image you posted, is in the settings to represent the presence and working of microphone. It does not indicate that the mic is always on. It is turned on only for demonstration purpose, and the data is not actually recorded.
It is just for representation purpose.
However if you want to completely disable the device then see this
.


Problem booting Ubuntu Server after editing /etc/fstab to mount secondary hdd

The problem was resolved. How far this is correct I am not sure, but I resolved it like this.
I was not creating the mount point that /media/storage and adding the line to /etc/fstab
The directory storage was automatically being created in /media/ and on manual mount it was working fine.

But I read somewhere that you have to create the mount point with root privileges so I deleted the storage directory and created another directory with the command
sudo mkdir /media/server-backup and modified the /etc/fstab accordingly.

Then I rebooted the machine and I didn't face any problem the secondary hdd was mounted without any problem.


Kind of an old question here, but for future reference.  If you need a specific version of cuda it is actually very easy to install CUDA for specific version of Ubuntu LTS releases.  You just need to make sure you have the Ubuntu default repo cuda REMOVED.

You can check the version of the nvidia-cuda-toolkit by running this command.

nvcc --version

output

  nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2016 NVIDIA
  Corporation Built on Tue_Jan_10_13:22:03_CST_2017 Cuda compilation
  tools, release 8.0, V8.0.61

After you successfully install using the .deb file provided by Nvidia make sure you add the directory to your file path so it works with anything that may be looking for it like this.

export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}


How can we avoid entering the path of every different file each time in a shell script?

With $PWD

PWD is an environment variable that is updated to contain the current directory,
$variable is replaced by the value of variable

This gives:

thescript $PWD

With $(pwd)

pwd is a command that prints the current directory
$(command) is replaced by the output of command

This gives:

thescript $(pwd)


File '/etc/sudoers': Why do I need to use the sudo command if I am in the sudo group?

Having one's userid (or a group one is a member of) in the sudoers file gives one the capability to run commands as root (or other users, but that's advanced sudoers). It does NOT make one root all the time, which is what you seem to be assuming.

Speaking from a half century's experience with computers, being root all the time is too dangerous. Having to type sudo in front of the command gives one extra time to consider - will this shoot me in the foot?

Please read man sudo, man sudoers, man sudo_root.


error writing /etc/resolv.conf operation not permitted

resolve.conf is an autogenerated file by resolvconf package.
cd /etc/resolvconf/resolv.conf.d

There is a head file. First create a backup copy of head file. Then edit the head file so the nameserver is added.
sudo nano head

Do not change the rest and ignore warnings.
Go to the end of the file, and add the nameservers you need. nameserver ip_here. Then generate the conf file
sudo resolvconf -u

Check if the nameserver is added to /etc/resolve.conf, then reboot. The nameservers will be there even after reboot.

resolve.conf are static pages and nameservers can be added using resolvconf package

Here is the manpage for resolvconf
See if this helps.


As explained here, bash made the choice to exit only when all the commands in the pipe as ended. Here, netcat does not want to stop, but after since the end pipe is broken, netcat fails. That's why you need to wait one more time to quit the loop (by the way, you have an error when you quit the loop). Here is a version that doesn't have this pipe problem :

#!/bin/bash

echo "Start listening on port 12345 ..."
while read line
do
    if [ "$line" == 'exit' ]; then
        echo "Received 'exit'"
        break
    else
        echo "$line"
    fi
done < <((echo "Welcome. Please give me one of the following commands: $AVAILABLECOMMANDS") | nc -q -1 -l 12345)
echo "Good bye"


Simply run

sudo apt-get update

and then

sudo apt-get install python3-pip

or python-pip depending on your version.

Apparently fresh install doesn't have full list of available packages cashed.


"Missing Operating System" after installing Ubuntu 12.04 from a CD on a Macbook Pro

Sounds like an issue with Grub, since I don't have a Mac and other UEFI system implementations seem to differ a lot I can just give you a heads up to this wiki page: https://help.ubuntu.com/community/UEFIBooting


upgrading to Ubuntu 16.04 partition issue.

Your Ubuntu installation is on /dev/sda8, which is only 11 GiB in size, 9 GiB of which are already in use. Although 11 GiB is (clearly) enough for an Ubuntu installation, it's a bit tight, and whether because of temporary needs of doing an upgrade or increased needs of Ubuntu 16.04 vs. 14.04, the 2 GiB of free space on that partition is not sufficient for doing an upgrade.

In theory, you might be able to clear enough space by uninstalling unused packages, removing unnecessary files from your home directory, or taking other disk-space-saving measures; however, I don't think that's really the best approach, given your situation. I see that the partition immediately before /dev/sda8, /dev/sda7, is a 143 GiB NTFS partition with 127 GiB of free space. Unless you have plans to use most of that space in the foreseeable future, I recommend you shrink that partition and move/resize your Ubuntu partition into that space. Such operations carry some risk, so backing up any important files from both partitions before you do this is a good idea. Note that you'll need to do the resizing from a "live disk," such as the Ubuntu installer in its "try before installing" mode. Several questions and answers on this site cover partition resizing in more detail, such as:

How to resize partitions?
How to extend my root (/) partition?
Resize partition using Gparted
How do I resize my partition in Ubuntu?

How much should you increase the size of your Ubuntu root (/) partition? That's hard to say. Given your disk sizes, I'd say to roughly double its size, unless you have a specific reason to do otherwise. (For instance, if you expect to be using lots more space in /dev/sda7, you might want to sacrifice as little of its space as possible and expand by less -- say, 5 GiB; or if you expect to be storing bigger files in the Ubuntu partition itself, you might want to expand it by more.)

An alternative to this approach is to shrink or delete your swap partition, /dev/sda9, and grow /dev/sda8 into that space. This will gain you a maximum of 3.89 GiB, though, and you'll lose your swap space, which you might or might not need. (Swap space is most important if you use suspend-to-disk operations, but it can be used to improve overall system performance even if you don't do this, since the kernel can use it to help optimize its use of RAM.)


Creating a bootable USB-stick on OS X for PC

Well to create a Bootable USB of Ubuntu 16.04  in MAC , I recommend you to install Unetbootin software where Mac version is available. Kindly install it and download the Xenial 16.04 iso from ubuntu webpage and burn it to your USB. Not that you will be running unetbootin with privileges so , beware selecting correct USB drive if you have multiple USBs mounted simultaneously.


Less engaging trema or umlaut key combination

Since you mentioned the English (UK) layout, there is no need to use a compose key since it includes the dead_diaeresis symbol. Hence:

Right Alt+[ followed by E => ë

As regards US, a trema can be added in a similar way if you for instance use the English (US, intl., with dead keys) keyboard layout.


Open the following file with this command : nano /etc/passwd
Then search for the user name : ctl+w username in my case anass

then copy the two numbers in right of the user name anass:x:1000:1000 , in this case 1000:1000

Connect with root and type this command : chown -R 1000:1000 yourdirectory
chow mean change owner


Apparmor that runs normally will show a number of loaded profiles. However, this is applicable only when Xubuntu has been installed to the local machine.

  Could it be because I am using the live-usb?

So the short answer is, yes.

And it is not just Live USB, but also applies to Live CD/DVD regardless of the Xubuntu releases (I have confirmed myself using Xubuntu 12.04/14.04 on both live and local sessions).

The apparmor-profiles package isn't included on default installation of Xubuntu. Even so, running sudo apparmor_status by default will show more than 10 profiles loaded for evince, NetworkManager, lightdm, etc.

There are known exceptions, such as Apparmor is disabled by default for Firefox. Someone has asked this question on askubuntu already.

Finally, you may wonder why Apparmor profiles aren't loaded on live sessions?

Apparently, Apparmor doesn't work on stacked filesystem i.e. Live CD. And this has been reported as bug since Karmic and likely remain unfixed to this date.


How to disable onedrive service from autostarting

This issue is caused by the Ubuntu PPA package creating a symbolic link when the package is installed:
Created symlink /etc/systemd/user/default.target.wants/onedrive.service → /usr/lib/systemd/user/onedrive.service.

To resolve this situation, this symbolic link needs to be removed:
sudo rm /etc/systemd/user/default.target.wants/onedrive.service

To fix this issue permanently, the PPA package needs to be updated so that this symbolic link is not created.
The above information is also listed in https://github.com/abraunegg/onedrive/issues/1274 which tracks this particular issue.


Which website do i have to unblock to be able to download ubuntu packages?

You need to white-list (if you are set it to use the main server):

http://ubuntu.com
https://ubuntu.com

and if you plan on using the canonical repository as well those:

http://canonical.com
https://canonical.com


How do I change "Image" tab information on a downloaded icon (PNG)?

The text for "Created by" is taken from the image's metadata, more specifically, from the metadata key Software. There are a number of standards and formats to embed metadata in an image, among them Exif, IPTC/IIM or XMP.

I'm not sure why exiv2 doesn't find the metadata of that image, but I've found that exiftool (from package libimage-exiftool-perl) does. You can extract the current value of the field with

exiftool -Software path/to/file

and set a new value with

exiftool -Software="new value for field" path/to/file


Respect BIOS-specified CPU speed without kernel patches, etc. in 14.04

If you have the cpupower command available (part of linux-tools-common package, I think included by default), you can use a powersaving CPU governor to limit the speed - you can list the available governors with:

cpupower frequency-info --governors

Example output:

analyzing CPU 0:
conservative ondemand userspace powersave performance

And set it with this (as root):

cpupower frequency-set -g GOVERNOR

e.g.

sudo cpupower frequency-set -g conservative

You can then view the current state by running sudo cpupower frequency-info - example output:

analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.50 GHz
  available frequency steps: 2.50 GHz, 2.50 GHz, 2.00 GHz, 1.80 GHz, 1.60 GHz, 1.40 GHz, 1.20 GHz, 1000 MHz, 800 MHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance
  current policy: frequency should be within 800 MHz and 2.50 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz (asserted by call to hardware).
  boost state support:
    Supported: yes
    Active: yes
2900 MHz max turbo 4 active cores
2900 MHz max turbo 3 active cores
2900 MHz max turbo 2 active cores
3100 MHz max turbo 1 active cores

Documentation on what each governor does cna be found here - here is a summary (you probably want the powersave one):

  2.1 Performance

  The CPUfreq governor "performance" sets the CPU statically to the
  highest frequency within the borders of scaling_min_freq and
  scaling_max_freq.

  2.2 Powersave

  The CPUfreq governor "powersave" sets the CPU statically to the lowest
  frequency within the borders of scaling_min_freq and scaling_max_freq.

  2.3 Userspace

  The CPUfreq governor "userspace" allows the user, or any userspace
  program running with UID "root", to set the CPU to a specific
  frequency by making a sysfs file "scaling_setspeed" available in the
  CPU-device directory.

  2.4 Ondemand

  The CPUfreq governor "ondemand" sets the CPU depending on the current
  usage. To do this the CPU must have the capability to switch the
  frequency very quickly. ...

  2.5 Conservative

  The CPUfreq governor "conservative", much like the "ondemand"
  governor, sets the CPU depending on the current usage.  It differs in
  behaviour in that it gracefully increases and decreases the CPU speed
  rather than jumping to max speed the moment there is any load on the
  CPU.  This behaviour more suitable in a battery powered environment. ...

This governors can be set to be used fairly easily (there's even a Unity extension that can be used so it can be done from a desktop user's panel), and can save a fair amount of power when used (extra hour/half hour batter life for a laptop, etc)


Downloading Wine from the Ubuntu Software Center

I followed the instructions from the website
  https://www.winehq.org/download/ubuntu

The team behind the PPA ppa:ubuntu-wine/ppa has changed the package names in the year 2010 or 2011.

Therefore install Wine 1.7 with

sudo apt-get install wine1.7

More about the installation of Wine here.


Ubuntu doesn't start, not enough disk space

In normal operation Ubuntu does not utilize a lot of disk space for itself, even with a bunch of packages installed. On a filled 50 GB partition, there are surely some warez you can remove or temporarily move somewhere else.

However there is another option: tune2fs -m 0.5 /path_to/device

From the tune2fs manpage:

-m _reserved-blocks-percentage_

Set the percentage of the filesystem which may only be allocated
by privileged processes.   Reserving some number of filesystem blocks
for use by privileged processes is done to avoid filesystem fragmentation,
and to allow system daemons, such as sys‐logd(8), to continue to function
correctly after non-privileged processes are prevented from writing to the
filesystem.  Normally, the default percentage of reserved blocks is 5%.

So using this command you will lower the the reserved blocks in your example from 2,5 GB to 250 MB, which should suffice to boot Ubuntu again.

Obviously you need to run the command from the Live CD. Put the setting back in place after you fixed your issue(!) with: tune2fs -m 5 /path_to/device

As I said in normal operation Ubuntu does not fill a 50 GB file system to the brim. If that 5 GB and above game was the only large thing that you can remember to put on this file system you might want to investigate here. You can use the graphical disk usage tool that comes with Ubuntu or use a command like this: find -size +1G /path | more

Files over 1 GB in size are very rare in the Ubuntu system. Also take a look into /var/log or the log viewer. Don't just remove the files, try to find out if they have to be that big or what made them grow. If it is a logfile take a look at it. I had one with 30 GB in size due to my KVM switch acting up. Replugging it fixed the issue.


How do I fix dragging items between two monitors?

Try to upgrade your nvidia driver with:

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install nvidia-current nvidia-current-modaliases nvidia-settings

I have noticed you use 280 version of Nvidia drivers. In the above repos you will find the latest drivers and the latest version of the X server. Possibly it will fix the issues.

If anything goes wrong, you can revert with

sudo ppa-purge ppa:ubuntu-x-swat/x-updates

Friendly note from Oli: I've removed xorg-edgers from the answer above but if you find that ubuntu-x-swat doesn't get you anywhere you could try ppa:xorg-edgers/ppa which is an even more updated version of the graphics stack. You should be aware that while x-swat is mainly driver updates, edgers will try to replace the whole kit and kaboodle. It will probably eat your babies.


Visit this UbuntuPre-installed list .

Or You can choose the Best for yourself through this

Ubuntu Certified hardware list.

Visit their official Product sites for more info.


How do I delete an unwanted icon in the bar at the bottom of the screen, in GNOME Classic?

Originally posted by boxcorner:

  I discovered the arcane method is:

  Alt + right-click

  Not exactly very intuitive, but it did the trick!


Shut down / start up black screen problem

Sorry to waste time. I suspected Windows 10 and started it up and then shut it down. That solved my problem. I had some time previously hit restart for Windows 10 and then chose to boot from GRUB my Ubuntu 16.04. Maybe something to do with Windows 10 fast startup.


Okay in comments you said you want a fresh install and there is nothing to backup. Basically you just want to download 14.04 and burn to disk or put img on usb (if have access to Windows you can use Linux Live USB Creator).

During install process I'm pretty sure one of the options is to wipe everything and do a clean install. Not sure what effect that will have with your raid setup. Might need to reset that up.

If you don't get that option, you may need to back out of install, go to try Ubuntu and use gparted to delete partitions/recreate them.


My Brother DCP-7030 printer does not work

What happens when you try to print? Does it print none stop with blank pages? What version of the driver are you using? I have had these problems with the Brother Printers.


How to edit the top right panels in Ubuntu 14.04?

Just use this code in Terminal,
sudo apt-get remove indicator-messages

It should look like this in the terminal

And this when its complete
For this to take effect, you need to restart your computer,I hope this helped!


How to remove a specific folder from the Ubuntu search?

When you use files and folders, your activity is logged by a service called Zeitgeist. Unity uses the data from Zeitgeist in its search results.

Because Zeitgeist and Unity are separate services, Zeitgeist shouldn't be affected by updates to Unity.

As far as I'm aware, the Activity Log Manager is the only easy way to manage what Zeitgeist logs. I know you're worried about the Zeitgeist Activity Log Manager not being 'native', but as far as I can tell, it is. It's maintained by Zeitgeist's developers and is going to be included in Ubuntu Precise; I think the only reason it isn't included in Oneiric is because it was released too late.

As you might have seen from the OMG Ubuntu article Gonzo linked to, there's a PPA, so keeping Zeitgeist and the Activity Log Manager up to date really isn't anything to worry about. I installed Activity Log Manager on my Oneiric netbook months ago, and it's working perfectly since then.

Here's what you need to do to:

sudo add-apt-repository ppa:zeitgeist/ppa
sudo apt-get update
sudo apt-get install activity-log-manager

You can then launch it by searching for it in Unity. Once it's loaded, you'll find the option to prevent certain folders being logged in the Files tab.

When you use these files they won't be logged by Zeitgeist any more, but if you've used any of the files before they'll still show up in Unity's search results. To stop this, you'll need to delete Zeitgeist's record of them. The best way to do this would be to use "Activity Journal", which you might need to install first. Just search for it in the Ubuntu Software Centre or run:

sudo apt-get install gnome-activity-journal

Fire it up, and you'll see your computer usage is sorted chronologically. Flick through until you find when you last used those files, right click on a file and click "Delete all items with this URL"; Zeitgeist will forget you ever used that file.

The Activity Journal is included in the default Ubuntu repositories, so if you really don't want to add the PPA and install the Activity Log Manager, you could install it and use it to manually delete Zeitgeist's records each time you use your files. This wouldn't be very convenient, though.

EDIT: I originally said the the Activity Log Manager was an official GNOME project - as you'll see from Manish's comment, it turns out not to be. I've changed my wording to "maintained by Zeitgeist's developers".


Does Ubuntu Touch have a terminal and/or a compiler?

The Ubuntu Touch Terminal has already been released as an Ubuntu Touch Core App. For more information about the Ubuntu Touch Terminal visit the Ubuntu Touch Terminal wiki.


(I guess my comment should be an answer...)

I'm guessing "/mnt/encryptedVolume" is not mounted yet when the startup script is being run.

You could wait for a while to run the script until after the needed volume is mounted,

using a sleep 20 in the script.
Or run the script after everything's "up" and mounted and you're logged in, running initctl start myService should work.


Will Trusty/14.04 Installation Media come without Ubuntu One?

The client packages for file sync have already been removed from the 14.04 archive, yes. However, if you upgrade, the client will not be removed unless you choose to allow it to be removed during the process.

Contacts sync has been shut down for a long time already. You are not using it on any current phone version of the client with Ubuntu One. Also, the phone apps did not support synchronization. You could only download individual files from the service. Only auto-upload was supported, only for photos. The music streaming app will stop working on June 1. The Android and iOS apps will be removed from the respective stores at some point.

The 13.10 install image will never change. However, 13.10 will also no longer be supported, after July 2014, and it is already impossible for new users to sign up for the service.


Is there any way I can setup AirPort Express from Ubuntu?

I'm running an Airport Express wireless AP. I can configure it with a Java app, called AirportBaseStationConfigurator, which is part of a Java source package called AirportAdministration, written by J. Sevy. I forget where I got it, but I recall that google was my friend, it could be yours, too.


Help! Ubuntu 20.04 Server is printing kernel messages to my console

Usually people want to know about messages like this because they point to serious issues that the OS is contending with. Hopefully this server is not being used for any mission-critical purposes ….
That said, if you insist on hiding these messages to the console, then you’ll need to set a different virtual console in the Grub configuration and reboot (because the virtual console cannot be changed dynamically).
Here’s how:

Open Terminal (if it’s not already open)
Edit the Grub configuration file in a text editor of your choice:
sudo vi /etc/default/grub

Find the line that starts GRUB_CMDLINE_LINUX
Add/Edit the console setting:
console=ttyS0

Save and close the file
Update the Grub configuration
sudo update-grub

Reboot the machine

This will do what you’re looking for. To undo it in the future, remove the console setting, update Grub, and reboot.


login error in Ubuntu 16.04 with X authority problem

The XAuth error you're getting is because you don't have permissions to write to that file despite it being in your /home directory.

While logged in, change the ownership of the .Xauthority file from root to you username:

sudo chown $USER:$USER ~/.Xauthority

Then it will be accessible when you want to log in. The file is overwritten every time you attempt to start X-Windows.

Also, do:

sudo apt-get install --reinstall xorg

If your configuration files get messed up or the permissions are wrong, this will reconfigure and reset them for you in X-Windows.

Purge and reinstall Android Studio, make sure you install it to your /home directory and not root /, it has no business being there. The reason why you can't do the other stuff you want is that, since it's installed as root, you have to execute everything else as root in order to interact with your application. That's a recipe for disaster.

When you install it to the /home directory, you won't need to use sudo to get at the file, to start it.


As you correctly say, GStreamer does support replaygain. However I don't think it is enabled unless an application specifically requests it.

I'd advise testing your files in Rhythmbox or Banshee (both of which have a preference to turn replaygain on).


Stuck on splash screen, error loading shared library

Sounds like you accidentally moved some/all shared libraries in the /usr/lib directory.

I would boot from a Ubuntu Live CD/USB or recovery mode and look if the /usr/lib directory still exists. If not maybe you just renamed it. Search for recently modified directories.

The Live system should give a good reference on how the content of the directory should look like. From the errors you mentioned: libapt-pkg.so* should be located in /usr/lib/x86_64-linux-gnu and
libsudo_util.so* should be located in /usr/lib/sudo.


This bug is reported here. I managed to workaround it so I thought I could share the fix so others can benefit and perhaps contribute more accurate information. Information source is soneedu commnent and Ubuntu Wiki.

Update: There is another fix suggestion which seems way more easy to do, and it was confirmed in the comments that it works.

Fix suggestion #1:

Install the package ndiswrapper-dkms
Run the command: sudo modprobe ndiswrapper

Now you should be able to use the Windows Wireless Network Drivers (ndisgtk) utility.

Don't forget to make sure that ndiswrapper is being loaded on system startup.

Fix suggestion #2:

Tested on Ubuntu 12.04 32 bit.

Go to Ubuntu Software Center, search for ndisgtk and open its entry. Install it in case you haven't yet. Check the add-on Source for the ndiswrapper Linux kernel module (ndiswrapper-source) and click "Apply Changes".

Now there must be a file called ndiswrapper.tar.bz2 in /usr/src. Open a terminal and go to the directory:

cd /usr/src

Extract the file:

sudo tar -xjf ndiswrapper.tar.bz2

Go the the extracted directory:

cd /usr/src/modules/ndiswrapper

Compile and install:

sudo make
sudo make install

Add the module to the system:

sudo modprobe ndiswrapper

Open the file:

gksudo gedit /etc/modprobe.d/ndiswrapper.conf

Delete the content of the file, save and close. Then let the module write the configuration file again:

sudo ndiswrapper -m

Reboot.

Now you should be able to use the Windows Wireless Network Drivers (ndisgtk) utility.

Don't forget to make sure that ndiswrapper is being loaded on system startup.


Lost on these new fresh install upgrade-update errors on Ubuntu Gnome 17.04

Removing errros
“Minecraft Installer Peeps” team and Jonathon F doesn't have a release targeting Zesty yet.
I'd advise you to run these following commands to get rid of the errors
sudo add-apt-repository --remove ppa:minecraft-installer-peeps/minecraft-installer
sudo add-apt-repository --remove ppa:jonathonf/python-3.6

Then run
sudo apt-get update

Installing the packages you want
If you want to get python 3.6 on 17.04, then you don't need to add PPA, it's already available on Universe repository
sudo apt-get install python3.6

And Minecraft is officially available as .jar file on their website

References and extra information
How can PPAs be removed?
How do I enable the "Universe" repository?
Trying to install Minecraft on Ubuntu 16.04
How to install a .jar file


How do you find php.ini in ubuntu for phpv7.2

You cand find the php.ini file in the following directories:

/etc/php/7.0/apache2/php.ini
/etc/php/7.0/cli/php.ini

Hope it helps.


NAT'ing a non-directly connected network

UFW is an interface for netfilter and it uses iptables for configuration.
It means that, when you try to edit configuration file, you are editing iptables rules. Therefore you can find help in iptables manual.
Every iptables rule does two things:

matches the IP packet
executes action on the packet

In the case of the rule you are wondering about, it will match any packet that was already routed to be send out of interface ens3, and has source IP in 10.100.0.0/24 network. Once matched it will be NATed to IP address of the ens3 interface.
FORWARDING - no UFW
I suspect you have made assumption when asking your question and you didn't say what is actual problem you are trying to solve. It sounds like you are unable to forward network 10.100.0.0/24 to internet. The question feels like XY Problem
If you are routing traffic through the Linux, you must enable ip forwarding.
To verify if forwarding is enabled run:
echo /proc/sys/net/ipv4/ip_forward

You will get return 0 for disabled and 1 for enabled.
When not using UFW you can enable it permanently by editing /etc/sysctl.conf:
echo "net.ipv4.ip_forward = 1" | sudo tee -a /etc/sysctl.conf

Above command will append the text in the quotes into the mentioned file.
In order to apply the new setting run:
sudo sysctl -p

UFW
Although above setting will work with UFW it would be wise to stick to ufw base configuration.
Check the UFW configuration:
sudo ufw status verbose

You may see that the default routed policy is disabled:
Default: deny (incoming), allow (outgoing), disabled (routed)

Now edit /etc/ufw/sysctl.conf. Settings in this file will overwrite /etc/sysctl.conf
In the above file locate line #net/ipv4/ip_forward=1 and remove the #.
Save the file and reload the ufw:
sudo ufw reload

When displaying verbose status this time, you should see default routed policy changed from disabled to deny.
To allow routing run:
sudo ufw default allow routed

This commend will modify /etc/default/ufw line, from
DEFAULT_FORWARD_POLICY="DROP"

to
DEFAULT_FORWARD_POLICY="ACCEPT"

MASQUERADE
With above settings, your rules in /etc/ufw/before.rules should work, but they need to be before *filter. It is also a good idea to flush the rules -F before appending new ones -A. Otherwise anytime the ufw service would be restarted, it would add another copy of the same rule.
*nat
:POSTROUTING ACCEPT [0:0]
-F
-A POSTROUTING -s 10.100.0.0/24 -o ens3 -j MASQUERADE
COMMIT

After applying these setting the ufw needs to be reloaded:
sudo ufw reload

The ufw status will not display the NAT configuration but it can be verified by checking iptables with:
sudo iptables -t nat -L -v

and the POSTROUTING chain should look as below:
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target     prot opt in     out     source               destination
0     0 MASQUERADE  all  --  any    ens3    10.100.0.0/24        anywhere

Remember that your firewall will also need to have a route back to your 10.100.0.0/24 network.


Remove Wine's Notepad from "Open With" options

wine-notepad creates a local mime association for text/plain and some other types in the file ~/.local/share/applications/mimeinfo.cache; this effectively allows it as an alternative to anything gedit (or your default GUI editor) would otherwise open
To disable, open ~/.local/share/applications/mimeinfo.cache in a text editor and delete the lines with the MIME types text/plain and text/html
Also move/delete wine-extension-txt.desktop and wine-extension-htm.desktop from ~/.local/share/applications/
Most text or text-like files should default back to your GUI editor


How to get more information about a mountpoint

The command

df -h

of just

df

gives you some informations


Installed on a machine with EFI and after installation, it says the disk is not bootable

The problem is the EFI does not recognise the bootloader and even though GRUB is installed it is not able to run correctly due to not being able to be read from the MBR.

I found a solution on Ubuntu Forums that hopefully will solve your issue and get your installation working.

  SOLUTION 1) GPT partitioning seemed to be a problem for the Ubuntu
  installer. I took the SSD disk out of the PC, plugged it to another PC
  with a SATA-to-USB adapter and created a normal partition table on it
  without any of the non-working GPT crap. I created the partitions as
  follows (with cfdisk, gparted also works):

  1: FAT32 partition for the EFI bootloader. I set this to 500 MB size
  and formatted it with mkfs.vfat. 2: / (root) partition (ext4). 3:
  /home partition (ext4).

  I use no swap on computers like this that have 16 - 32 GB of RAM.

  2) I kept the SSD disk plugged to the other PC with the SATA-to-USB
  adapter and mounted the FAT16 EFI partition. I created a folder
  efi/grub under it with the command "mkdir -p efi/grub".

  3) Now the disk was ready for installation. I put the SSD disk back to
  the new PC, booted up Ubuntu installation from the USB disk and
  installed it as usual, formatting / and /home as ext4 in the process.

  SUCCESS!!! The PC boots in about 10-15 seconds like you'd expect from
  an SSD disk. The network card on this motherboard works on Ubuntu
  11.10 out-of-the-box as well. 10.04 doesn't seem to recognise it, 11.04 I'm not sure.

  My advice to others reading Ubuntu's EFI/UEFI instructions: Do NOT
  start recompiling GRUB or other more complicated stuff. It is
  completely unnecessary.

  The instructions are outdated for 11.10 and just creating the FAT
  partition with a folder efi/grub is enough for Ubuntu to automatically
  recognise and install the bootloader there. Ubuntu 11.10 already has a
  working GRUB for EFI systems, you do NOT need to compile one yourself,
  at least not for the Asus EZ.

  So, in short: create the partitions on a non-EFI system, mkdir 2
  folders and install. If I only knew from the start that it was this
  simple.

Reference

Although this references removing the drive from the PC other threads have not removed the drive, used the same method and had success - good luck and let us know how it goes.


Lirc, irxevent: Why doesn't it work with Nautilus?

As I workaround I installed xautomation and modified ~/.lircrc to use xte instead of irxevent wherever it referred to CurrentWindow. The mentioned passage now looks like this:

begin
    prog = irexec
    button = KEY_OK
    config = xte 'key Return'
end

Now everything's working fine again.


Dual monitor lubuntu how to change wallpaper in extended screen?

Ok I found the solution.

I downloaded and installed disper-indicator. It is a .deb package.
I installed it manually because I could not find it in repositories.
Then I have set disper-indicator to run on startup. So now I click on disper indicator and I configure the dual monitors

Disper indicator can be found from this repository https://launchpad.net/~nmellegard/+archive/ubuntu/disper-indicator-ppa

Added later by Edit


Bleachbit is a good alternative for linux and will allow you to clean program clutter and system clutter to tidy up things like logs, caches and thumbnail libraries grown too huge...  It can be found in the Software Centre...


Wanted to post the answer I was looking for in case anyone else needs the same scenario.  AlexP pointed me in the right direction above - the outside boxes didn't know how to reply back and I didn't want to have to add routes on every network that may use this.

I did want routing but I also needed NAT.

These instructions were cobbled together from several different sources but primarily - https://help.ubuntu.com/lts/serverguide/firewall.html <- the ufw IP Maquerading section here.

CentOS instructions from here- https://ronnybull.com/2015/11/20/how-to-centos-7-router/.

I am assuming an internal and an external interface on the Ubuntu box and that the settings for those have already been configured. (Also added instructions at the very bottom to accomplish the same thing with CentOS 7 - that was also a requirement of mine)

1. first, enable ufw and ufw logging

sudo ufw enable
sudo ufw logging on

2. Flush any existing rules (do NOT do this if you are already using ufw or IP tables for firewalling).  Delete and flush. Default table is "filter". Others like "nat" must be explicitly stated.

iptables --flush            # Flush all the rules in filter and nat tables
iptables --table nat --flush
iptables --delete-chain    # Delete all chains that are not in default filter and nat table
iptables --table nat --delete-chain

3.  First, packet forwarding needs to be enabled in ufw. Two configuration files will need to be adjusted, in /etc/default/ufw change the DEFAULT_FORWARD_POLICY to “ACCEPT”:

DEFAULT_FORWARD_POLICY="ACCEPT"

4.  Then edit /etc/ufw/sysctl.conf and uncomment:

net/ipv4/ip_forward=1
net/ipv4/conf/all/forwarding=1
net/ipv6/conf/default/forwarding=1 # if using IPv6

5.  Now add rules to the /etc/ufw/before.rules file. The default rules only configure the filter table, and to enable masquerading the nat table will need to be configured. Add the following to the top of the file just after the header comments:

# nat Table rules
*nat
:POSTROUTING ACCEPT [0:0]
# Forward traffic from eth1 through eth0.
-A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE
# don't delete the 'COMMIT' line or these nat table rules won't be processed
COMMIT

For each Table a corresponding COMMIT statement is required. In these examples only the nat and filter tables are shown, but you can also add rules for the raw and mangle tables.
In the above example replace eth0, eth1, and 192.168.0.0/24 with the appropriate interfaces and IP range for your network.

6.  Finally, disable and re-enable ufw to apply the changes:

sudo ufw disable && sudo ufw enable

IP Masquerading should now be enabled. You can also add any additional FORWARD rules to the /etc/ufw/before.rules. It is recommended that these additional rules be added to the ufw-before-forward chain.

CentOS 7 firewalld config to accomplish the same thing -

1. Enable IPv4 packet forwarding.

a. Add the following to /etc/sysctl.conf:

 net.ipv4.ip_forward = 1

b. Apply the sysctl settings:

sysctl -p

2. Add direct rules to firewalld. Add the --permanent option to keep these rules across restarts.

firewall-cmd --permanent --direct --add-rule ipv4 nat POSTROUTING 0 -o eth_ext -j MASQUERADE
firewall-cmd --permanent --direct --add-rule ipv4 filter FORWARD 0 -i eth_int -o eth_ext -j ACCEPT
firewall-cmd --permanent --direct --add-rule ipv4 filter FORWARD 0 -i eth_ext -o eth_int -m state --state RELATED,ESTABLISHED -j ACCEPT

a. Add the following to /etc/sysctl.conf:

 net.ipv4.ip_forward = 1

b. Apply the sysctl settings:

sysctl -p

2. Add direct rules to firewalld. Add the --permanent option to keep these rules across restarts.

firewall-cmd --permanent --direct --add-rule ipv4 nat POSTROUTING 0 -o eth_ext -j MASQUERADE
firewall-cmd --permanent --direct --add-rule ipv4 filter FORWARD 0 -i eth_int -o eth_ext -j ACCEPT
firewall-cmd --permanent --direct --add-rule ipv4 filter FORWARD 0 -i eth_ext -o eth_int -m state --state RELATED,ESTABLISHED -j ACCEPT


One way to go, is to tell window switcher to ignore it.

Install ccsm& run it
Desktop category → Ubuntu Unity plugin → Switcher tab

Disable all its shortcuts.
Enable alternative switcher

Window management category → Application switcher

Check enable application switcher
General tab → change Switcher windows to exclude your specific windows.

Example for gnome-terminal:

(Toolbar | Utility | Dialog | Normal | Unknown) & !(name=gnome-terminal-server)

You could even use dual switcher:

Set AltTab & ShiftAltTab for application switcher
and live set AltCtrlTab & ShiftAltCtrlTab for unity switcher

So current desktop window switcher will skip it but the all window switcher will not. Best of both worlds


Well from the script that means that nautilus -q returned a non-zero exit code. Hence the && evaluates to false and nautilus -n doesn't get executed.

You tell it: run nautilus -n if nautilus -q succeeded. The definition of success is an exit code of 0 in the shell.

Use ; instead of && to do it unconditionally or use a small wrapper script to translate the possible return codes that you want to accept as "success" into 0.

Another method to tear down running nautilus instances is obviously to use pkill this way:

pkill -u $(whoami) ^nautilus

You may want to specify a particular signal (pkill -SIGNALNAME -u ...), but I found no documentation on which signals nautilus reacts to.

The above command kills all instances of nautilus running as you (the whoami).

Use this to figure out what the first command (nautilus -q) returned:

nautilus -q || echo "exit code: $?"

What do you see? If it's not 0 then this is clearly the problem just the way the script logic suggests.


Ubuntu partitioning and dual boot install on Lenovo IdeaCentre Q190

@1) You don't really need to move that free space, although some people recommend to do so.

@2) While installing you could either choose "guided install on the largest free space".

-- If you want to select partition options by hand, then choose "custom install". Continue by creating a new primary partition with swap-filesystem. The size should be something between 2 and 8 GB. Tell the computer to use the partition as swap.

-- At next create a new primary partition with ext4 filesystem, size something between 15 und 20 GB, or maybe 30. Tell ubuntu to use that as / .

-- Then create a new primary partition with ext4 filesystem. The size could be all the rest of the space. You don't really need a seperate home partition, so you could skip that step and use the homefolder that comes in the root-partition created in the previous step. In this case increase the size of the root-partition.

-- Last but not least tell ubuntu where to install the boot loader. I assume you want to keep secure boot active, so proceed to install it on the first partion, the efi partition.