Red5

This is a free RTMP server for recording and streaming to a Flash client. Its features according to the project's home page are:

  Streaming Audio/Video (FLV and MP3)
  Recording Client Streams (FLV only)
  Shared Objects
  Live Stream Publishing (live h264 supported now)
  Remoting ( AMF0/ AMF3)

The application is mainly intended to setup your own RTMP server. We have no experience on how to set up sending a stream to a remote streaming server and if we are able to do this for Twitch.tv. Some documentation exists on the project's home page indicating that this can be done.

A (somehow quite nested) documentation can be found on the projects pages:

Red5 Getting Started


Deleted windows partition, now I can't get into Ubuntu

This is what happened:

Wubi uses the Windows boot manager to load it, even if it's on a separate partition.  So by deleting your Windows partition, you have deleted the "pointer" that tells your computer where to look for the Wubi install.  Now, I in all fairness don't know that much about Wubi (how exactly it is booted) so I can't tell you the exact steps.

There is almost certainly a better way to do this.  Wubi stores your OS in a virtual hard disk file.  It's possible that it could be extracted to a separate partition and booted.  BUT that's a little complex and you might run into some issues because of the way it's set up.  So, here's something you can do:

Boot up an Ubuntu LiveCD or USB that is the same architecture (32- or 64-bit) and version as your Wubi install.  (I assume you already know how to do this, but just in case you didn't use the LiveCD earlier run sudo gparted to edit partitions easily).  Tell it to look for a lost partition or partitions.  As long as you have not written to the space where it was, your data will still be there.  Now, you can run Startup repair for Windows to automatically restore the boot sector of the partition, and voila!  You should be able to boot your Wubi install once again.

If you have written to the partition space, try making a new NTFS partition with the same size and dimensions of the previous one and running file recovery.  For instance:

Boot up Hiren's Boot CD and start the Windows XP option.  Then, install Piriform's Recuva and look for C:\boot.ini.  Once you have that copied to a flash drive, install Windows again and copy that file over the new boot.ini.  You should be able to start up your Wubi install again.

See the Ubuntu community wiki on data recovery for more information


Vendor Id and Product ID for Micromax 355G USB modem

You modem is not showing it's a product from OMEGA technology but there is no any omega technology here ! Reinsert the modem and try again!


I'm not entirely sure why you wouldn't be able to do so in Compiz-config Settings Manager (CCSM) anymore. Is it possible that you just need to install a plugin in order to get that feature back?

Anyway, I would recommend Devil's Pie for this. It's not specific to Compiz, but works with any X desktop, meaning that it's also useful with Gnome Shell, KDE, LXDE, Xfce, etc, which normally don't use Compiz.

Devil's Pie is in the Ubuntu archives as devilspie (click to install) and there are also a GUI application for it: gdevilspie (click to install)

You can read more about Devil's Pie in the Ubuntu Community help pages: https://help.ubuntu.com/community/Devilspie


How about passing the output to awk and using a system call to do the job, here is an example which echos the second argument.
ps -ef | grep python | grep grep | awk '{system("echo kill " $2)}'
(This one would kill itself)
You could run your netstat command echoing the argument until you find the correct value eg  $1, $2 ....  Then remove the echo and it will kill your process
netstat -nlp | grep :3306 | awk '{system("echo kill " $1)}'
probably the command you are looking for is
sudo netstat -nlp | grep :3306 | awk  '{print $NF}' | awk -F "/" '{system("kill " $1)}'


I'd start a python interpreter to perform such simple operations:

$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 100/9.14
10.940919037199125
>>>

Please check this link for a list of python mathematical operators.


Spell checker not working in Libre Office 5.2

I tried Brayden's answer but I also had to go to Tools > Language > For all Text > English (USA) to get it to work.


Choose Window with Keyboard from GNOME Activities?

You can use a extension from GNOME Extensions. One extensions that should be able to do this is 'windowNavigator'. Once installed (you may need to restart the shell with Alt+F2 and then r, or by logging out and logging in again), you can press Alt whilst in overview, and select a window by pressing the number on the keyboard shown in its corner:


In what folder does Ngnix gets installed in Ubuntu Server

To get a list of all files installed by a package use:

  dpkg -L PACKAGE_NAME

Note that this command will not list files installed by dependencies.

For example running apt-get install nginx  installs nginx, nginx-core, nginx-common. So you would have to run dpkg -L PACKAGE_NAME for each of these packages to get a list of all files that were installed by the apt-get install PACKAGE_NAME command.

The installed dependencies can be found with apt-cache show PACKAGE_NAME or by searching for PACKAGE_NAME in /var/log/apt/history.log.


When you give two tests, this implies AND condition. You are asking for files that were modified less then 12 days ago AND today. Then you get what you asked.


Nvidia 390 driver overheat on optimus laptop

I found a semi solution to this at:

http://seperohacker.blogspot.com/2012/10/linux-keep-your-cpu-cool-with-frequency.html

I found this script which allows to throttle the cpu down from 3.8 GHZ to 2.5 GHZ which makes the temperature go from 90+ to 77-80 degrees celcius.

#!/bin/bash

# Usage: temp_throttle.sh max_temp
# USE CELSIUS TEMPERATURES.
# version 2.20

cat << EOF
Author: Sepero 2016 (sepero 111 @ gmx . com)
URL: http://github.com/Sepero/temp-throttle/

EOF

# Additional Links
# http://seperohacker.blogspot.com/2012/10/linux-keep-your-cpu-cool-with-frequency.html

# Additional Credits
# Wolfgang Ocker <weo AT weo1 DOT de> - Patch for unspecified cpu frequencies.

# License: GNU GPL 2.0

# Generic  function for printing an error and exiting.
err_exit () {
    echo ""
    echo "Error: $@" 1>&2
    exit 128
}

if [ $# -ne 1 ]; then
    # If temperature wasn't given, then print a message and exit.
    echo "Please supply a maximum desired temperature in Celsius." 1>&2
    echo "For example:  ${0} 60" 1>&2
    exit 2
else
    #Set the first argument as the maximum desired temperature.
    MAX_TEMP=$1
fi

### START Initialize Global variables.

# The frequency will increase when low temperature is reached.
LOW_TEMP=$((MAX_TEMP - 5))

CORES=$(nproc) # Get number of CPU cores.
echo -e "Number of CPU cores detected: $CORES\n"
CORES=$((CORES - 1)) # Subtract 1 from $CORES for easier counting later.

# Temperatures internally are calculated to the thousandth.
MAX_TEMP=${MAX_TEMP}000
LOW_TEMP=${LOW_TEMP}000

FREQ_FILE="/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies"
FREQ_MIN="/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq"
FREQ_MAX="/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq"

# Store available cpu frequencies in a space separated string FREQ_LIST.
if [ -f $FREQ_FILE ]; then
    # If $FREQ_FILE exists, get frequencies from it.
    FREQ_LIST=$(cat $FREQ_FILE) || err_exit "Could not read available cpu frequencies from file $FREQ_FILE"
elif [ -f $FREQ_MIN -a -f $FREQ_MAX ]; then
    # Else if $FREQ_MIN and $FREQ_MAX exist, generate a list of frequencies between them.
    FREQ_LIST=$(seq $(cat $FREQ_MAX) -100000 $(cat $FREQ_MIN)) || err_exit "Could not compute available cpu frequencies"
else
    err_exit "Could not determine available cpu frequencies"
fi

FREQ_LIST_LEN=$(echo $FREQ_LIST | wc -w)

# CURRENT_FREQ will save the index of the currently used frequency in FREQ_LIST.
CURRENT_FREQ=2

# This is a list of possible locations to read the current system temperature.
TEMPERATURE_FILES="
/sys/class/thermal/thermal_zone0/temp
/sys/class/thermal/thermal_zone1/temp
/sys/class/thermal/thermal_zone2/temp
/sys/class/hwmon/hwmon0/temp1_input
/sys/class/hwmon/hwmon1/temp1_input
/sys/class/hwmon/hwmon2/temp1_input
/sys/class/hwmon/hwmon0/device/temp1_input
/sys/class/hwmon/hwmon1/device/temp1_input
/sys/class/hwmon/hwmon2/device/temp1_input
null
"

# Store the first temperature location that exists in the variable TEMP_FILE.
# The location stored in $TEMP_FILE will be used for temperature readings.
for file in $TEMPERATURE_FILES; do
    TEMP_FILE=$file
    [ -f $TEMP_FILE ] && break
done

[ $TEMP_FILE == "null" ] && err_exit "The location for temperature reading was not found."

### END Initialize Global variables.

### START define script functions.

# Set the maximum frequency for all cpu cores.
set_freq () {
    # From the string FREQ_LIST, we choose the item at index CURRENT_FREQ.
    FREQ_TO_SET=$(echo $FREQ_LIST | cut -d " " -f $CURRENT_FREQ)
    echo $FREQ_TO_SET
    for i in $(seq 0 $CORES); do
        # Try to set core frequency by writing to /sys/devices.
        { echo $FREQ_TO_SET 2> /dev/null > /sys/devices/system/cpu/cpu$i/cpufreq/scaling_max_freq; } ||
        # Else, try to set core frequency using command cpufreq-set.
        { cpufreq-set -c $i --max $FREQ_TO_SET > /dev/null; } ||
        # Else, return error message.
        { err_exit "Failed to set frequency CPU core$i. Run script as Root user. Some systems may require to install the package cpufrequtils."; }
    done
}

# Will reduce the frequency of cpus if possible.
throttle () {
    if [ $CURRENT_FREQ -lt $FREQ_LIST_LEN ]; then
        CURRENT_FREQ=$((CURRENT_FREQ + 1))
        echo -n "throttle "
        set_freq $CURRENT_FREQ
    fi
}

# Will increase the frequency of cpus if possible.
unthrottle () {
    if [ $CURRENT_FREQ -ne 1 ]; then
        CURRENT_FREQ=$((CURRENT_FREQ - 1))
        echo -n "unthrottle "
        set_freq $CURRENT_FREQ
    fi
}

get_temp () {
    # Get the system temperature.

    TEMP=$(cat $TEMP_FILE)
}

### END define script functions.

echo "Initialize to max CPU frequency"
unthrottle

# Main loop
while true; do
    get_temp # Gets the current temperature and set it to the variable TEMP.
    if   [ $TEMP -gt $MAX_TEMP ]; then # Throttle if too hot.
        throttle
    elif [ $TEMP -le $LOW_TEMP ]; then # Unthrottle if cool.
        unthrottle
    fi
    sleep 3 # The amount of time between checking temperatures.
done

How to use:

sudo ./temp_throttle.sh 75

(75 is the temperature, i.e. throttle at 75+ degrees celcius)

The terminal will begin printing that the CPU is throttling and it begins to go down from 3.8 GHz (in my case) to 3.7 and so forth. Unfortunately it continues to do that until it reaches 800 MHz which makes everything lag. What I found out was that when it reaches the throttle to for example, 2.8 GHz, just hit ctrl+C to end the process and it will stay there. If you want to return to maximum power again, just set some high temperature like 80 or above and it will return to 3.8 GHz or higher depending on your CPU.


kill -9 4469

or

 fuser -k -n tcp 3000

3000 is the port number

or
Use killport command :

wget https://raw.github.com/abdennour/miscs.sh/master/killport
killport 3000


What's the difference between the different "rename" commands?

How come there are two packages providing different commands using the same name (if not by accident)?

That's not unusual. Authors typically pick the simplest command name they think of, so if two people write a command to rename files, it's likely they'll both name it rename. That's one of the reasons behind the Debian Alternatives system - it allows packages providing similarly-named commands to coexist, and for one package to replace another. For example, there are multiple AWK implementations - mawk, original-awk, gawk (though they all refer to themselves as awk). With the alternatives system, you can install them all at the same time, and conveniently switch between any of them as the default awk.

In this specific case, prename comes from the Perl source code. The Debian package maintainers originally had rename be the Perl one, then switched to the alternatives system, to accommodate the rename from util-linux. Then somebody wrote an improved version of Perl's rename in the File-Rename Perl module, which was then added as another alternative. But that's not even the only Perl module for renaming files.

  Wouldn't it be rather straightforward for the perl package to either include the “full” rename command or not include any rename command at all? Why is this seemingly uncomplete split sustained until at least Ubuntu 17.04?

See Debian bug #735134 for how this situation evolved. Debian maintainers generally prefer going at least one release when doing something drastic, like replacing a working command with another. prename was kept around for jessie, and has now been removed for buster. In addition, it looks like rename will no longer be under the alternatives system, since rename.ul is too incompatible. rename will be just file-rename.

Since Ubuntu generally picks up packaging changes from Debian, what happens to rename in Debian will be picked up by Ubuntu sooner or later, probably in 18.04. It seems to be too late for 17.10.

  What exactly are the differences between those commands?

Fundamentally, both prename and file-rename run Perl expressions to rename files. file-rename is just actively maintained and supports more options. rename from util-linux works entirely differently, has its own rules for patterns.


Which package should I use to file a bug for the "application" menu?

The proper name is "application menu" to distinguish it from the older (and seperate project).

The modules are indicator-appmenu and appmenu-gtk. Unless it's indicator specific most bugs should be reported against appmenu-gtk.

https://bugs.launchpad.net/indicator-appmenu/
https://bugs.launchpad.net/appmenu-gtk

Wiki page


skype: error while loading shared libraries: libstdc++.so.6: wrong ELF class: ELFCLASS64

I found a solution to my problem:

sudo apt-get install lib32stdc++6


To install gnome-tweak

sudo apt install gnome-tweak-tool

To install restricted-extras

sudo apt install ubuntu-restricted-extras

To install arc-theme

sudo apt install arc-theme

Something has broken in one of the usual methods for installing software.  The link that you have posted should open the Ubuntu Software program and initiate installation, but obviously does not.

As a good learning experience, there are a lot of well written answers on this website which can be searched by "How to install sofware"


If you installed it via apt, then it’ll be:
sudo apt remove code

If it was via the Snap Store, then:
sudo snap remove code


You have there now two tar archives which you can extract with:

tar -xf gcc-4.9.2.tar.xz
tar -xf gdc-20141020.tar.xz


ssh with nautilus : connect to server1 and then server2

Create a file ~/.ssh/config if not already exists and add following content:

Host server1
    User my_id
    ServerAliveInterval 120

Host server2
    User my_id
    ProxyCommand ssh -q -W server2:22 server1
    ServerAliveInterval 120

You could even chain more hop servers:

Host server3
    User my_id
    ProxyCommand ssh -q -W server3:22 server2
    ServerAliveInterval 120

(ServerAliveInterval 120 is optional, but I always use it, because many ssh servers will drop idle connections after some time, and this option prevents that by sending a packet every 120 seconds.)

Then you can directly run

ssh server2

and also connect to ssh://server2 with nautilus.

If you have password authentication, the passwords of both servers will be prompted one after the other.


Possible duplicate: Unmet dependencies for Media Players

Please try sudo apt-get install -f at the Terminal, as suggested in the above link.


I'm with Xen2050, it isn't clear if you mean you changed the cables as well or not.  And even if you used the same cables, the cables could be bad or stretched out.  certainly try other cables.  I love seagate but it could have been damaged in shipping.  One day I heard a brick hit my porch Newegg shipped a hard drive without so much as a bubble wrap bag around it, just thin plastic.  I gave them such a rant fest they didn't dare refuse to pay return shipping.  Your drive could just be bad.  It happens.

Or it could be that your computer refuses to recognize hard drives of that size.  depends how old the bios is.

Here's a test you can do.  While booted to a live boot CD, please open Disk Utility and if the seagate supports SMART see what it has to say about the drive health.  If it claims it is healthy (unlikely) or if it does not support SMART, you can ask that it perform diagnostic tests.


kill all process greater than some process ID and match with particular name

First, get the PIDs of the processes:

pgrep google-chrome

To kill all the google-chrome processes with PIDs greater than say, 4500:

kill -9 $(pgrep google-chrome | awk '$1>4500')

Example output:

ron@ron:~$ pgrep sleep
3956
4656
4978
4992
ron@ron:~$ kill -9 $(pgrep sleep | awk '$1>4500')
[2]   Killed                  sleep 1000
[3]-  Killed                  sleep 4500
[4]+  Killed                  sleep 6000
roronn@4736Z:~$ pgrep sleep
3956


Try this:

Open a terminal,Press Ctrl+Alt+T

Run it:

sudo -i
nano /etc/apt/sources.list

In the open file, delete its contents and put this:

deb http://old-releases.ubuntu.com/ubuntu/ utopic main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ utopic main restricted
deb http://old-releases.ubuntu.com/ubuntu/ utopic-updates main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ utopic-updates main restricted
deb http://old-releases.ubuntu.com/ubuntu/ utopic universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ utopic universe multiverse
deb http://old-releases.ubuntu.com/ubuntu utopic-security main restricted
deb-src http://old-releases.ubuntu.com/ubuntu utopic-security main restricted
deb http://old-releases.ubuntu.com/ubuntu/ utopic-backports main restricted universe multiverse

Ctrl+O  Save File

Ctrl+X  Close Nano

Continue running:

apt-get update
apt-get dist-upgrade
apt-get install flex


How to open the Unity dash when hitting the top left corner of the screen?

Install xmacro.
Install compizconfig-settings-manager.
Open ccsm and click the Commands button (not the tick in front of it).

Go to the Commands tab and copy-paste this line into an empty box: echo “KeyStrPress Super_L KeyStrRelease Super_L”| xmacroplay -d 1 :0.0 &> /dev/null.

Go to the Edge bindings tab and click the button labeled None next to the corresponding command number.

That should've done the trick.

Source: http://www.omgubuntu.co.uk/2011/08/open-unity-dash-compiz-edge-binding-gnome-shell-style/


Remap Ctrl+PageUp, Ctrl+PageDown (switch tabs in gnome)

The code for keybinding starts from line 558 (may be different in your system),
in file /usr/share/gnome-shell/js/ui/viewSelector.js.

I rebound it to Ctrl - Tab and Ctrl - s (and I am wondering how to bind it to Ctrl - Shift - Tab)

    } else if (modifiers & Clutter.ModifierType.CONTROL_MASK) {
        if (symbol == Clutter.s) {
            if (!this._searchTab.active)
                this._prevTab();
            return true;
        } else if (symbol == Clutter.Tab) {
            if (!this._searchTab.active)
                this._nextTab();
            return true;
        }


Ubuntu 16.04, installing updates returned an error code (1)

I have solved my issue by following dpkg overwrite

Specifically I entered:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/libx265-102_2.2-1~16.04.york0_amd64.deb


WebDav won't connect: 405 Method Not Allowed

The problem was that the Lets Encrypt setup had created a site specific ssl config that I hadn't noticed.  Copied the above code into that file, and it worked fine.


USB-live does not save files between sessions

Bug 1159016 is for broken presistence on UEFI machines.

The live media has two boot mechanisms, syslinux for non-UEFI and grub for UEFI machines.

The persistence mechanism is simply a word "persistent" on the kernel boot command line, and while the syslinux boot works with persistence, the word was missed in the grub.cfg file.

You can add it yourself. Edit the grub.cfg (usbpen/boot/grub/grub.cfg) file and add persistent just before the file= on the vmlinuz lines.  And yes, your desktop will be part of the things which will be saved when things are working.

E.g.

menuentry "Try Ubuntu without installing" {
    set gfxpayload=keep
    linux   /casper/vmlinuz.efi persistent file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash --
    initrd  /casper/initrd.lz
}

ISO formats changed about 14.04, making changes as suggested above more difficult (editable FAT filesystems can no longer be used on the USB).  The best current way to make a persistent USB is to use the mkusb tool from mkusb download site.  The mkusb-installer should set things up for you.


Open the terminal and run:

cd /var/www
sudo find . -type f  -name 'config.dat' -exec cp /home/john/config.dat {} \;

Here I have assumed that the /var/www directory is owned by root, but if you are the owner of the /var/www directory, then you don't need to use sudo in the command.


Ubuntu 18.04 won't start w/ dual-boot Windows 10

Partial answer...

For 18.04 or newer...

boot to a Ubuntu Live DVD/USB
open a terminal window
type sudo fdisk -l
identify the /dev/XXXX device name for your "Linux Filesystem"
type sudo fsck -f /dev/XXXX # replacing XXXX with the number you found earlier
repeat the fsck command if there were errors
type reboot


How to install Syntek Driver Ubuntu 14.10 (WiFi)

You've installed the wrong driver! These modules do not get associated with your wireless card and are therefore not loaded. Where did you get from that this is the correct driver?

I guess that there aren't drivers which work with 14.10 and the underlying kernel (yet)... I can't find anything about it on Google.


FX-6300 detected as i686 - Kubuntu won't install

You need to turn on hardware virtualization in bios to be able to install 64-bit OSes into VirtualBox.


How to make sure a Row {} or Column {} does not contract when an item's visible: property is set to false?

I you need to keep the column size, do not use the visible property, prefer to set the Item opacity to 0:

Example:

import QtQuick 2.0

Rectangle {
    width: 200
    height: 200

    Column { /* outer column */
      spacing: 10
      Text { text: "Column Element"}
      Column { /* inner column */
        x: 10; y: 10
        spacing: 10
        Rectangle { width: 40; height: 20; color: "red" }
        Rectangle { width: 40; height: 20; color: "green" }
        Rectangle { width: 40; height: 20; color: "blue"; opacity: 0 }
      }
      Text { text: "Row Element" }
      Row { /* inner row */
        spacing: 10
        Rectangle { width: 40; height: 20; color: "red" }
        Rectangle { width: 40; height: 20; color: "green" }
        Rectangle { width: 40; height: 20; color: "blue" }
      }
    }
}

Result:


How to mount an Android Jelly Bean phone if there's no option?

Install go-mtpfs from WebUpd8 repository following this guide:

http://www.webupd8.org/2012/12/how-to-mount-android-40-ubuntu-go-mtpfs.html

Then add go-mtpfs-unity.desktop the dash, connect your phone via usb and you have a quicklist to mount and dismount your android device.

Sorry for my bad English, I speak Spanish.


Computer Turned off during Ubuntu 14.04 Update

If it is an update just continue with the update normally, you wont lose your files, if you have problems with recovering insert an Ubuntu 14.04 LTS USB and upgrade from there and you will have no problem. :)


Simply create a line datadir = /path where it says

[mysqld]
#
# * Basic Settings
#

Then restart MySQL.


Has support for non-UEFI/non-I386 been dropped?

AMD iso does not work with a non-UEFI. Can anyone confirm this conclusion?

No, all Ubuntu images work fine with general BIOS systems. Really. As you don't include any reference to that "research", I don't see how you come to that conclusion.

And while the actual i368 architecture isn't supported anymore, the i686 architecture and up still is (despite keeping the i386 name), next to x86_64 (also referred to as amd64 and this has nothing to do with AMD, just the support for the amd64 instruction set).

From the Ubuntu installation guide:

  However, Ubuntu precise will not run on i586 or earlier processors. Despite the architecture name "i386", support for actual 80386 processors (and their clones) was dropped with the Sarge (r3.1) release of Debian[2]. (No version of Linux has ever supported the 286 or earlier chips in the series.) Support for i586 and lower processors, as well as for i686 processors without the cmov instruction, was dropped in Ubuntu 10.10. Most i686 and later processors are still supported[3].


How does Nautilus mount webdav without root?

In case you are still waiting for an answer, Nautilus seems to use gio mount (see e.g. https://stackoverflow.com/a/5977036 for some more details).
So in case of WeDAV, just use gio mount davs://...


The conceptually simple way to do this is to back up your data and install Ubuntu clean with "use the entire disk" option, then restore data from backup.  This isn't the way I'd do it, for a number of reasons, but it's surely the easiest way to do the partition changes you want.

Otherwise, you're going to have problems.  Deleting the first (or first two or three) partitions on the hard disk and expanding the remaining one(s) to fill the space is going to cause problems with partition ordering; you may get away with it if you (or your installer) used UUID for all your GRUB and fstab designations, but the first partition or two are almost certainly primary partitions, and my experience is that only logical volumes located inside an extended partition can be readily relocated or expanded.

One reasonably practical way to do this, however, might be to delete the Windows partition(s) (using a partitioning tool from inside Ubuntu or Ubuntu Live), create new partition(s), and clone the Ubuntu partition into the new partition(s).  You'll need to correct the UUIDs in GRUB and fstab, but this will get Ubuntu into the primary partition(s) and let you do what you like with the rest of the hard disk space.

It should go without saying, that you should make a backup of anything you want to keep before attempting this...


No menu bars after upgrading to 14.04LTS

Press Ctrl+Alt+F1 and log in{enter your passward}.
Enter this command

sudo apt-get install compizconfig-settings-manager

Then run it by doing this:

export DISPLAY=:0
ccsm

The first part tells the terminal which display you want it to load on (otherwise it won't have a clue).
Press Ctrl+Alt+F7 (or Ctrl+Alt+F8 sometimes) to get back to the graphical display where there should be a CompizConfig Settings Manager screen sitting there.
Press Ctrl+Alt+T and enter this command ccsm
now find unity plugin and enable it.


unable to remove partially installed packages

You original problem may be fixed with simple trick - you can create the needed file manually:

sudo mkdir -p /usr/share/X11/xorg.conf.d/
sudo touch /usr/share/X11/xorg.conf.d/50-synaptics.conf

and then use

sudo apt-get -f install


Software to block specific internet web pages

There are several options, depending on what and how you are trying to filter.

1 -If you simply wish to filter most "adult content" sites you can use opendns . Opendsn is easy to set up and they will do most of the work for you (maintaining blacklists)

http://www.opendns.com/home-internet-security/parental-controls/opendns-home/

2 - You can download a blacklist of ip addresses from the internet and use iptables or your hosts file to block ip. This is sort of difficult in that you have to update the list from time to time.

3 - If you want to filter content, you can use a proxy. My favorites are privoxy and squid.

See http://www.techradar.com/us/news/software/applications/6-of-the-best-content-filters-for-linux-698307#articleContent for ideas.

4 - You can use addins or plugins, adblock for firefox for example.


The volume "Filesystem Root" has only 533.9 MB disk space remaining

You can use the "Disk Usage Analyser" to see what is using all of your drive space.

Open "Disk Usage Analyser" by searching for it in the Dash.
Click on your root (/) drive.
Wait for the graph at the right to stop displaying loading dots (it may take a while).
You can now review which files are taking up the most space (You can just close the 'Permission denied' error if it appears).
Hover your mouse over a sector to get the name of that folder and its size.

To delete the largest files/folders

After performing the above steps and with the file path to a larger file/folder which you want to delete, you can do the following:

Only if the file is in your Home directory, you could just move it to an external hard drive (or delete it altogether if it's unimportant)
If the file is not in your Home folder, you can take a guess at which package it belongs to and try apt-get uninstall to remove that package (if you don't need it)
Anything else, please edit your question with the path to the file/folder which you'd like to delete. You should not randomly delete files which are not in your Home folder.

Mounting a separate partition on /usr

This would be my suggestion. Use the following instructions:

Install GParted using this command in a terminal:

sudo apt-get install gparted

Open GParted by searching for it in the dash.
Locate a large partition (>100GB, I'd suggest sda5) of which is mostly unused (<50% used)
Shrink this partition by 10GB (or 10000MB)
Create a new logical ext4 partition taking up all of the free space.
Open a root Nautilus window (be careful with this)

sudo -H nautilus

Copy the contents of the /usr folder (contents, not the folder itself) into the root of your new ext4 partition created above.
Execute this command in a terminal, replacing /dev/sda1 with the partition identifier of your new partition created above:

sudo blkid | grep '/dev/sda1' | grep -Po 'UUID="[^"]+"'

Copy the complete output of this command (should be similar to this: UUID="X7X2X1X3-X573-4929-97XX-XX1514X31X7X")

Open the /etc/fstab file with this command:

sudo -H gedit /etc/fstab

Paste in it the following on it's own line, substituting your copied text in where necessary:

<PASTE_HERE>    /usr    ext4    errors=remount-ro 0       1

Reboot

The below steps are optional, but will delete redundant copies of the /usr folder still on your original / drive, freeing up space.

Boot into a LiveCD/USB.
Mount your original / drive in Nautilus, and take a note of where it's mounted to.
Open a root Nautilus window (be careful with this)

sudo -H nautilus

Navigate to your original / drive (which you noted above)
Delete the contents of the /usr folder, not the folder itself but everything inside it.
Reboot.

Replies

  Can the files outside the home directory not be copied to an external drive?

No, they can not. You should not manually delete (or move away) any files outside of your Home folder unless you (you yourself, not apt-get or similar) put them there.

  Is having two mount point at the same logical partition possible?

No, that is not possible.


Please, try the package ubuntu-xboxdrv from this PPA:

sudo apt-add-repository ppa:rael-gc/ubuntu-xboxdrv
sudo apt-get update
sudo apt-get install ubuntu-xboxdrv

This package provides additional configurations over the stock xboxdrv, creating a service for it and a "Joysticks" entry on System Panel.

The shoulder buttons are mapped as buttons (not triggers), but you can see how to change some configurations in the package repo.


I can't find most packages in Ubuntu 16.04 LTS pakcage manager

I assume with "I had added all the most common repos in 15.10" you mean third-party repositories like PPAs? Repositories are specific for different Ubuntu releases. For example, the (arbitrarily chosen) Cinnamon Nightly PPA is available for Ubuntu releases from Trusty to Yakkety. Each of these releases gets a different set of packages from the PPA.

Because of that, third-party repositories get routinely disabled in the upgrade process (when you switch from one Ubuntu release to another). After the upgrade, you can look through your third-party repos. Some you can just switch to the new Ubuntu release you're using (for example from "wily" to "xenial"), because the repo maintainer offers the repo for that version as well. Some repos may have become obsolete, because the packages you added the repo for are now part of the main Ubuntu release. Some repos are not available for the Ubuntu release you're running now, so you can't use them any more.


Touchscreen works on Ubuntu 15.10 but not on 14.04 (HP)

You can install kernel from Ubuntu 15.10 that should support your touchscreen.

Run in terminal

sudo apt-get install linux-generic-lts-wily

and reboot when installation is finished.

You may need to install Broadcom wireless drivers from 15.10 source. Run

wget http://mirrors.kernel.org/ubuntu/pool/restricted/b/bcmwl/bcmwl-kernel-source_6.30.223.248+bdcom-0ubuntu7_amd64.deb
sudo dpkg -i  bcmwl-kernel-source_6.30.223.248+bdcom-0ubuntu7_amd64.deb


Have you tried to do another re-install? That should fix it. And are you dual booting or was a a full on install?


System Requirements

700 MHz processor (about Intel Celeron or better)

512 MiB RAM (system memory)

5 GB of hard-drive space (or USB stick, memory card or external drive but see LiveCD for an alternative approach)

https://help.ubuntu.com/community/Installation/SystemRequirements


Ubuntu White Screen after sudo apt-get remove --purge nvidia*

Try this:

Reboot. Once you get into the bootloader menu (GRUB), choose Advanced Options for Ubuntu.
Select a Recovery Kernel (doesn't matter which).
In the list of options that then comes up, select failsafe graphics mode.
This should boot you into Ubuntu and should let you use it, but with low-res graphics. Now you need to reinstall the generic drivers.
Open Unity Dash (the search menu) and search for Additional Drivers.
Open the resulting application and let it scan.
Once it finishes scanning, select the generic Xorg driver. It should be obvious which it is.

If this doesn't work, I'll delete my answer. No need to downvote.


Ubuntu fails to detect my webcam more than once

I don't know the cause of the problem, and many others reported the same frustration across the years.
As a workaround, to avoid rebooting, you could disable and enable the webcam.

$ sudo modprobe -r uvcvideo
    (sudo rmmod uvcvideo may work as well)
$ sudo modprobe uvcvideo

This worked for many since old Ubuntus and not-so-old ones

sudo modprobe -r uvcvideo
sudo modprobe uvcvideo

If uvcvideo is not the right module in 20.04, you can list possible values with lsmod:

sudo lsmod

Other sources:

https://digitizor.com/how-to-reload-ubuntu-linux-laptop-webcam-fix-without-restart/


delete all sub-directories recursively except several ones

Quick and dirty, but very efficient:

shopt extglob   # possibly already there
shopt globstar  # not often the default
rmdir ./**/!(abc|def) # rinse and repeat

In slo-mo:

extglob enables bash extended patterns (including tings like !(abc|def) that means (anything but abcordef)
globstar makes ** match any level of directories
so ./**/!(abc|def) will match everything not called abc or def (I am assuming you have removed the files already, otherwise with a slightly different pattern you can rm the files too [*] )
since the directories are listed top-down, the rmdir for the top levels will come before the lower levels are removed, which is why you may have to repeat the command a few times.

More classical with find

You can also use find (with -depth to process subdirectories first):

find . -depth -type d \( \! -name 'abc' -a \! -name 'def' \) -exec rmdir {} \;

but as you see the command will be rather verbose if you have more than a couple of directories to ignore.

[*] rm ./**/!(abc|def)/*.txt for instance


Cursor Jump on Dell Inpsiron Ubuntu 18.04

I had to uninstall libinput, reinstall it, install synaptics, restart immediately, now I have two devices however, but the synaptics seems to be priority, now how to disable libinput for touchpad. This appears to be working currently, I do not know why I had to uninstall libinput but my exact steps are, login to Ubuntu Wayland (login as another user option), uninstall synaptics if one has it installed, uninstall libinput with {sudo apt remove xserver-xorg-input-libinput}, reinstall libinput with {sudo apt install xserver-xorg-input-libinput}, install synaptics with {sudo apt install xserver-xorg-input-synaptics} and restart immediately afterwards. After restarting one needs to switch out of Wayland by login as another user. This worked for me after lots of trial and error.


What is the thing called in GNOME 3 that appears when you press the super key?

It's generally called the "(Activities) Overview":

Activities Overview
This is a separate view designed to enable users to get an overview of
their current activities and to enable effective focus switching (in
this regard, the overview is a facilitator and a mediator, not a
destination). The top bar continues to be displayed in the overview in
order to provide a familiar landmark and visual anchor.

It's composed of:

the dash,

the window picker,

the application picker,

the search,

the workspace switcher, etc.

We also have a tag for it: activities-overview


Can I use Ubuntu and its file system on a hard drive?

External Hard Drive that Boots on Any Computer

If you want an external hard drive that boots on any computer it must be able to boot in both BIOS and UEFI mode.

There are advantages to a Full install over a Persistent install see: I want to make a portable version of Linux Ubuntu . A Full install must be modified to be able to install Ubuntu

A step by step guide for creating a Full install USB that can boot both BIOS and UEFI can be found here: How to Create a Full Install of Ubuntu 20.04 to USB Device Step by Step

If you just want to remove the try/install screen see: Remove Ubuntu 20.04 Try/Install screen


In Ubuntu 17.10 'plymouth show-splash' does nothing, why?

This must be executed as root with sudo plymouth show-splash


How can I uninstall Softmaker Office 2012 if I downloaded their Deb?

This depends on what the software is and also how well it was made ... but in general: normally I would expect an uninstall option in the directory where the software resides.

If not ...

open a termimal, go to the directory with cd and do a remove (rm) of the files or directory those files reside in from the termimal.
or navigate with Nautilus to the directory where it is installed, select it and hit delete.

If the software created all kinds of configuration files this will force you to manually track and remove them. Also: you also will need to manually stop the service if applicable preferbly before removing the software.

In this case:  softmaker can be removed with this command.

sudo dpkg -r softmaker-office-2012

if installed with the .DEB file. If you used the tar.gz file then there is a script

sudo uninstallsmoffice12

that removes it.


If you just need to view a .dae file you can use meshlab, which can be installed by

sudo apt-get install meshlab


Two finger scroll stops working on Ubuntu 18.04

This answer from Manjaro suggests adding the following line to /etc/modprobe.d/psmouse_serio2_setup.conf:

options psmouse synaptics_intertouch=0

This apparently forces the trackpad to use PS/2 emulation and makes everything all better.  I haven't tested it extensively, but it seems to work in my T450s with Ubuntu 18.04.


Try

open the terminal and type

sudo apt-get purge gnome-shell
 and then
sudo apt-get install gnome-shell.
 What method did you use to install the gnome-shell?


On boot, black screen says "Ubuntu 12.04.1 LTS [ubuntu name] tty1" and asks for login

What it means is that for some reason the graphics doesn't work, but otherwise the system is fine. Laugh not: what you see is the regular login screen on a Ubuntu server edition, or a typical Unix login screen for many, many years.

This can be for example due to a problem with a graphics driver. There are a few things you can do to correct the problems. After you log in, try the following:

Type startx at the command prompt. This will, most likely, fail, but it will also print out a reason for the failure.
Copy the file /var/log/Xorg.0.log to an USB stick or a Windows partition (your USB stick should work as usual), using command like cp /var/log/Xorg.0.log /media/XXX, where XXX is the name of your USB stick. Upload it to http://paste.ubuntu.com.
At the minimum, tell us what graphic adapter you have (my guess is: Nvidia)


(root) CMD (sudo mount dev/sda1 /mnt)

This is missing the leading / in /dev/sda1

(jovan) CMD (/home/jovan/Documents/scripts/startup.sh)

This runs with your (jovan) identity. You can't expect it to somehow guess your password to authenticate to sudo, can you ;) I would say putting sudo anywhere in a non-interactive script is wrong.

Note that for mounting filesystems at boot time, there is the /etc/fstab file. You just add your filesystem there and the startup scripts (or systemd) will mount it, unless your mark it noauto.

And last, I would certainly recommend you to install the mail transport agent (even if only one that delivers mail on your machine), in that case you'd get the error message in your mailbox.


What happened when I installed graphic drivers?

If you are trying to check to see if the driver is installed go to the terminal and type lshw to see the drivers installed your pc.


Would zRam increase my computer's performance?

I'm using it on Oneiric and have not found any problem yet. You should give it a try, and see if the performance is better. Virtualization is one of their use cases. But bear in mind that to give that "extra memory" effect, pages are compressed, which requires cpu power.

To see if it is running, use service zramswap status


How do I delete the target of a symbolic link without deleting the link itself?

using find to find the symlink and then using readlink to get the full path to the target to rm:

find ~/Desktop/ -type l -name 'test.txt' -exec bash -c 'rm "$(readlink -f "$1")"' _ {} \;

Or as you know the link name already:

rm "$(readlink -f ~/Desktop/test.txt)"


Firefox will play videos of this website but Chromium won't

Chrome and Chromium have now changed to PepperFlashPlugin to run all flash and while it seems to be a newer version, has quite a few problems when playing content on certain sites and providing hardware acceleration for streaming videos on certain vide cards...

Personally I prefer Firefox because of the fact it still works with the original flash plugin and gives my much needed hardware support and seems that bit more stable...


Is there a way "extract and delete zip file" in a single command?

For a GUI I'd say the easiest way is a nautilus script. The main line of which would be:

unzip "$item" && trash "$item"

It works in bash/dash just as easy. In nautilus the whole thing would look like this:

#!/bin/bash
# Nautilus script to unzip and then remove a zip archive.
# Nautilus script usually go in "$HOME/.gnome2/nautilus-scripts"

IFS='
'
for item in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS; do
    if [ -n "$(file -b "$item" | grep -o 'Zip')" ]; then
        unzip "$item" && trash "$item"
        # use trash instead of rm to move them to trash
        # (trash-cli package installed)
    fi
done


What are these two USB devices and how do I disable them?

The first item is this:

USB device: usb-device-8087-0a2b

A search for the usb.id 8087:0a2b suggests that is the bluetooth segment of the wireless/bluetooth card. Generally, in Settings, there is a slider to turn bluetooth off and on.

The second item is this:

05c8:03a2 Cheng Uei Precision Industry Co., Ltd (Foxlink)

Searching for that wording finds this page: https://certification.ubuntu.com/catalog/make/Cheng%20Uei%20Precision%20Industry%20Co.%2C%20Ltd%20%28Foxlink%29/

This seems to confirm that the device is the webcam. Next, we find this: https://www.linuxquestions.org/questions/linux-software-2/webcam-not-recognized-4175495176/ That page suggests that the driver is uvcvideo. Confirm that it is loaded:

lsmod | grep video

If it is, and you wish to disable the device altogether, blacklist the driver:

sudo -i
echo "blacklist uvcvideo"  >>  /etc/modprobe.d/blacklist.conf
modprobe -r uvcvideo
exit

The driver has a long list of dependencies, one or more of which may load despite the blacklist. We may need to blacklist a few more after a trial and error.

EDIT: Reboot and see if there are any of these still loaded: uvcvideo,videodev,videobuf2-core,videobuf2-v4l2,videobuf2-vmalloc,media

If so, blacklist them one at a time and reboot and check again until none is left.


I would do this: take the OLDEST backup folder and rename from "backupFeb2015" (or what it would be) to "restore" or any other name you would like. Copy to a new location or few levels up. Then go back to the source location, rename the "restore" folder back to "backupFeb2015" and rename the next one "backupNov2015" to "restore". Copy and paste it to the destination location containing your restore. This way the copy operation detects the folder with the same name and you can now choose "merge folders" or something like that. choose the "do this to all files" or something and proceed. It will ask this for files too.  Do this until you had all backup folders and you should have all merged in your new folder. The old ones are still there, so you will not loose anything. GOOD LUCK


Register an application for lubuntu's "Run" dialog

Desktop environments don't process the .bashrc file.

In order for you to have the path available to the Alt+F2 run dialog, you need to edit your ~/.profile file, as a regular user, sudo is not required.  You can use any editor such as nano or gedit.

Add the following line to the bottom of the .profile file:

PATH="/path/to/folder:$PATH"

Alternatively, if you have a line such as the one below:

PATH:"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/treedev/lib/Qt/bin"

You can add your path to that following the same convention of paths being separated by a colon.  But it's easier to do the first way so that you can spot your own edit easier and remove it in the future if need be.

After saving and closing, restart your session by logging out and back in, or in terminal, type source ~/.profile for changes to take effect.


Changing Selection color in Ubuntu 18.10 themes

we need to edit the file gtk.css

access the file by

sudo -H nautilus /usr/share/themes/Ant-Dracula/gtk-3.20/gtk.css/ change /usr/share/themes if you stored your file in ~/.themes

find the color #ff79c6 and change it to your preferred color in the initial lines.
it has major effect on themes.

/* GTK NAMED COLORS
   ----------------
   use responsibly! */
/* widget text/foreground color */
@define-color theme_fg_color #f8f8f2;
/* text color for entries, views and content in general */
@define-color theme_text_color #f8f8f2;
/* widget base background color */
@define-color theme_bg_color #1e1f29;
/* text widgets and the like base background color */
@define-color theme_base_color #282a36;
/* base background color of selections */
@define-color theme_selected_bg_color #ff79c6;
/* text/foreground color of selections */
@define-color theme_selected_fg_color #f8f8f2;
/* base background color of disabled widgets */
@define-color insensitive_bg_color #22232e;
/* text foreground color of disabled widgets */
@define-color insensitive_fg_color #8b8c8e;
/* disabled text widgets and the like base background color */
@define-color insensitive_base_color #282a36;
/* widget text/foreground color on backdrop windows */
@define-color theme_unfocused_fg_color #8b8c8e;
/* text color for entries, views and content in general on backdrop windows */
@define-color theme_unfocused_text_color #f8f8f2;
/* widget base background color on backdrop windows */
@define-color theme_unfocused_bg_color #1e1f29;
/* text widgets and the like base background color on backdrop windows */
@define-color theme_unfocused_base_color #2a2c39;
/* base background color of selections on backdrop windows */
@define-color theme_unfocused_selected_bg_color #ff79c6;
/* text/foreground color of selections on backdrop windows */
@define-color theme_unfocused_selected_fg_color #f8f8f2;
/* widgets main borders color */
@define-color borders rgba(25, 26, 34, 0.9);
/* widgets main borders color on backdrop windows */
@define-color unfocused_borders rgba(26, 27, 35, 0.91);
/* these are pretty self explicative */
@define-color warning_color #ff9f39;
@define-color error_color #ff3c3c;
@define-color success_color #4caec3;

there are 67 entries with the color #ff79c6, i have replaced all of them with #456789 in single shot. if you want to try each individual, you have to make trial and error of those 67 entries.

save the file & Close. Reboot to see the change.


How do I add a PPA in a shell script without user input?

The script goes like this

#! /bin/sh
sudo add-apt-repository ppa:(Your ppa here) -y

BTW you will still have to enter password.


Apt sources list with both Dev and Stable entries

Assuming the two repositories offer the same packages in potentially different versions then they will not interfere with each other. Apt will simply install whichever package has a "higher" version number which is most likely the one from the development channel.

If the repositories offer different packages and aren't well maintained then it's possible that their simultaneous inclusion will cause package management issues like with any other set of package repositories.


Regression? Ubuntu 17.10 gnome-shell starts instead of gnome-flashback

"when I lock the screen, it behaves like something was pressing enter every ~500ms, so it's not possible to enter the password"

I was able to fix this by uninstalling lightdm and gdm3, and then reinstalling both, and running sudo dpkg-reconfigure lightdm which took me to a dialog where I chose lightdm over gdm3 (which was used before). Now I am at least able to lock and unlock the system. Still no Flashback though.


How to navigate to C drive in bash on WSL-Ubuntu?

C:\ in Windows is /mnt/c/ in WSL Ubuntu
In Windows Subsystem for Linux (WSL) The C:\ drive is mounted as /mnt/c/, D:\ is mounted as /mnt/d/ et cetra. Therefore, C:/wamp64/www should be at /mnt/c/wamp64/www. Try:
cd /mnt/c/wamp64/www

in the Ubuntu terminal to go to that folder. Note, the first / before mnt and remember that in Ubuntu file and folder names are case sensitive. So wamp64, WAMP64, wAmP64, and WaMp64 are 4 different folders! See https://superuser.com/questions/1116625/how-can-i-access-case-sensitive-paths-on-windows-created-with-bash-on-ubuntu-on for a bit more on using case sensitive file names in WSL.
Background on /mnt
Windows users not familiar with Ubuntu (Linux in general) may wonder:
What does /mnt stand for?
In Linux almost everything is a file or a folder. /mnt is a folder, /mnt/c is a folder called c inside the folder /mnt.
In Linux partitions (Windows calls them "drives" to confuse us) are mounted in folders generally called "mount points". So in WSL, the "C Drive" is mounted in the c folder inside /mnt folder. /mntis a folder within which other folders are created for the purpose of mounting various partitions. See the link related to mnt below.
References:
https://blogs.msdn.microsoft.com/wsl/2016/06/15/wsl-file-system-support/
https://superuser.com/questions/1066261/how-to-access-windows-folders-from-bash-on-ubuntu-on-windows
On mnt
https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/mnt.html
Hope this helps


How can I configure a domain-specific default browser?

Note that there is a difference between the text/html mimetype
(this is opening actual HTML files)
and the x-scheme-handler/http mimetype
(this is an HTTP URL).
I assume you want to customize how external applications open HTTP/HTTPS URLs,
since you mention domains.
(Note that this is for external applications.
Customizing how a particular browser handles an HTTP URL
is a different thing altogether.)

One tricky thing about custom URL handlers
is that there are at least four files the associations might be stored in,
depending on the application / library the application uses:

~/.config/mimeapps.list (the right place to make changes)
~/.local/share/application/mimeapps.list (the deprecated location)
~/.local/share/application/defaults.list (the older deprecated location)
~/.local/share/applications/mimeinfo.cache (the cache)

I've been doing some work on custom URL handlers
lately, so I've adapted some of that for this purpose.
Here are the instructions:

Check the currently registered file for the protocols.
Here's what they look like for me:

$ gio mime x-scheme-handler/http
Default application for “x-scheme-handler/http”: firefox.desktop
Registered applications:
        firefox.desktop
        chromium-browser.desktop
Recommended applications:
        firefox.desktop
        chromium-browser.desktop
$ gio mime x-scheme-handler/https
Default application for “x-scheme-handler/https”: firefox.desktop
Registered applications:
        firefox.desktop
        chromium-browser.desktop
Recommended applications:
        firefox.desktop
        chromium-browser.desktop

Write a script that parses the URL and launches the appropriate browser.

I prefer to use Python,
since it has libraries to parse URLs and send errors to syslog.

#! /usr/bin/env python3

import subprocess
import logging
import argparse
import syslog
import sys

try :
    from urllib.parse import urlparse
except ImportError:
    from urlparse import urlparse
import os.path

def http_url(url):
    if url.startswith('http://'):
        return url
    if url.startswith('https://'):
        return url
    else:
        syslog.syslog(syslog.LOG_ERR, sys.argv[0] + ": not an HTTP/HTTPS URL: '{}'".format(url))
        raise argparse.ArgumentTypeError(
            "not an HTTP/HTTPS URL: '{}'".format(url))

if __name__ == '__main__':
    parser = argparse.ArgumentParser(
        description='Handler for http/https URLs.'
    )
    parser.add_argument(
        '-v',
        '--verbose',
        help='More verbose logging',
        dest="loglevel",
        default=logging.WARNING,
        action="store_const",
        const=logging.INFO,
    )
    parser.add_argument(
        '-d',
        '--debug',
        help='Enable debugging logs',
        action="store_const",
        dest="loglevel",
        const=logging.DEBUG,
    )
    parser.add_argument(
        'url',
        type=http_url,
        help="URL starting with 'http://' or 'https://'",
    )
    args = parser.parse_args()
    logging.basicConfig(level=args.loglevel)
    logging.debug("args.url = '{}'".format(args.url))
    parsed = urlparse(args.url)
    if parsed.hostname == 'askubuntu.com':
        browser = 'firefox'
    else:
        browser = 'chromium-browser'
    logging.info("browser = '{}'".format(browser))
    cmd = [browser, args.url]
    try :
        status = subprocess.check_call(cmd)
    except subprocess.CalledProcessError:
        syslog.syslog(syslog.LOG_ERR, sys.argv[0] + "could not open URL with browser '{}': {}".format(browser, args.url))
        raise

Adapt the script to your liking,
particularly the executable for brave (I haven't used it, so I don't know)
and the hostname in the if parsed.hostname part.
Test the script from the current directory.

This should open with Firefox:

$ ./http_url_handler.py 'https://askubuntu.com/questions/1161752/how-can-i-configure-a-domain-specific-default-browser'

This should open with Chromium:

$ ./http_url_handler.py 'https://superuser.com/questions/688063/is-there-a-way-to-redirect-certain-urls-to-specific-web-browsers-in-linux/'

Add the script to your $PATH so the desktop file can find it.

I use a bin directory like this:

$ mkdir ~/bin/

and add this to ~/.profile
(note you will need to log out and log in again to see changes):

PATH="$HOME/bin:$PATH"

and finally either copy or symlink the script to ~/bin:

$ ln -s $PWD/http_url_handler.py ~/bin/

If you did this properly, you should see this:

$ type -a http_url_handler.py
http_url_handler.py is /home/nathaniel/bin/http_url_handler.py

not this:

$ type -a http_url_handler.py
bash: type: http_url_handler.py: not found

Test the script from your home directory.

This should open in Chromium:

$ http_url_handler.py 'https://superuser.com/questions/688063/is-there-a-way-to-redirect-certain-urls-to-specific-web-browsers-in-linux'

This should open in Firefox:

$ http_url_handler.py 'https://askubuntu.com/questions/1161752/how-can-i-configure-a-domain-specific-default-browser'

Install the desktop file. Here's the one I used:

[Desktop Entry]
Name=HTTP URL handler
Comment=Open an HTTP/HTTPS URL with a particular browser
TryExec=http_url_handler.py
Exec=http_url_handler.py %u
X-MultipleArgs=false
Type=Application
Terminal=false
NoDisplay=true
MimeType=x-scheme-handler/http;x-scheme-handler/https

Either via desktop-file-install:

$ desktop-file-install --dir=$HOME/.local/share/applications/ http-url-handler.desktop

or manually copy the http-url-handler.desktop file
to the proper directory,
which should be ~/.local/share/applications/:

$ cp http-url-handler.desktop ~/.local/share/applications/

These are the most important lines in the desktop file:

Exec=http_url_handler.py %u
MimeType=x-scheme-handler/http;x-scheme-handler/https

Make the desktop file executable.

$ chmod +x $HOME/.local/share/applications/http-url-handler.desktop

This is necessary because of a security precaution.
Register the desktop file with the
x-scheme-handler/http and x-scheme-handler/https mimetypes.

$ gio mime x-scheme-handler/http  http-url-handler.desktop
Set http-url-handler.desktop as the default for x-scheme-handler/http
$ gio mime x-scheme-handler/https http-url-handler.desktop
Set http-url-handler.desktop as the default for x-scheme-handler/https

All this really does is change lines in ~/.config/mimeapps.list
under the [Default Applications] group
so that instead of this:

x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop

it says this:

x-scheme-handler/http=http-url-handler.desktop
x-scheme-handler/https=http-url-handler.desktop

You can also add it under the [Added Associations] group
with a text editor so it looks something like this:

x-scheme-handler/http=http-url-handler.desktop;firefox.desktop;chromium-browser.desktop
x-scheme-handler/https=http-url-handler.desktop;firefox.desktop;chromium-browser.desktop

Some older applications use ~/.local/share/application/mimeapps.list,
but this is officially deprecated.
However, the xdg-mime command uses this location anyway:

$ xdg-mime default http-url-handler.desktop x-scheme-handler/http
$ xdg-mime default http-url-handler.desktop x-scheme-handler/https

There is also an even older deprecated file
called defaults.list
that is still used by some applications.
Edit this file with a text editor:

$ edit ~/.local/share/applications/defaults.list

and manually add these lines:

x-scheme-handler/http=http-url-handler.desktop
x-scheme-handler/https=http-url-handler.desktop

under the [Default Applications] group.
Check if it was successfully registered.

$ gio mime x-scheme-handler/http
Default application for “x-scheme-handler/http”: http-url-handler.desktop
Registered applications:
        firefox.desktop
        chromium-browser.desktop
Recommended applications:
        firefox.desktop
        chromium-browser.desktop
$ gio mime x-scheme-handler/https
Default application for “x-scheme-handler/https”: http-url-handler.desktop
Registered applications:
        firefox.desktop
        chromium-browser.desktop
Recommended applications:
        firefox.desktop
        chromium-browser.desktop

If you also added to the [Added Associations] group,
it will look like something like this:

$ gio mime x-scheme-handler/http
Default application for “x-scheme-handler/http”: http-url-handler.desktop
Registered applications:
        http-url-handler.desktop
        firefox.desktop
        chromium-browser.desktop
Recommended applications:
        http-url-handler.desktop
        firefox.desktop
        chromium-browser.desktop
$ gio mime x-scheme-handler/https
Default application for “x-scheme-handler/https”: http-url-handler.desktop
Registered applications:
        http-url-handler.desktop
        firefox.desktop
        chromium-browser.desktop
Recommended applications:
        http-url-handler.desktop
        firefox.desktop
        chromium-browser.desktop

Check xdg-mime also.

$ xdg-mime query default x-scheme-handler/http
http-url-handler.desktop
$ xdg-mime query default x-scheme-handler/https
http-url-handler.desktop

Test some URLs.

This should open in Chromium:

$ gio open 'https://superuser.com/questions/688063/is-there-a-way-to-redirect-certain-urls-to-specific-web-browsers-in-linux'

This should open in Firefox:

$ gio open 'https://askubuntu.com/questions/1161752/how-can-i-configure-a-domain-specific-default-browser'

Now test the same URLs with xdg-open:

$ xdg-open 'https://superuser.com/questions/688063/is-there-a-way-to-redirect-certain-urls-to-specific-web-browsers-in-linux/'

$ xdg-open 'https://askubuntu.com/questions/1161752/how-can-i-configure-a-domain-specific-default-browser'

Update the mimeinfo cache.

Some applications read ~/.local/share/applications/mimeinfo.cache
instead of ~/.config/mimeapps.list.
So update the cache:

$ update-desktop-database ~/.local/share/applications/

For convenience, the files are on Github here:

https://github.com/nbeaver/askubuntu-custom-http-url-handler


The code echo "show slave status \G;" | mysql -u $User -p$Password 2>& at line 37 gives an error back and we don't see this error, so you should print the $Show_Slave_Status variable in case of a fail:

#Show Slave Status
Show_Slave_Status=`echo "show slave status \G;" | mysql -u $User -p$Password 2>&1`
status=$?
if [ $status -ne 0 ]; then
  echo $Show_Slave_Status
  exit $status
fi

And then run the script again. It should now print you the error message of the mysql command and exit.

And add to the lines 40, 43 and 49 echo before the $Show_Slave_Status variable:

Line 40: echo $Show_Slave_Status | grep "Last_" > $Log_File

Line 43: echo $Show_Slave_Status | grep "Slave_IO_Running: No"

Line 49: echo $Show_Slave_Status | grep "Slave_IO_Running: Connecting"


With dual boot Ubuntu and Windows you have to disable fast boot in Windows, if you have not done it, you can do so by following these instructions:

Go to "Control Panel > Power Options"
To the left, click "Choose what the power buttons do."
Click "Change settings that are currently unavailable."
Uncheck "Turn on fast startup (recommended)" then save the changes.

Done.

Control Panel is harder to get to on recent versions of Windows, it's easier to press Windows + X, click "Power Options", then at the bottom click "Additional power settings".


Ubuntu 13.04 Intel Graphics on Intel Desktop Board DH87RL

See this-

xrandr --addmode VGA-1 1440x900 xrandr --output VGA-1 --mode 1440x900
 --rate 60

  Of course, change the value on rate to what refresh rate you want, and
  VGA-1 should be changed to what the name of your monitor is. If you
  need to find out the name just do

xrandr

  and it will show you a list.

From here,
My 1440x900 resolution is not recognized

See this too

  This worked for me on an old Dell Optiplex GX270:

  Launch a terminal window and enter the following command:

sudo gedit /etc/X11/xorg.conf

  Enter your password if prompted. The xorg.conf document will then
  launch in gedit.

  Add the following line under Section "Monitor":

  Modeline     "1440x900_60.00"  106.47  1440 1520 1672 1904  900 901
   904 932  -HSync +Vsync

  Add following lines under Section "Screen":

SubSection "Display"
      Viewport       0 0
      Depth         24
      Modes         "1440x900_60.00" EndSubSection

  Select "Save" from the file menu, then "Close".

  Shut down any running programs and then restart X Server using
  Ctl+Alt+Backspace. Log back in and go to System > Preferences > Screen
  Resolution. Choose Resolution 1440x900 and then Apply. You may need to
  restart the PC for the change to take effect without display errors.

  This may work with other widescreen resolutions. To generate modelines
  for different resolution/refresh rate combinations use the command gtf
  [hres] [vres] [refresh rate], e.g. for a monitor with 1680x1050 native
  resolution:

gtf 1680 1050 60

From here, http://ubuntuforums.org/showthread.php?t=1022011

  I have a similar problem with my monitor. Have you tried the usual
  randr commands?


Can I allocate both "available" and "free" memory to a Minecraft server? (18.04)

Let's see a typical free output:

              total        used        free      shared  buff/cache   available
Mem:       32806952     7552612      780696      949180    24473644    23843300
Swap:       2097148       36864     2060284

Here available is free + part of buff/cache, you could not add them together because free will be counted twice.

Also if you allocate all available memory to your minecraft server, it means your computer will not have any memory left to use disk cache.  OS will try to swap something out, and could be incredibly slow.


You have a couple of issues here

unlike in csh, in bash (and other Bourne-like shells), aliases are assigned with an = sign e.g. alias foo=bar
quotes can't be nested like that; in this case, you can use single quotes around the alias and double quotes inside
the backslash \ is a line continuation character: syntactically, it makes your command into a single line (the opposite of what you want)

So

#!/bin/bash

alias jo='
echo "please enter values "
read a
read -e b
echo "My values are $a and $b"'

Testing: first we source the file:

$ . ./myscript.sh

then

$ jo
please enter values
foo bar
baz
My values are foo bar and baz

If you want to use the alias within a script, then remember that aliases are only enabled by default in interactive shells: to enable them inside a script you will need to add

shopt -s expand_aliases

Regardless of everything above, you should consider using a shell function rather than an alias for things like this


Open your grub configuration file by typing in the terminal

gksudo gedit /etc/default/grub

When this the opens, check that the following lines in your file look like this-

GRUB_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true

if not edit them to look like above.

What this will do is to enable your Grub menu at boot time and give you a time of 5 seconds to choose an OS.

Then save the file and run

sudo update-grub

This should now list your eOS as well as Ubuntu13.04

This should be enough.

Now you would be able to boot into Ubuntu 13.04 on restart.

However if you still want
To get the Ubuntu bootloader back, boot into Ubuntu, open a terminal and type-

sudo grub-install /dev/sdb
sudo update-grub

This would install Ubuntu's grub to the MBR of sdb and update the grub configuration file.


Where to download the latest ubuntu touch iso?

Try the ubuntu touch official web page
https://ubuntu-touch.io/es/get-ubuntu-touch


In Cameroon there is the iSchool project and the Classroom project (on IRC), both of which are projects of the Ubuntu Users in Cameroon Team. Information about other educational projects of the Ubuntu Users in Cameroon Team can be found on the Ubuntu Cameroonian Team Projects wiki.


Faenza microphone icon missing in the sound indicator

(comment by OP solved issue)

FIXED: I also installed the gnome-shell package and seems to work now. Really strange though. – nikita.utiu Jan 19 at 16:24


Probably the touchpad activating. Try this:

System Settings => Hardware => Input Devices => Touchpad => Taps

and change 'One Finger' under 'Mouse Click Emulation' to 'No action'


Re-install ubuntu without losing install

You can delete the first partition and grow the second partition to the size of entire drive. Use GParted from the Ubuntu LiveUSB boot.

No reinstall needed.

(another unrelated small useful thing is to keep /home on separate partition)


How to make nautilus recognize emblems changed from the command line

You can use nautilus -q to only restart nautilus.


You could just write sudo in front of every command, which needs sudo rights. If "the sudo timer runs out", you will be prompted again.
This would look like

#!/bin/bash
sudo ./main a > out/output2DFloat.csv

sudo ./main a a > out/output3DFloat.csv

sudo ./main a a a > out/output2DDouble.csv

sudo ./main a a a a > out/output3DDouble.csv

then.


Ubuntu server doesnt find cable connection

The interface for your USB ethernet is enx00051bd0e80e and not eth0. This is a result of predictable network naming: https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

Your settings for wlp2s0 in /etc/network/interfaces are faulty. As well, since you are not asking to connect by wireless, but ethernet, I suggest that you remove the wireless settings altogether. I suggest that you amend the file:

sudo nano /etc/network/interfaces

Change the file to:

auto lo
iface lo inet loopback

auto enx00051bd0e80e
iface enx00051bd0e80e inet dhcp

Proofread carefully, save and close the text editor. Restart the interface:

sudo ifdown enx00051bd0e80e && sudo ifup -v enx00051bd0e80e

Did you connect?

Typically, servers are set up with static IP addresses so that you can easily ssh and ftp into them. If you wish to do so, then I suggest:

auto lo
iface lo inet loopback

auto enx00051bd0e80e
iface enx00051bd0e80e inet static
address 192.168.1.150
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1 8.8.8.8

Of course, select an address outside the range used by the DHCP server in the router, switch, or access point. Substitute your details, IP addresses, DNS servers, etc., here.

Get the system to re-read and use the changes:

sudo ifdown enx00051bd0e80e && sudo ifup -v enx00051bd0e80e

Did you get the requested address?

ifconfig

Can you reach the internet?

ping -c3 www.ubuntu.com


How can I reset ubuntu gnome terminal options?

Two simple steps to reset gnome-terminal to defaults:

Run this command from your Terminal:

mv -v $HOME/.gconf/apps/gnome-terminal/ $HOME/.gconf/apps/gnome-terminal_bak

Log out and then log back in

The defaults will then be back in place. Then go to:

Edit --> Profile Preferences

and customise as you wish...


How do I recompile my kernel without qt3?

Either you need to install some libraries do not exist for Trusty or you have to take the road for which the libraries are not needed.

To use

make xconfig

you have to install the QT3 libraries, and you could download and install the Precise packages. To do this, download libqt3-mt-dev and install with sudo dpkg -i. But you'll have to install many more dependencies.

But ;)

The only reason you need qt3 is because you ran make xconfig. There are other ways of configuring your kernel for compilation that don't require qt3. When I was young, I did it this way:

make menuconfig

Or, really old-shool:

make config

After the configuration steps, run

make -j3

if you have two cores (cores + 1)

make modules_install
make install


How to output commands when running lynx from bash script?

Use the -dump argument.

Example of lynx in a script:

#!/bin/bash

buffer=$(lynx -dump "https://www.domain.com/script.php?")

copyright=$(echo "$buffer"|egrep Copyright)
phonenumber=$(echo "$buffer"|egrep "]Call.*Chat"|awk '{print $5}')

echo -e "This domain has this Copyright notice:\n$copyright"
echo "Phone contact is: $phonenumber"

Running the above tested script will give this output:

$ ./script.sh
This domain has this Copyright notice:
   © Copyright  2017 Domain.com. All rights reserved.
Phone contact is: 800-403-3568


How to mount disk image taken in linux and run in virtual box

Select a virtual machine by clicking its name in the VirtualBox window
Click the Machine menu at the top of the VirtualBox window, and click Settings
Click the Storage category in the Settings window
Right-click in the storage tree pane, and click Add Floppy Controller
Right-click the Floppy Controller device, and click Add Floppy Device
Click the Choose Disk button in the prompt window that appears

Navigate to the floppy disk image file (.IMG) on your computer and double-click it
If that doesn't work, try renaming the .IMG as .ISO and mount it.

If that too doesn't work, use VBoxManage's convertfromraw command as follows:

VBoxManage convertfromraw --format VDI [filename].img [filename].vdi

Finally, mount the VDI as a hard disk.


This is an issue with building octave 3.8.0 against LLVM >= 3.4.  There is updated information in this bug report:
https://savannah.gnu.org/bugs/?41061


Creating a bootable USB recovery drive to be used by someone who isn't computer savvy

As at first glance it seems to be a good idea to have a key that resets a machine to a "factory" state, there are some major issues we have to consider before we proceed to do so.

User specific settings are stored in /home/user/.
Updating or restoring the OS will not touch or restore these.
Erroneous user settings are the most frequent cause of trouble, but these will not be repaired by reinstalling.
Resetting or deleting /home/user/ is not an option as we will lose important user data (including passwords).
Replacing the OS by a stored version from USB will restore it to a rather outdated state where many security updates will not be included.

Therefore I would like to recommend you to teach the remote user how to make frequent backups of their HOME, and install an easy or eventually automatic backup solution that would make restoring to a previous state easy. Test this for ease of restoring the backups before you give away the machine.

If the person you give the machine to agrees then the most convenient additional approach would be to set up the machine to enable remote root access via SSH for administration. I have successfully done so with my 75 years old mother's machine (which was her first computer). By this we are able to solve all minor and even most major problems remotely. The time needed for solving issues on a SSH session could well be less than explaining a computing layman how to successfully operate an USB stick to reinstall.


grub2 doesn't have a "grub" command, only grub legacy has that. And grub legacy does not have a grub-mkconfig command, only grub2 has that. So yes, you have two versions of grub installed. My guess is that you have the grub-common package installed, which contains grub-mkconfig but you do not have the grub-pc package which contains most of grub2's files and is needed for grub on a BIOS based PC (if you have UEFI firmware, you may want grub-efi-amd64). I believe that to be the case because the package "grub" (containing grub-legacy) and the package "grub-pc" (containing most of grub2) conflict and therefore cannot be installed at the same time. Because you have grub legacy installed, "update-grub" is modifying grub legacy's /boot/grub/menu.lst rather than using grub-mkconfig to write a /boot/grub/grub.cfg.

The solution is simple:

If you have a BIOS based system then just install the grub-pc package (which will automatically remove the grub package).

If you have a UEFI based system then install grub-efi-amd64.

If you don't know which you have, say so in a comment and I will help you figure that out.


Why does mkdir fail (no such file or directory) in a script with BIN_DIR="~/bin/"?

It doesn't work because ~ is quoted. Double quotes " suppress tilde expansion. There is no directory with the literal name ~/bin. As explained in man bash (emphasis mine):

  Tilde Expansion

  If a word begins with an unquoted tilde character  (`~'),  all  of  the
         characters  preceding  the  first unquoted slash (or all characters, if
         there is no unquoted slash) are considered a tilde-prefix.  If none  of
         the  characters  in  the tilde-prefix are quoted, the characters in the
         tilde-prefix following the tilde are treated as a possible login  name.
         If  this  login name is the null string, the tilde is replaced with the
         value of the shell parameter HOME.  If HOME is unset, the  home  directory  of  the  user executing the shell is substituted instead.  Otherwise, the tilde-prefix is replaced with the home  directory  associated
         with the specified login name.

You can remove the quotes, since ~ is the only character in the path ~/bin that will cause the shell to perform an expansion, and we want the expansion in this case. The shell won't perform any further expansions on the result of tilde expansion, at least in Bash 4, which all current or remotely recent releases of Ubuntu have. So even if your home directory contains unusual characters like spaces, it's okay.

Or you can use $HOME instead of ~, because parameter expansion is not suppressed by double quotes, only by single quotes. The double quotes do ensure that the expanded value is not itself subject to any further expansions, so word splitting or filename expansion will not occur. So $HOME works even with strangely named home directories, too, so long as you keep the double quotes.


Error when I upgrade my Ubuntu 14.04 to 16.04 and download new packages

If you are still using Ubuntu 14.04 and want to update it to Ubuntu 16.04, this mismatch could be due to the location you are downloading updates from. To solve the problem try this :

Open Software & Update.
Change the Server location in "Download from : "
Try again


Mount LevelOne GNS-2000 NFS share on Ubuntu 14.04

You have to mount it by the name you given the share:

mount -t nfs "172.16.3.84:/DISK 1" nas

e.g. for the default share


Sudden bluetooth mouse lag ONLY on ubuntu 19.04 MX anywhere 2s

I was able to mostly fix the lag issue by connecting the mouse using the unifying receiver.

Afterwards the mouse did react far better when connected via bluetooth, although not perfect.

Mouse used: Logitech MX anywhere 2s
Distro: Ubuntu 19.04
Kernel: 5.0.0-32-generic


Routing internet traffic through vpn only when connected

To have both VPN and internet, traffic has to be forwarded out of the VPN server’s public network interface. So kindly enable port forwarding by editing the sysctl.conf file. I assume “net.ipv4.ip_forward” is commented in the /etc/sysctl.conf file:

nano /etc/sysctl.conf

Add or find and comment out the following line

net.ipv4.ip_forward=1

Save, close the file and run the following command to make the changes take effect.

sysctl -p

The following iptables firewall rules allow port 1723, GRE and perform NAT

iptables -I INPUT -p tcp --dport 1723 -m state --state NEW -j ACCEPT
iptables -I INPUT -p gre -j ACCEPT
iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE

In the last rule replace “eth0″ with the interface connecting to the internet on your VPN server. Finally the following rule is required to ensure websites load properly

iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -s 172.20.1.0/24 -j TCPMSS  --clamp-mss-to-pmtu

Replace 172.20.1.0/24 with the IP address range used in the “remoteip” option in the /etc/pptpd.conf this firewall rule is used to ensure a proper MTU value is used to prevent fragmentation.

Hope it could help.


In addition to what @dk-bose have suggested, another option option would be Hardinfo as detailed in this AskUbuntu thread:

Hardinfo:

Install sudo apt-get install hardinfo from the command line. The motherboard make and model can be found on the Devices > DMI page.

There are few more options on the thread I've linked above.


How can I acess all Windows 7 files from a Wubi Ubuntu installation?

The Windows partition where you installed Wubi is available as /host within Ubuntu (Places > Computer > File System > Host) All the other partitions will be available under Places > Removable Media

Taken from the wubi wiki guide.


Broken sound volume indicator - can't change volume

PulseAudio is an audio system that, among other things, enables multiple applications to use the audio interface at the same time. It can also be used for things like sharing audio over the network. So, PulseAudio is a good thing.

If PulseAudio keeps crashing, then something is wrong. The best way for you to prevent that from happening, is to file a bug on http://Launchpad.net and get the developers attention. We don't exactly have a configuration option to enable or disable application crashes. :)
Yes, restarting the indicators might be a successful workaround. In order to do that, you'll press AltF2 and type killall unity-panel-service

If restarting PulseAudio and then restarting the panel service works, then you might want to combine them in a script so you can do both things at once. You can then create a new text file in Gedit, paste the following and make the file executable. You do that by right clicking on the file, selecting properties > permissions > Allow execution of file. Afterwards, you can run that script as a normal program.

This is the script itself:

#!/bin/sh
pulseaudio --start
killall unity-panel-service

So, if you call the file fix_audio.sh and place it in your home directory, you'll be able to run it by pressing alt+f2 and typing ~/fix_audio.sh.

However, even if this workaround works, you should still file a bug on Launchpad so that the problem itself gets fixed for you and everyone else.


Try pressing the Windows key (Meta/Super) + P. It brings up a few display options such as Mirroring, Extend Left/Right, etc. I do this each time I connect a display to my system for the external monitor to get it to work.

Note: This shortcut may vary depending on distribution. I use Kubuntu 19.10.


Screen Brightness not Changing on Dell XPS 7590

I recommend using the ICC Brightness tool, which worked well for my Dell 7590 with OLED screen. It requires compiling and installing a small utility, but it works well.

Full instructions can be found at https://github.com/udifuchs/icc-brightness but here is a summary.

$ sudo apt install git liblcms2-dev
$ mkdir ~/git
$ cd ~/git
$ git clone https://github.com/udifuchs/icc-brightness
$ cd icc-brightness
$ make
$ sudo make install

After a reboot your brightness keys should now work. Be careful not to use this in conjuction with the xrandr solutions as they don't play nicely together.


Does Samba no longer work for you after installing update python3-urllib3 1.13.1-2ububtu0.16.04.4

The Ubuntu 16 system is upgraded to Ubuntu 18.
After this upgrade python3-urllib3 1.22-1ubuntu0.18.04.2 was installed.
After this upgrade the Samba problem doesn't occur anymore.
So my problem is solved.


I used x11vnc for the server and realvncviewer for windows. It doesn't works perfect but still better than nothing.


How to change password of hotspot in Ubuntu gnome 17.04?

You can use nm-connection-editor as told by @pomsky


Accessing data on a mounted phone takes FOREVER

MTP is to blame and we can thank Microsoft and Android for that problem. The answer is to either transfer the files using a different protocol like PTP or I would suggest installing a fileserver application like "software data cable" on Android to transfer files wirelessly over your local network or use bluetooth (it's way easier and faster without wires).

Side Note: If you haven't already, install ADB (sudo apt install android-tools-adb) and try transferring the files the same way as before. Sometimes, it solves those problems, and you will still be able to use the graphical file exploreo.
The other option would be to use adb which is significantly faster than MTP.
First, you will need to install ADB:
sudo apt update
sudo apt install adb

note: if you get an "unable to locate package" error, run: sudo add-apt-repository universe and try again
Then, follow these instructions to use ADB commands to "pull" files off of your phone to Ubuntu or to "push" files to your phone from Ubuntu.
You should also be able to use ls and cd commands using and adb shell:
adb shell

and then use cd and ls as normal to change directories or list files.
If your phone isn't rooted, you will need to list files from the storage directory or you won't have permission so you can use cd /storage before using ls or you could just list everything recursively using the following command (directories will be blue or white):
ls -R --color=always /storage

and you can also use grep to find a particular filename or directory (like your DCIM directory for example):
ls -R /storage | grep DCIM

If you need an easier method to find the location of your files, you could install a shell on your Android device that has access to the find command using an app called "terminal emulator for Android".
find /storage

will list the full path of pretty much every file you have access to if you don't have a rooted phone (and it also has grep).
See here for more information about finding and listing files using adb.

Alternatively, you can also transfer files from your phone to your computer using Google Drive.
First, use the Google Drive app to upload the files to your account.
Then, use a web-browser on any computer to go to drive.google.com and sign into your account where you can download the file(s).


Is it possible to copy a file into a zip archive?

Use -m to import a file to a ZIP archive.

I found this on StackOverflow maybe it helps you.
How to move a file in to zip uncompressed, with zip cmd tool

But be careful it deletes the source file after it adds it to the archive.
See the link for more details.

UPDATE

Instructions from this site. http://linux.about.com/od/commands/l/blcmdl1_zip.htm.
-m moves the specified files into the ZIP archive; actually, this deletes the target directories/files after making the specified ZIP archive.

If a directory becomes empty after removal of the files, the directory is also removed. No deletions are done until zip has created the archive without errors. This is useful for conserving disk space, but is potentially dangerous so it is recommended to use it in combination with -T to test the archive before removing all input files.

zip -m yourfile zip.file


Creating a custom text entry input source (keyboard layout) based on an existing one

Adding new custom keyboard layouts is pretty easy if you know what to do. There is already a detailed answer on how to set up a new keyboard layout. You will only need to add entries for the changes you need.


SSH tunnel to browse localhost, super slow

The problem seem to be with the DNS on the target server, changing from localhost to 127.0.0.1 works but do not really solve the DNS problem on the target machine.


Using Pulse Audio Control (pavucontrol):

You can choose to increase just the volume of the browser

or the system volume

To install this tool, go here or do

sudo apt-get install pavucontrol

Instead of/beside that: youtube videos can be played in external players that can boost the volume:

SMPlayer's Youtube Browser (smtube) can search and play youtube content.
You can edit main SMPlayer toolbar to add the specific button or open from Options.

Then, in SMPlayer (according to this answer) go to SMPlayer Preferences/Audio, check "Use software volume control" and increase the maximum amplification.

VLC can be used to play youtube video as indicated here, and this player can boost the volume up to 125%.


multiple nvidia errors but my display adapter is not nvidia

Log no longer includes the messages. I followed Fred's procedure outlined here

How can I uninstall a nvidia driver completely ?

I am using MATE so instead of re-installing the Ubuntu desktop I re-installed mate-desktop.


Since you want to remap the keys for all applications the best option is to use xmodmap. It is flexible and very powerful but involves typing in a few commands into a terminal.

Step 0 - The approach

The X-server manages the keyboard and all key events and translates that into keycodes for all applications.

The approach would be to map a modifier key (like Super or Right Alt key) as the "mode switch" key and tell the X-server to generate different codes depending on whether a key is pressed with Mode key being held down or not.

By default there is no mode switch key defined and also all keys are configured to generate the same code when they are pressed with or without mode switch. This is good since this means except for the keys you override explicitly no other keys will behave differently or need additional configuration.

However, I would like you to consider using Right Alt key as mode switch especially if you are also using compiz since some compiz plugins map super key shortcuts (e.g., window picker, shift switcher etc). If you are not keen on controlling compiz via the keyboard then Super is just fine.

To xmodmap, the super keys are identified as Super_L or Super_R. You need to pick one to use as the mode switch key. Alternatively, the right alt key is Alt_R. You can confirm these by running xev and pressing the necessary keys on your keyboard. See this post for the steps.

Step 1 - Setting up the modifier map

Open a terminal (Applications -> Accesories -> Terminal) and run the following command to create a file with current keybindings. We will use this as starting point.

xmodmap -pke > curkeys.map
xmodmap -pm >> curkeys.map

Open this in your favourite text editor. gedit curkeys.map & opens it in gedit. Towards the end of the file, you will see some lines like this:

keycode 253 =
keycode 254 =
keycode 255 =
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)

Delete the line starting with "xmodmap: up to 4..."
Edit the modifier map so it looks like this. Put the word "add " at the beginning of each line and insert "= " after the modifier name. Then remove the codes in parentheses and commas. Also note that I have moved Mode_switch from the mod5 line to mod3 line since it was empty. The modified table should look like this - actual contents will slightly vary in your case from those below (depends on your keyboard layout).

add shift =      Shift_L  Shift_R
add lock  =      Caps_Lock
add control =    Control_L  Control_R
add mod1    =    Alt_L Meta_L Alt_R
add mod2    =    Num_Lock
add mod3    =    Mode_switch
add mod4    =    Super_L Super_R Super_L Hyper_L
add mod5    =    ISO_Level3_Shift

Remap physical mode-switch key. Add a line like this at the end (Replace Super_L with Super_R or Alt_R if required).

keysym Super_L = Mode_switch

Remove the keyname (Super_L) from any modifier definition. For Super_L this means removing it from the mod4 line.

add mod4    =    Super_R Hyper_L

Now the right "Super" key will still act as a normal super key whereas the left key will have special properties.
Now we need to remap the keys to produce different codes whether they are pressed while holding down Super_L or not.
Each line in our file beginning with keycode specifies 4 keysyms for each key to be generated based on whether Mod1 (shift keys) and Mode switch keys are pressed.(link)

!...........................................................................
!        Key            Base              Shift           Mode    Mode+Shift
!---------------------------------------------------------------------------
keycode  13             = 4               dollar          4       quotedbl
keycode  14             = 5               percent         5       colon
keycode  15             = 6               asciicircum     6       comma
keycode  16             = 7               ampersand       7       period
...
keycode  45             = k               K               k       K

If we want Super_L+k keypress to generate a "+" key then we need to modify it to read so

keycode  45 = k K plus plus

The final plus also maps Shift+Super_L+k to plus, but this can be mapped to something else. For each key there is exactly 1 line to modify. Edit more lines to remap more keys - leave the first 2 entries intact to retain normal keypress behaviour.
Save the file and exit the editor.
Install the keymap by running the following commands in a terminal. The first one sets it up for this session, the second makes it permanent for future sessions.

xmodmap curkeys.map
cp curkeys.map ~/.Xmodmap

You can immediately test this by pressing the modified keys (Super_L + k for example).

Step 3 - Adding / revising the map

Once the modified map is installed it is easy to add new keys.

Use xev to find the keycodes and keysyms
test it by running this command to map the key :

xmodmap -e "keycode <code> = <base> <shift> <new-mapping> <new-shift-mapping>"

Replace items in angle brackets (like <code> <base> etc) with appropriate values.
Backup the curkeys.map file.
Open the curkeys.map and edit the line for the corresponding keycode.
Reapply with the below commands (first one is not necessary if you did step 2)

xmodmap curkeys.map
cp curkeys.map ~/.Xmodmap

Note:1: Modifications made in Keyboard Shortcuts (via e.g., System -> Preferences -> Keyboard Shortcuts) affect the modifier map and will be generally lost on next login. So please avoid that.

Note:2: I sometimes get error messages like this while using this method. I don't know what this means, however, these are generally harmless.

X Error of failed request:  BadValue (integer parameter out of range for operation)
Major opcode of failed request:  118 (X_SetModifierMapping)
Value in failed request:  0x17
Serial number of failed request:  263
Current serial number in output stream:  263

Detailed help for xmodmap is available here.


Try to boot using the live CD and install Boot Repair program:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install boot-repair

then launch Boot Repair, use the default settings and follow the instructions (it may ask you to do something manually)


SQLite 3.8.8 in Ubuntu 14.04 via apt-get

base on the SQLite project page on launchpad: https://launchpad.net/sqlite/+packages

The latest version 3.8.8 is not available yet for Ubuntu. You can't install it with apt-get command now.

You could download the "Precompiled Binaries for Linux" form SQLite's website: http://www.sqlite.org/download.html


Cannot get disk parameters after deployment the node

Please check BIOS setting "boot order" and make sure you can boot into local hard disk.

This error message mean "Cannot boot into local disk after deploy", it maybe related to hard disk and BIOS.

You can boot into BIOS ,load default setting , change PXE to first priority, save changes and reset and deploy again.


If I understand your question, I don't think you can resolve the problem on social sites like Facebook or Twitter as Twitter & Facebook use their own emoji-replacement-images for users of the desktop website. This works around issues of emoji compatibility and also gives a chance for branding in the emoji set.

Further, removing fonts will not extend the capability of your system. I suggest that you may wish to reinstall the fonts you removed due to the theory that they were taking precedence somehow.

As far as the "few missing" emojis you mention you may be interested to know that "The particular issue here is that while the glyphs are present in the B/W emoji font with a cmap entry mapping a single character to each (couple with heart 1f491, kiss 1f48f, and family 1f46a), there are no GSUB entries that map these sequences to them." <-Quote Source

You can track all the existing issues with Noto-emoji here

Original Source: http://blog.emojipedia.org/new-to-emojipedia-samsung-facebook-emoji-one/


Changing the diNovo Mini stick modes from Linux?

The utility is called hid2hci and it's in the bluez package you need to install anyways for Bluetooth. (On Arch, it's in bluez-hid2hci)

For other sticks the change is completely automatic. But this stick is not recognized by the relevant udev rule. So I did sudo cp /lib/udev/rules.d/97-hid2hci.rules  /etc/udev/rules.d/ and then changed the logitech line:

KERNEL=="hiddev*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bcf]", \
  RUN+="hid2hci --method=logitech-hid --devpath=%p"

Note the f at the end of the first line, that's what was missing.


If you followed the instructions faithfully, just run:

sudo rm /etc/modprobe.d/psmouse.conf

Then run

sudo modprobe -r psmouse && sudo modprobe psmouse

You will be left without the right button, though (as you were before you made modifications).


You can't configure which Python it should use without building from sources; all you can do is run something like:

readelf -d $(which gdb) | grep python

to find out which Python it uses.


Not able to add user image in Ubuntu 14.04

Easy: convert your picture (using any picture program like gimp) to a square .png and save it somewhere where all users have access.

Then use that one in the Add User Image...


How do I start a program later if I unlock it from the Launcher on the left?

Yep, press the windows key (called Super) and then search for the program name. What you opened is called the Dash, to get it you can also click on the icon at the top of your launcher.

Have a look at this website, on migrating from windows. If you need, you could install lubuntu or xubuntu which are versions of Ubuntu that looks similar to XP.


Duplicated, interlaced and distorted graphics on my HP dv6000

It sounds like you are affected by this bug

Launchpad Bug 597476

There was a work around posted by Cristian Arezzini

Still about the Natty beta... I tried to change the resolution to 1280x800, but it wasn't available on the monitor preferences window. To enable it, I had to uncheck the "same image on all monitors" box - then all the resolutions are available. Without unchecking that box, only the resolutions also good for TV output are available. And all of those are corrupted (striped) on this video card.
It would be really nice to fix all the resolutions, but at least to set the default to the correct (1280x800) resolution, so that the system works "out of the box"...