Cannot import Banshee audio since I upgraded to 18.04

Having a very similar problem. I can import music from CD, but attempting to import from a folder (in the file tree where all the music already in Banshee lives) has been failing since the upgrade.

I can select one of the files in a folder that I can't import, select Banshee as the app to open it with, and it plays just fine in the File System Queue.

Have sent multiple crash reports.

As mentioned in https://bugs.launchpad.net/ubuntu/+source/banshee/+bug/1687220,
as a workaround, if the folder in question is in the "Music Folder" tree, rescanning the music library will add it to the library.
(Just confirmed that this works.).


Is it possible to install Windows 8.1 Preview to test on a hard drive where Ubuntu is installed, then remove windows when done?

It's possible, just follow the instructions on dual booting windows 8 and ubuntu. but remember once you installed windows it overwrites master boot record and if you uninstall it, you'll have some trouble getting back to ubuntu (there is no grub any more).

Another way is to use VirtualBox but I don't if it supports windows 8.1


curl : Depends: libcurl3 (= 7.35.0-1ubuntu2.14) but 7.55.1-1ubuntu2.3 is to be installed

Thanks to user535733

I finally figured it out! It was problem with libcurl3 cause it was older version libcurl that was of 16.04LTS. I uninstalled libcurl 3 by
    sudo apt-get remove libcurl3
and tried
    sudo apt-get install curl
and Bam It worked!


Dual Monitor Problem with Radeon HD 7570

Many motherboards will automatically turn off on-board video whenever there is a card present.
Sometimes there is a way to override in the BIOS but usually not.

Does the 7570 not support two displays already?


What to fix with the fresh factory Ubuntu 16.04 on a Dell XPS 13 9360 (Q&A)

Cooling Fan spins up because of a faulty samba process
The culprit is gvfsd-smb-browse process.
Add the statement below to [global] section of your /etc/samba/smb.conf
name resolve order = wins lmhosts bcast

https://itsfoss.com/fix-gvfsd-smb-high-cpu-ubuntu/
Remove conflicting duplicate touchpad driver
To get things working properly, I needed to disable the second touchpad device "SynPS/2 Synaptics TouchPad". I think it was mostly being ignored, and syndaemon was attaching to it instead of "DLL0704:01 06CB:76AE Touchpad", which was actually managing the touchpad.
I disabled it in the Xorg config file. I opened:
/usr/share/X11/xorg.conf.d/51-synaptics-quirks.conf
and added this entry:
Code:
# Disable generic Synaptics device, as we're using
# "DLL0704:01 06CB:76AE Touchpad"
# Having multiple touchpad devices running confuses syndaemon
Section "InputClass"
        Identifier "SynPS/2 Synaptics TouchPad"
        MatchProduct "SynPS/2 Synaptics TouchPad"
        MatchIsTouchpad "on"
        MatchOS "Linux"
        MatchDevicePath "/dev/input/event*"
        Option "Ignore" "on"
EndSection

https://ubuntuforums.org/showthread.php?t=2316240
Activate Touchpad Palm Detection
Add to /usr/share/X11/xorg.conf.d/50-synaptics.conf after line 13 an Option "PalmDetect" "1"
so the overall this section looks like this:
Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
    Option "PalmDetect" "1"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
      MatchDevicePath "/dev/input/event*"
EndSection

https://erik.torgesta.com/2016/11/things-to-improve-ubuntu-16-04-on-dell-xps-13-9630/
sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install touchpad-indicator
/opt/extras.ubuntu.com/touchpad-indicator/bin/touchpad-indicator&

The touchipad icon should appear in the notification area. Go to preferences, Set General Options->Autostart and Actions->Disable Touchpad on typing. Youst  may want to adjust the delay in milliseconds too.
Changing the scrolling direction of the two-finger scrolling on the touch-pad:
EDIT: the below file doesn't seem to have any effect on the scrolling but breaks the mouse functionality. I have deleted it again but do not have the problem with the scrolling anymore.
Alternate method from https://askubuntu.com/a/519859/452753 worked for me:
In the file /usr/share/X11/xorg.conf.d/20-natural-scrolling.conf you have opened in your preferred text editor, paste the following:
Section "InputClass"
        Identifier "natural scrolling for mouse wheel"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "mouse"
        Option "Device" "/dev/input/mice"
        Option "Protocol" "Auto"
        Option "ZAxisMapping" "5 4"
EndSection

Save the file and reboot. As above, individual users can switch it off on a per-user basis by using Ubuntu-Tweak to "turn on" natural scrolling (it will be the reverse of the system-wide setting on a per-user basis but will not affect the actual system setting for other users who will want to use natural scrolling).
Get the F1-F12 row to function as such instead of media keys by default
How to invert fn keys on Dell Laptop?
Press F2 during POST (Power On Self Test) to enter the System Setup (BIOS) utility.
In the Function Key Behavior, select Multimedia Key First or Function Key First.
Function Key First — This is the default option. Press any function key to perform the associated function. For multimedia action, press Fn + the required multimedia key.
Lacking dedicated page up/down, home/end buttons.
The XPS 13 keyboard has these buttons combined with the arrow buttons and so one needs two hands to access them (pressing Fn required).
Here I re-purpose Print button to act as a Home button and Insert as PgDn:
xmodmap -e "keycode 107 = Home" # using "Print" button
xmodmap -e "keycode 118 = Next" # using "Insert" button

Remove the Print shortcut to Screenshot in the System Settings->Keyboard ->Shortcuts->Screenshots
Right Ctrl (with the list symbol) + up_arrow/down_arrow function as home/end as well.
Encrypted home directory blocks ssh key based authentication and vpn client
This is not strictly an XPS or 16.04 related issue, but it is helpful to know that you need to move your authorized_keys file outside of your encrypted home directory in order to be able to use ssh key based authentication.
https://help.ubuntu.com/community/SSH/OpenSSH/Keys#Troubleshooting
Here is a help entry from one of the VPN providers on the fix for their software in case you are using encrypted home directory.
https://helpdesk.privateinternetaccess.com/hc/en-us/articles/227831828-Installing-the-PIA-app-on-Linux-with-encrypted-home-directories
Change Default Power Button Behaviour From Interactive to Suspend
gsettings set org.gnome.settings-daemon.plugins.power button-power suspend

Monitor Stays Blank After Suspend When External Monitor Was In Use
This issue seems to pertain to poor Thunderbolt protocol support in older kernels. Problems crashing/hanging after plugging/unplugging monitors seem to go away after updating the kernel - see below.
Update to latest HWE Kernel
The 4.4.0 kernel that ships with the XPS 13 seems to have some problems with WiFi breaking, resuming from sleep, and external monitors that goes away with a kernel update.
There are many options for updating the kernel, however as far as I can tell the best approach is to install a signed (because the original image was signed and UEFI may complain without it) HWE (Hardware Enablement) kernel along with the image-extra drivers. HWE is especially important because the 4.10 and 4.13 kernel updates bring significant improvements in Thunderbolt 3 support--super important if you are using a docking station. The following command does that:
sudo apt install linux-signed-generic-hwe-16.04 linux-image-extra-virtual-hwe-16.04

If you don't install linux-image-extra-virtual-hwe your WiFi and touchpad will probably not work.
This kernel update may also fix the above issue with the screen not working after resume / connection to external monitor.


Virtualbox: Fail to mount folder on Ubuntu16.04

Your guest user needs to be in the vboxsf group.

sudo adduser your_username vboxsf

Then logout/login, or reboot the guest OS.

Assuming that you've properly setup a shared folder in the prefs, open a Files (Nautilus) window and you'll find the shared folder in the left pane. Just single-click on it to open it.


Some of an answer regarding GRUB I just posted might help you with GRUB and your boot situation.

Please be certain that you actually want those entries removed prior to deleting them form GRUB.


Numix Theme Removal : Resulting Mixed Themes

Oh okay.. I figured it out myself. I installed Unity Tweak Tool and clicked on restore to default and it worked.


Installed Ubuntu 20.04 a few weeks ago. Now stuck in loop

Hello and welcome to askubuntu,
your problem looks like a kernel panic. See this blog
If possible, then start your last kernel which is possible to run.
Try to generate with update-initramfs new initramfs images for your kernel.
If it doesn't work, start Linux live distro and try it there.


Unable to so see or access ubuntu pc in network from Windows

Ubuntu PC has a static IP (192.168.0.10) it can be pinged but not
  accessed or seen.

Please run one of the following commands on your server:

nmcli device show | grep DEVICE

ifconfig

I would be willing to bet real money that you have no interface named eth0 in Ubuntu 18.04.

Yet that is exactly what you told samba to use with these two lines in smb.conf:

interfaces = 127.0.0.0/8 eth0
bind interfaces only = yes

Remove those two lines so samba can figure it out on its own and restart smbd:

sudo service smbd restart


How to check whether a file is in current directory or its subdirectories?

To check only for t1.csv, you can use:

find . -name 't1.csv'

Now, to go in the first directory where t1.csv file is found, you can use:

cd $(dirname $(find . -name 't1.csv' 2>/dev/null | head -1)  2>/dev/null)


How do I get rid of the "opened application" indicator on Plank? (Ubuntu 18.04, Cinnamon)

I found an answer to my own question by looking into the source code of Plank. I'll post my answers here so if anyone else would like to get rid of the running app indicator, they'll be able to. First I gave myself root by entering

        sudo -i

and I entered in my password to gain root privileges. I then entered

      gedit /usr/share/plank/themes/Transparent/dock.theme

You don't have to put "Transparent," that's just the theme I'm using. If you're not using transparent, then insert whatever theme you're using. From here, a text editor will pop up, and you will be allowed to edit it. If there is already a value for IndicatorSize, replace the value with 0. If there is not, then type in

        IndicatorSize=0

on a new line. Now, all you will have to do is hit ctrl+s, and your running application indicators will be no more!


Programmaticaly change lightdm autologin session type

In lightDM, try this.

Open (gksu gedit) the file /etc/lightdm/lightdm.conf
Change the values (in # Seat configuration)
from:

#default-user=bob
#default-user-timeout=5
#pam-service=lightdm

to:

default-user=username
default-user-timeout=0
pam-service=lightdm-autologin

And you can do this to:
Edit /etc/gdm/custom.conf file.

[daemon]
TimedLoginEnable=false
AutomaticLoginEnable=true
TimedLogin=(your username)
AutomaticLogin=(your username)
TimedLoginDelay=0
DefaultSession=gnome

Finally reboot it, This will automatically login your username.


Is there any guarantee that software from Launchpad PPAs is free from viruses and backdoor threats?

Every package's install script has root access to your system, so the mere act of adding a PPA or installing a package from one is an implicit statement of trust on your part of the PPA owner.

So, what happens if your trust is misplaced and a PPA owner wants to be naughty?

In order to upload to a PPA, a package must be signed by a GPG key unique to the launchpad user (indeed, the same key they signed the code of conduct with).  So in the case of a known malicious PPA we would simply ban the account and shut down the PPA (affected systems would still be compromised, but there's no good way fix them at that point anyway).

To some extent Launchpad's social features can be used as a bit of a preventative measure of bad users -- someone who has a history of contributing to Ubuntu and some established Launchpad karma, for instance, is less likely to be setting up a trap PPA.

Or what if someone gains control of a PPA that isn't theirs?

Well, this is a bit tougher of a threat scenario, but also less likely since it requires an attacker getting both the launchpad users's private key file (generally only on their computer) as well as the unlock code for it (generally a strong password not used for anything else).  If this happens, though, it's usually fairly simple for someone to figure out their account has been compromised (Launchpad will for instance email them about the packages they're not uploading), and the cleanup procedure would be the same.

So, in sum, PPAs are a possible vector for malicious software, but there are probably much easier methods for attackers to come after you.


Copy images in bash without changing subfolders

First create the directory you want to copy to:

mkdir -p pic/2017

Then copy over the files. Normally one would just need cp:

cp photo/2017/*.png pic/2017/

As you mentioned there are too many files and you probably receive an “Argument list too long” error, we’ll use printf and xargs to run cp as often as necessary:

printf "%s\0" photo/2017/*.png | xargs -0 cp -t pic/2017/

You can also use mcp from the mmv package in the following way:

mcp -n "photo/2017/*.png" pic/2017/

-n let’s mcp only list the changes, remove it to actually perform the copying. Note the quoted asterisk: It’s not evaluated by the shell, but rather by mcp.


Cannot edit php5.fcgi owned by Me with RWX owner permissions

If Linux permissions were not complicated enough, I just learned about extended attributes.  Turns out there is this thing called an immutable attribute.  Using lsattr php5.fcgi shows the i(mmutable) attribute is set.  Using chattr -i php5.fcgi allowed me to save modifications then chattr +i php5.fcgi to restore the immutable attribute.

Who knew!


How do I add a d-bus command as a global shortcut in Gnome (classic)?

Never mind, found it. Use qdbus as the command line interface:

qdbus <Remote Application> <Remote object> <Function>

I was trying to control spotify. The playPause command would be :

qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause


How do i fix this problem (insserv) cant update , cant autorun apps

The Problem:

insserv helps figure out which services should be started in which order.

  Example: Filesystem starts before Networking, because networking needs to read/write files.

It's a clumsy system, long replaced by Upstart (Ubuntu 14.04), and later by systemd (Ubuntu 16.04). But insserv remains to help very old sysvinit services fit into the newer world.

All of these ways of starting services have one thing in common - they hate loops. The system cannot determine which service should start first.

  Example: A starts before B. B starts before A.

The system figures out much of the start order when packages are installed or uninstalled. Adjusting the start order is part of configuring a newly-installed package.

A loop will cause an error.

The error will prevent the package from configuring.

The unconfigured package will cause a package-manager error.

Now go back and re-read the whole error message again. You can see the insserv error, which causes the package install to fail, which causes all the dependency packages to fail.

There's one more element: Apt, the package manager, remembers that you want this package installed. Every time you start apt, it will look around to see if must resume any incomplete installs. So apt willkeep trying to install these packages every time you run it, and you will keep getting the same errors every time.

Apt terminates upon the first error, so the error may (unintentionally) block other package actions, including normal updates and security patches.

The Solutions:

There are several ways to handle the problem.

1) Read the error messages carefully You have FOUR scripts (two called 'selinux') without any LSB Headers. That's unusual - did you try installing SELinux several different ways? If so, clean up your old attempts before proceeding. Simply edit each of the remaining scripts, adding the LSB Headers to tell the system when the script should be run. Keep notes, because this is a temporary solution - a package upgrade may erase your changes.

A proper LSB Header looks something like this:

### BEGIN INIT INFO
# Provides:          scriptname
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start daemon at boot time
# Description:       Enable service provided by daemon.
### END INIT INFO

2) In addition to missing LSB headers and tags, you have Loops. Recall that init really hates loops. If adding headers and tags doesn;t colve the problem, edit the tags so that selinux and other scripts don't rely upon plymouth...or change plymouth so it doesn't rely upon $all.

WARNING: Keep careful notes and a LiveUSB handy - tinkering with the startup order of essential services (like plymouth) can break your system or render it unbootable.

3) Alternately, if you don't use some of those services, simply uninstall the ununsed service(s). Loop broken, apt should complete the configuration and install.

4) If you are using 16.04 or newer, file a bug report with each upstream project. Insserv is very old and kludgy, and those upstreams should be furnishing you proper systemd-native .service files.


Every Program is executed in terminal windows when opened using run dialog

This happens when you check the "Run in terminal" box when hitting alt+f2.
The change is persistent meaning that if you check it by accident, or use it on purpose the setting will remain next time you bring up the run dialog.

The purpose for this is to make the program run from a terminal so you can monitor output or possible errors put out by the program, also closing the terminal running the program will also close the program.

To fix just uncheck that box, shown here-

If this action is still hapening but the check box appears not to be checked try these steps-

Try checking the run in terminal box
Run a program
Bring run in terminal back up and try to uncheck it again
Run a program

This might be the results of one of two problems

Either the theme for the check is not working or this bug may be relevant -  http://mail.xfce.org/pipermail/xfce-bugs/2007-January/003075.html


Where is the firmware-b43-installer package?

Check to make sure that the multiverse repository is enabled. Then run apt install --simulate firmware-b43-installer without sudo and not as root to simulate installing the firmware-b43-installer package without actually installing anything.

$ apt install --simulate firmware-b43-installer
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  b43-fwcutter
The following NEW packages will be installed:
  b43-fwcutter firmware-b43-installer
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Inst b43-fwcutter (1:019-3 Ubuntu:18.04/bionic [amd64])
Inst firmware-b43-installer (1:019-3 Ubuntu:18.04/bionic [all])
Conf b43-fwcutter (1:019-3 Ubuntu:18.04/bionic [amd64])
Conf firmware-b43-installer (1:019-3 Ubuntu:18.04/bionic [all])

It appears that firmware-b43-installer can be installed from the default repositories with sudo apt install firmware-b43-installer in all currently supported versions of Ubuntu.


How to refresh launcher icon application menu in ubuntu 12.04?

The most elegant way is to "restart" the icon; to remove the icon from its position in the launcher and replace it on the same position. The script below does the job. It is in python2, since 12.04 does not come with python3 by default. However, it can be used in python3 as well, only change the shebang in that case. The script can also be useful (on later Ubuntu versions as well) to immediately apply a changed icon for example.

You can simply use it by calling the script, with the edited desktop file as an argument (see further below).

Note: in 12.04, if a refreshed icon represents a running application, the application in question will crash, as described in this question, so if you use it, make sure the application is not running. In 14.04, the icon will simply not refresh in case of a running application.

The script

#!/usr/bin/env python

import subprocess
import time
import sys

desktopfile = sys.argv[-1]

def read_currentlauncher():
    # reads the current launcher contents
    get_launcheritems = subprocess.Popen([
        "gsettings", "get", "com.canonical.Unity.Launcher", "favorites"
        ], stdout=subprocess.PIPE)
    return get_launcheritems.communicate()[0].decode("utf-8")

def set_launcher(llist):
    # sets a defined unity launcher list
    current_launcher = str(llist).replace(", ", ",")
    subprocess.Popen([
        "gsettings", "set", "com.canonical.Unity.Launcher", "favorites",
        current_launcher,
        ])

def refresh_icon(desktopfile):
    current_launcher = read_currentlauncher()
    current_launcher_temp = eval(current_launcher)
    item = [item for item in current_launcher_temp if desktopfile in item][0]
    index = current_launcher_temp.index(item)
    current_launcher_temp.pop(index)
    set_launcher(current_launcher_temp)
    time.sleep(2)
    set_launcher(current_launcher)

refresh_icon(desktopfile)

How to use it

Copy the script above into an empty file and safe it as refresh.py
For convenience reasons, make it executable
Refresh the icon by the command:

/path/to/script/refresh.py name_of_edited_desktopfile (e.g. 'firefox.desktop')

If you really want to make it smooth

Make the script executable, remove the .py extension, save it in ~/bin. After log out/in, you can run it by the command:

refresh firefox.desktop (as an example)


I used this one Create a usb on Windows, I hope it helps, never had a problem.  Sounds like your grub got screwed up when you created the bootable usb. Let me know if it works for you.


Actually that question has already been answered here.
try:

LD_PRELOAD=/lib/x86_64-linux-gnu/libresolv.so.2 /path/to/Unity

where /path/to/Unity is likely to be /opt/Unity/Editor/Unity


KVM is not installed on this machine (/dev/kvm is missing)

Use the below command to check whether the KVM is installed in the machine or not,

kvm-ok

Output:

INFO: /dev/kvm exists
KVM acceleration can be used

Output like the below means,

INFO: Your CPU does not support KVM extensions
KVM acceleration can NOT be used

In this scenario need to install KVM using the below command,

sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils

Hope this helps.


Problems with attempting to install drivers. Ubuntu 12.04, Realtek

First, let's clean up the file from your first attempt:

cd Desktop/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013
make clean

Now, let's modify one file:

gedit pci.h

At the top of the file,after the comment section all out lined in **, add this sequence:

#ifndef __devinit
#define __devinit
#define __devinitdata
#endif

Proofread carefully, save and close gedit. Now do:

make
sudo make install

Finally, I believe the driver you need is rtl8192ce and not rtl8188ee:

sudo modprobe rtl8192ce

Your wireless should now be working.


Before you login you must answer me these questions 3?

The following is tested with Ubuntu 13.04 and system's Python, using Gtk bindings (PyGobject).

Here is one way a bit dirty though and it needs more investigation:

Summary

Add a .desktop file at /usr/share/xsessions we will name it custom
Add an .xsession file at the user in question (your kids) we will name their user as kid
Create the Python GUI application for the math puzzle and run it from .xsession, we will name it as puzzle.py

Details

sudo vi /usr/share/xsessions/custom.desktop

Add the following in the file:

[Desktop Entry]
Name=Custom
Comment=This session logs you into your managed desktop environment
Exec=/etc/X11/Xsession
X-Ubuntu-Gettext-Domain=gnome-session-3.0

vi /home/kid/.xsession

Add the following in the file:

#!/bin/bash
lightdm &
exec /home/kid/puzzle.py

vi /home/kid/puzzle.py

Add the following in the file:

#!/usr/bin/python
# -*- coding: utf-8 -*-
import subprocess
import random
from gi.repository import Gtk

#----------------------------------------------------------------------
class PuzzleWindow(Gtk.Window):

    def __init__(self):
        Gtk.Window.__init__(self, title="Math Puzzle", resizable=False)

        super(PuzzleWindow, self).set_position(Gtk.WindowPosition.CENTER)
        super(PuzzleWindow, self).maximize()

        self.a_number = random.randint(1, 5)
        self.b_number = random.randint(1, 5)
        self.result = self.a_number + self.b_number

        self.vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=5)

        self.label = Gtk.Label("What is the sum of the numbers bellow?")
        self.number_label = Gtk.Label("{num_a} + {num_b}".format(
            num_a=self.a_number, num_b=self.b_number))

        self.entry = Gtk.Entry()
        self.button = Gtk.Button(label="Check answer!")
        self.button.connect("clicked", self.on_button_clicked)

        self.vbox.pack_start(self.label, True, True, 0)
        self.vbox.pack_start(self.number_label, True, True, 0)
        self.vbox.pack_start(self.entry, True, True, 0)
        self.vbox.pack_start(self.button, True, True, 0)
        self.add(self.vbox)

    def on_button_clicked(self, widget):

        if int(self.entry.get_text()) == self.result:
            subprocess.call("unity &", shell=True)
        else:
            self.label.set_text("Wrong answer, try again.")
#----------------------------------------------------------------------
def main():
    """Application's entry point"""
    win = PuzzleWindow()
    win.connect("delete-event", Gtk.main_quit)
    win.show_all()
    Gtk.main()

if __name__ == "__main__":
    main()

Results:

If you logout, at the login screen you will see a new session named Custom.
By choosing the custom session and after successful login you will presented by a small PyGtk (using pygobject) window asking for a math puzzle. There will be no top bar, launcher and the rest of the default desktop widgets:

If you answer correctly, Unity will load...

It needs further research though but i hope that it helps as a starting point.


Changing the applications launched by special keyboard buttons

In your settings page, there's a keyboard shortcuts section where you can remap all your shortcuts.


How can I mount cifs shares in (k)ubuntu 13.04?

I had this same problem trying to mount a Apple Time Capsule volume.

I solved by adding a sec=ntlm option to /etc/fstab.

For your command, use

sudo mount -t cifs -o user=foobar,password=foobar,rw,hard,nosetuids,noperm,sec=ntlm //192.168.1.2/Drive ~/mnt/mount_point

See a more detailed explanation about the root change in:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=81bcd8b795229c70d7244898efe282846e3b14ce

Not sure if this is the best solution because I suppose I'm lowering security.


Dell Inspiron 5010 overheating issue ubuntu 12.04

Here are two solutions that may work for you, the first tried to get your Ati graphics card working instead of having both running at same time:

http://xpressrazor.wordpress.com/2013/01/13/how-to-setup-amdintel-hybrid-graphics-cards-in-linux-ubuntu/

... and the second disables Ati completely and lets you use the Intel chipset on it's own:

http://usernamepending.wordpress.com/2011/11/02/getting-back-some-battery-life-in-ubuntu-11-10-by-disabling-discrete-graphics/

... also, running the latest version of Ubuntu is recommended for newer drivers and support, Xubuntu if you would like a simpler non-3D desktop...


Youtube displays white bar at top and hides player controls while in fullscreen

This is not related to Ubuntu
You might log into a account and google and see that the top white bar disappears and the display returns to normal.
There is probably a notification displayed that disturbs the normal display, maybe about cookies or so...


ext4 recovery (extundelte error: malloc(): invalid next size (unsorted))

Check your usage of the command.
On my (PCLINUXOS) box, extundelete specifies
extundelete {switches} [--] device-filename

and I got the same error as you when I typed it in the format
extundelete /dev/sda4 -o /path-to-destination -restore-all

Of course AFTER I typed it in correctly, the command still didn't work, I got a different error message that I didn't catch because of the limited singleuser console login mode I was using, and now can't seem to replicate!


Is it risky to update my Linux Kernel to latest stable version when running Ubuntu?

The kernels that are offered via the Ubuntu repositories are tested and likely to work properly with the version of Ubuntu that you are running, more likely than the latest stable kernel version. But things might break anyway because some new driver might not match your hardware or a present driver might not be supported by that kernel.

For this reason it is a good habit to keep two kernels in the system, the newest one offered via the repositories and a previous kernel, that works well. Then you can select the previous kernel from the grub menu, if there are problems with the newest kernel.

If you want to 'see' the grub menu in a single boot system, edit the file /etc/default/grub and run

sudo update-grub

according to the instructions at

help.ubuntu.com/community/Grub2/Setup#/etc/default/grub

GRUB_HIDDEN_TIMEOUT=

    No value entered after the = sign
    The menu will be displayed for the number of seconds designated by GRUB_TIMEOUT.


Compatible stand alone multi-touch display for Ubuntu?

BTW I have this monitor the Dell P2714T and I installed a copy of Ubuntu 14.04 and attached the usb connection to this monitor and the multi-touch worked like a charm. No need for any additional drivers!

http://accessories.us.dell.com/sna/productdetail.aspx?c=us&l=en&s=dhs&cs=19&sku=210-ABMB


How to use a different partition in Ubuntu

You are actually using both partitions.

/dev/sda5 is mounted as /home it's your personal home for everything. Your VirtualBox VMs by default are stored in ~/VirtualBox VMs this is on your /home filesystem;-) VirtualBox binaries and config files are spread into /usr /etc.

If you run dpkg -L virtualbox-4.2 you'll see the list.

/dev/sda1 is mounted as / root.

So, nothing to worry about.


Install the packages needed to get a basic system for handling mail:

sudo apt-get install postfix mailutils libsasl2-2 ca-certificates libsasl2-modules

Next modify (as root) the configuration file /etc/postfix/main.cf to have something like this:

relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CApath = /etc/ssl/certs
smtpd_tls_CApath = /etc/ssl/certs
smtp_use_tls = yes

Next create/modify (as root) the /etc/postfix/sasl_passwd to contain:

[smtp.gmail.com]:587    USERNAME@gmail.com:PASSWORD

Make sure the permissions for the file are correct or it might get mad:

sudo chmod 400 /etc/postfix/sasl_passwd
sudo postmap /etc/postfix/sasl_passwd

Lastly reload postifx:

sudo /etc/init.d/postfix reload

Now you can run a test:

echo "Test mail thingy" | mail -s "Test Postfix Subject" username@gmail.com

You should get an email that comes from the SMTP account you configured.


Can no longer launch Bibble Ubuntu 11.10

It looks like you're trying to run something that was built against the 32-bit libraries, on a 64-bit system. You'll need to recompile the app against the 64-bit versions of the libraries, or install the 32-bit versions of some libraries as well, to be able to use it. The latter is better done on 12.04 which has much improved multiarch support, over 11.10.

Another option of course, is to re-install again, but using the 32-bit version of Ubuntu 11.10 instead of 64-bit.


How do I increase touch-pad senstivity using libinput?

This was something that was merged into the kernel sometime earlier last year (?) In short touchpad pressure depend on Device quirks specific to laptop models

So you would need to create a quirk similar to this

cat /etc/libinput/local-overrides.quirks
[Touchpad pressure override]
MatchUdevType=touchpad
MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX230*
AttrPressureRange=10:8

For better reference and an actual guide, checkout this page https://wayland.freedesktop.org/libinput/doc/latest/touchpad-pressure-debugging.html#touchpad-pressure-hwdb


Can I create an uninstallable debian package which overwrite's another package's files?

It is possible to have dpkg not overwrite a file when it reinstalls the package it belongs to, and to have it put the file from the package somewhere else instead.

This can be used locally to override a package’s version of a file, or by one package to override another’s version (or provide a wrapper for it).

There is a diversion list, which is read by dpkg, and updated by a special program dpkg-divert. Please see dpkg-divert(8) for full details of its operation.

When a package wishes to divert a file from another, it should call dpkg-divert in its preinst to add the diversion and rename the existing file. For example, supposing that a smailwrapper package wishes to install a wrapper around /usr/sbin/smail:

dpkg-divert --package smailwrapper --add --rename \
    --divert /usr/sbin/smail.real /usr/sbin/smail

The --package smailwrapper ensures that smailwrapper’s copy of /usr/sbin/smail can bypass the diversion and get installed as the true version. It’s safe to add the diversion unconditionally on upgrades since it will be left unchanged if it already exists, but dpkg-divert will display a message. To suppress that message, make the command conditional on the version from which the package is being upgraded:

if [ upgrade != "$1 || dpkg --compare-versions "$2" lt 1.0-2; then
    dpkg-divert --package smailwrapper --add --rename \
        --divert /usr/sbin/smail.real /usr/sbin/smail
fi

where 1.0-2 is the version at which the diversion was first added to the package. Running the command during abort-upgrade is pointless but harmless.

The postrm has to do the reverse:

if [ remove = "$1" -o abort-install = "$1" -o disappear = "$1; then
    dpkg-divert --package smailwrapper --remove --rename \
        --divert /usr/sbin/smail.real /usr/sbin/smail
fi

If the diversion was added at a particular version, the postrm should also handle the failure case of upgrading from an older version (unless the older version is so old that direct upgrades are no longer supported):

if [ abort-upgrade = "$1 && dpkg --compare-versions "$2" lt 1.0-2; then
    dpkg-divert --package smailwrapper --remove --rename \
        --divert /usr/sbin/smail.real /usr/sbin/smail
fi

where 1.0-2 is the version at which the diversion was first added to the package. The postrm should not remove the diversion on upgrades both because there’s no reason to remove the diversion only to immediately re-add it and since the postrm of the old package is run after unpacking so the removal of the diversion will fail.

Do not attempt to divert a file which is vitally important for the system’s operation - when using dpkg-divert there is a time, after it has been diverted but before dpkg has installed the new version, when the file does not exist.

Do not attempt to divert a conffile, as dpkg does not handle it well.

Copy-pasted from debian wiki: https://www.debian.org/doc/debian-policy/ap-pkg-diversions.html


I went through this myself and it was very harrowing to find all the information. It took me almost three hours of continuous testing to finally get it done. It was in February this year. But now I am quite used to it.

This is how I went about in Windows XP and it should work the same in Windows 7 too but I am not sure.

These are the steps for uninstalling any Linux distribution from your computer:

Create an Ubuntu USB using Unetbootin or Linux Live USB Creator( as it is required in a subsequent step).
Go to windows 7 and in command prompt type diskmgmt.msc you will see the partition manager. In there, delete the partition that you created for Linux.
Now reboot your machine, You will see the GRUB rescue prompt saying no partition found. Don't panic, this is normal. As we have removed the linux partition but did not fix the MBR.
Reboot from your USB. I hope you know how to change your BIOS settings so as to boot from a USB. In case you don't, it should be easy to find on the internet as the exact. I cannot tell you the exact steps as the options depend on your motherboard.
Once you have booted from the USB, select try Ubuntu and wait for the OS to load.
Make sure you are connected to the internet and now run a terminal.
You need root access, so type:

sudo passwd root

type in the password you want

now type:

su -

and type in the password at the prompt

now use the following command:

apt-get install lilo

and once the installation is complete and the prompt returns then type in:

lilo -M /dev/sda mbr

Once done you will get the message in the terminal something like:

Your Master Boot Record has been fixed

Once you see this, reboot and you should be able to boot into Windows XP directly.

I don't know if the instructions for Windows 7 are exactly same but hopefully other forum members can help you with the specifics but these are the critical steps. Make sure you have a Ubuntu USB handy as without this I don't think you can fix the MBR.

I have done this a couple of times on my Windows XP machine and it works perfectly fine.

Alternatively if you have a Windows 7 DVD, or rescue disk, you can use that to restore the original Windows 7 MBR. The steps about will reinstall lilo instead of restoring the original bootloader.


Sometimes it's the easy things. Inspired by @Lucio who said that this should work I rebooted and it does now. Now I also saw that it says "Changes take effect next time you log in.". Read first, then ask. Should have done this in the first place, sorry for that!

So for everyone who wants to achieve the same:

Go to System Settings...=>Language Support
Make sure the language for your format locale is installed. You can install it using the Install/Remove Languages button
Go to the Regional Formats tab and choose your country
Click Apply System-Wide
Reboot! (Or log out and back in. Should also work)

The default calculator should now accept the decimal mark used in your locale.


I have a menuentry in my /etc/grub.d/40_custom file that I activate via sudo update-grub to boot into a Lubuntu iso file.

#!/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 "Lubuntu 18.04.1 Desktop iso" {
            set isofile="/lubuntu-18.04.1-desktop-amd64.iso"
            loopback loop (hd0,1)$isofile
            linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject
            initrd (loop)/casper/initrd.lz
}

This works as expected, but even when I pushed it into RAM with the boot option toram (at the end of the 'linux' line), it would not let me unmount the partition, where the iso file is stored, mounted at /isodevice.

I store the iso file in the root partition of my installed system, so it means that I cannot modify or repair it with tools that only work, when the target partition is unmounted.

It is possible to store the iso file in a separate partition, that is not used by the installed operating system. That way you can use the live system booted from the iso file to edit the partition(s) of your installed operating system.

So modify (hd0,1) in

            loopback loop (hd0,1)$isofile

to point to that separate partition.
If there is a swap partition in the internal drive and you want to edit it, you must swap it off

sudo swapoff /dev/sdxn

where x is the device letter and n is the partition number


Cannot change login screen background in 18.10

to change the login screen background in Ubuntu 18.10 with default Display Manager that is gdm3
we need to edit the gdm3.css file.
open the file with your favorite editor, mine is gedit. so
sudo -H gedit /etc/alternatives/gdm3.css
go to line number around 1981 and find the below content.
#lockDialogGroup {
  background: none;
  background-color: none;
  background-gradient-direction: vertical;
  background-gradient-start: #6D2169;
  background-gradient-end: #370026; }

change the content with
#lockDialogGroup {
  background: #000000 url(file:///home/pratap/Desktop/1.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center; }

here in the line number 1982 url(file://put your actual image path)
save the file, close & reboot to see the change.
Picture of Lock Screen Wallpaper

Picture of  Unlock Screen Background

for 18.04 same method, only line number varies 1814,
#lockDialogGroup {
  background: #2c001e url(resource:///org/gnome/shell/theme/noise-texture.png);
  background-repeat: repeat; }

replace the above content with
#lockDialogGroup {
  background: #000000 url(file:///home/pratap/Desktop/1.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center; }

here in the line number 1815 url(file://put your actual image path)


ThinkPad W500 ubuntu 12.10 64 poor battery performace

I have exactly zero stats to back this up, and it's probably just wishful thinking, but jupiter (hardware and power management tool) seems to have improved my battery life (Thinkpad Edge). See pileofrocks's comment below.

If you want to try it out

Press Ctrl + Alt + T, terminal will pop up; type

sudo add-apt-repository ppa:webupd8team/jupiter

enter password (you won't see it as you type, that's normal), confirm adding the repo, then:

sudo apt-get update && sudo apt-get install jupiter

If you want to play around with settings yourself search for jupiter in the dash.


unmet dependencies, linux-server depends: linux-headers-server, but boot is full

One solution that I have found to work quite well is this:

Remove the offending packages:

sudo apt-get remove -f linux-server linux-headers-server linux-image-server

Then re-install them:

sudo apt-get install linux-server linux-headers-server linux-image-server


There is no need to create multiple PPAs, unless it's necessary. For example, daily builds, and stable releases, of the same project (same package) would need to be separate PPAs, since you can't have multiple versions of the same package, in a single archive. However, just making packages of various things you find an interest in, or as a point of staging packages you wish to propose for inclusion in the Ubuntu or Debian archives, does not require multiple PPAs.

The best thing you can do is organize in a way that minimizes any potential damage to users' systems who decide to add your PPA. Packaging of libraries and applications that exist in Ubuntu already, can greatly increase potential for damage, especially if you start adding extra patches and such.


SOLUTION:

After re-installing the entire SO, in a clean instalation i made this:

https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-ubuntu-18-04

Then:

https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-16-04

Then:

https://websiteforstudents.com/install-php-7-2-mcrypt-module-on-ubuntu-18-04-lts/

And lastly:

Enable extension for apache

echo "extension=mcrypt.so" | sudo tee -a /etc/php/7.2/apache2/conf.d/mcrypt.ini

and:

echo "extension=mcrypt.so" | sudo tee -a /etc/php/7.2/mods-available/mcrypt.ini

sudo phpenmod mcrypt

The three last steps are from:

php-mcrypt package missing in Ubuntu Server 18.04 LTS

I really thanks to Epskampie and Werner for the solution


gksudo keeps asking for my password when using a custom Unity launcher

As far as I know, it is the terminal environment which remembers the password for a certain amount of time.

For example, the command

gksudo nautilus

in the terminal will ask the password only once in a certain timeframe. While the same command in the alt+f2 launcher asks it every time.

Either way, if you want to run something as root, it is not that weird it will ask your password every time. That way you know you will be running the command as root.


Error in configure.ac file while running aclocal

It appears to be just a matter of whitespace: according to 3.1.2 The Autoconf Language from the Autoconf Manual:

  When calling macros that take arguments, there must not be any white
  space between the macro name and the open parenthesis.

 AC_INIT ([oops], [1.0]) # incorrect
 AC_INIT([hello], [1.0]) # good

So you need to change

AC_INIT ([helloworld], [0.1], [someone@nowhere.com])

to

AC_INIT([helloworld], [0.1], [someone@nowhere.com])


I have two different versions of VLC, how to remove?

Okay here is the embarrassing part: I also installed the flatpak runtime from the PPA and now I remember that I tried the flatpak VLC but it didn't integrate well with 16.04, so I forgot about it (hoping that it might improve in the future).

$ flatpak list
Ref                                             Options
org.videolan.VLC/x86_64/stable                  system,current
org.freedesktop.Platform.VAAPI.Intel/x86_64/1.6 system,runtime
org.freedesktop.Platform.ffmpeg/x86_64/1.6      system,runtime
org.gtk.Gtk3theme.Ambiance/x86_64/3.22          system,runtime
org.gtk.Gtk3theme.Communitheme/x86_64/3.22      system,runtime
org.kde.Platform/x86_64/5.11                    system,runtime
$ find /var/lib/flatpak/app/org.videolan.VLC/ -iname *.desktop
/var/lib/flatpak/app/org.videolan.VLC/x86_64/stable/3aa719dda459ee693de4d94cee23e50e2f6eb144d1914d3bc93a15a6e8ba762b/files/share/kde4/apps/solid/actions/vlc-openvcd.desktop
/var/lib/flatpak/app/org.videolan.VLC/x86_64/stable/3aa719dda459ee693de4d94cee23e50e2f6eb144d1914d3bc93a15a6e8ba762b/files/share/kde4/apps/solid/actions/vlc-opendvd.desktop
/var/lib/flatpak/app/org.videolan.VLC/x86_64/stable/3aa719dda459ee693de4d94cee23e50e2f6eb144d1914d3bc93a15a6e8ba762b/files/share/kde4/apps/solid/actions/vlc-openbd.desktop
/var/lib/flatpak/app/org.videolan.VLC/x86_64/stable/3aa719dda459ee693de4d94cee23e50e2f6eb144d1914d3bc93a15a6e8ba762b/files/share/kde4/apps/solid/actions/vlc-opencda.desktop
/var/lib/flatpak/app/org.videolan.VLC/x86_64/stable/3aa719dda459ee693de4d94cee23e50e2f6eb144d1914d3bc93a15a6e8ba762b/files/share/applications/org.videolan.VLC.desktop
/var/lib/flatpak/app/org.videolan.VLC/x86_64/stable/3aa719dda459ee693de4d94cee23e50e2f6eb144d1914d3bc93a15a6e8ba762b/export/share/applications/org.videolan.VLC.desktop

To remove just run:

flatpak uninstall org.videolan.VLC

For flatpak integration with Gnome Software install the respective plugin:

sudo apt install gnome-software-plugin-flatpak


How to Handle BTsync GUI in Ubuntu 14.04 with Small Displays?

I sent a ticket to the Developers of BTsync March/2016. They promised to pass the piece of information forward to developers, but did not promise any time to provide the simple fix.


for loop in folders with \n character in their names

You've only single command there, so it's sufficient to call find with -exec flag calling rmdir:
find -depth -type d -exec rmdir {} \;

Or use the -delete option as in  find -type d -delete, but it won't work with non-empty directories. For that you will also need -empty flag. Note also, -delete implies -depth so that may be skipped. Thus another viable alternative that keeps everything as one process:
find -type d -empty -delete

If the directory not empty, use rm -rf {} \;. To isolate only directories with \n in filename we can combine bash's ANSI-C quoting $'...' with -name opption:
find  -type d -name $'*\n*' -empty -delete

POSIX-ly, we could handle it this way:
find -depth  -type d -name "$(printf '*\n*' )" -exec rmdir {} \;

It is worth mentioning that if your goal is removal of directories, then -delete is sufficient, however if you want to execute a command on directory then -exec is most appropriate.
See also

How to delete directories based on find output?
find -delete does not delete non-empty directories


Firefox does not load local html files kubuntu 14.04

Yeah, please share what is the exact error that you experience.

By the way, you could possibly try resetting the settings in Firefox. To do so, go to the new config menu, open the Help menu, and then Troubleshooting Information. Click Reset Firefox. And then check whether you are able to view local html files.

Firefox will reset all your data (including addons, themes and profile data), and your Firefox installation will be like a brand new one. If everything works fine, then you can re-install your favorite addons.

Otherwise, you could try deleting (or backing up) your profiles directory, which is housed in $HOME/.mozilla/firefox.


You can access the color manager on xfce by running colormgr.

If you want to apply a color profile:

sudo apt-get install xcalib -y

Apply an ICM file with:

xcalib profilename.icm

Revert the changes with xcalib -c.

Note that the change won't stay upon reboot, so you'll need to add the xcalib profilename.icm command to Startup Applications.


GNOME Mplayer: "Failed to open VDPAU backend libvdpau_nvidia.so" error

I'm using the proprietary NVIDIA driver and I fixed this by creating a symlink to the VDPAU lib:

ln -s /usr/lib/vdpau/libvdpau_nvidia.so.1 /usr/lib/libvdpau_nvidia.so

This has the benefit of actually enabling VDPAU rather than falling back to XV or X11. Of course you need a video card that supports VDPAU acceleration.


Force Alt+Tab show only active desktop apps in gnome-shell

There is a Gnome Shell extension that does this: Alt Tab Workspace.

You could also directly enable this behavior in the default switcher by running:

gsettings set org.gnome.shell.app-switcher current-workspace-only true

which is what the extension does under the hood.


A few things you could try if you haven't already:

you can try Unetbootin, an other program to make live usb sticks
for multiple linux distros
you can try to re download your immage in case your download is
corrputed
if you have an other USB laying arround you can check whether that one works (if only to see where the problem is at.


I don't have enough points to comment to request clarifications so I'll post what I do suggest, and then check back for updates from you:

First: Make sure to backup any vital information! When dealing with boot, anything and everything can go wrong.

I would simplify things a bit by making sure to uninstall burg by purging it's config:
sudo apt-get purge BURG

I would love to see your partition information clearly, in particular which partition is your boot partition as would be seen by running
sudo fdisk -l

From there I would suggest you run boot-repair again and make sure you are running the 'Recommended Repair' option.  As you run through it make sure to read each step carefully and let me know if there are any error messages.
Common mistake:  When you get to the part where it asks you which partition you want to install grub to, make sure to choose one by pressing spacebar (you will see it checked off with an asterisk like so: [*]) THEN press enter, many people press enter and have not actually selected a place to install grub.

I would also like to know what happens when you run boot-repair, perhaps it entirely skips the above step?

You also likely have changed your boot order so make sure to have returned it to a desired state.

If this hasn't helped (which it has always solved my grub-gone-wrong issues)  I will try and help further in investigating.  Good luck!!


-k will use kerberos authentication, so if you have a ticket from a principal that can create computer objects in AD, the net ads join command will work without providing any further credentials.

The process would be:

get ticket: kinit <user>, where <user> is e. g. a Domain Admin account
execute the join: net ads join -k

You can do this from within a script. You can even consider using msktutil to do this, in case you do not want to have all the samba stuff installed on the client. The msktutil would replace the net ads join command.

As to fully automating that is a bit of a vague question, but the key concept would be to have some way to pre-create the computer accounts in the AD (you can use msktuil, net ads or the Windows GUI for this), then use one of the tools to actually join the client using some default password.

If you have a separate admin group managing the AD they will probably pre-create the computer objects for you. If you have to do that yourself I do not see much usefulness in automating this anyway, as it won't save you any work.


Will PowerPoint work with all the editing done in MS Office?

Every PowerPoint presentation that I ever got worked properly in LibreOffice Impress except for one fancy .pptx presentation that had audio and animations. It doesn't seem worthwhile to install Microsoft Office in Ubuntu just to open one file that I can open online.


restarting mysterious touchpad driver in 19.10

Assuming you have these:

xserver-xorg-input-libinput
xserver-xorg-input-evdev
xserver-xorg-input-mouse

(if you don't sudo apt install xserver-xorg-input-libinput xserver-xorg-input-evdev xserver-xorg-input-mouse)
You might have to install this: xserver-xorg-input-synaptics
sudo apt install xserver-xorg-input-synaptics


How to check (via software) if my usb 3.1gen2 Type-C port supports Thunderbolt3?

Thunderbolt 3
My system has Thunderbolt 3, USB 3.1 Gen 2 Type-C jack. I use it to drive a second HDMI TV through a DisplayPort to HDMI adapter.
lsusb -t
$ lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 4: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 4, If 1, Class=Vendor Specific Class, Driver=, 480M
        |__ Port 1: Dev 4, If 0, Class=Printer, Driver=usblp, 480M
        |__ Port 4: Dev 6, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 4: Dev 10, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
            |__ Port 3: Dev 8, If 0, Class=Vendor Specific Class, Driver=usbfs, 480M
    |__ Port 4: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 5: Dev 5, If 1, Class=Wireless, Driver=btusb, 12M
    |__ Port 5: Dev 5, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 7: Dev 7, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 7: Dev 7, If 1, Class=Video, Driver=uvcvideo, 480M
    |__ Port 9: Dev 9, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 9: Dev 9, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 9: Dev 9, If 2, Class=Human Interface Device, Driver=usbhid, 12M

Notice the speed of 10000M which doesn't appear on your display.
Bottom of sudo lshw | grep -A10 -i usb
                 *-usb
                      description: USB controller
                      product: Intel Corporation
                      vendor: Intel Corporation
                      physical id: 0
                      bus info: pci@0000:39:00.0
                      version: 00
                      width: 32 bits
                      clock: 33MHz
                      capabilities: pm msi pciexpress xhci bus_master cap_list
                      configuration: driver=xhci_hcd latency=0
                      resources: irq:123 memory:d9f00000-d9f0ffff
                    *-usbhost:0
                         product: xHCI Host Controller
                         vendor: Linux 4.14.4-041404-generic xhci-hcd
                         physical id: 0
                         bus info: usb@3
                         logical name: usb3
                         version: 4.14
                         capabilities: usb-2.00
                         configuration: driver=hub slots=2 speed=480Mbit/s
                    *-usbhost:1
                         product: xHCI Host Controller
                         vendor: Linux 4.14.4-041404-generic xhci-hcd
                         physical id: 1
                         bus info: usb@4
                         logical name: usb4
                         version: 4.14
                         capabilities: usb-3.10
                         configuration: driver=hub slots=2 speed=10000Mbit/s

Notice the last line speed=10000Mbit/s.
Summary
It appears you do not have Thunderbolt 3 nor USB 3.1 Generation 2. You have USB 3.1 Type C Generation 1.0 which is 5 Gbps (480 MB/s) the same speed as USB 3.0.
The best way to find out is to look for the "thunderbolt" picture next to the USB Type-C jack on your computer. However even then it might only be two PCIe lanes and not four (according to some websites I read tonight).

Look at PCIe for more information
PCIe tree
$ lspci -tv
-[0000:00]-+-00.0  Intel Corporation Sky Lake Host Bridge/DRAM Registers
           +-01.0-[01]--+-00.0  NVIDIA Corporation GM204M [GeForce GTX 970M]
           |            \-00.1  NVIDIA Corporation GM204 High Definition Audio Controller
           +-02.0  Intel Corporation Skylake Integrated Graphics
           +-04.0  Intel Corporation Skylake Processor Thermal Subsystem
           +-14.0  Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller
           +-14.2  Intel Corporation Sunrise Point-H Thermal subsystem
           +-16.0  Intel Corporation Sunrise Point-H CSME HECI #1
           +-17.0  Intel Corporation Sunrise Point-H SATA Controller [AHCI mode]
           +-1c.0-[02-3a]----00.0-[03-3a]--+-00.0-[04]--
           |                               +-01.0-[05-38]--
           |                               \-02.0-[39]----00.0  Intel Corporation DSL6340 USB 3.1 Controller [Alpine Ridge]
           +-1c.4-[3b]----00.0  Qualcomm Atheros Killer E2400 Gigabit Ethernet Controller
           +-1c.5-[3c]----00.0  Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter
           +-1c.6-[3d]----00.0  Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader
           +-1d.0-[3e]----00.0  Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961
           +-1f.0  Intel Corporation Sunrise Point-H LPC Controller
           +-1f.2  Intel Corporation Sunrise Point-H PMC
           +-1f.3  Intel Corporation Sunrise Point-H HD Audio
           \-1f.4  Intel Corporation Sunrise Point-H SMBus

Looking at the details below we see nVidia GPU can take a maximum of 16 PCIe lanes at Gen 3.0 speeds but, is currently using 8 lanes. NVMe M.2 Samsung SSD is taking 4 PCIe lanes at Gen 3.0 speeds. Others devices at taking 1 PCIe lane at Gen 3.0 speeds or less.
Device 1c.0 -02 looks like it may serve the Thunderbolt3 taking 4 PCIe lanes at Gen 3.0 speeds. The description above reads "Alpine Ridge". However when you run sudo lspci -tv the description changes:
   +-1c.0-[02-3a]----00.0-[03-3a]--+-00.0-[04]--
   |                               +-01.0-[05-38]--
   |                               \-02.0-[39]----00.0  Intel Corporation Device 15b5

When you google 15b5 it confirms it's the Intel Thunderbolt 3!
There is other interesting information below such as nVidia power limit of 75 Watts. Ethernet and WiFi power limit of 10 watts but yet SSD has a limit of 25 watts which seems high. The Thunderbolt3 power limit is 25 watts which makes sense for charging devices.
The report below had to be truncated heavily because it won't fit into Ask Ubuntu 30KB message maximum size. I left in the relevant details which I hope complements the tree printout above.
Partial contents of sudo lspci -vv (73 kb initially):
00:00.0 Host bridge: Intel Corporation Sky Lake Host Bridge/DRAM Registers (rev 07)
    Subsystem: Dell Skylake Host Bridge/DRAM Registers
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ >SERR- <PERR- INTx-
    Latency: 0
    Capabilities: [e0] Vendor Specific Information: Len=10 <?>
    Kernel driver in use: skl_uncore

00:01.0 PCI bridge: Intel Corporation Sky Lake PCIe Controller (x16) (rev 07) (prog-if 00 [Normal decode])

    (...SNIP...)

    Capabilities: [88] Subsystem: Dell Skylake PCIe Controller (x16)
    Capabilities: [80] Power Management version 3

    (...SNIP...)

        LnkCap: Port #2, Speed 8GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <256ns, L1 <8us

    (...SNIP...)

            Slot #1, PowerLimit 75.000W; Interlock- NoCompl+

    (...SNIP...)

    Kernel driver in use: pcieport
    Kernel modules: shpchp

00:02.0 VGA compatible controller: Intel Corporation Skylake Integrated Graphics (rev 06) (prog-if 00 [VGA controller])
    DeviceName:  Onboard IGD
    Subsystem: Dell Skylake Integrated Graphics

    (...SNIP...)

    Kernel driver in use: i915
    Kernel modules: i915

00:04.0 Signal processing controller: Intel Corporation Skylake Processor Thermal Subsystem (rev 07)
    Subsystem: Dell Skylake Processor Thermal Subsystem

    (...SNIP...)

    Kernel driver in use: proc_thermal
    Kernel modules: processor_thermal_device

00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31) (prog-if 30 [XHCI])
    Subsystem: Dell Sunrise Point-H USB 3.0 xHCI Controller

    (...SNIP...)

    Kernel driver in use: xhci_hcd

00:14.2 Signal processing controller: Intel Corporation Sunrise Point-H Thermal subsystem (rev 31)
    Subsystem: Dell Sunrise Point-H Thermal subsystem

    (...SNIP...)

    Kernel driver in use: intel_pch_thermal
    Kernel modules: intel_pch_thermal

00:16.0 Communication controller: Intel Corporation Sunrise Point-H CSME HECI #1 (rev 31)
    Subsystem: Dell Sunrise Point-H CSME HECI

    (...SNIP...)

    Kernel driver in use: mei_me
    Kernel modules: mei_me

00:17.0 SATA controller: Intel Corporation Sunrise Point-H SATA Controller [AHCI mode] (rev 31) (prog-if 01 [AHCI 1.0])
    Subsystem: Dell Sunrise Point-H SATA Controller [AHCI mode]

    (...SNIP...)

    Kernel driver in use: ahci
    Kernel modules: ahci

00:1c.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #1 (rev f1) (prog-if 00 [Normal decode])
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin A routed to IRQ 16
    Bus: primary=00, secondary=02, subordinate=3a, sec-latency=0
    I/O behind bridge: 00002000-00002fff
    Memory behind bridge: c4000000-da0fffff
    Prefetchable memory behind bridge: 0000000080000000-00000000a1ffffff
    Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ <SERR- <PERR-
    BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
        PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
    Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
        DevCap: MaxPayload 256 bytes, PhantFunc 0
            ExtTag- RBE+
        DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
            RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
            MaxPayload 128 bytes, MaxReadReq 128 bytes
        DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
        LnkCap: Port #1, Speed 8GT/s, Width x4, ASPM not supported, Exit Latency L0s unlimited, L1 <16us
            ClockPM- Surprise- LLActRep+ BwNot+ ASPMOptComp+
        LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk-
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 8GT/s, Width x4, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
        SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
            Slot #4, PowerLimit 25.000W; Interlock- NoCompl+
        SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet+ CmdCplt- HPIrq- LinkChg-
            Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
        SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
            Changed: MRL- PresDet- LinkState-
        RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
        RootCap: CRSVisible-
        RootSta: PME ReqID 0000, PMEStatus- PMEPending-
        DevCap2: Completion Timeout: Range ABC, TimeoutDis+, LTR-, OBFF Not Supported ARIFwd+
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd-
        LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete+, EqualizationPhase1+
             EqualizationPhase2+, EqualizationPhase3+, LinkEqualizationRequest-
    Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
        Address: 00000000  Data: 0000
    Capabilities: [90] Subsystem: Dell Sunrise Point-H PCI Express Root Port
    Capabilities: [a0] Power Management version 3
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
        Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [100 v1] Advanced Error Reporting
        UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:  DLP- SDES- TLP- FCP- CmpltTO+ CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt: DLP+ SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
        CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
        AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
    Capabilities: [140 v1] Access Control Services
        ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir+ UpstreamFwd- EgressCtrl- DirectTrans-
        ACSCtl: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans-
    Capabilities: [220 v1] #19
    Kernel driver in use: pcieport
    Kernel modules: shpchp

00:1c.4 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #5 (rev f1) (prog-if 00 [Normal decode])

    (...SNIP...)

        LnkCap: Port #5, Speed 2.5GT/s, Width x1, ASPM L1, Exit Latency L0s <1us, L1 <16us
            ClockPM- Surprise- LLActRep+ BwNot+ ASPMOptComp+
        LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- CommClk+
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
        SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
            Slot #8, PowerLimit 10.000W; Interlock- NoCompl+

    (...SNIP...)

    Kernel driver in use: pcieport
    Kernel modules: shpchp

00:1c.5 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #6 (rev f1) (prog-if 00 [Normal decode])

    (...SNIP...)

        LnkCap: Port #6, Speed 2.5GT/s, Width x1, ASPM L1, Exit Latency L0s <1us, L1 <16us
            ClockPM- Surprise- LLActRep+ BwNot+ ASPMOptComp+
        LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- CommClk+
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
        SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
            Slot #9, PowerLimit 10.000W; Interlock- NoCompl+
        SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-

    (...SNIP...)

    Kernel driver in use: pcieport
    Kernel modules: shpchp

00:1c.6 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #7 (rev f1) (prog-if 00 [Normal decode])

    (...SNIP...)

        LnkCap: Port #7, Speed 8GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <1us, L1 <16us
            ClockPM- Surprise- LLActRep+ BwNot+ ASPMOptComp+
        LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- CommClk+
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
        SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
            Slot #10, PowerLimit 10.000W; Interlock- NoCompl+

    (...SNIP...)

    Kernel driver in use: pcieport
    Kernel modules: shpchp

00:1d.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #9 (rev f1) (prog-if 00 [Normal decode])

    (...SNIP...)

        LnkCap: Port #9, Speed 8GT/s, Width x4, ASPM L1, Exit Latency L0s <1us, L1 <16us

    (...SNIP...)

            Slot #12, PowerLimit 25.000W; Interlock- NoCompl+

    (...SNIP...)

        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR+, OBFF Disabled ARIFwd-

    (...SNIP...)

    Kernel driver in use: pcieport
    Kernel modules: shpchp

00:1f.0 ISA bridge: Intel Corporation Sunrise Point-H LPC Controller (rev 31)
    Subsystem: Dell Sunrise Point-H LPC Controller
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0

00:1f.2 Memory controller: Intel Corporation Sunrise Point-H PMC (rev 31)
    Subsystem: Dell Sunrise Point-H PMC
    Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Region 0: Memory at dd12c000 (32-bit, non-prefetchable) [disabled] [size=16K]

00:1f.3 Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31)
    Subsystem: Dell Sunrise Point-H HD Audio
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 32
    Interrupt: pin A routed to IRQ 128
    Region 0: Memory at dd128000 (64-bit, non-prefetchable) [size=16K]
    Region 4: Memory at dd100000 (64-bit, non-prefetchable) [size=64K]
    Capabilities: [50] Power Management version 3
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Address: 00000000fee00318  Data: 0000
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel

00:1f.4 SMBus: Intel Corporation Sunrise Point-H SMBus (rev 31)
    Subsystem: Dell Sunrise Point-H SMBus
    Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Interrupt: pin A routed to IRQ 255
    Region 0: Memory at dd132000 (64-bit, non-prefetchable) [size=256]
    Region 4: I/O ports at f040 [size=32]
    Kernel modules: i2c_i801

01:00.0 3D controller: NVIDIA Corporation GM204M [GeForce GTX 970M] (rev a1)
    Subsystem: Dell GM204M [GeForce GTX 970M]
    (...SNIP...)

        LnkCap: Port #0, Speed 8GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <1us, L1 <4us
            ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
        LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk-
            ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 8GT/s, Width x8, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-

     (...SNIP...)

    Kernel driver in use: nvidia
    Kernel modules: nvidiafb, nouveau, nvidia_384_drm, nvidia_384

01:00.1 Audio device: NVIDIA Corporation GM204 High Definition Audio Controller (rev a1)

    (...SNIP....)

    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel

02:00.0 PCI bridge: Intel Corporation Device 1576 (prog-if 00 [Normal decode])

    (...SNIP....)

03:01.0 PCI bridge: Intel Corporation Device 1576 (prog-if 00 [Normal

    (...SNIP....)

03:02.0 PCI bridge: Intel Corporation Device 1576 (prog-if 00 [Normal

    (...SNIP....)

39:00.0 USB controller: Intel Corporation Device 15b5 (prog-if 30

    (...SNIP....)

3b:00.0 Ethernet controller: Qualcomm Atheros Killer E2400 Gigabit Ethernet Controller (rev 10)
    Subsystem: Device 0707:2400

(...SNIP...)

        LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s unlimited, L1 unlimited

    (...SNIP...)

    Kernel driver in use: alx
    Kernel modules: alx

3c:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)
    Subsystem: Bigfoot Networks, Inc. QCA6174 802.11ac Wireless Network Adapter

    (...SNIP....)

    Kernel driver in use: ath10k_pci
    Kernel modules: ath10k_pci

3d:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader (rev 01)

    (...SNIP....)

    Kernel driver in use: rtsx_pci
    Kernel modules: rtsx_pci

3e:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a804 (prog-if 02 [NVM Express])
    Subsystem: Samsung Electronics Co Ltd Device a801

     (...SNIP...)

        LnkCap: Port #0, Speed 8GT/s, Width x4, ASPM L1, Exit Latency L0s unlimited, L1 <64us
            ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
        LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- CommClk+
            ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 8GT/s, Width x4, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-

    (...SNIP...)

    Kernel driver in use: nvme
    Kernel modules: nvme

I'll try to study this a little more and update it later.


Can not fix the Display rotation in ubuntu 17.10

I have tried many methods and following many comments, and now I find the answer:

Just press Ctrl+Alt+F1 then it goes to the login screen, after being logged in the screen comes back to its correct position.


Why the field in header is tt insted of tty?

tty, tt, and tname are aliases, all of them show the controlling terminal. On the header:

tty, and tt will show TT
tname will show TTY

So, if you want TTY as the header, use tname:

ps -eo pid,ppid,tname,cmd


Unable to boot into ubuntu 15.04 after a clean install

Well it seems like it can't detect your disk. You could try reinstalling if only some random bug hadn't happened, or type lsblk and see how are your disks/partitions named, from the install you can know, that if your disk is for example sda, than the first partition(typically ext3/ext4) will be sda1 and the second will be swap ... although I find this order not very logical. Now you know the disk where you installed is called sda1 so you go edit the file /etc/fstab and in the line containing this name /dev/disk/by-uuid/612a3bcc-0033-47bf-bcca-b6ad3a4224c8 you rename it to /dev/XXXY in this cas XXXY == sda1.

Hope it helps :)


Download the debian package for pyssh from here and then open a terminal using Alt+F2 and type gnome-terminal and type:

sudo dpkg -i </path/to/the/deb/file>

and then retry running the script.


I want to reinstall ubuntu as to remove the full disk encryption

Have you tried entering your BIOS and selecting to boot from your DVD drive? And/or changing the the boot order?

(Sorry if that seems obvious, it's not clear from your post if you've tried that yet. :)


Configure sSMTP with Gmail, in Ubuntu 12.04 LTS

mailhub=smtp.gmail.com:465

The port is wrong. Your aliases need updating too.

Gmail only really allows SSL emails from remote hosts, other connections usually don't work. Enable SSL and use port 465.

If that doesn't work verify connectivity with telnet:

telnet smtp.gmail.com:465 it should work, and return gibberish.


How to maximize dash using keyboard shortcut?

A shortcut for this doesn't currently exist, but a bug exists that documents the lack of this feature.

If you subscribe to Bug #842683, you can be notified when the bug has been fixed and the functionality has been added.


Looks like I found how to fix it. I edited custom.conf file in /etc/gdm3/custom.conf and comment line with #WaylandEnable=false. Now I do not have xor logs anymore and nothing "eat" space on disk.


How to remove system files that are marked read-only?

It seems your pendrive device is dead. I am pretty sure, because all times I saw I/O error it meant hardware was damaged.


Changed motherboard, eSATA doesn't hot-swap

Further tinkering has inadvertently lead me to the solution -- in addition to changing the SATA mode to AHCI, I had to also disable "SATA IDE Combined Mode"; I've also left disabled "AMD AHCI BIOS ROM", however I have not tested if that is necessary or not for proper detection of hot-swap events.

Seems really odd to me that such a basic functionality as hot-swappable eSATA depends upon first finding the proper group of settings to enable and disable in the BIOS (wasn't necessary to tweak anything on my previous motherboard, it just worked right out of the box), but there it is.


Installing Ubuntu Studio aside Ubuntu 13.04

Ubuntu Studio, as it name describes, is a Ubuntu version but focused to the multimedia purposes. To do that task, it uses a Real Time (kind of Low Latency) Linux kernel.

The main differences between this kernel and the usual is that uses less time to response to a multimedia actions (in music is crucial to play and listen the sound that you are making in less than 10ms), but the overall performance is worse than the generic kernel (here an example: http://sevencapitalsins.wordpress.com/2007/08/10/low-latency-kernel-wtf)

Then, if you want Ubuntu and Ubuntu Studio, both in the same SO (you don't want dual boot), you can install one OS (Ubuntu for example) and install all the packages of the other flavour over it like this:

sudo apt-get update && sudo apt-get install ubuntustudio-desktop ubuntustudio-audio ubuntustudio-audio-plugins ubuntustudio-graphics ubuntustudio-video

From https://help.ubuntu.com/community/Ubuntu%20Studio%20Upgrade%20from%20Ubuntu

As a conclusion, you could have both operative systems installed as a one OS but you are able to work only with one kernel, the generic or the low-latency one (depending if you need performance or multimedia purposes), and you need to reboot when you want to change to the other (the same scene as if you have a dual boot system).


Slack suddenly stopped working on Ubuntu 20.04

Looks like there is a confirmed issue with the snap package.

We’re very sorry for the trouble there. We are experiencing some difficulties with the Slack Snap package. Our team is working hard to resolve the issue as quickly as possible. For now, you can access Slack via a browser or on our Direct Download version: https://slack.com/intl/en-gb/downloads/linux?eu_nc=1

Source: https://twitter.com/SlackHQ/status/1280808281989152771
A fix should be available in the next snap slack package release.


After upgrading to 18.04 from 17.10 dual monitor stopped working, nvidia works with incorrect resolution, intel graphics card does not

Uh, Installed nvidia-390 driver and rebooted today and it worked.
I hate computers :)


Ubuntu Software doesn't work and why are there two Software Center in Ubuntu 20.04?

This is because the pre-installed Ubuntu Software is a snap package (source: article on OMG! Ubuntu). You can check this by running the following command:

snap list

You should see an entry called snap-store which corresponds to the pre-installed Ubuntu Software.
You are supposed to be able to run the pre-installed Ubuntu Software by running the snap-store command in Terminal. If it fails, it should show some useful error messages.

Secondly, the pending updates shown in the GUI application are updates for two pre-installed snap packages. That's why they don't appear in the list of packages that can be upgradable by apt.


How Do I Prevent Access To My Server via SSH During School Hours?

Here's a start at it.
This shows one way to disable ssh by editing its configuration file and restarting it. To use it, you could construct two versions of /etc/ssh/sshd_config, one enabled and one disabled and write two cron scripts set to run on the server to switch between versions of the files at the appropriate times or replace the config file with a symlink that could be pointed at either version.
Just be sure you have physical access to the server or some other way to recover ssh access if something gets stuck or you have to get in for some reason during your restricted hours.
Even simpler, your cron jobs could just stop and start ssh at the appropriate times if it isn't being used in other ways during your restricted hours.
Note: I am not an experienced sysadmin, so I do not know if there are any security implications to this approach.


I used the top answer on this as basis for my own script for managing backlight brightness: Brightness Controls Not Working on a Dell Inspiron N4010 Laptop

Unlike OP (
user152748 ) there and similarly to you, backlight controls were basically working, but i just wanted the ability to fine tune it. This method will not affect how your normal backlight brightness adjustment works.

So what you need to know is if /sys/class/backlight/intel_backlight/brightness is the correct file for your system.

You could test it with sudo echo $VALUE | tee /sys/class/backlight/intel_backlight/brightness where $VALUE is a number you want to try. Your permitted values are probably different from mine (0 to ~4000). In the case of my Dell laptop, it just doesnt work if i try an incorrect value.

If this method works for you, then you just have to make a script and assign hotkeys to it. My modified version of bcbc's script is this one (at the lower end adjusts by increments of 1; the higher the brightness level, the bigger the increment):

#!/bin/bash
# Dell N4010 brightness control workaround
# Note: add the following to /etc/rc.local
#       chmod 777 /sys/class/backlight/intel_backlight/brightness
# The file .config/khotkeysrc should contain the hotkeys CTRL+SHIFT+F4/F5 to
# adjust brightness down and up respectively.
#
# Usage:
#    ./brightness.sh up   # bump up brightness
#    ./brightness.sh down # bump down brightness
#
curr=`cat /sys/class/backlight/intel_backlight/brightness`
bump=$(( $curr / 50 ))
if [ "$1" == "up" ]; then
  curr=`echo "$curr + $bump + 1" | bc`
else
  curr=`echo "$curr - $bump - 1" | bc`
fi
# Set the brightness to the new level. 0 is the lower limit. Cant set it lower than that.
echo $curr | tee /sys/class/backlight/intel_backlight/brightness
echo $bump

If you're interested i can walk you through the code step by step.

As the comments in the code indicate, you need to edit the file /etc/rc.local (which is run at a certain point in the boot process) to include this line chmod 777 /sys/class/backlight/intel_backlight/brightness (changes permissions of this brightness file to allow anything to it by anyone) before this line: exit 0 (because in rc.local all code must be before exit 0).

You also need to set up your hotkeys which can be done via GUI (The link at the top has instructions how to do that in Ubuntu or you can search the web for "how to set custom hotkeys ubuntu"). You have to choose some key combination for it (i prefer something close to the original brightness adjustment keys). The second half of setting up custom hotkeys is telling it what to do when said keys are pressed. You want 2 hotkeys, one running $path_to_your_file/your_file.sh up and the other one $path_to_your_file/your_file.sh down.
Alternatively you can manually edit the file where hotkeys are stored on Ubuntu and its derivatives: $home/.config/khotkeysrc

Ill be happy to elaborate anything unclear.


How to create SMB share for Windows with Auth prompt without AD?

Maybe the following will help: this is the config I use for three different shares with access rights as follows:

[ze] is accessible to any user (read and write)
[Valves] is readable by anyone, writeable only by users belonging to group 'Bureau'
[Bureau] is readable/writeable (not hidden) only by users belonging to unix group 'Bureau'.

Note that using these settings, files are created by the user under his name but belonging to group 'Bureau' (enforced by force group).  Besides, all file (and directories) receive a RWX group setting (force create mode + force directory mode). I guess adding browseable = no will hide the desired share.

It is then up to you to define the list of users belonging to the desired group (or to change the write list).  Last but not least, you will have to define the users in the unix system and in samba (smbpasswd)

[ze]
comment = Public share
path = /partages/ze
public = yes
writeable = yes
force create mode = 777
force directory mode = 777

[Valves]
comment = Read by everybody / write by '@bureau'
path = /partages/valves
public = yes
write list = @bureau
force create mode = 770
force directory mode = 770
force group = bureau

[Bureau]
comment = read / write only to users in the group 'bureau'
path = /partages/bureau
writeable = yes
write list = @bureau
force create mode = 770
force directory mode = 770
force group = bureau
valid users = @bureau

`


GDM is the default DM in Ubuntu as of 17.10. LightDM is still the default for some other flavours, like Xubuntu or Lubuntu, and I doubt either of these projects will move to GDM, so LightDM should continue to be supported in Ubuntu.

See this mailing list post from June 2017:

  As you might be aware the Ubuntu desktop has decided to switch to
  using GNOME and this means we will be using GDM instead of LightDM
  Unfortunately this means there is likely to be a reduction in
  development effort from Canonical.

  However, I want to assure you that we are not abandoning LightDM:

  We continue to ship LightDM in our existing Ubuntu desktop releases and we will support those for many years to come (see below).
  Many Ubuntu derivatives use LightDM and we continue to support them in doing that.
  Ultimately we think that LightDM is the right cross-desktop solution for display management, it's just not something we can make use of in
  Ubuntu desktop at this time. Who knows how the future will pan out :)

  I will continue to do release management for LightDM and review and
  merge branches as I can. If anyone else is capable and interested in
  helping out with these jobs I'd love to hear from you - I don't want
  to be a blocker on development just because my focus is elsewhere.

The LightDM greeter is configurable, and a barebones greeter might well be faster than GDM, but a complex one might be slower.


Remove everything after dot and overwrite in same file

Use -i:

sed -i 's/\..*$//' Filename

  -i[SUFFIX], --in-place[=SUFFIX]
  edit files in place (makes backup if SUFFIX supplied)


Help needed recovering erased boot disk label

Well, in the end, someone else on another forum DID take a few minutes moment to walk me through Testdisk, have a look at what I got, and explain how to interpret it and what the next step should be.

In the end, it wasn't just a case of "Use Testdisk".

Found this:

http://ubuntuforums.org/showthread.php?t=895224
(oddly enough, no-one helped this guy out either...)

Long story short, even if you nuke your partiton table with mklabel, the data IS stil there, and if you can find out the sectors where the partitions used to be, you CAN put a new partition table in place and it will let you access the data.

So I gave gdisk a go, because apparently it's supposed to be able to restore backup GPT table....except it didn't. No idea why, but despite apparently finding a backup table, restoring it did nothing.

Then by sheer luck I found this:

http://ubuntuforums.org/showthread.php?t=2214497
(also another person who had to "bite the bullet" and go for it without advice...)

Again, summarizing -

Despite what it says (or rather, doesn't say) on its documentation Testdisk for whatever reason can't restore full LUKS partitions. In fact it cant even find them!! But - you can at least use it to get some ideas on what sector the LUKS partition might have started - it  at least picks up the LUKS header as a 4096 / 2MB partition.

You can then take the starting sector of this header and make a new partition manually from there to the end sector of the disk (assuming you encrypted all the remaining disk - if you don't know the end sector you're in trouble, testdisk can't find it. But if you get it right and write a new partitions table with those sectors, viola - you have a mountable partition and can recover your data. If you can find the sectors you can restore the EFI and boot partitions too (test disk at least can do this itself, it picks up the FAT and efs2).

However no matter what flags I put on them, it still wouldn't boot.So instead, I dd'd each of these recovered partitions separately onto an external drive, re-installed a a fresh encrypted copy of ubuntu, then dd'd the recovered partitions back into their respective places. The partiton sizes are all identical and it all booted up like nothing had ever changed, even swap worked.

So, what have I learned? Well, if you fry your partition table, even with an encrypted install, the data IS recoverable.

And motorbike forums  provide apparently provide more tech help in an afternoon than the actual Ubuntu support sites provide in a month... :/

And folks wonder why people won't use Linux...


Are you installing from a live median such as a boot disk or are you installing from within windows then letting the computer reboot?

Also I am assuming that you meant grub-install/dev/sda and not grub-install/dev/sad

I believe your are getting this failure at the point when Stage 1 of GRUB installation is installing into the MBR which points to Stage 2 afterwards.

Post some more information about your hardware. Motherboard, cpu, age of computer, hard drives (and how did you partition it) etc....


Howto prevent grubpc 2.02 from displaying submenu?

I found in info grub that there is an option to add in /etc/default/grub, so, in a terminal:

gksudo gedit /etc/default/grub

Insert this line at the end of the file

GRUB_DISABLE_SUBMENU=y

Save, exit, and run

sudo update-grub

Please take note that this option works in grub 2.02 and later


How to install Shotwell Unstable from Flathub?

Copy the link provided (in this case, click the "Install Unstable" button - the link should be https://gitlab.gnome.org/GNOME/shotwell/raw/master/flatpak/org.gnome.Shotwell.unstable.flatpakref). Then, in a terminal, run flatpak install [LINK] (where LINK is https://gitlab.gnome.org/GNOME/shotwell/raw/master/flatpak/org.gnome.Shotwell.unstable.flatpakref).


Qt creator does not work correctly after installing ubuntu sdk

This is a Qt Creator error. I have the same problem, but the only solution is to click back on the main window. This problem is something the you should take to the developers of Qt Creator. It is a problem that you might have to just ignore. I know it is annoying, trust me.

Good Luck,
Brooks Rady


Ubuntu 20.04 wifi connected but no internet

Finding lots of other folk with the same/similar issues with the AX200. Most are focusing on drivers.
Search Askubuntu for "iwlwifi modprobe ax200".  Lots of stuff to try...
And let's move comments to chat - getting out of hand.


qemu-img: error while reading sector 327680: Invalid argument

The syntax needs adjusting. Flag arguments need to come first, then the input file and then the output file.

qemu-img convert -f vmdk -O raw Ubuntu-12.04-LTS-Jeos-1.0-disk1.vmdk myImage.raw

If you're still getting that, it might suggest a corrupted VMDK. I just downloaded the appliance VMDK and ran:

$ qemu-img convert -f vmdk -O raw Ubuntu-12.04-LTS-Jeos-1.0-disk1.vmdk myImage.raw
$ ls -l myImage.raw
-rw-r--r-- 1 oli oli 2147483648 Jan 16 13:35 myImage.raw

That seems to work fine.

Edit: This seems like it might be a side-effect of an old version of qemu. I'm using Ubuntu 13.10 with version 1.5.0 of qemu-utils. Either upgrade the version of qemu (per the question I linked to) or upgrade Ubuntu.


How can I change my keyring password from the command line

After much trial and error I found that the old feisty package pam-keyring still contains the pam-keyring-tool which you can use to unlock keyrings from the command line. Ubuntu took the tool out of the package after the feisty release, perhaps for security reasons?

Here's what to do:

Download the package:

wget https://launchpad.net/ubuntu/+archive/primary/+files/pam-keyring_0.0.8.orig.tar.gz

Unpack it where you want, then do:

./configure

make

You DON'T make install because you don't want it to upgrade the package at any point.
Open the post login config file rc.local:

gksu gedit /etc/rc.local

Edit to make it look like this:

exec echo ENTER_YOUR_PASSWORD_HERE | /PATH_TO_PAM_KEYRING_TOOL/pam-keyring-tool --keyring=login -u -s

exit 0

That's it! This definitely works.


Very strange behaviour of the Compose Key

It sounds to me as if you want to create the file ~/.XCompose and put whatever you want to be used there. As the first line you may want to have:

include "/usr/share/X11/locale/en_US.UTF-8/Compose"

For that to work, you also need to set "xim" as your input method. It can be done from terminal:

im-config -n xim

~/.XCompose will be used whatever your locale is.


The easiest way GUI (recommended for novice)

Open the protected file and use ctrl+p or use print option to print the file, now save the file as pdf.

Using Command line

If you have pdftk already installed you can skip step1

Step 0: To check if Pdftk is already installed

sudo apt list | grep pdftk

If output contains '[installed]' tag with pdftk then you can skip step1
i.e if the output is like this

pdftk/xenial 2.02-4 amd64 [installed]

Step 1: Install pdftk

sudo apt-get install pdftk

Step 2: Run following command

pdftk /path/to/input.pdf input_pw <yourpassword> output out.pdf

If you don't want to install pdftk there is another utility qpdf which is automatically installed (at least on 16.04 which I am using)

To use qpdf for generating unsecured pdf run following command.

qpdf -password=<your-password> -decrypt /path/to/secured.pdf out.pdf

For detailed information take a look at this HTG tutorial


Is Synaptic better than the Software Center?

Well these two solutions are quite different. While Ubuntu Software Centre is very user friendly, it has some disadvantages:

Some packages are hidden
It's quite slow

Synaptic is a tool for power users. It gives you access to all available packages. However it will not protect user from his own mistakes (for example uninstalling some essential package). And, of course, it's not user friendly at all.


Wireless Connection drops every few days

Remove the following packages:
network-manager-gnome

Install the following packages:
python-wicd
wicd
wicd-daemon
wicd-gtk

Source: http://ubuntuforums.org/showthread.php?t=1866335

If this works for you please upvote/mark as accepted. If not comment and we will try to help further.


A workaround is:

lpadmin -p TOSHIBA-ColorMFP  -o pdftops-renderer-default=pdftops

if, your printer is indeed called TOSHIBA-ColorMFP. Check the name of your printers with:

lpstat -a


How can I completely remove NetworkManager?

First edit /etc/network/interfaces so that the ifup utility can be used to configure eth0 once NetworkManager is gone.

Remove NetworkManager from the system

sudo apt-get purge network-manager

Configure eth0 using ifup.

sudo ifup eth0


Boot error "Platform does not support this image''

Solved with boot repair tool. To use it you need a bootable USB pendrive, with Ubuntu on it.
After booting, open a terminal and enter these commands:
sudo add-apt-repository -y ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair


dpkg: error: duplicate file trigger interest for filename `/usr/share/icons/hicolor' and package `hicolor-icon-theme'

Notice the first and last lines of /var/lib/dpkg/triggers/File are duplicates (both contain the same about hicolor). Try removing one of the lines (leaving the other!):

sudo gedit /var/lib/dpkg/triggers/File

then save it. Then try installing/removing software again.

You might also want to run sudo apt-get clean, since apt-get might have cached the packages that failed to install.


Assuming that the public key was correctly copied to the target server, you'll need to make sure that the SSH daemon supports passwordless login. This configuration is set in the /etc/ssh/sshd_config file, and you need to make sure the following values are set:

PermitRootLogin yes
RSAAuthentication yes
PubkeyAuthentication yes

If those values are not set, you will need to set them and then restart SSH with sudo service ssh restart in a terminal.


My zte ac 8700 usb modem is not recognized. What should I do?

This seems to be a pretty solid howto:

  After Long hours of hard work, I finally found out how to connect ZTE EV-DO AC8700 USB Modem supplied by BSNL, India. Here's what I did and what's to be done:-

  Download the linux driver for ZTE EV-DO AC8700 from http://www.ztemt.com/ennewzte/uploadimages/1257081294661.zip
  Extract it and then install the .deb package/app (CrossPlatformUI-V1.0.27-BSNL-i386-ubuntu.deb).
  Install GNOME PPP (gnome dial up tool). This can be found from [ Applications - Ubuntu Software Centre and in search bar type GNOME PPP]. Obviously, you'll need Internet Connection for this download.
  Now, u'll find the application (ZTEMT UI) in [Applications-Internet-ZTEMT UI].
  Open it. Click Settings. Input phone number as #777,Username and then password. Click Connect and then Voila!!! Happy Now ?


How do I uninstall Ubuntu OS (used Ubuntu for Windows)?

For that i need to how did you install it? If you installed it using wubi then just login in window7, goto control panel>Programs&featues then uninstall ubuntu.

If you install it using partition then

1. If you install ubuntu by replacing the C drive of windows then just reinstall windows and create a new primary partition by deleting ubuntu partition.

2. If you install ubuntu in different partition then also re-install windows7 in C and format the ubuntu partition from windows Disk management (control Panel> Disk management or device management [not sure])