L2TP VPN is Consuming Too Much of Remote Network's Upload Bandwidth

Connecting to the VPN changes your default route

If you were to take a look at your routing table before connecting to the VPN, and afterwords, you will notice that not only do you have additional routes, but your default route has been changed.  Your traffic goes out over the default route, unless there is a 'better', specific route.

To see your routing table, you can run ip route.  You used to be able to run route, but most distributions no longer have that command.

ip route

With each VPN type, and with each VPN client, you are limited to different options and possibilities, but when you use openconnect, you have the ability to control this and prevent your default route from changing.

To be clear, let's say your VPN network is 192.2.2.0/24.  When you connect to the VPN, you need a new route to route that traffic to the gateway.  It will likely look like 192.2.2.0/24 via 192.2.2.1 on tun0, but the gateway IP could be different.  By having this route, any traffic to 192.2.2.0 255.255.255.0 will go over tun0 to 192.2.2.1 instead of eth0/wlan0 to your router.  You just don't want 192.2.2.1 becoming your default route.


Repairing broken installation from Live USB without losing data

Using gparted, shrink /dev/sdb1 to 32GB. It's plenty of room for a typical root partition, it won't crowd your current situation and will leave ~110GB for /home.
While re-partitioning is not risk-free, in 20 years and multiple dozens of re-partitionings, I have never had a problem.  Check out How to resize partitions? for pointers.
Create partition /dev/sdb3 from the remainder of the first partition.
An advantage of this method (separate partitions) is that if you wish to change distributions in the future, there is little drama.  It's almost like changing a shirt. All your personal data will be on another partition.  The new system can write the old root partition with glee.
Mount both partitions with either your GUI or with the command line using standard practices, such as discussed in  How to access a usb flash drive from the terminal?
If you are using the GUI, you may run into permission issues unless you use a super user (root) GUI.  The partitions would be mounted somewhere like /media/{LiveCD_user}/{UUID of dev-sdb1}/home/{old_user_id} and copy/move it to /media/LiveCD_user/{UUID of dev-sdb3/old_user_data.  The command line is less drama.
Follow this procedure:

Make two mount points:
sudo mkdir /media/ubuntu_root  /media/new_home

Call them what you will, the names are only for your benefit.

Mount the two new partitions in your system
sudo mount /dev/sdb1 /media/ubuntu_root
sudo mount /dev/sdb3 /media/new_home

Move your old home directory to the new partition
sudo mv /media/ubuntu_root/home/{old_user_id} /media/new_home/old_user_data

Unmount the partitions after the data is moved to not be reminded during installation.
sudo umount /dev/sdb1
sudo umount /dev/sdb3

Launch the installer and install the new system with the *Something else option.

Select /dev/sb1 as root / and ☑tick  the format partition.

Select /dev/sdb3 as /home and do not format this partition (it has all your data).

You've installed a dual boot before, but be careful with GRUB.  Double check that regard.

Install. (Using the same user_id circumvents any unforeseen ownership issues).

When the dust has settled, boot into the new system, and drag the data you want from /home/old_user_data to the new location.

Delete the leftovers when you're done.


How to fake the format of file to an arbitrary format?

Linux does not care about file extension. Changing the file name does NOT let the file command show it is a picture. It will still show it is an ISO.

How do you believe to retrieve the ISO from doing this:

cat picture.png myiso.iso.gpg > picture2.png

Why do you not encrypt the file?

gpg -c {file}

would be enough. It will ask for a password twice. Make it a good one, and don't forget it

If you do not want anyone to see the file start the name of it with a "." and put it into a directory, remove all permissions except for the user and lock it down with chattr -i {file} from a root session.


Laptop Screen Rotation Dell Inspiron 7348 / 7359 Kubuntu

It turns out that this project works and can easily be installed.
https://github.com/donbowman/kde-auto-rotate


Have you by any chance been downloading Graphics card drivers ? I had this probrlem with ubuntu 12.10 and I had to uninstall the proprietary 'fglrx' driver for AMD/ATI and this solved it?

Just a thought?


Virtual Box Have No IP Address error Show When Start Genymotion Device

Finally I got some solution for this. First Go to on Virtual Box and Check Above side Green color Button for start and Virtual Device and click on this then a screen occur when it will properly Show on your desktop. Now go to genymotion and Run Your Device proper function.
Try it and Thanks...


Enforcing the setting to the process would make more sense

sudo cgexec -g cpu:cpulimited /usr/sbin/apachectl start


Path of a file in the user directory from root directory

There are two ways to specify a file path.

An absolute path, which always begins with the root folder

A relative path, which is relative to the program’s current working directory

There are also the dot (.) and dot-dot (..) folders. These are not real folders but special names that can be used in a path. A single period (“dot”) for a folder name is shorthand for “this directory.” Two periods (“dot-dot”) means “the parent folder.”

Understanding this gives you 2 answers.

Absolute path as mentioned by PerlDuck comment:
 /home/user1/textfile.txt

And the relative path

../home/user1/textfile.txt

Personally in this case I would recommend the absolute path.

Recommended reading: https://automatetheboringstuff.com/chapter8/


How can I download and install miniconda?

You can use the link given below and install the software:

https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html


Copying files from PC to Pendrive gets stuck at the end on Ubuntu 16.04

It’s not just happening to you :-)  The problem is due to how linux works and the default settings that Ubuntu gives you.  The file copy tool is reading a chunk of the source file then writing it to the destination, and updates the progress bar each time it finishes a write.  However, to speed things up, Linux takes the data that is meant to be written and immediately tells the program that is has been written, while doing the work in the background.  Linux allows some percentage of system memory to be used for this purpose, which with the size of memory these days is usually more than the entire file, so a program can think it has written the whole thing when in reality the copy has just begun.  But, when a program tries to close the file, Linux makes it wait for the operation to complete.  (else the program might try doing something with a half-written file)

You see this the most when writing large files to slow devices, like USB, but it can show up in other situations too and make it look like the computer is locking up.

The thing I do to “fix” the problem is tell Linux to buffer less data.  That way an application can’t get so far ahead of the actual progress.  This involves changing a kernel parameter, which is a power-user thing that should be done with care.  You need to add “vm.dirty_bytes=15000000” to /etc/sysctl.conf

echo vm.dirty_bytes=15000000 | sudo tee -a /etc/sysctl.conf

then reboot.

That sets the buffer size to 15MB, which is a number I picked, and roughly translates to “half a second writing to a fast USB2 device”.  You can choose larger (or smaller, but probably not too much smaller) as you like.

The disadvantage of this setting is that high-throughput operations might run slower, like running a bunch of file copies simultaneously.  It could also cause a laptop drive to come out of sleep mode more frequently.


How can I comment on apps shown in the Ubuntu Software Center?

Sign up for a (free, spamfree) Launchpad.net account. Once you are registered, go to https://bugs.launchpad.net/ubuntu/+source/software-center and post a bug message about the product in question.


Ubuntu 18.04 is broken once I use a static IP

Your gateway has to be in same subnet as your IP is.

For example:

IP 192.168.100.100

GW: 192.168.100.1 or whatever it is.

Netmask is your netmask.

IN /24 netmask your gateway can be only in 192.168.100.1 - 192.168.0.100.254 range. By default it's 192.168.100.1 or 192.168.100.254

Or if you don't know your IP but you know your gateway, then you can configure like that:

IP: 192.168.121.252

Netmask: 255.255.255.0

Gateway: 192.168.121.1

DNS: 8.8.8.8, 8.8.4.4 (or another public DNS)


Spawn new Terminator tabs from Bash script

First, open a terminator instance, split it into 4 panes as desired and save as a new layout (make sure to close all open terminal windows except the one you've set up with your new profile). For each of the 4 panes, add a custom command but just add the text COMMAND1, COMMAND2 etc. Save the new layout as foo (or whatever). At this point, your ~/.config/terminator/config should look something like this:

[global_config]
  enabled_plugins = LaunchpadCodeURLHandler, APTURLHandler, LaunchpadBugURLHandler
  focus = mouse
  suppress_multiple_term_dialog = True
  title_use_system_font = False
[keybindings]
[layouts]
  [[default]]
    [[[child0]]]
      fullscreen = False
      last_active_term = ad14f6cd-bcc3-4a80-9852-3fe64f7fc2eb
      last_active_window = True
      maximised = False
      order = 0
      parent = ""
      size = 735, 474
      title = sometitle
      type = Window
  [[foo]]
    [[[child0]]]
      fullscreen = False
      last_active_term = 18ebf009-c427-4c2f-8017-78c379a72d31
      last_active_window = True
      maximised = False
      order = 0
      parent = ""
      position = 2730:254
      size = 735, 474
      title = NAME-1
      type = Window
    [[[child1]]]
      order = 0
      parent = child0
      position = 237
      ratio = 0.5
      type = VPaned
    [[[child2]]]
      order = 0
      parent = child1
      position = 368
      ratio = 0.500680272109
      type = HPaned
    [[[child5]]]
      order = 1
      parent = child1
      position = 368
      ratio = 0.500680272109
      type = HPaned
    [[[terminal3]]]
      command = COMMAND1
      order = 0
      parent = child2
      profile = default
      title = NAME-1
      type = Terminal
      uuid = 01e46a5a-0a12-4861-a81e-e376af6041a7
    [[[terminal4]]]
      command = COMMAND2
      order = 1
      parent = child2
      profile = default
      type = Terminal
      uuid = 094d544d-944c-48a7-9960-00370253e799
    [[[terminal6]]]
      command = COMMAND3
      order = 0
      parent = child5
      profile = default
      type = Terminal
      uuid = fe19f601-1963-4af7-8870-f90e289d3d27
    [[[terminal7]]]
      command = COMMAND4
      order = 1
      parent = child5
      profile = default
      type = Terminal
      uuid = 18ebf009-c427-4c2f-8017-78c379a72d31
[plugins]
[profiles]
  [[default]]
    cursor_color = "#aaaaaa"
    font = Monaco 11
    scrollback_infinite = True
    scrollback_lines = 5000
    use_system_font = False

Now, modify your bash script to replace COMMANDN with the actual command you need to run:

#!/bin/bash

## change these to whatever you actually need
command1="echo one; bash"
command2="echo two; bash"
command3="tail -f /var/log/messages; bash"
command4="top"

## Modify terminator's config
sed -i.bak "s#COMMAND1#$command1#; s#COMMAND2#$command2#; s#COMMAND3#$command3#; s#COMMAND4#$command4#;" ~/.config/terminator/config

## Launch a terminator instance using the new layout
terminator -l foo

## Return the original config file
mv ~/.config/terminator/config.bak ~/.config/terminator/config

Running that script will now open a new terminal window with 4 panes, each running one of your commands.

Important: if the command is something that runs and then exits (as opposed to something like top which runs until you tell it to stop), you need COMMAN; bash as the command so that a new shell will be started. Otherwise, the command will run and the shell will exit immediately. That's why I have ; bash after each command except top in y script.


Why is my GRUB displaying so many options?

To boot Windows 8, you need to select

Windows 8 (loader) (on /dev/sda4)

I understand that you want to tidy up the menu. This can be done most easily with the program grub-customizer. It's available from  ppa:danielrichter2007/grub-customizer  (Click here for instructions on using PPAs.)

So to install it on your Ubuntu system, run the following commands:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

Then, launch grub-customizer. After it has loaded your configuration and detected all locally installed bootable stuff, you should see a list like this:

You can rename items by double-clicking them.
To create submenus (folders) to group several similar menu points to one entry, select all items you want to group and chose Create submenu from the right-click context menu or the Edit menu.

Changes will not be applied until you click the Save button, or close the window and chose Save & Exit from the appearing dialogue.


Is there a way to use firefox favicons with alt-tab?

If you're using Ubuntu 11.10 or newer, you can press Alt+` (the key to the left of 1 and below Esc), to switch between the windows of the same application.

It shows smaller resolution images of whatever is shown in the windows. Below is a sample screenshot:


Can't get fullscreen resolution on Ubuntu hosted on VirtualBox

Go to the VirtualBox options while in your VM (the same place you went to to install Guest Additions) and select View -> Auto-resize Guest Display. This should automatically set your VM's resolution to the proper screen size.


What are the steps to install windows 7 on virtual box in ubuntu 14.4lts?I have version 4.3.10 virtual box and I do not see a extension pack for it

took me some time to find the Extensions

The version in Ubuntu is 4.3.10-93012 if you go straight to the latest you will get a version mismatch error. Here is the good one for the current version in 14.04LTS:

VirtualBox Extension Pack-4.3.10-93012

Should there be an update it will most surely be a few versions behind the latest, thus bookmark this URL:  Virtualbox Older Versions


Installing Multiple Linux Distros in a single partition

This is written so it can be read all the way through, skimmed, or sections can be skipped. However, I highly recommend looking at the last section ("you might not really be limited to 4 partitions at all") before deciding what to do, in case you have a GPT-formatted disk or otherwise are not subject to the 4-partition limit.

Multiple "Filesystems" on the Same Partition: ...Maybe

Installing multiple Linux systems in the same partition might be possible, but would require heavy modification to the systems, to make them access the correct files.

For example, different OSes will usually use different executables for init. But the executable file for init is always expected to exist at /sbin/init. For this and similar issues, you would at least have to make the systems use highly customized kernel boot arguments. To address some issues, you might have to manually recompile a kernel. You'll also have to deal with changing the default locations where libraries are installed and where they are looked for when a program that uses a library runs, so programs installed in one OS don't use another OS's different versions of the same library (which will sometimes be incompatible). To get package managers to work as desired, you might have to edit their source code and recompile (which would mean you couldn't update them in the normal way).

In principle, this should all be possible. In practice, it might not possible: you'd most likely never get it working to an acceptable level of stability. However, if you do want to attempt this, you might want to look into the possibility of modifying the systems so they chroot into separate chroot jails early during boot. I believe this is possible and may afford the necessary stability. Perhaps others will post answers with specific solutions.

Sharing Swap: Quite Easy, but you can use one or more swap files and no swap partitions!

In contrast, you can and it is quite easy to make different GNU/Linux operating systems use the same swap partition. You will not, generally speaking, be able to hibernate one system and boot into another, but many people don't use hibernation anyway.

In any case, if you're trying to reduce the number of partitions you use, you can do away with the swap partition entirely and use swap files instead. (You can even use the same swap file for multiple OSes swaps.)

But what you should actually do, if you are limited to 4 partitions...

...is make an extended partition. This acts as a container for partitions, and lets you effectively have more than four partitions on a disk with a partition table of a type that supports only 4 "primary" partitions.

To do this, boot from a live CD/DVD/USB flash drive and run GParted. If you already have four partitions, you'll have to remove one first. This can be the swap partition, as virtualxtc suggests--provided you're not hibernated to it. (So shut down or restart properly rather than hibernating, before doing this.)

Here are some screenshots illustrating a simple situation where an extended partition is being created. (Of course the sizes here are unrealistic, as I used a small flash drive to create the screenshots.)

Right-click on the unallocated space (either in the horizontal bar representing the disk, or in the list below it) and clicked New.

Or (left) click on it and click Partition > New in the menu.
Or (left) click on it and press the Insert key.

That brings up the window shown above. Click to the right of Create As and select Extended Partition. (By default it will be Primary Partition, which is not what you want.)

Make the extended partition the maximum size.

Now, inside the extended partition you can create additional partitions as needed, bypassing the 4 partition limit.

You do this in the same way you'd create any partition in GParted... just inside the extended partition, which is acting as a container for other partitions. These partitions are called "logical partitions" to distinguish them from "primary partitions" which are not contained inside an extended partition.

When you have done this, it will look something like this (and then you can click the check mark in the toolbar, to do Edit > Apply All Operations, to apply your changes.

As usual, it's a good idea to make sure that at least all your important files (e.g., documents) are backed up before performing any partitioning.

Finally, you might not really be limited to 4 partitions at all!

As you know, partitions are formatted before they are used. But the disk itself is also "formatted" in a way. Partitions formats establish what kind of data they can store and how the data (usually files) are stored. But a disk is "formatted" with a partition table and other information. There's more than one kind of partition table. A "msdos" partition table (sometimes called an "msdos disklabel" or an "MBR partition table," though "MBR is used in other contexts) is limited to four primary partitions.

But some other partition table types are not limited in this way at all, and you might be using such a type. Of course, if GParted has already told you that you cannot create another primary partition, that is not likely to be the case.

But many hard disks these days, especially disks with Windows 8 on them (especially if it is preinstalled) and disks bigger than 2 terabytes, come formatted GPT.

A GPT (GUID Partition Table) doesn't limit you to four partitions; you can make more without any special effort or workaround. So if you haven't already tried this, I recommend doing so. Sometimes people think they're limited to four but really have a GPT disk and are not limited at all.

One way to find out if you have an "msdos" partition table or another, less limiting, type of partition table is to just try creating a fifth partition (without making it inside an extended partition--extended partitions are generally not possible except with an "msdos" partition table).

Another way is to check directly in GParted. To do this, click View > Device Information. A **Device Information* pane will appear to the left of the list of partitions, under the horizontal representation of the disk.

In contrast, if you have a GPT disk, you'll see "gpt" instead of "msdos." (There are other types of partition table as well, GPT and "msdos" are just the most likely, on a PC.)

Note that, while it is possible to turn a disk with an "msdos" partition table into a GPT disk in GParted (with Device > Create Partition Table...), doing so will "erase" all data on the disk! (That's why I haven't recommend that, as a solution to your problem.)


Native - Many games support running on Ubuntu natively, without Windows 10.
Wine - Wine is a "compatibility layer" allowing some Windows applications to run. However performance isn't great and many games refuse to start.
Dual Boot - You can install Ubuntu and Windows 10 alongside eachother. When you start the computer, you will get a prompt asking which operating system you want to boot into.
VGA Passthrough - A little complex to set up and requires two graphics cards.


How do I get juju 1.11 to bootstrap on a private OpenStack cloud?

You'll need to create a second bucket, called juju-dist, where you upload the image data files. Then add

public-bucket-url: <URL TO JUJU-DIST BUCKET>

to you environments.yaml file. That should resolve the "could not find precise image" error.


14.04 - Disable SSID broadcast on Wifi Hotspot on Ubuntu Laptop

SSIDs in 802.11 protocol are defined as 0-32 byte octets. It is indeed possible to "hide" your hotspot and the process is as simple as setting 0 length SSID in your beacon frames. According to the protocol, clients should not show SSIDs with "null" or "zero length" names.

Regular routers have that option in their control panels as "Don't broadcast SSID" or "Ignore broadcast SSID". By hand the same can be achieved by looking for the following in your hostapd files:

# Send empty SSID in beacons and ignore probe request frames that do not
# specify full SSID, i.e., require stations to know SSID.
# default: disabled (0)
# 1 = send empty (length=0) SSID in beacon and ignore probe request for
#     broadcast SSID
# 2 = clear SSID (ASCII 0), but keep the original length (this may be required
#     with some clients that do not support empty SSID) and ignore probe
#     requests for broadcast SSID
ignore_broadcast_ssid=2

Read more about hostapd at gentoo wiki and its configuration here


I seriously doubt that your system will be still in a useful state after disabling everything but sshd.
For a status list of upstart services do:

sudo service --status-all

For System V services:

sudo initctl list

Disable anything that has a + or is listed as start/running with the appropriate commands. To state the blatantly obvious: if you do this via ssh "service network stop" or the like won't do you any good.


How can I make wmctrl raise the most recently fosused window of an application?

On request, a splitoff of another answer, supplemented with a new section.

Focus history of windows

How to raise the most recently focused window of an application

As mentioned in my comment, currently, there is no focus history of windows. That means that if we need it, we need to create it ourselves. The first script below exactly does that; It keeps track of the currently focused window, and stores the history in a tiny file, refreshed once per second.
The order of the lines is also the order of focus; the top line represents the latest focused window, the last line the "oldest".

To make a script raise the most recently focused window of an application, all we need to do is to read the lines from top to bottom, find the first occurrence of a window of the application, and raise it. That is exactly what the second script does, if you run it with the WM_CLASS of the sought window.

The scripts

The background script, keeping track on focus history. This script is an exact copy of the first one here:

#!/usr/bin/env python3
import subprocess
import time
import os

rootdata = os.environ["HOME"]+"/.focus_history"
open(rootdata, "wt").write("This is an empty line")

def current_windows():
    try:
        return subprocess.check_output(["wmctrl", "-lp"]).decode("utf-8")
    except subprocess.CalledProcessError:
        pass

def convert_format(w_id):
    return w_id[:2]+(10-len(w_id))*"0"+w_id[2:]

def read_data():
    return open(rootdata).read().splitlines()

def get_top(wlist):
    try:
        top = convert_format(
            [l.split("#")[-1].strip() for l in subprocess.check_output(
                ["xprop", "-root"]
                ).decode("utf-8").splitlines() \
               if "_NET_ACTIVE_WINDOW(WINDOW)" in l][0])
        return [l for l in wlist if top in l][0]
    except IndexError:
        pass

if __name__ == "__main__":
    while True:
        time.sleep(1)
        wdata = current_windows()
        if wdata != None:
            wlist = wdata.splitlines()
            # get frontmost window (as in wmctrl -lG)
            top = get_top(wlist)
            oldlist = read_data()
            if not any([top == oldlist[0], top == None]):
                # clean up closed windows
                [oldlist.remove(l) for l in oldlist if not l.split()[0] in wdata]
                # remove possible other mentions of the active window
                [oldlist.remove(l) for l in oldlist if l.startswith(top.split()[0])]
                open(rootdata, "wt").write(("\n").join([top]+oldlist))

Copy the script into an empty file, save it as focus_history.py
The script to raise the latest focused window of an application.

#!/usr/bin/env python3
import os
import subprocess
import sys

lookfor = sys.argv[1]
winhistory = os.environ["HOME"]+"/.focus_history"

for l in open(winhistory):
    wid = l.split()[0]
    wmclass = subprocess.check_output(
        ["xprop", "-id", wid, "WM_CLASS"]
        ).decode("utf-8").strip()
    if lookfor in wmclass:
        subprocess.check_output(["wmctrl", "-ia", wid])
        break

Save it as raise_recent.py.

How to use

make sure wmctrl is installed:

sudo apt install wmctrl

Test- run the first script as a backgrounder with the command:

python3 /path/to/focus_history.py

N.B make sure the script starts before other windows open, else the windows will only be recorded (of course) once they get their first focus.
Call the second script with the command (e.g.)

python3 /path/to/raise_recent.py gedit

...to raise most recently focussed window of gedit.
If all works fine, add the first script to Startup Applications. Note however you probably need to add a break before the script to start, to prevent wmctrl to break. (Although the script shouldn't, since it handles the possible exception).

That's it.


I have this weird issue with my monitor. How can I fix it?

Looking at this part of your question: P4M890 [S3 UniChrome Pro] I noticed you had a video card that is in the group of the OpenChrome drivers. There is some good news and bad news. The Bad news is that it has many graphic related issues. you can see several of them (Most for the 3D graphics part) here: https://help.ubuntu.com/community/OpenChrome

The good news are the following:

On the same link provided above: https://help.ubuntu.com/community/OpenChrome you can see that there is a compiling from source workaround that "probably" could work for the 3D part.

There is also some workaround fixed to disable 3D altogether. By editing the xorg.conf: and adding the following:

Section "Module"
        Disable    "dri"
EndSection

(there are a couple of more xorg.conf edits in the link provided)

There is also a ticket system for bugs detected: http://www.openchrome.org/trac/report/1

(Some of the tickets have ideas and comments about how to fix some of the problems)

Lastly, if not downloaded already (It should be downloaded since it is done by default), download the xserver-xorg-video-openchrome package. And tell xorg.conf to use the following driver in the Device Section:

Driver "openchrome"

One final note, some links point to downloading the proprietary VIA driver for this from here: http://linux.via.com.tw/support/downloadFiles.action for what I could see it is very abandonware since the only one I found there was the 9.04 version driver.

Anyway you have several options that might help, others that might help and a little bit more complicated and the last ones which are just to eliminate 3D completely.

If the file xorg.conf is not found, you can created by doing the following:

Boot the system in Recovery Mode. You can do this by pressing ESC or leaving the SHIFT key pressed until the GRUB menu appears. Select Recovery Mode (Should be second option).
After booting go to the terminal as root. There is an option that tells you if you want to log in the terminal.
Type X -configure. The X is in upper case. This will create the file xorg.conf.new in your current home directory.
Test to see if the file is working by doing this X -config xorg.conf.new. If a gui environment appears and looks good then you can do the following step. If not, I suggest editing the xorg file and changing anything you need until it looks good. You can edit with nano: nano xorg.conf.net doing any modifications and save by pressing CTRL+X and pressing Y to save and quit.
Copy the new xorg file: cp xorg.conf.new /etc/X11/xorg.conf
type exit or reboot to test it out.


Does Preload in conlict with other read-ahead type processes?

Well I have been using preload for some years on all my ubuntu installations and never had any problems. And I'm quite prone to tinkering with the system.

Even the launchpad preload bug's page does not list any direct conflicts.

I would say you are safe.


Ubuntu 15.10 full freeze (maybe intel hd graphics kernel failure)

I have an issue that sounds pretty similar also on an N3540 CPU. I'm pretty sure this kernel bug may be the culprit, as the identified workaround fixed the problem for me.

https://bugzilla.kernel.org/show_bug.cgi?id=109051

Looks like it has something to do with the Baytrail CPUs changing to a different c-state (idle power state). The consensus seems to be that a workaround is limiting the c-state to a max of 1 by setting the kernel parameter intel_idle.max_cstate=1. Presumably, with a cost of less power savings when your machine is idle.

Instructions for setting kernel parameters:

https://wiki.ubuntu.com/Kernel/KernelBootParameters


As a compilation exercise, it is just about possible to force google-gadgets to compile - however I'm doubtful whether google-gadgets for the desktop is useful since Google themselves has discontinued support

Thus this answer will give you enough pointers to achieve this under 11.10:

How to compile:

Install the prerequisites:

sudo apt-get install build-essential bzr autoconf libtool

sudo apt-get install build-essential zip flex desktop-file-utils shared-mime-info zlib1g-dev libgtk2.0-dev libxml2-dev libdbus-1-dev librsvg2-dev libcurl4-gnutls-dev libgstreamer-plugins-base0.10-dev network-manager-dev libqt4-dev libstartup-notification0-dev libltdl-dev libqt4-dev

get the source

cd ~/Downloads
bzr branch lp:googlegadgets
cd googlegadgets/

to generate something to compile

sh autotools/bootstrap.sh
./configure

to compile

Now - this isnt straightforward since there is various parts of the code that dont compile in 11.10.

Thus it is interative - fix and then run make.  Repeat this until it fully compiles.

The files to edit are:

gedit ggadget/gtk/single_view_host.cc &
gedit ggadget/dbus/dbus_utils.cc &
gedit extensions/gst_video_element/gadget_videosink.cc &
gedit extensions/linux_system_framework/network.cc &
gedit extensions/linux_system_framework/wireless.cc

To take a purist approach - you'll need to replace the code with 11.10 equivalents.  Taking the blunderbuss approach ... I just commented out the various sections, or where an int variable needs to be assigned - just assigned it a value of 0.

Obviously - just commenting out code will leave these areas non-functional - I'll leave that to an interested person to investigate the 11.10 equivalents...

Use the make error to comment out the relevant sections ( 'C' comments are /* ... */ and // ...)

to install

sudo make install

to run

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
gg-qt &


Does Ubuntu App Showdown Allow Inventive Games?

Absolutely, feel free to submit innovative games!


You can restart it by

sudo service network-manager restart


Wallpaper change crontab jobs not working after upgrade from 8.04 to 10.04

Does your script include a call to gconftool-2 to set the wallpaper?  This relies on certain gnome / dbus environment variables being set, and they won't be set in the environment in which cron runs.

For a workaround see here:

For a bug report on this, see here:


How do I solve a thermal issue on my HP dv6 laptop?

I've had a dv7 for years (I think from Ubuntu 10.04). Of course it is not Sandy Bridge, but I have the same issue. After a lot of tries during these years I understood there is nearly no way to avoid the heat. But this is normal and doesn't harm your laptop.

Important note: This is a personal experience on a laptop different than yours. May be you were more lucky than me and find a good way on your computer.


First of all, you have to tell your Mail Transport Agent (MTA, in your case postfix) which sender is allowed to send e-mail, additionally you have to tell him, how you want to send it - via an Internet Service Provider, or via a company network? Even if you want to "send an email from the terminal" a mail program is doing the work (e.g. bsd-mailx).

It's essential to get some knowledge about the functions of a MTA, of mail programs and about Spam.
You could start here: https://help.ubuntu.com/community/PostfixBasicSetupHowto

After you decided how you want to send your emails you could ask some more specific questions, depending if you want to build up an Internet Site, an Internet smarthost, a satellite system or a local system.


Is it safe to zpool upgrade my boot pool?

Given that I already have another computer running 20.04 on ZFS with all feature flags enabled, I decided to upgrade my server to 20.04 and then take the chance and run zpool upgrade (after verifying that both machines had the same versions of grub and zfs). It worked! My server still boots just fine. So while I can't say anything about 19.10, I can say that as of 20.04, running zpool upgrade on your boot pool should not render your machine unbootable.


Where can I find the directory structure and important files paths explained?

For a more detailed documentation, in particular, on Ubuntu systems, install the following package:

sudo apt-get install ubuntu-policy

And see this document:

/usr/share/doc/ubuntu-policy/fhs/fhs-2.3.txt.gz


How do I get video to unfreeze in (X)ubuntu 12.04 with Skype?

Which Ubuntu are you using?

If you're using 12.04, you may install kernel 3.4.0 to solve the problem of skype video freezing. Hoping it is the same problem I had an not something else.

Go to http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.4-precise/ and download the three files according to your architecture. Then you have to install them (using Software centre didn't work for me).

Open a terminal (Ctrl + Alt + T). Go to the folder where you downloaded the files by using "cd ~/Downloads" (change the path as necessary). Then type :
sudo dpkg -i *.deb

Reboot your machine and you should notice that the first grub line had changed to the new kernel (the installation updates Grub). If you have problems with it, you can always boot using one of the old kernels.

This was in an e-mail sent to me


`sudo`, `gksu` and `gksudo` without password

First, a note about the security systems involved: sudo and gksudo are governed by sudoers, but much of the GUI uses polkit, whose configuration is independent of sudoers. There are not many common factors:

Ubuntu uses the sudo group to grant administrative privileges in both systems.
Both support PAM, so PAM configuration can affect both.

In particular, Fedora's default PAM configuration has:

$ grep 'auth.*pam_unix' /etc/pam.d -R
/etc/pam.d/password-auth-ac:auth        sufficient    pam_unix.so nullok try_first_pass
/etc/pam.d/system-auth-ac:auth        sufficient    pam_unix.so nullok try_first_pass
/etc/pam.d/system-auth:auth        sufficient    pam_unix.so nullok try_first_pass
/etc/pam.d/vmtoolsd:auth       sufficient       pam_unix2.so nullok
/etc/pam.d/vmtoolsd:auth       sufficient       pam_unix.so shadow nullok
/etc/pam.d/vmtoolsd:auth       required         pam_unix_auth.so shadow nullok
/etc/pam.d/password-auth:auth        sufficient    pam_unix.so nullok try_first_pass

Contrast Ubuntu:

$ grep 'auth.*pam_unix' /etc/pam.d -R
/etc/pam.d/common-account:account   [success=2 new_authtok_reqd=done default=ignore]    pam_unix.so
/etc/pam.d/common-auth:auth [success=2 default=ignore]  pam_unix.so nullok_secure

The important point is nullok_secure being set for pam_unix in Ubuntu vs nullok in Fedora. According to man pam_unix:

nullok
   The default action of this module is to not permit the user access
   to a service if their official password is blank. The nullok
   argument overrides this default and allows any user with a blank
   password to access the service.

nullok_secure
   The default action of this module is to not permit the user access
   to a service if their official password is blank. The nullok_secure
   argument overrides this default and allows any user with a blank
   password to access the service as long as the value of PAM_TTY is
   set to one of the values found in /etc/securetty.

Now, /etc/securetty does contain :0 and other command values for graphical sessions, so gksudo, for example, will work with empty passwords.

# Local X displays (allows empty passwords with pam_unix's nullok_secure)
:0
:0.0
:0.1
:1
:1.0
:1.1
:2
:2.0
:2.1
:3
:3.0
:3.1
#...

Polkit, on the other hand, seems to leave PAM_TTY unset, so securetty doesn't affect it. sudo, of course, won't work, since you always run sudo from a terminal, and the pseudoterminal allocated to it (/dev/ptsX) won't be mentioned in /etc/securetty. You can, however, use sudo in the TTYs.

So how do we make Ubuntu like Fedora? Just change nullok_secure in common-auth to nullok:

sudo sed -i.bak '/pam_unix/s/nullok_secure/nullok' /etc/pam.d/common-auth


Yes, I have successfully installed various versions of Ubuntu on VMware products, both Fusion and Workstation. Therefore, if you are unable to install Ubuntu on a virtual environment, I don't think the cause of problem is Ubuntu itself, but I would blame the virtual environment or/and the product in use, such as VMware Player. Make sure you are using the latest version of the product, and that it is updated.

When setting up the virtual machine, you must make sure that the system requirements are met, also the allocated RAM on the VM should be the double of the recommended.

Some information on the community wiki:
https://help.ubuntu.com/community/VMware


Networking is disabled after waking up from hibernation sometimes

I get this problem sometimes, here is how I fix it.  Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo service network-manager restart

Enter your password, and press Enter


How To assign keyboard shortcut to a new application in ubuntu 13.10

Open System Settings -> Keyboard -> Shortcut Tab -> Launchers -> left click Terminal -> press backspace.

Custom Shortcuts -> left click the plus sign at the bottom -> type a name for the shortcut and the BASH (terminal) command to launch Terminator -> left click the shortcut and press ALT+CTRL+T.


If you are inferring to the ME part when in Nautilus and you select Permission for a file/folder, then this Me is simply a short way of saying your username. As seen on this image:

It is a simple way of showing the name. It means that in this case, the owner is you. In regards to creating another user and trying to take over files/folders from your other user, this will not work except if you use the chmod and/or chown commands on it. As a matter of fact, if you created the other user, when you go into this user's home folder and see the permission on any of the files, you will also see ME as the owner, in this case implying that me is the other user.


The list of officially supported devices: https://wiki.ubuntu.com/Touch/Install#Supported_devices_and_codenames


Which security features are disabled when I start wireshark?

Wireshark does not start any services or open any ports, although it may perform network activity if you have it configured to resolve IP addresses to DNS names.

If you wish to avoid running Wireshark as root, you can use the following command in a terminal:

sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/dumpcap

This gives additional privileges to the dumpcap tool, which is the back-end of Wireshark which actually performs the packet sniffing, so that the entire Wireshark application does not need to run with root privileges.

More information about Wireshark privileges on Linux is available here.


Ubuntu on Micromax Funbook Pro With Cortex A8 processor

An ubuntu image for this tablet isn't available probably. Installing ubuntu on x86 arch (All PC processor) isn't same as these tablets which are based on ARM architecture. You need special imanges. Currently ubuntu image is only provided for Nexus 7 tablet.

However, Installing ubuntu as virtual system and using it via VNC is pretty easy.

First you need to root your device (rooting voids warranty, be careful to review other side effects that may happen including a complete brick)

This can help - Rooting guide

Use Complete Linux Installer app & andriod VNC.

A complete step by step tutorial can be found here

I don't have this device, neither I did any tests. This answer is based on search on internet.
You won't get much help in this Q&A site.Because ubuntu doesn't support your tablet. It is better to head for XDA dev forum.


Passing commands as a string to shell sudo bash –c "ls -l /home" gives the error bash: –c: No such file or directory

If you use bash it is to execute a script

bash /path/to/myscript.sh

You don't need it to execute a command in shell, simply do

ls -l /home

The error you get is because option -c does not exist.
In order to see the options of your command you can do

bash --help


How do I set a click action on zenity --notification?

The request to perform an action when you click on the Zenity notification icon is a long standing request.

According to the associated bug-report, it was proposed to perform this action when you pass a parameter like --cmd= - an example use-case was to invoke the terminal window when the notification was clicked i.e. by passing the parameter --cmd=gnome-terminal

However, this is still outstanding, awaiting for a budding coder to take this forward.


Zotero reference manager installed from snap cannot process files via Firefox connector

There may not be a specific interface to handle this communication with your browser. As a workaround, install the snap without confinement, i.e. in classic mode. For this, you need to remove the current installation and reinstall it with the --classic option:
sudo snap remove zotero-snap
sudo snap install zotero-snap --classic


Ubuntu 17.04 installation from USB doesn't work/boot

Alright I've solved the problem after looking at the link provided by MichaelBay. Apparently it was some kind of driver issue caused by my graphics card. Here's what I did:

plug in the USB stick, select UEFI boot option in boot order of motherboard, boot into grub menu
press e to edit boot settings, change quiet splash to nomodeset, boot with F10
follow Ubuntu installer
reboot, at reboot repeatedly press Shift to get into the grub menu, hover over 'Ubuntu' and again press e and change quiet splash  to nomodeset and boot with F10
in Ubuntu use sudo apt update and sudo apt upgrade
repeat 4.
launch 'Software & Updates' program, switch to tab 'Additional Drivers' and switch to the proprietary driver by NVIDIA
reboot regularly

Now I can use my system normally.


Is the wireless driver from Live USB different from the standard install?

Turns out that, after a long struggle with Ubuntu over my internet connection, I found that switching from Unity to Gnome 3 solved the issue. I guess both interfaces use different network managers and Gnome's one keeps connection stable.

I mark this answer as accepted since it eliminates the issue. If a more precise/detailed one comes up (i.e. instructions to install Gnome's network manager into Unity) from a more experienced user, I'll choose it.


Chrome and Chromium have this functionality built-in. They call it Application Shortcuts. Instructions to use it are here.

  Click the wrench icon  on the browser    toolbar.
  Select Tools.
  Select Create application shortcuts.
  In the Gears dialog the appears, select the checkboxes for the
  locations where   you want shortcuts
  to be placed.
  Click OK.


Ubuntu 18.04 cannot connect Bluetooth to Android phone

There are a number of reasons why you may not be able to connect to a Bluetooth device, such as a phone or headset.

Connection blocked or untrusted

Some Bluetooth devices block connections by default, or require you to change a setting to allow connections to be made. Make sure that your device is set up to allow connections.

Bluetooth hardware not recognized

Your Bluetooth adapter or dongle may not have been recognized by the computer. This could be because drivers for the adapter are not installed. Some Bluetooth adapters are not supported on Linux, so you may not be able to get the right drivers for them. In this case, you will probably have to get a different Bluetooth adapter.

Adapter is not switched on

Make sure that your Bluetooth adapter is switched on. Open the Bluetooth panel and check that it is not disabled.

Device Bluetooth connection switched off

Check that Bluetooth is turned on on the device you are trying to connect to, and that it is discoverable or visible. For example, if you are trying to connect to a phone, make sure that it is not in airplane mode.

No Bluetooth adapter in your computer

Many computers do not have Bluetooth adapters. You can buy an adapter if you want to use Bluetooth.

Also Check the link below

https://help.ubuntu.com/stable/ubuntu-help/bluetooth-connect-device.html.en


new dyndns server at home needs more security

Disable password based authentication and change SSH port to something else, would probably keep you relatively safe against brute-force attacks. (that's done through sshd config file).

Additionally if you know IPs of folks who need to access your home server you can tweak iptables to only allow connections from those IPs.


What you are seeing is a leftover in the Windows boot loader.

Quote from https://wiki.ubuntu.com/WubiGuide/#Uninstallation on how to remove it:

In Windows XP you need to edit C:\boot.ini and delete the Ubuntu/Wubi
line. Alternatively you can modify the boot menu via Control
Panel > System > Advanced > Startup and Recovery and pressing "Edit".

For Windows 98 you have to edit C:\config.sys and remove the Wubi block.

For Windows Vista/7, you can use the built-in bcdedit command or install
EasyBCD to edit the boot menu. To use bcdedit, run cmd.exe as an
administrator, then enter bcdedit to show all boot entries, note the {GUID}
specified for the Ubuntu entry, and then remove it: bcdedit /delete {GUID}


You can bind ESC to the Readline function unix-line-discard:

bind '"\e": unix-line-discard'

To make the change permanent, add the command to ~/.xinputrc:

printf "bind '\"\\\e\": unix-line-discard'\n" >>~/.xinputrc

And source ~/.xinputrc in ~/.bashrc:

printf 'source ~/.xinputrc\n' >>~/.bashrc

To load the change also in the current shell, source ~/.xinputrc:

source ~/.xinputrc

This is a Bash feature, so it will work across any terminal, unless the terminal is hijacking the ESC key itself, for example if ESC is part of a terminal-specific keystroke, in which case you'll have to disable the offending keystroke in the terminal.

See also help bind and bind -P for a list of the available Readline functions and the keys / keystrokes they're currently bound to.


What is a good way to create a low cost Ubuntu based Cassandra or Hadoop Cluster in my house?

A number of companies now produce small "laptop in a box" PCs that can be used as small scale internal servers running Ubuntu, etc.  A quick check reveals that the Intel NUC, Gigabyte BRIX, ASUS Vivo, and Zotac ZBOX are all pretty strong contenders.

These boxes all come with Intel i5 or i7 multi-core CPUs and can have up to 32GB of RAM and support M.2 and 2.5 inch SSD drives.

Since they are laptop CPUs and SSD drives, they make almost NO NOISE and require very little power!  For an internal development environment, they have plenty of power.  Most come with integrated 4K video cards and HDMI ports to connect a monitor.

I personally have 4 connected to a 4 port Keyboard/Video/Monitor switch that allows me to switch between them quickly.  But they can be run as headless servers with ssh access from your main machine as well - much like you would do in AWS anyways - without the monthly bill.


Installing Broadcom Wireless Drivers for "Chip ID": BCM4360, "PCI-ID": 14e4:43a0 (rev 03) on Ubuntu 14.04

AFAIU, bcmwl-kernel-source is correct, so I suggest you reinstall it:

sudo apt-get install --reinstall bcmwl-kernel-source
sudo modprobe wl

Now check the logs for informative messages:

dmesg | grep wl

It appears that, although you have a 3.16.0-xx kernel (thanks, @Jeremy31!), apt has tried to install the version for Ubuntu 14.04. I suggest you remove the version that failed to install:

sudo apt-get purge bcmwl-kernel-source

Download these packages to your desktop: http://packages.ubuntu.com/utopic/bcmwl-kernel-source and also: http://packages.ubuntu.com/utopic/dkms Be sure to get the 32- or 64-bit version as needed. Find out with:

arch

For example, if it returns x86_64, then you need the 64-bit version; known at packages.ubuntu as amd64.

Install the packages with:

cd ~/Desktop
sudo dpkg -i *.deb
sudo modprobe wl

Again, note and post any errors.


Ubuntu doesn't work with 3d acceleration in virtualbox

You need to install the VirtualBox additions for your virtual machine and also enable the 3d support in your virtual box settings.

Have you done both?


How can I install such a kernel?

If you supply the package version etc it should install that version

sudo apt-get install linux-image-3.13.0-24-generic

If for some reason you want to install loads of kernel, note that if you have a /boot partition, or a small root one you will likely run out of disk space, so the system won't boot.

Also, if you want to use a particular driver which only works with a certain kernel version, please make a question relevant to this

What command should I give in the terminal to start a kernel?

Kernels are the base part of system, so generally you need to reboot to change what is running at the core (probably not with linux kernel 4+ on some OSs with some updates though).

So change which kernel you are using you can reboot and show GRUB, then you can select to use the kernel - (The nearest command is sudo reboot which will reboot the system). By default it will choose the latest one (usually recomended for security stuff)

See also:

Set "older" kernel as default grub entry
How do I remove old kernel versions to clean up the boot menu?


How to change network interfaces' priority

Prioritising interfaces for general traffic is done by manipulating the routing metrics.

Each route has associated parameters such as hop-counts and bandwidths. See netstat -nr and the "metric" option in the man-page for route command.

For very simple control of metric use ifmetric tool:

sudo apt-get update

sudo apt-get install ifmetric

Once installed use it to change metric value for interface,
 refer this http://manpages.ubuntu.com/manpages/vivid/man8/ifmetric.8.html


How to Update Ubuntu 14.04 to 15.04 in dual boot mode with windows 7?

You should be able to boot from the Install DVD, select install ubuntu, and there should be an option to upgrade to 15.04.  This should not drastically impact disk space (no more than a few hundred MB).


Extracting all PDF Links from Multiple Websites

I would create a separate (text) file with all url's listed in single lines:

www.url1
www.url2

Then change the line in the script to append the found pdf links to the produced pdflinks.txt (tee -a pdflinks.txt | more instead of tee pdflinks.txt):

lynx -cache=0 -dump -listonly "$WEBSITE" | grep ".*\.pdf$" | awk '{print $2}' | tee -a pdflinks.txt | more

Then make the script executable and run it by another (python in this case) script:

#!/usr/bin/python3
import subprocess

url_list = "/path/to/url_list.txt"
script = "/path/to/script.sh"

with open(url_list) as sourcefile:
    sourcefile = sourcefile.readlines()
for item in sourcefile:
    subprocess.call([script, item.replace("\n", "")])

Paste the text above in an empty document, add appropriate paths and save it as run_pdflinkextractor.py and run it by the command

python3 /path/to/run_pdflinkextractor.py

More options

You didn't actually ask for it, but in case you would like to download the found pdf links, it is a pity to stop half way. The script below might be handy to do that. The procedure is the same: paste the text below in an empty file, save it as download_pdffiles.py, add the path to the pdflinks.txt that was created in the first step, the path to the folder you would like to download the files to, and run it by the command:

 python3 /path/to/download_pdffiles.py

The script to actually download the files:

#!/usr/bin/python3

import subprocess

pdf_list = "/path/to/pdflinks.txt"
download_directory = "/path/to/downloadfolder"

with open(pdf_list) as sourcefile:
    sourcefile = sourcefile.readlines()
for item in sourcefile:
    subprocess.call(["wget", "-P", download_directory, item.replace("\n", "")])

You can of course add more options to the script, what to do in case of errors for example (errors are ignored in the script as it is). See man wget for more options.


Disable USB Mass Storage from Standard User on Ubuntu 17.04

In addition to adding the line blacklist usb_storage to /etc/modprobe.d/blacklist.conf, you also have to:

add the following line to /etc/rc.local just before exit 0:

modprobe -r usb_storage

Then reboot.

Then, [only] Users with administrator privileges will be able to mount USB storage devices by typing:

sudo modprobe usb_storage


From the ^M you can see that the file myscript.py is using windows/dos-style line breaks (Windows uses CR LF (carriage return + line feed) at the end of a line. Unix only uses LF - so what you see as ^M is the CR. So what you are not using /usr/bin/python but /usr/bin/python<CR> that does not exist.

You can remove the ^M using dos2unix (do a sudo apt-get install dos2unix to install and then use dos2unix myscript.py).


Is it possible to run Docker container and show its graphical application window on host?

We need to inform container about running X11 server on host with special syntax [1]:
docker run -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --user="$(id --user):$(id --group)" ubuntu:xclock

where [2]:

-e, --env=[]
Set environment variables
-u, --user=""
Sets the username or UID used and optionally the groupname or GID for the specified
command.
-v|--volume[=[[HOST-DIR:]CONTAINER-DIR[:OPTIONS]]]
Create a bind mount. If you specify, -v /HOST-DIR:/CONTAINER-DIR, Docker
bind mounts /HOST-DIR in the host to /CONTAINER-DIR in the Docker
container. If 'HOST-DIR' is omitted,  Docker automatically creates the new
volume on the host.  The OPTIONS are a comma delimited list and can be:

Reference:

https://forums.docker.com/t/x11-forwarding-with-v-on-docker-run-not-working/17708/4
man docker-run

Complete reproducible solution:
mkdir ~/docker-xclock

cat > ~/docker-xclock/Dockerfile << EOF
FROM ubuntu:20.04
RUN apt-get update
RUN apt-get install -y x11-apps
CMD xclock
EOF

docker build -t ubuntu:xclock ~/docker-xclock

docker run -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --user="$(id --user):$(id --group)" ubuntu:xclock


How do I access the `aptitude why` functionality through Aptitude’s interactive interface?

If you start aptitude in its gui (with ncurses) you can browse packages. While you're on a package name, hit I and see information in the status bar. Hit I until you are shown something like

i     kubuntu-desktop Depends anacron

or

unable to find a reason to install <package-name>

That's the aptitude why

Here is a screenshot


01-netcfg.yaml file is not showing inside /etc/netplan after upgrade to Ubuntu 18.04

A search on packages.ubuntu.com shows that NO package provides this file.

/etc/netplan/01-netcfg.yaml describes YOUR particular network configuration, and, as such, is a file that you have to create.

Begin by reading man -a netplan


How can I set the default terminal? Preferably from the command line

sudo update-alternatives --config x-terminal-emulator

Should run something like:

$ sudo update-alternatives --config x-terminal-emulator

There are 7 alternatives which provide `x-terminal-emulator’.

Selection Alternative
———————————————–
    1 /usr/bin/xterm
    2 /usr/bin/uxterm
    3 /usr/bin/koi8rxterm
    4 /usr/bin/lxterm
*+ 5 /usr/bin/gnome-terminal.wrapper
    6 /usr/bin/konsole
    7 /usr/bin/xfce4-terminal.wrapper

Press enter to keep the default[*], or type selection number:


Windows 10 dual boot - Ubuntu/GRUB disappeared

Im using windows 8.1 os, and i was able to use a windows compatible boot loader to show both options windows and ubuntu. Try easy BCD, the instructions are on the web, but let me know if you still need help.


Change background color/colour displayed in FVWM

Okay,  I was using gdm as the login manager.  I switched to lighdm (which, I think is the default in 11.10) and I got a much nicer background theme.


Automatic login no longer working in 19.10

Thanks to the above answer, I solved like this:

Edit grub config with sudo nano /etc/default/grub

locate the line starting with GRUB_CMDLINE_LINUX_DEFAULT and empty it or at least remove splash

GRUB_CMDLINE_LINUX_DEFAULT=""

save and run sudo update-grub

Edit GDM config with sudo nano /etc/gdm/custom.conf and set

AutomaticLoginEnable = true
AutomaticLogin = <your user here!>

reboot (sudo reboot) and it should login automatically.


How to enable autologin but still require password

Enable auto login.

Check whether you have installed gnome-screensaver by running following command.

sudo dpkg --get-selections | grep gnome-screensaver

If it is not installed run following command to install gnome-screensaver.

sudo apt-get update && sudo apt-get install gnome-screensaver

Add this command on Startup application.(To open startup application preferences search "Startup applications" on Unity dashboard.

/usr/bin/gnome-screensaver-command -l

This screenshot is a Unity screenshot. But this works on GNOME shell without any modification.

Latest Ubuntu version has a command called loginctl. You can replace startup command with below command and get the same thing done.

loginctl lock-session


Why does this fail to make my postfix configuration step non-interactive?

I'm setting them like this:

debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'"


I have figured out what the problem is. This is an important change that needs to be made in /etc/postfix/main.cf.
You must ensure that if it exists, the following line is commented out or deleted...

#sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost_map

If that line is not commented out, obviously postfix goes looking for a relayhost_map (which does not exist if the tutorials are followed).

Hope this helps someone else... the google cloud tutorial on this is incomplete, as is the sendgrid one.


Yes.  Install Ubuntu on the USB stick.  It'll then run no different (except for speed) than running off your hard drive.  The performance should be better than what you are getting when trying to run under the Try Ubuntu option.

You can also consider installing Ubuntu on the computer as a multiple boot configuration so that by default the computer boots into their OS and specify your OS when you are ready to boot to your environment.


Error while trying to post $PS1 on my terminal

The output you see there is no error at all its simply the actual contents of your command prompt.

Coming to the point you pointed out in comments. You nearly had it right. You should use PS1= to set the input prompt and not $PS1. To get it to show the user name and the hosts name your approach was as well slightly wrong the full line for that would be:

PS1='[\u@\h]'

Or if you want the simple Ubuntu style prompt:

# For use with force_color_prompt=true
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

# The normal one
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

On top of this saying, as long you not changed the lines in your .bashrc file or in /etc/bash.bashrc you can simply close your terminal and reopen it again, if you're on a GUI that is. This as well will reload the .bashrc file and restore your command prompt.


16.04 LTS upgrade alert- How to handle it?

The upgrade will not delete your files and installed software.

It will upgrade all software installed from Ubuntu repositories to new versions.

Please take in account that an upgrade can fail. There is no 100% guarantee it is successful.

If you are not sure, select "not now".


Keyboard shortcut reset every other reboot

Okay, think a may have found a solution after this has been bugging me for month. After uninstalling Compiz Config Setting Manager my minimize window key bindings have survived 3 reboots. (Another reason not to install CCSM unless you absolutely have to.)

I'll check if there's a bug report on this.

Meanwhile uninstalling CCSM is a solution for similar problems ...


You can zero-pad letters too, you just need to alter my original command slightly to:

rename 's/\w+/sprintf("%05s", $&)/e' *.jpg

We're basically just saying, replace the first "word" (numbers and letters) with a zero-padded string. It's very similar to the original, it's just slightly different. This version wold work for the original problem.

You could expand it into a .+ match (to zero pad everything), but then you might need to handle the extension on top.

Test harness:

$ mkdir test; cd test; touch {a..d}.jpg 1.jpg
$ rename 's/\w+/sprintf("%05s", $&)/e' *.jpg
$ ls
00001.jpg  0000a.jpg  0000b.jpg  0000c.jpg  0000d.jpg


how to correct glib-2.35.x 'g type_init is deprecated' error when compiling from source

(I don't actually know what that means)

What is means is that starting with glib version 2.35.0, the function g_type_init should no longer be used because the intention is to remove it from the library at some point in the future.

So when compiling older glib programs against glib version 2.35.0 or greater, you should edit the code to put a test around g_type_init

#if !GLIB_CHECK_VERSION(2,35,0)
g_type_init ();
#endif

At first this looks as if g_type_init will only be excluded for glib 2.35.0 but the macro LIB_CHECK_VERSION is in fact defined to return true for the same or greater/newer version than that specified.

  Wonder if there is an easy way to tell the compiler to use the old version of glib

You can instruct the compiler and linker to use an older or newer version that the default, but obviously you need to have that version installed which may very well lead to problems with other programs trying to use the wrong version of the glib library.

So, as a general rule, only install multiple versions of library as a last resort, extra especially so for general purpose libraries such as glib which is used by so many programs.

  to ignore werror checks.

The -Wall flag on the gcc command tells gcc to flag all warnings, and for a few years now, the default state of gcc is to treat all warnings as errors.  If you ask this question on many sites, responders will simply tell you to do a web search.

If you were to check the manual page for gcc, you would find that the best way to deal with the specific issue of a deprecated function is to add

-Wno-deprecated-declarations

to the gcc command in order to just ignore that and still keep the safety of checking for all other warnings with -Wall


What is the proper way to update packages? Software Updater isn't updating all of my software

Update manager does update all of the software, but I can see how you got that impression.

How upgrades work:

Your package manager or updater downloads a list of software available. The updater does that automatically every day (or whatever time you configured).
Based on that list, it then shows what updates are available.

In particular, if it downloaded that list automatically less than one day ago, it might only show upgrades which have already been available yesterday. Manually calling apt update or clicking the update button will download a new list right now. After that both the updater and apt upgrade will show you the newer upgrades as well.


Huawei broadband modem internet connection using wine

You can't use windows drivers with wine in Ubuntu. What is  the model number? Just plug in the modem & follow these steps for 3G on help.ubuntu.com.

If it does not work, then open terminal( CTRLALTT) write this commands (modem still plugged in)

lsusb
usb-devices


What data counters / meters are available?

System Monitor

It is default in ubuntu ,you can see speed and data count in it :)

Nanny

A parental control tool for ubuntu .It needs more improvements ,but still works.It is available in software centre

Here is some usefull links:

http://ubuntunigeria.wordpress.com/2010/08/18/monitor-your-data-usage-on-ubuntu-easily-using-ntm
http://www.ubuntugeek.com/bandwidth-monitoring-tools-for-ubuntu-users.html


Deleting cities in the ubuntu touch clock app

Found it. You have to push the entry to the right, then a garbage bin will appear on the left side. This also works in for example Notes.


I reinstalled gdm

sudo apt-get install gdm

and then did startx which took me back into Gnome desktop.


Unable to install the kernel 3.5 in Ubuntu 12.04

Suggest amending your GRUB2 menu to add the option for the alternate kernal. Specific instructions are provided at How can I repair grub? (How to get Ubuntu back after installing Windows?) so you may add the older kernel.


Show all pictures recursively (include any subfolders)

Not an application but an useful tool to recursively show the pictures of a folder and a subfolder:

feh --recursive --auto-zoom --geometry 1600x1000 ~/Pictures

It can also generate an image with the thumbnails:

feh -r -i ~/Pictures -O index.png

It is not exactly what you (and I) were looking for, but it is the only option I have found in Linux at the moment to recursively explore the images of a directory.


You can disable the handling of F10 in GNOME Terminal's Preferences dialog, General tab.

While at it, you might also want to disable Alt+letter mnemonics here, as well as F1 (and if required, F11 too) under the Shortcuts tab.


This is because your BIOS settings is enabled with Network boot option.

Everytime it boots, it checks to see if there is a TFTP server sitting on the other side is giving image for network booting. This is not your case.

Since you already have a Ubuntu running locally, please go to BIOS during boot and disable the network boot option. Then your problem is resolved.

Concluding in a single line, just "Disable network boot option in BIOS settings".


It is likely that this is not because of system speed, but because of how Firefox is configured to handle scrolling.

Start by typing about:config in the address bar. This will provide you with access to detailed Firefox settings.

Once there, search for scroll and you will find tons of values that address scrolling speed, animations, and behaviour.

If you are scrolling with mouse wheel, you may significantly increase scroll speed by increasing the value of mousewheel.min_line_scroll_amount. This setting is the amount by which a page is scrolled when you turn your wheel for one tick.

If scrolling is slow when using the scrollbar, you may wish to disable smooth scrolling animation, which may be causing some slight lag. To achieve that, set general.smoothScroll to false.

It may be required to restart Firefox before these changes take effect.


HDMI used to work like a charm in 10.10. I was surprised to find out that it doesn't work anymore after upgrading to 12.04. I specifically waited until 12.04 to upgrade as it seemed that the drivers were in good shape.

Since I use my dell to give presentations every week, I just boot to windows and setup the dual screen. Then, when I boot back to Linux, it magically works -- the chipset keeps the settings and ubuntu doesn't overwrite them. It gets the job done.


Use gdebi to install free office.
To do this open a terminal and type  the following command.

sudo apt-get install gdebi

Once gdebi is installed,right click on the .deb file and select open with gdebi as shown below.

Now you will see the gdebi window,click on install package.


Are there any download managers with web interface?

Aria2 has a pretty good web gui, http://aria2.sourceforge.net

Scroll down to the bottom of the homepage.


Remote access to Ubuntu 18 not working from Win 10 with TeamViewer

Ubuntu doesn't contain Remote Desktop Protocol server on default install. If you like to use windows remote desktop, you need to install and configure rdp server to your computer.

Here is an explanation on Ubuntu wiki:

https://help.ubuntu.com/community/xrdp


View history of commands run in terminal

This is automatically done. Bash stores your commands in ~/.bash_history. If you want to have a look at the history, either print the output of this file using one of

cat ~/.bash_history
less ~/.bash_history
...any other pager or output command...

Or you can use bash's builtin command:

history

To clear the history, delete the file and clear the temp history:

rm ~/.bash_history && history -c

The history size defaults to 500 commands. You can, however, increase this by adding a line to your ~/.bashrc file to set the HISTSIZE variable:

HISTSIZE=<number of entries, -1 for unlimited>

This will not take effect immediately, but only to newly started sessions. To apply this, re-source the .bashrc file:

. ~/.bashrc

or run HISTSIZE=... in your current session.


These are all the symptoms of a broken USB stick.  Please replace it.

To be absolutely sure that it is indeed broken, install the smartmontools package:

sudo apt-get install smartmontools

then run:

sudo smartctl --all /dev/sdd

and depending on the error message you'll know for sure that it's broken.

Sorry to be the harbinger of bad news


Having trouble installing Dlink dwa-182 ac1200 wifi adapter

Discussion in Xenial 16.04: D-Link DWA-182 [aka "Wireless AC1200 Dual Band USB Adapter"] issues
The answer suggested "Software & Updates -> Additional Drivers" update, that did not work for me.

What did work on 16.04 was to bring on the USB stick the directory with the driver code from https://github.com/abperiasamy/rtl8812AU_8821AU_linux
Then "sudo make; make install" followed by a reboot.
Was already running without "Secure" BIOS

If you already have connectivity, like through a wired link, the driver in the official Xenial repo.


How to enable the turbo button on acer predator helios 300 in Ubuntu

I am also looking for a solution to this. What I do is the following: if you have dual-booting with Windows/Ubuntu, you can press the turbo button in Windows, restart your laptop, and then you'll have the fan in turbo mode when you initiate Ubuntu. That's a workaround though.


Try removing Google Chrome with:

sudo apt purge google-chrome-stable

Then:

sudo chown -Rc $USER:$USER $HOME

Finally:

sudo rm -rf ~/.config/google-chrome
sudo rm -rf ~/.cache


HP Envy 15 Speakers Partially Working (Beats Audio)

The subwoofer and rear speakers are not detected in Debian. You need to correctly assign the pins using hdajackretask. To install hdajackretask execute following command in terminal

sudo apt-get install alsa-tools-gui

now run sudo hdajackretask in a terminal. A window will open with many options. Select the proper "Codec" and check the "Show unconnected pins" and now change the pins accordingly.

0x0D -> Internal Speaker

0x0F -> Internal Speaker (Back)

0x10 -> Internal Speaker (LFE) #This is the subwoofer

Now click on "Apply". To make the changes permanent, click on "Install boot override".


Dealing with ubuntu partitions for the first time

Mostly hg8 has provided good answers; however....

  How is it possible that I have 1.02 MiB of space unallocated? Is it necessary to keep it?

The answer to which hg8 has linked on this one is poor. In order to optimize performance on a variety of disks, most modern partitioning tools align partition start points to 1 MiB values by default. (See this article I wrote for technical details and some benchmarks for one particular disk technology.) Thus, there will be a close-to-1MiB gap at the start of the disk, since there's a small bit of space used at the start for partitioning data structures. GParted hides this gap because it's unimportant.

Many tools, including libparted (used by GParted, parted, and the Ubuntu installer) also align the ends of partitions. This isn't necessary for optimizing the performance of the partition being created, but it enables the next partition to be properly aligned without a gap. One consequence, though, is that there's often about 1 MiB of unused space at the end of the disk. In your case, it's a tiny bit more than 1 MiB (I'm guessing because a rounding error caused it to be too big, although that's just a guess), and GParted is showing it, unlike the gap at the start, which is hidden.

Small ~1 MiB gaps betwee partitions, or at the start or end of the disk, are no big deal. Your disk in particular is 465.76 GiB in size, so that 1.02 MiB gap is (1.02 / (465.76 * 1024)), or 0.00021%, of your disk's capacity. It's trivial. You can certainly extend the partition to fill that gap by using another tool (like gdisk -- you'd delete the existing partition and create a new one with the same start point but an end point a little further out); but then to use the space you'd need to extend the filesystem it contains, and the filesystem's own data structures might not even make use of the extra space. Furthermore, mucking about with partitions in this way carries some danger, so you'd be risking your entire OS installation to get 0.00021% more disk space. If you're that desperate for disk space, you need to buy another disk, not waste time trying to recover enough disk space to hold about 1/600th of an Ubuntu .iso file.

So: Don't worry about it.


You can use Time Shift for this purpose. It has GUI as well as CLI that you can use for both Ubuntu server and Desktop editions.

sudo apt-add-repository -y ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install timeshift


libGL.so.1 is missing after changing graphics card - unable to run Steam

Maybe im wrong but, im using nvidia card and libgl.so* is part of my nvidia driver.i use nvidia proprietary driver.Maybe coz u changed ur card so the driver not load properly.  So u can try to remove ur driver first . REBOOT, and try to reinstall ur graphics driver again. Try using additional driver menu in dash, maybe there is a best (recommend) driver for ur card.


How do I install build-essential without an Internet connection?

Open a Terminal by pressing CTRL+ALT+T and type:

sudo apt-get -qq --print-uris install build-essential linux-headers-$(uname -r) | cut -d\' -f 2 > urls.txt

copy the urls.txt to a thumbdrive and move over to a computer with Internet Access. Download all files from urls.txt (if the other computer is running Linux you can use wget < urls.txt) and save them in a folder called deb on your thumbdrive.

Go back to your Ubuntu machine, plug in the thumbdrive and open a Terminal

sudo cp /media/YOUR_USERNAME/THUMBDRIVE_NAME/deb/* /var/cache/apt/archives/
sudo apt-get install build-essential linux-headers-$(uname -r)


How do I set up printer sharing with a Windows 7 machine in Ubuntu?

This is a two part question, requiring 2 part answer.

First, Windows -> Ubuntu:

To begin with, you need to make sure that your windows host allows connecting to the printers. There are various things that could disallow access, the most common one being Windows Firewall.

Here is a quick howto

Now that you have a working share on your windows host, you need to add the printer to your Ubuntu host. This can be accomplished by going to System -> Administration -> Printing and by selecting the + Add button. From there the wizard will guide you through adding the printer. You will need to know the IP address or name of the windows host and name of the printer being shared to complete the wizard.

Next Ubuntu -> Windows:

The easiest way to accomplish this is by using IPP share to connect to the printer. Start by enabling Internet Printing Client as described in this knowledge base article

browsing to http://IP.OF.UBUNTU.HOST:631/printers/ and select the printer you wish to connect to and make a note of the full URL of the printer. Now go to Printers and Faxes on the windows host and start adding a network printer. At one point of the installation wizard you will be asked for the location of the printer, in the IPP field enter the address for the printer found on the webpage.

When the wizard asks for the driver to be used for the printer, use the CUPS Windows driver available from CUPS download page

Continue through the wizard and fill in the rest of the information normally.

You can also use the native driver for the printer, but you will then need to edit the CUPS mimetype support to include RAW printing which is done by editing /etc/cups/mime.convs file and uncommenting this line:

application/octet-stream application/vnd.cups-raw 0

You will also need to edit /etc/cups/mime.types and uncomment the line

application/octet-stream

After editing the files and restarting CUPS, you are able to print with native drivers as well.


Firstly I change my fstab by swaping disk identifiers back to /dev/**** format:

     /dev/sdb2 /home ext4 defaults 0 2
    # swap was on /dev/sdc3 during installation
    # UUID=99e8278d-830c-4edf-8461-4838bd1bccf6 none swap sw 0 0

Then remove lvm2 related packages, I don't use any lvm2 partitions.

You can do this via rescue mode. When you inside grub menu choose advanced options, enable network (this will remount your filesystem in read/write mode) and select root shell.


Command-line presentation tool for Linux?

In MDP, you're limited to what the console can do. Console text monospace and impossible to change its size on a character-by-character basis. That's sort of the point of this. You do have a couple of options to make it a better presentation though:

Increase the global font size in the terminal (in Konsole this is Control++). This makes it easier to read at a distance but will limit how many rows you can fit on the screen. MDP will bug out if the font size is too big for the content.
Use ASCII art! figlet is pretty great for this but you will have to use the markdown code-formatting to preseve the spacing around it in your presentation file.

 __  __         _____ _ _   _      _
|  \/  |_   _  |_   _(_) |_| | ___| |
| |\/| | | | |   | | | | __| |/ _ \ |
| |  | | |_| |   | | | | |_| |  __/_|
|_|  |_|\__, |   |_| |_|\__|_|\___(_)
        |___/

Ultimately it's going to be a combination of the two.

mdp really looks like fun though, just make sure you test it on the presentation hardware before you do your presentation - you don't want to be the muppet whose presentation doesn't work. It might make sense to make a screenshot-PDF backup.


How can I disable Ctrl+Q for all applications (system wide)?

The best way is to disable the keyboard setting in your specific application. For Firefox there is an extension keyconfig. This allows you to change keyboard settings.

If you want to disable Ctrl+Q for your whole system, I would suggest to make a new setting:

Go to System -> Preferences -> Keyboard settings
Click Add
Give it a name like fake setting and enter /bin/false as command. Apply your changes.
Click on 'Disabled' and press Ctrl+Q.

Now you should have a new entry with your applied name and your keyboard setting. Every time you press Ctrl+Q your system will run the command /bin/false which basically does nothing. So this is a workaround to disable the setting.


Ctrl+U will only clean from the cursor to the beginning of the line, so if the cursor is at the end of the line, all the line will be cleaned, and if not, there will remain the characters after the cursor.

For a complete answer, I will say:

Ctrl+U - clear all the current line from the end to the beginning only if the cursor is at the end of the line.

You can then recall the cleared line with Ctrl+Y if you need.

Ctrl+K - clear all the current line from the beginning to the end only if the cursor is at the beginning of the line.

You can then recall the cleared line with Ctrl+Y if you need.

Ctrl+W - clear the previous word in the current line. For example if you have typed a command like git diff /path/to/some/file and you want to delete just the last parameter to the command, Ctrl+W is very useful.

You can then recall the cleared data using Ctrl+Y if you need.

Ctrl+E Ctrl+U - move the cursor to the end of the line and clear all the current line from the end to the beginning.

You can then recall the cleared line with Ctrl+Y if you need.

Ctrl+A Ctrl+K - move the cursor at the beginning of the line and clear all the current line from the beginning to the end.

You can then recall the cleared line with Ctrl+Y if you need.

Ctrl+C - my favourite - cancel the current command line, which implies clear all the current line no matter where the cursor is.

Disadvantage: you can't recall the cleared line anymore.

Alt+Shift+# - comment the current line, keep it in the history and bring up your prompt on a new line.


How change Address of NTP server for nodes by shell command?

Login to your MAAS server via SSH. Get API key from your administrator account (take a look to the top right corner in the web GUI) and run the following command:

maas login my-mass http://localhost/MAAS

Set NTP server value:

maas my-maas maas set-config name=ntp_server value=your-preferred-ntp-server

Get NTP server value:

maas my-maas maas get-config name=ntp_server


Should I reboot after set new timezone using timedatectl

Yes.  You will need to restart the cron and rsyslog services on your system.  They obtain their timezones when they start up, and don't detect overall system timezone changes.

service cron restart
service rsyslog restart


How to update graphics card driver in ubuntu 12.04.1

Go to 'System Settings' and under 'Hardware' section click on 'Additional Drivers'. It will automatically search for drivers and it will ask if you want to install the graphics drivers.

In short

System Settings -> 'Hardware' section -> Additional Drivers

PS:

You can search for System Settings in unity dash.

Just hit Super Key(that key which has windows logo between left Ctrl and left Alt on the bottom left of keyboard) and type System Settings and hit [ENTER] to open it.


Solved by OP in comments

  I remove[d] the NVIDIA files and reinstall NVIDIA, with the following
  instructions

sudo apt-get purge nvidia* bumblebee*

  then

sudo apt-get install nvidia-prime


What happened to netatalk? MacOSUbuntu filesharing

sudo apt-get netatalk

is an invalid command. It is

sudo apt-get install netatalk

or the newer...

sudo apt install netatalk

It is part of universe so available for 18.04.


How does Canonical choose Linux kernel version for Ubuntu?

By default, Ubuntu systems run with the Ubuntu kernels provided by the Ubuntu repositories. However it is handy to be able to test with
  unmodified upstream kernels to help locate problems in the Ubuntu
  kernel patches, or to confirm that upstream has fixed a specific
  issue. To this end we now offer select upstream kernel builds. These
  kernels are made from unmodified kernel source but using the Ubuntu
  kernel configuration files. These are then packaged as Ubuntu .deb
  files for simple installation.

These kernels are not supported and are not appropriate for production use.

See https://wiki.ubuntu.com/Kernel/MainlineBuilds and http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D for more details.


Effects on applications caused by security updates?

I found this post on Ubuntu Forums somewhat helpful. thought its worth sharing:

  Your system isn't smart enough to know if a particular update includes a new feature, a bugfix, or a security patch.
  It only knows the software's repository.
  Happily, you can tell (and filter) based on the repository.

  If the upstream project releases a security patch for a CVE, the Ubuntu Security Team applies it to the current version, and it goes into the *-security repository.

  *-security does not include updates. CVE patches only.
  The upstream version number does not change, the Debian or Ubuntu version number does change: Foo 1.2.3-1ubuntu2 becomes Foo 1.2.3-1ubuntu3

  You can easily enable automatic updates for *-security repos in /etc/apt/apt.conf.d/50unattended-upgrades or in Ubuntu's Software & Updates control panel.

  Also: If you enable the *-updates repository, then you will get those minor improvements you don't mind. But the system has no way to determine if an update is too much for your comfort...it's not psychic...so perhaps you should disable that repository.

  Finally: Some users get confused when a famous vulnerability gets discovered, and the upstream project seems to recommend upgrading to the latest version to fix it. Follow the CVE number at security.ubuntu.com instead of following the hype.


How can I prevent [flush-8:16] and [jbd2/sdb2-8] from causing GUI unresponsiveness?

I'll venture a theory:

/dev/sdb1 is perhaps swap space?

If something central to the graphical interface has been offloaded to disk, the GUI can't continue until it has received those data. If the swap disk is sleeping, this means it's stuck until the disk responds.

I think this would give a temporary lockup, and the 10-20 second period fits the time it takes for a sleeping disk to respond.
The terminal is presumably still responsive because all it needs is already in RAM.

Some terminal tools to explore the theory:

hdparm -C /dev/sdX tells you whether a disk is sleeping:

$ sudo hdparm -C /dev/sdb
/dev/sdb:
drive state is:  standby

active/idle means that it's running. In state standby or sleeping it has stopped spinning and will take a while to start up again. See man hdparm.
free -m says how much swap space is used:

$ free -m
             total       used       free     [...]
Mem:          5973       4928       1045     [...]
-/+ buffers/cache:       1091       4882
Swap:         6234          0       6234

"Swap:" is the relevant line, in this example 6.2 GB swap is available and nothing is used.

If this is the issue, you could either move swap to sda or disable spindowns for sdb.


How does one remove applications installed through "python setup.py install"?

Martin v. Löwis answered this here:
"You need to remove all files manually, and also undo any other stuff that installation did manually.
If you don't know the list of all files, you can reinstall it with the --record option, and take a look at the list this produces."
examples:
python setup.py install --record files.txt to generate the list
cat files.txt | xargs rm -rf to remove the files recorded by the previous step.


How do I get the Redshift functionality of smart adjustment of the color temperature throughout the day in a Wayland session of Ubuntu 17.10?

Not really a good one but kinda half-baked solution is using a GNOME shell extension called "Night Light Slider". It adds a slider to control the colour temperature manually:

(screenshot source: extension's homepage at extensions.gnome.org)

Also you may change Night Light's colour temperature using dconf Editor/gsettings as suggested here: How to adjust the hue (intencity) of gnome night light?


Update 2:

You stated you want to install Windows on the second internal disk. You did not include this in your original question. I will now add the following points.

A far as I know, you can not create a USB installer for any version of windows that will boot on your Mac. You must either use a DVD or Virtualization software. A DVD would be easiest. Do you know if you can boot from a Windows installation DVD using your external optical drive? If not, then you will need to download and install Virtualization software. I only have experience with VirtualBox. The download is free.
Installing Windows to your second internal drive requires either temporarily removing your first internal drive or creating a 100 MB partition on the first drive to hold a System Reserved partition.
You should first get Windows installed before we worry about installing Ubuntu. I have never owned a Mac with two internal drives, so I can advise you but I can not verify every step of the procedure.

BTW, are you sure your Macbook Pro is a late 2009 model? I ask because your model does not appear on the web page System requirements to install Windows on your Mac using Boot Camp.

Update 1:

I transferred the ubuntu-14.04.2-desktop-amd64.iso file to a USB flash drive using the current version of UNetbootin. For the "Space used to preserve files across reboots (Ubuntu only):", I used the default of 0 MB. Upon completion a window appeared as follows.

I ignored the message "The created USB device will not boot off a Mac". I assume you can also. I rebooted my computer and held down the Option key. The following menu appeared.

I chose the orange icon on the right labeled "EFI Boot". In the next menu, I selected "Check disk for defects". This took some time to complete. Upon completion, a window appeared with the message "Check finished: no errors found".

If you get this far, you can try booting to the Live version of Ubuntu. In other words, select "Try Ubuntu without installing" from the menu.

I did a similar install a few weeks ago. Before I post a detailed answer, I would like to know how what you want differs from what I did. I already know your second disk is internal. Mine happened to be an USB external hard drive. My computer is a iMac 20-inch Mid 2007 running OS X 10.10.3 and Windows 8.1 on the internal disk. I have rEFInd installed  as an optional boot manager. It resides in its own hfs+ formatted partition on the internal disk. I assume you would want a similar partition on your second disk.

I agree you should use UnetBootin to create the bootable USB flash drive installer. The recommended method for OS X does not verify, where as,  using UnetBootin does. I used the file ubuntu-14.04.2-desktop-amd64.iso which leads to an EFI/GPT install. If you are using a different iso file, let me know.

I did not install using a LVM. If you want to use a LVM or are uncertain, let me know. Also, my OS X install does not use Core Storage.

When installing Ubuntu, files were added to the EFI partition on my first disk. I moved these files to a small 100 MB hfs+ partition on the second disk. Basically, these files are GRUB. I added some files from rEFInd to make this partition appear when holding down the Option key at startup and on the Startup Disk window in the OS X System Preferences. This means all the partitions used for Ubuntu will reside only on the second disk. The second disk will contain 5 partitions. An unused 210 MB FAT formatted ESP, a 100 MB hfs+ formatted ESP, a 100 MB hfs+ formatted rEFInd partition, ext4 formatted Ubuntu partition and a Linux Swap partition.


Problems after installing Ubuntu 14.04 on previous Windows 7

I'd say bad luck. It's very unlikely that a hard disc failure -- your issue sounds like you should buy a new one -- is caused by installation of Ubuntu. Do your backup and buy a new one. Also you might try to boot the live image of Ubuntu and maybe run smartctl for you disc.


Changes for upload_max_filesize, memory_limit & post_max_size in the php.ini aren't affect

The solution copy from link

If you have your own Ubuntu server running you may encounter the maximal file size upload limit in php scripts which is set to 2Mb as default. In order to change that we first have a look what the size actually is. In /var/www (standard www directory) create a file called info.php with the following content:

<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>

Then browse to this file via localhost/info.php (replace localhost with the servername if necessary) and look for the line

upload_max_filesize 2M 2M

which will show you the actual maximum file size. In order to change that open a ssh connection to your server and edit the file /etc/php5/apache2/php.ini with

sudo nano /etc/php5/apache2/php.ini

search for “upload_max_filesize” with Ctrl-W and change “2M” to “20M”. Save the file with Ctrl-O and exit with Ctrl-X. Restart the apache server with

sudo /etc/init.d/apache2 restart

and visit again localhost/info.php to check if the maximum file size was changed.


linux cmd how to delete all the file of a folder that don't have any permissions for the category owner,read,write,execute

You can use the -perm test of the find command to identify files by their permissions. In particular,

   -perm /mode
          Any  of the permission bits mode are set for the file.

So for example, given
$ ls -l subdir
total 0
----r--r-- 1 steeldriver steeldriver 0 Oct 15 19:15 file0
---xr--r-- 1 steeldriver steeldriver 0 Oct 15 19:15 file1
--w-r--r-- 1 steeldriver steeldriver 0 Oct 15 19:15 file2
--wxr--r-- 1 steeldriver steeldriver 0 Oct 15 19:15 file3
-r--r--r-- 1 steeldriver steeldriver 0 Oct 15 19:15 file4
-r-xr--r-- 1 steeldriver steeldriver 0 Oct 15 19:15 file5
-rw-r--r-- 1 steeldriver steeldriver 0 Oct 15 19:15 file6
-rwxr--r-- 1 steeldriver steeldriver 0 Oct 15 19:15 file7

then
$ find subdir ! -perm /u=rwx
subdir/file0

finds the file that has neither read, write, nor execute permission for its owner.
Once you are happy that it is identifying the correct files, you can add -delete to the command to delete them:
find subdir ! -perm /u=rwx -delete

You can use octal 700 in place of symbolic u=rwx if you prefer.


It looks like that the default terminal app is not there (not listed)... make a custom shortcut for gnome-terminal and assign CTRL+ALT+T to key combination to it and see if it works. If it does I'm right and leave it just as it is. If not post a comment ;)


Systemd script not writing into a .txt file

You need to use a fully qualified path for your script when executing it via a SystemD script.  That way, it knows where to store the file data to on-disk.

So instead of alert.txt give it a full path, for example /home/user/alert.txt or /tmp/alert.txt or similar.


No such file or directory but file png exists

There is no need to run the source command here
If you have the config file in the correct location, on execution of the xcowsay command it will read the config in
To find where the correct location for the xcowsay config file location is check here
http://manpages.ubuntu.com/manpages/bionic/man6/xcowsay.6.html

xcowsay reads a configuration file on startup.  The configuration file can  be  stored  in
the   XDG   compliant   location   $XDG_CONFIG_HOME/xcowsayrc   (which   will  default  to
$HOME/.config/xcowsayrc)  or  in  your  home  directory  at  $HOME/.xcowsayrc.    If   the
--config=FILE  command  line  option  is passed FILE will be processed after your personal
configuration file.

A note on what is happening here,
The source command executes command from a text file but there are not necessarily bash command
Running source bash.rc works because everything in this file can be executed in a bash terminal


Ubuntu gave up waiting for suspend/resume

Changed the drive (SATA) mode to AHCI in UEFI settings and it's working fine again.


windows 7 and ubuntu wont boot after trying to boot ubuntu

you should reinstall your boot loader.

I suggest you to try this:
restore the windows boot loader


You can try installing testdisk. Sometimes it fixes problems other software can't. Becareful though it is pretty hardcore. Google around to see how it works.


Can't install Nvidia drivers on Ubuntu 19.10 after Kernel update

sudo update-alternatives --all

Change everything with clang selected back to gcc

It works. Finally.


Which numbers; 0 or 1 disable/enable gconftool?

You are correct, 0 is the disabled state. It should be on (1) since Ubuntu 12.10. You can turn it off with the command in the answer if this causes problems for you.


You can only add applications (i.e. packages which have a .desktop file either in /usr/share/applications or ~/.local/share/applications) to the dock not folders or shortcuts. This is a feature-limitation which is likely to be fixed in the next versions of Dash To Dock (and the Ubuntu dock by extension).

If you want to have your mounted-partitions visible at all times then the Removable Drive Menu extension can help with that. This extension makes any mounted partition permanently visible in the right corner of the top-panel.

If you'd like this feature in the dock then you can use Dash To Panel to transform the top-panel into a dock.


Convert downloaded YouTube videos (downloaded with youtube-dl) to audio-only, with no loss?

You can convert to audio only formats using youtube-dl itself, although it still downloads the video and then converts it.

To do this, use -x or --extract-audio to the command, for example:

youtube-dl -x 'http://www.youtube.com/watch?v=0iyeUcFKRv4&feature=c4-overview&list=UU1KPy3cAAj0i0RIFC_SzjMg'


New HDD in 19.10: Where is 7MiB/s constant write activity coming from?

Following LupusE's suggestion I installed iotop and noticed a process "ext4lazyinit" which I didn't recognize so I googled it and learned that the kernel is still initializing the drive.  After 4 hours IO droppped to zero and the ext4lazyinit process is gone.


Well-known packages are not shown in synaptic package manager

Reinstall the Synaptics package manager:

sudo apt-get --purge autoremove synaptic && sudo apt-get install synaptic

Then update the system:

sudo apt-get update

Then reboot.