The problem is that there is no a specific program/service/daemon to check when a new wireless network appear/disappear in/from the range of the wireless antenna as far as I know (in fact there is airodump-ng and maybe others, but this conflicts with Network Manager).

As alternative, you can scan for wifi networks from time to time, using iwlist tool.

  Note: In tests iwlist tool may only work with Atheros, Intel or Broadcom cards.

These being said, the following script can do what you wish (I named it wifidetect):

#!/bin/bash

#wifidetect - Alert when new wireless

#Licensed under the standard MIT license:
#Copyright 2013 Radu Rădeanu (http://askubuntu.com/users/147044/).
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

DISPLAY=:0.0
#change 'username' with your username
HOME=/home/username/
XAUTHORITY=$HOME/.Xauthority
export DISPLAY XAUTHORITY HOME

#check if you run the script as root
if [ "$(whoami)" != "root" ]; then
    notify-send -i error "You must to run $(basename $0) script as root."
    echo "You must to run $(basename $0) script as root."
    exit
fi

#check if beep is installed
if [ ! -n "$(dpkg -s beep 2>/dev/null | grep 'Status: install ok installed')" ]; then
    notify-send -i error "The package 'beep' must to be installed before to run $(basename $0)." "Use 'sudo apt-get install beep' command in terminal to install it."
    echo -e "The package 'beep' must to be installed before to run $(basename $0)\nUse 'sudo apt-get install beep' command in terminal to install it."
    exit
fi

[ -f /tmp/networks ] || > /tmp/networks

#scan for networks - need root privileges
#change 'wlan0' with your interface name of your wireless network card; you can find it using 'ls /sys/class/net' command
sudo iwlist wlan0 scan | grep -E "Address|ESSID" |  awk 'BEGIN {FS=": |\""} {print $2}' | sed 'N;s/\n/ /' | sort > /tmp/new_networks

#check if there are new networks
new_networks=$(comm -1 -3 /tmp/networks /tmp/new_networks)
new_essids=$(echo $new_networks | sed "s/..:..:..:..:..:..//g" | sed "s/  /, /g")

if [ -n "$new_networks" ]; then   #if there are new networks
    #send a graphical notification
    notify-send -i /usr/share/app-install/icons/wifi-radar.svg "New network(s) detected:" "$new_essids"
    #send a sound notification
    pcspkr_on=$(lsmod | grep pcspkr)
    if [ -n "$pcspkr_on" ]; then
        beep
    else
        sudo modprobe pcspkr
        beep
        sudo modprobe -r pcspkr
    fi

    #change the old list of networks with the list containing new networks
    #the networks that were detected in the previous scan and wern't detected this time will be removed from the list
    cat /tmp/new_networks > /tmp/networks

    #if you want that only the new networks detected (who were not detected in previous scans) to be added to list, comment the previous line and and uncomment the following three
    #cat /tmp/networks > /tmp/tmp_networks
    #cat /tmp/new_networks >> /tmp/tmp_networks
    #cat /tmp/tmp_networks | sort | uniq > /tmp/networks
fi

  Note: You have to change in script username with your user name and wlan0 with your interface name of your wireless network card; you can find it using 'ls /sys/class/net' command.

Don't forget to make the script executable, using the following command in terminal:

chmod +x /path/to/scripts/wifidetect

Finally, edit the crontab entries for root using sudo crontab -e command by adding the following line:

*/1 * * * * /path/to/scripts/wifidetect

I have set the cron job for every minute, but you can change as you wish or as you think is better. See http://en.wikipedia.org/wiki/Cron in this sense.


How to permanently save powertop's suggestions?

Quick answer :

You just need to save them in /etc/rc.local.

Detailed answer

In a terminal run:

sudo powertop --html=powertop.html

Step 1 generates a html file in your home directory. Click on that file so that it opens in your internet browser.
In the browser, go to "Tuning" tab. It gives all the tunings you have to tweak (on the left), and the commands that are implementing them (on the right).
Save these commands in /etc/rc.local.

To do that, in a terminal, run:

gksu gedit /etc/rc.local

Write the commands before the line that reads exit 0, and save the file.


How to make Ubuntu change the wallpaper when monitor is disconnected?

It will take a background script to keep track of whether the second monitor is connected or not.

The script below checks every five seconds if that is the case, and sets the wallpaper accordingly.
The script also remembers the set wallpaper for the two states (connected/disconnected) in a hidden file. The file is automatically updated if you change the wallpaper for either one of the situations.

How to use

Copy the script into an empty file, save it as change_wallpaper.py
In the head section of the script, set the name of your second screen (run the command xrandr from a terminal window, to see the screen's name in the output). I left "VGA-0" as an example.
Start the script with the command (from the terminal):

python3 /path/to/change_wallpaper.py

Connect the second screen, wait a few seconds and set the wallpaper. (the wallpaper has to be changed to remember it). Again wait a few seconds. Disconnect the second monitor, set the wallpaper for the single- monitor situation.

If the wallpaper is set for both situations, the script should change the wallpaper automatically. If you change the wallpaper as usual, the script will remember it for the corresponding situation (connected/disconnected)

If all works fine, add it to your Startup Applications: Dash > Startup Applications > Add the command:

/bin/bash -c "sleep 15&&python3 /path/to/change_wallpaper.py"

The script:

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

#--- set the name of your secundary screen below
second = "VGA-0"
#---
# the script uses the key org.gnome.desktop.background picture-uri to set/change the wallpaper
key = ["gsettings get ", "gsettings set ",
    "org.gnome.desktop.background picture-uri"]
# set the name of the wallpaper- datafile(s)
wallbody = os.environ["HOME"]+"/.wallpaperset"
# define the string to be found (or not) in the output of xrandr
tocheck = second+" connected"

def set_wallpaper(w):
    try:
        cmd = key[1]+key[2]+' "'+open(wallbody+str(w)).read().strip()+'"'
        subprocess.Popen(["/bin/bash", "-c", cmd])
    except FileNotFoundError:
        pass

check = lambda cmd: subprocess.check_output(["/bin/bash", "-c", cmd]).decode("utf-8")
# first call of xrandr, and get the current wallpaper
xr1 = tocheck in check("xrandr")
if xr1 == True:
    set_wallpaper(2)
else:
    set_wallpaper(1)
wall1 = check(key[0]+key[2])

while True:
    time.sleep(5)
    # second call of xrandr, and get the current wallpaper
    xr2 = tocheck in check("xrandr")
    wall2 = check(key[0]+key[2])
    # if the second screen either connects or disconnects, change the wallpaper
    if (xr1, xr2).count(True) == 1:
        w = 2 if xr2 == True else 1
        set_wallpaper(w)
    # if wallpaper is changed, remember the new wallpaper
    elif wall2 != wall1:
        w = 2 if xr2 == True else 1
        open(wallbody+str(w), "wt").write(wall2)
    xr1 = xr2
    wall1 = wall2


Encrypt External Hard Drive Without Formatting?

What I suggest for your situation is to use encfs instead of something like luks which encrypts the whole device and then you create a new file system on it, however we can still use luks in a similar scenario too (Creating a virtual device).

encfs helps you to create a encrypted virtual filesystem, it allows :

  Portable encryption of file folders on removable disks.
  Available as a cross-platform folder encryption mechanism.

  EncFS has no "volumes" that occupy a fixed size — encrypted directories grow and shrink as more files are added to or removed from the mountpoint.

  [source]

So you can easily encrypt a directory an moves all your files within that directory without any risk of loosing data.

With your suggestion you have to face the risk of loosing your data while resizing the partition to create a new one, even when you are resizing a LVM logical volume you have to get a backup first.

the other similar option would be to use eCryptfs instead of encfs, their somehow do the same thing, you should decide which one is better for you, however I suggest usingencfs because of the reasons I quoted above.


PL2303 attached to ttyUSB0 -> Change it to ttyS*?

Your first issue (device permissions) was fixed by adding your user to the correct group.
Your second issue (device path) seems to be that you are not using the full device path. From man statserial:

The optional device-name parameter is the full name of the device file for the serial port  in  question. If not specified, the default is taken from the environment variable MODEM if set, otherwise /dev/cua1.

So you need to do statserial /dev/ttyUSB0
(I checked the source to verify this is correct, it literally does fd = open(device,...) where device is your argv[x])
For generic information about programming the serial port see Serial Programming HOWTO. You can look at the source of statserial with apt-get source statserial (it is a very simple program compiled from a single file statserial.c which is 195 lines long).
The update is slow because statserial only polls the serial port every second, the main loop is:
  for (;;) {

    /* get modem status info */
    status = ioctl(fd, TIOCMGET, &arg);
    if (status != 0) {
      perror("statserial: TIOCMGET failed");
      exit(1);
    }

...
    printw("Device: %s\n\n", device);
    printw("Signal  Pin  Pin  Direction  Status  Full\n");
    printw("Name    (25) (9)  (computer)         Name\n");
    printw("-----   ---  ---  ---------  ------  -----\n");
    printw("FG       1    -      -           -   Frame Ground\n");
    printw("TxD      2    3      out         -   Transmit Data\n");
    printw("RxD      3    2      in          -   Receive  Data\n");
    printw("RTS      4    7      out         %1d   Request To Send\n", !!(arg & TIOCM_RTS));
    printw("CTS      5    8      in          %1d   Clear To Send\n", !!(arg & TIOCM_CTS));
    printw("DSR      6    6      in          %1d   Data Set Ready\n", !!(arg & TIOCM_DSR));
    printw("GND      7    5      -           -   Signal Ground\n");
    printw("DCD      8    1      in          %1d   Data Carrier Detect\n", !!(arg & TIOCM_CAR));
    printw("DTR     20    4      out         %1d   Data Terminal Ready\n", !!(arg & TIOCM_DTR));
    printw("RI      22    9      in          %1d   Ring Indicator\n", !!(arg & TIOCM_RNG));
    refresh();

    /* break out if -n option was used */
    if (n_option)
      exit(0);

    /* delay 1 second between loops */
    sleep(1);
  }

If you are doing any serious work with serial ports, I would highly recommend that you get a real serial port card (PCI card with RS232 controller on it). The USB adaptors are not reliable enough, especially if you are linking to old hardware, you will find that they do not reproduce the signal timings accurately, which will cause problems with some devices. Another common problem is that the USB serial ports don't implement (or badly implement) hardware RTS/CTS handshaking, and thus end up being incompatible with old serial port devices. Having said that, the PL2303 is one of the better chips, and should work with most devices.


Get intersection between two files using command line

Use grep command line as following:

grep -Fx -f file1 file2


Installing Nvidia Drivers: open source vs proprietary

Seeing as I only told Ubuntu to install nvidia-346, why has it also installed all of these other Nvidia drivers (331, 340 and 349)?

Additional Drivers lists every possible driver that your system is known to be able to use. It doesn't mean that it's installed, but rather that it's available and (likely) works with your hardware.

You can see what NVIDIA drivers and support packages you've actually installed using this command:

dpkg --get-selections | grep nvidia

For example, note the discrepancy on my system:

  All the Nvidia drivers, except for nvidia-331-updates, are described as "open source". However, nvidia-331-updates is described as "proprietary". Why are these drivers open source, when I thought that all official Nvidia drivers would be proprietary, and only Nouveau would be open source?

This appears to be a bug with drivers added from a PPA. Note, again, that the nvidia-370 driver is listed as "open-source" even though it's very much not. This is because my driver comes from a PPA, and apparently didn't have the attached metadata (or similar) that marked the as proprietary. The only open-source driver is the actual Nouveau driver.


What exactly do the 'allow-discards' and 'root_trim' Linux parameters do?

From my understanding the boot parameter root_trim=yes is Gentoo specific. Within genkernel there is a script which looks for the parameter and sets the option --allow-discards with cryptsetup (see their git repository). Furthermore I found many reports of Ubuntu or Debian users which said that it worked without the root_trim parameter. I also found no lines in Ubuntus update-initramfs script.

So all in all it is no boot parameter, but more a parameter to cryptsetup.
The documentation of --allow-discards can be found in the manpage of cryptsetup(8):

  --allow-discards
   Allow using of discards (TRIM) requests for device.  This option is only relevant for create, luksOpen or loopaesOpen.

  WARNING: Assess the specific  security  risks  carefully  before
                enabling   this  option.   For  example,  allowing  discards  on
                encrypted devices may lead to the leak of information about  the
                ciphertext  device  (filesystem  type,  used space etc.)  if the
                discarded blocks can be located easily on the device later.

  Kernel version 3.1  or  more  recent  is  required.   For  older
                versions is the option ignored.

Based on this blog on TRIM & dm-crypt, TRIM is operation where upper layer (e.g. filesystem) informs the device which sectors are no longer used (do not contain valid data anymore) and that the device does not need to keep that data content.

In Linux terminology is this operation called discard. In the SCSI world it's be referred to as the UNMAP command.

The discard operation can be used for two purposes: thin Provisioning (informs that data area can be returned to allocation pool) and for SSD operation optimization.

Discards is most useful for SSD optimization since the internal architecture uses larger blocks than sectors and that the blocks must be erased before a write operation can be performed. Information about sectors which do not need to keep data is very useful since the filesystem would be able to more effectively organize blocks in such a way that data fragmentation is minimized and also the disk lifetime would increase.


Ubuntu 17.10 tons of lags with mouse and window glitch

Unfortunately, I don't think this is a Wayland only issue. After I upgraded from 17.04, I've found lag/sluggish response with gnome-shell under both Wayland and Xorg. It does seem to be a little worse under Wayland.

In my case, after a reboot, all is good for a while, but things slowly degrade and after a few hours, switching between virtual desktops or moving windows gets slower and slower. When the lock screen kicks in, after hitting a key to bring up the password prompt, there is a definite lag i.e. on a couple of occasions 15 seconds before the lockscreen wallpaper is cleared and the password prompt appears.

This is on a high spec machine i.e. 12 core i7 3Ghz with 32 Gb memory. I'm using the default oss graphics drivers (I have a nvidia gforce card, but not using the nvidia driver as it is not compatible with wayland).

I did not have these problems with 17.04 and the gnome ubuntu remix.

I've now installed MATE and seeing if that works better as the gnome-shell gets sluggish enough to be almost unusable unless I reboot every few hours.

Using journalctl to look at the logs, I see a lot of gnome-shell related errors and warnings.

All pretty disappointing. I was also unlucky enough to run into the fwupd bug related to some Logitech keyboards, so had to change my keyboard to even get 17.10 to work!


Can I install Windows after Ubuntu 14.04?

If I understand correctly, you want to install windows on a machine that already possess Ubuntu.
Yes it is possible. But you will have to shrink your Ubuntu partition first in order to make some space for windows. Use gparted to shrink the partitions easily (especially if you are new).
Then the windows installer should propose you an option to install alongside the other systems.
However, I don't know what will happen to the grub bootloader. You will probably have a windows equivalent to grub.


Linux driver for the Epson Style Office BX305F printer/scanner?

You can download drivers via the following website:
http://download.ebz.epson.net/dsc/search/01/search/searchModule


I want to purchase a new Ubuntu installation CD

Can you mail me a new Ubuntu instillation CD?

In brief NO. ShipIt has been closed. So the there is no official way to send anybody Ubuntu DVD for free.

  What are the other options do I have?

You can buy packs of 5 Ubuntu CDs (minimum) from Canonical shop
Alternately you can download Ubuntu CD image from the official Ubuntu site for free and create Bootable DVD or USB
The last option would be to borrow a Ubuntu DVD from a friend.

Note: I answered most of it in the comment. I am posting it as answer as requested by  Elder Geek and think it will be helpful.


Yes you can, but only one of the partitions can be set as a boot partition at a time.  (on most BIOSes)

Meaning: if you want to have 2 bootable partitions on one USB stick, you will have to use gparted each time you want to "switch" between the one and the other.

Depending on what you want/need, you could have a look at Easy2Boot


Remove Ubuntu from stand-alone hard drive. Format drive

I always use liveUSBs because they are far, far faster.  A liveCD likely will not give you a good experience.

This is where you can download Ubuntu.

http://www.ubuntu.com/download/desktop

This is how you can turn any flash drive into a liveUSB using the downloaded .iso.  If you need to use a CD, the link should be on this page as well.

http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows


For Ubuntu 16.04, gnupg package is in main repository, so it is still updated for security issues and safe to use.
For new features, you can install gnupg2 in 16.04:
$ sudo apt install gnupg2
$ gpg2 --version
gpg (GnuPG) 2.1.11
libgcrypt 1.6.5
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
        CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2


Consider using kerl to build and manage Basho's Erlang.

This build will take some time, and the output should end up looking something like this:

$ kerl build git https://github.com/basho/otp.git OTP_R16B02_basho10 R16B02-basho10
Checking Erlang/OTP git repository from https://github.com/basho/otp.git...
Building Erlang/OTP R16B02-basho10 from git, please wait...
DOCUMENTATION INFORMATION (See: /home/sutt/.kerl/builds/R16B02-basho10/otp_build_git.log)
 * documentation  :
 *                  fop is missing.
 *                  Using fakefop to generate placeholder PDF files.

Erlang/OTP R16B02-basho10 from git has been successfully built

Install Erlang R16B02:

$ kerl install R16B02-basho10 ~/.kerl/installs/R16B02-basho10/
Installing Erlang/OTP git (R16B02-basho10) in /home/sutt/.kerl/installs/R16B02-basho10...
You can activate this installation running the following command:
. /home/sutt/.kerl/installs/R16B02-basho10/activate
Later on, you can leave the installation typing:
kerl_deactivate

Activate it, and verify that it is activated:

$ . /home/sutt/.kerl/installs/R16B02-basho10/activate
$ kerl active
The current active installation is:
/home/sutt/.kerl/installs/R16B02-basho10

Git clone the Riak code:

git clone https://github.com/basho/riak.git
cd riak

Optional: switch to a tag:

git checkout -q tags/riak-2.2.0

With Erlang R16B02-basho10 active you should be able to run make.

You can simply compile:

make

Or you can make an Erlang Release:

make rel

A development release (for testing):

make devrel DEVNODES=$(nproc)

Or a package specific to your OS (.deb):

make package

See if this has better results for you.


Use mkvtoolnix to split video file such that each file in same duration?

This can be done quite easily with mkvmerge using a simple variation of the --split option:
mkvmerge --split duration:00:10:00.000 input_file.mkv -o split.mkv

This unadorned command line (other much more complex options are available for --split) will produce an out file naming pattern of split-001.mkv, split-002.mkv, split-003.mkv etc.
The full man page entry for time / duration splitting with mkvmerge is as follows:
2. Splitting after a duration.

  Syntax: --split [duration:]HH:MM:SS.nnnnnnnnn|ds
  Examples: --split duration:00:60:00.000 or --split 3600s

  The parameter must either have the form HH:MM:SS.nnnnnnnnn for
  specifying the duration in up to nano-second precision or be a
  number d followed by the letter 's' for the duration in
  seconds.  HH is the number of hours, MM the number of minutes,
  SS the number of seconds and nnnnnnnnn the number of
  nanoseconds. Both the number of hours and the number of
  nanoseconds can be omitted. There can be up to nine digits
  after the decimal point. After the duration of the contents in
  the current output has reached this limit a new output file
  will be started.

How cool is the command line :)


Dependency errors for gcc-4.8 while installing any package or software in Ubuntu 16.04

I have resolved the issue by re-installing the package binutils.
Now it is working fine.


How do I update Intel e1000 driver? Server reverts to old driver on reboot

That module may be part of the initrd ramdisk. You should rebuild the initrd using the command

mkinitrd

Check the correct syntax 'cause now I'm not on linux.


Gnome Keyring does not work anymore on Lubuntu 14.04

1) sudo apt-get install seahorse

2) Open a terminal and type seahorse, or find 'Passwords and Keys' in Preferences menu.

3) Click on the View menu and then click on 'By keyring', this shows a left side bar.

4) In the left side bar, under Passwords, right click on 'default' and choose 'Change Password'.

5) Enter the old password, then the new one twice (as prompted).

6) Reboot to ensure it all works wonderfully well.


I'm sorry I cannot comment on your post because of my reputation,

Try the following  keyboard shortcuts F1(while booting) and after being booted fn+Ctrl+Alt+F2 or other function keys F3 and so on but not F1 that's the default one


Command man 5 sshd_config will give you plenty of options.

Setting LogLevel VERBOSE in file /etc/ssh/sshd_config is probably what you need, although there are higher levels.

The messages will end ip in /var/log/auth.log by default, so you will have to tail -f /var/log/auth.log in a separate terminal to see what is going on.


Bash script to start 'motion' on screen lock

gnome-screensaver emits some signals on dbus when something happens.

The following line, when run, prints a line whenever the screen is locked or unlocked:

dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver'"

On my machine, the following is printed when the screen is locked:

signal sender=:1.87 -> dest=(null destination) serial=20 path=/org/gnome/ScreenSaver; interface=org.gnome.ScreenSaver; member=ActiveChanged
   boolean true

And when unlocked, the following text is printed:

signal sender=:1.87 -> dest=(null destination) serial=22 path=/org/gnome/ScreenSaver; interface=org.gnome.ScreenSaver; member=ActiveChanged
   boolean false

Script to lock screen and start motion

To make use of this, we run the above command in the script and whenever something is printed we check if it was a screen lock or screen unlock action.

#! /bin/bash

function onScreenLock() {
    motion 2> ~/.motion/log &
}

function onScreenUnlock() {
    /etc/init.d/motion stop 1> /dev/null
}

dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver'" |
(
    while true;
    do
        read X;
        if echo $X | grep "boolean true" &> /dev/null;
        then
            onScreenLock();
        elif echo $X | grep "boolean false" &> /dev/null;
        then
            onScreenUnlock();
        fi
    done
)

Source and further information:

Unix Stack Exchange - Run Script on screen lock/unlock
Gnome Documentation - gnome-screensaver


High Temperature on Ubuntu Server 18.04 (ASUS Chromebox)

It looks like that 96500 is a wrong number in /sys/class/thermal/.

This happens when a platform driver is not 100% compatible. It reads some register that is not showing real temperature on this device.

So just ignore this value. Everything else looks good.


It looks like there's a problem with the .desktop file.  These either don't exist or don't refer correctly to ipython3.   Also see the comments at the bottom, if you want to see how it's expected to work.

$ locate ipy | grep desk
/usr/share/app-install/desktop/ipython-qtconsole:ipython-qtconsole.desktop
/usr/share/app-install/desktop/ipython:ipython.desktop

$ more /usr/share/app-install/desktop/ipython-qtconsole:ipython-qtconsole.desktop
# If you want ipython to appear in a linux app launcher ("start menu"), install
# this by doing:
# sudo desktop-file-install ipython-qtconsole.desktop


How to install Ubuntu an existing partition, that has content on it:

When presented with formatting choices screen choose "Something Else", and click continue
Select the partition you want to install to. (eg. Sda6)
Click "Change"
Click the "Use As" menu, and scroll to find the file system you wish to use. (eg. Ext4)
Check the "Format" box
Choose a mount point (eg. /), and click okay
Make sure boot loader is going to install to the correct drive. (eg. Sda)
Click "Install Now", and proceed with installation setup

Please Note, this will erase all data on the selected partition. Alternatively you can choose not to format in which case directories and files that are on the partition will only be over-written if they use the same names as files and folders written by the ubuntu installer, though if you do this you must choose to use the filesystem as what-ever it is currently formatted as.

Sincerely, tapthoseshoesandwish

Sources:
http://candlelight.any.djun.net/x/1/index.php?topic=520.0


You can start from a USB device pressing the "c" key at boot time.

Startup key combinations for Mac


undefined reference to symbol 'uncompress', DSO missing from command line

I solved this by editing the Makefile, and adding -lz in EXTRA_LIBS.

Look for Makefile in the php directory.
Search for EXTRA_LIBS.
Add the -lz flag.

That links to the library that was missing. -lz links to zlib.

This solution is based on kevinf's answer to Strange linking error: DSO missing from command line on Stack Overflow.


You should be able to run Ubuntu on your PowerPC Mac; you just need to get the PowerPC version.

Some third-party software is not provided for PowerPC and thus won't work, and since the PPC architecture is community-supported and has a relatively small installed user base these days, you may experience a few more bugs. But I say go for it--especially since Mac OS X v10.4 Tiger is completely unsupported and no longer receives updates even for newly discovered security vulnerabilities.

See these resources for more information:

PowerPCFAQ
PowerPCDownloads
Which version of Ubuntu will work on my PowerPC?
(which is a bit more specific than this question, and also hasn't been updated in a while)

Lubuntu is particularly lightweight, so especially if this is an older PPC Mac (G3 or G3), you might consider using that. Ubuntu MATE is also lighter-weight than "vanilla" Ubuntu and has a (much reported on) PPC version.


Find duplicate files and folders and move these to a different folder

fdupes
No GUI but fdupes  / sudo apt-get install fdupes is very fast and reliable. It uses sizes and modification dates for a preliminary analysis, then compares md5 hashes of the files and then does a bit compare if necessary. It's also dead easy to use. I strongly recommend it.
Typical usage:
fdupes -d -r /path/to/directory/

-r for walking subdirectories as opposed to walking just the contents of the specified dir.
-d to prompt the user about which file to delete (without this fdupes just compiles a list of duplicated)
-N deletes without prompt
-H normally, when two or more files point to the same disk area they are treated as non-duplicates; this option will change this behavior
-L hardlink duplicate files to the first file in each set of duplicates without prompting the user (this option was rolled back in some versions as it was found to be buggy and unsafe in rare cases. It might be reintroduced in future versions).
Edit: The hardlink options was removed as buggy for now. It might return some day. For now you have to use hardlink  / sudo apt-get install hardlink
fslint
If you insist on a graphical user interface you might want to have a look at fslint  / sudo apt-get install fslint (see website for description). It is more feature rich but also more complicated and less reliable.


Installing adobe-flashplugin on Ubuntu 16.10 for Firefox

Add this line to /etc/apt/sources.list:

deb http://archive.canonical.com/ubuntu yakkety partner

and run

sudo apt update


node "Failed commissioning" on MAAS and hang on "[ OK ] Started Update UTMP about System Runlevel Changes." shown on node console

MAAS should be using Ubuntu 14.04 to commission. Can you try to update MAAS and see if that solves the problem?


Unfortunately this answer doesn't do everything you want but they are bash scripts you could modify.
First solution would be to have your machine automatically suspend when inactive. Then this script can be used:
$ suspendtime
Nov 10 13:51:52 to Nov 10 18:43:27 suspended 4 hours, 51 minutes, 35 seconds
Nov 11 00:33:26 to Nov 11 07:48:14 suspended 7 hours, 14 minutes, 48 seconds
Nov 11 13:23:28 to Nov 11 18:30:26 suspended 5 hours, 6 minutes, 58 seconds
Nov 11 21:48:00 to Nov 12 04:24:46 suspended 6 hours, 36 minutes, 46 seconds
Nov 12 05:51:51 to Nov 12 17:43:22 suspended 11 hours, 51 minutes, 31 seconds
Nov 12 21:51:33 to Nov 13 04:21:19 suspended 6 hours, 29 minutes, 46 seconds
Nov 13 05:54:53 to Nov 13 18:55:32 suspended 13 hours, 39 seconds
Nov 13 20:27:03 to Nov 13 23:11:23 suspended 2 hours, 44 minutes, 20 seconds
Nov 14 00:46:49 to Nov 14 07:27:29 suspended 6 hours, 40 minutes, 40 seconds
Nov 14 13:20:49 to Nov 14 18:56:52 suspended 5 hours, 36 minutes, 3 seconds
Nov 15 00:16:33 to Nov 15 07:33:53 suspended 7 hours, 17 minutes, 20 seconds
Nov 15 13:06:38 to Nov 15 18:07:34 suspended 5 hours, 56 seconds
Nov 15 21:46:09 to Nov 16 04:20:41 suspended 6 hours, 34 minutes, 32 seconds
Nov 16 05:55:28 to Nov 16 18:13:27 suspended 12 hours, 17 minutes, 59 seconds
Nov 16 21:36:22 to Nov 17 04:07:29 suspended 6 hours, 31 minutes, 7 seconds

Linux uptime 582,903 seconds ( 6 days, 17 hours, 55 minutes, 3 seconds)
15 Suspends 388,500 seconds ( 4 days, 11 hours, 55 minutes)
Real uptime 194,403 seconds ( 2 days, 6 hours, 3 seconds)

The second solution is close to your needs but has no logging. When you are watching movies this script dims the other two monitors and records inactivity time in X11:


I keep getting HTTP Error 500 how do I fix

HTTP error status 5xx are server errors. Unless you administer these systems, you shouldn't bother about fixing them. You may want to report them to the admins, though.

One exception is that if you've configured a proxy server, this may cause trouble as the proxy server will return 5xx error status codes when it runs into problems itself. Try to disable a proxy if you're using one.


Apologies all but I have figured it out.  I saw docker in Top output and checked what containers I had running (2 databases, a Wordpress and a Spring Boot app I had written).  Stopping these containers has stopped the fan thrashing and brought CPU usage right down.
So slightly embarrassing but a big relief. Thanks.


Full Screen: Ubuntu 14.04 LTS running on Windows 10 Hyper-V

According to here you must do the following:

  Open Terminal
  Type: sudo vi /etc/default/grub
  Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT, and add video=hyperv_fb:[the resolution you want].  The resolution I want is
  1280x720.  So my line ends up looking like this:
  GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1280x720"
  Write the changes and quit vi.
  Run: sudo update-grub
  Reboot the virtual machine


Error with building libreoffice 4.0.2.2 (in a virtual machine)

The official wiki says:

sudo apt-get build-dep libreoffice # only on Debian/Ubuntu
git clone git://anongit.freedesktop.org/libreoffice/core libreoffice
cd libreoffice
./autogen.sh
make dev-install

You can get the compiled version here. Just choose x86_64 or x86 and deb.
Unpack the file:

Click on your downloaded package (or right click and do a "Open With" and choose your unpacking tool).
Extract the folder to a location you have easy access to (your Home directory is fine)

Installation of the packages

Change into the unpacked folder, in it you will see some files  and a DEBS/ folder.
Change into this folder
Select ALL files within this folder (except the "desktop integration" folder).
Do a right-click and in the drop-down menu select something like "Open with Ubuntu Software center"
You may be prompted to install dependencies, generally the system will tell you if these dependencies will break something.
Change into the desktop integration folder. This contains a LibreOffice*debian-menus_*.deb file
Again right-click and open with Ubuntu Software Center to install.


You can List Installed Packages
Open terminal:

  sudo su

(will give you root permissions)

  apt list --installed

(Shows all installed apps)
Now here is a trick

  apt-get purge

removes configuration files,
while

  apt-get remove

does not!

So you can ->

  apt-get remove --purge PackageNameHere


UEFI Multi-Booting With Pre-Existing Windows Installation

I'm just going to answer my own question since I finally got everything to work, and this might help someone else with similar problems or questions.

Question 1:

It seems that the efi files that matter (by default) are on your EFI System Partition (partition 1) usually shown in the firmware (under FS0) as /EFI/Microsoft/Boot/bootmgfw.efi and /EFI/Boot/bootx64.efi. bootx64.efi seems to be just a bootloader whereas bootmgfw.efi starts Windows Boot Manager. If you have only 1 OS (Windows) installed, then it shouldn't matter which efi file you choose to boot from as the Windows Boot Manager menu won't appear if it only detects 1 OS.

Question 2:

Honestly, I still don't understand why my firmware always adds /EFI/Microsoft/Boot/bootmgfw.efi (on Partition 3) to the boot list if I use the actual functional bootmgfw.efi located (on Partition 1). I also don't know why the nonfunctional efi file is on my C: drive (Partition 3) to begin with.

Question 3:

In my case, rEFInd detected every efi file on my hard drive, but could not boot Windows. I have no idea why this is. Furthermore, upon trying to boot one of the efi files, the screen flashed, the computer restarted, and when I looked at my boot order (in UEFI firmware), Windows Boot Manager was once again in the top spot. Since then rEFInd has been unable to boot at all even when I put it back as first in my order. It just results in the computer restarting (which I don't really care about because I just installed GRUB and then everything all worked alright except rEFInd).

tldr; Sometimes there are extraneous boot files and Windows 10 Boot Manager might murder rEFInd. This is on Dell 'BIOS' Firmware 1.2.2.


Yes, you can. Especially if you compile the latest Ubuntu kernel. ;-)
You can also use mainline kernels in Ubuntu. But you do not have to build them. They are already built in Ubuntu Mainline PPA. You can always redo it in educational purposes.
New kernel with new features will "magically" work in Ubuntu.
Compiling a custom kernel with removing unneeded modules can improve boot time slightly, but will not improve performance.

In general Ubuntu patches in most cases just backport bug fixes and support of new hardware from latest kernels. They are not specific to Ubuntu distribution in 99% of cases.

It is fun building kernels, but it has no practical value if you do not modify the source. I have to build kernels in some cases, but I always try my best to get my patches applied upstream to let me avoid this sad task.


How to check the default handler for a specific file type in Terminal?

Using the command file or mimetype

EG

% file conf.ini
conf.ini: ASCII text

% mimetype conf.ini
conf.ini: text/plain

% file Screenshot\ from\ 2015-08-17\ 20-32-54.png
Screenshot from 2015-08-17 20-32-54.png: PNG image data, 1112 x 700, 8-bit/color RGBA, non-interlaced

% mimetype Screenshot\ from\ 2015-08-17\ 20-32-54.png
Screenshot from 2015-08-17 20-32-54.png: image/png

% file Intro.mp3
Intro.mp3: Audio file with ID3 version 2.3.0

% mimetype Intro.mp3
Intro.mp3: audio/mpeg

And to show the default desktop file for the mime type of a given file

% mimetype -b Screenshot\ from\ 2015-08-17\ 20-32-54.png |\
    xargs xdg-mime query default
eog.desktop

Or the application call

% mimetype -b Screenshot\ from\ 2015-08-17\ 20-32-54.png | \
    xdg-mime query default |
    xargs -i'{}' awk -F= '/^Exec/ {print $2}' "/usr/share/applications/{}"
eog %U


What happened if I put the PBS script into the background?

I would assume you need ...

(perl ~/bin/hapinfo2mhb.pl SP.Hap.SumUniqaa 0.5 > MHB.RD90up80.r0.5-aa.bed) &

to put the command into background.


PPTP VPN on Ubuntu Server 12.10 fails to connect, with error: no ifupdown configuration found

I can see this is probably a dead topic by now. But, if you are using ubuntu server, most people run into problems using Network Manager and forwarding. You can uninstall this and only leave your eth0 in the adapter list (/etc/network/interfaces). PPTP will manage the up/down events for you. I found pptpd-ubuntu-12-04-vps-fail2ban to be the best guide I have seen so far and it has some troubleshooting steps.


Additional IP address to loopback via /etc/network/interfaces

I think you were very close! To accomplish the lo addressing they way you are looking you might have to use a :[num] notation. You might be able to write out your address with mask in the interfaces file, but I used the traditional notation with address, netmask and network.

/etc/network/interfaces:

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

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo lo:0
iface lo inet loopback

# The primary network interface
auto ens33
iface ens33 inet dhcp

iface lo:0 inet static
  address 169.254.255.254
  netmask 255.255.255.0
  network 169.254.255.0

The resulting IP address on lo becomes:

user@server:~$ ip addr show dev lo
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet 169.254.255.254/24 brd 169.254.255.255 scope global lo:0
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
user@server:~$

I thought that the 169.254.0.0/16 range was used for link local - but you can modify the above as needed.

Hope that helps.


Stuck in log in screen after installing AMD-gpu-pro

Same thing over here with a R9 M275. I did uninstalled, just go to console and issue the command amdgpu-pro-uninstall. It was available from me on my path.


Transmission not working on UUID disk and proper permissions

Instead of messing with the config file, I prevented transmission-daemon from running automatically and opted, instead, to run it on demand.  I created a new user called "fetch", with no shell, and made him a member of the plugdev group.

Then, from my own shell, I execute...

sudo -H -u fetch bash -c "transmission-daemon"

The config file is, or course, located in /home/fetch/.config

Unless you have something weird going on with your file system permissions, substituting debian-transmission for fetch should work to allow the process to write to the necessary directories.

Good luck to you.


Getting error while trying to login to skype 4.3 in Ubuntu 12.04 LTS?

I'm on Kubuntu 14.04, but faced the same problem. Fixed it like this:

$apt-get update ; apt-get install sqlite

$sqlite3 ~/.Skype/[username]/main.db

Inside, copy/paste this (and press enter):

UPDATE messages
   SET body_xml =(
         SELECT SUBSTR( body_xml, files_start, alt_end - files_start ) ||
                SUBSTR( body_xml, 0, files_start ) ||
                SUBSTR( body_xml, alt_end )
           FROM (
             SELECT msg.body_xml,
                    instr( msg.body_xml, '<files' )  files_start,
                    instr( msg.body_xml, 'alt="' ) + 5 alt_end
               FROM messages msg
              WHERE msg.id = messages.id
           )
       )
 WHERE type = 68
   AND body_xml NOT LIKE '<file%';

To quit, enter:

.quit

This saved all of my history!

Sources:

http://community.skype.com/t5/Linux/Skype-4-3-crash-on-ubuntu-14-04/td-p/3219892/page/3


Link Internet: This will more than likely be DHCP'ed from your router. If not you will need a 'local IP' and set the gateway to the internet.

Link Teachers: a 192.168.x.x subnet will do the trick. as this is a lab, you could use 192.168.1.x/24

Link DMZ: Same as Teachers link use 192.168.2.x/24

Link Students: Same as Teachers Link use 192.168.3.x/24

Of course if you have more than 254 devices on the subnet, then you will need to increase the range.

If you only have 1 network card, then you will need to bind an IP address from each subnet to the network card - binding multiple IPs source.

Once you have your interfaces and networks setup, you should be able use IPTABLES.


Find the process-id in system monitor, then run

ubuntu-bug PID

on that process.  Then if you like, paste the bug number here and someone may be able to help more.  It's working for me, for what that's worth.


System Monitor > System tab missing in Ubuntu 13.04

It is a standard feature.

If you want information of your system, open System Settings and choose Details.


dd is the command for copying and checking from an input file if to anoutput file of.

Taken together, the command means to copy content from the input file, in this instance /dev/random, a pseudo-random number generator, into a file called .huehuehue.

I don't think this is a question particularly related to Ubuntu, personally, but it was asked here. Maybe this should be shifted to unix ?

You might also want to try running ps aux | grep dd to see if the process is still running. Get the process number and kill it.

I hope there was no other damage if this was a genuine case.


Cannot access cms panel in the same network

Errr wait so it works as 127.0.0.1:8081 but not 192.168.1.8:8081?

Confirm that IP is correct with ipconfig -all
If IP is correct your app is probably only configured to listen on local interface. Confirm that with netstat -an | grep 8081 if you see 127.0.0.1:8081 than that's the case. Edit app configs to listen on correct interface/s


How to disable automatic shut-down on low power (Ubuntu 15.04)?

try:

sudo dconf-editor

if you haven't it, then install:

sudo apt-get install dconf-editor

then

  org->gnome->settings-daemon->plugins->power->critical-battery-action=>nothing


After you formatted it did you actually mount it? Here's what I would do, presuming the device is listed as /dev/sdb in an fdisk -l output. Also, I am going to presume you want it mounted to /HDD (change this to whatever you want).

Open up a Terminal

sudo -s  # Switch to admin
mkfs.ext4 /dev/sdb
mkdir /HDD
nano /etc/fstab  # Use VIM if you don't have nano

Insert the following line at the end of the file:

/dev/sdb1 /HDD auto defaults 0 0

CTRL + X then Y to save and exit

mount -a  # To verify the drive mounts as /HDD

Close Terminal

Open your File Explorer, navigate to your root folder (/), find HDD. Right-click and Send to > Side Pane (create shortcut).

Now, reboot the system. Your drive should auto mount and be on the side pane.

Change Permissions

The following command will give full permissions to all users for a drive. Look at the wiki page about file permissions for information on what each 7 does and if you wanted to do anything different.

sudo chmod +777 -R /HDD


When removing Ubuntu for windows should I delete all partitions?

You will want to remove all partitions from the install disk, yes. Windows will create its own partition (or two, depending if it wants a D: drive). When installing Ubuntu later, you will recreate 2 more partitions.

Beware that you will lose ALL data on the Ubuntu partitions. Make sure you've saved your documents, pictures, videos, etc. before doing this.


unity-control-center printers does not bring up the printer panel

With the unity-control-center command line if you press Tab Tab after typing it in it will show you all the options you can bring up.

:~$ unity-control-center
appearance        info              power             universal-access
bluetooth         keyboard          printers          user-accounts
color             mouse             region            --verbose
datetime          network           screen            --version
display           --overview        sound             wacom

However, for some reason the printers part is not working.  I don't know if it is a bug or not.  But, the printers part can be launched from a command line with the following command:

system-config-printer

Hope this helps!


User defined Quick Build command (sage) does not work in Texmaker

I have tried StackExchange for Tex and resolved the problem. I have figured out whats was going wrong with my Quickbuild command. I have to write the whole path for the command sage in Texmaker. I replace my pipeline in Options → Configure → QuickBuild → User with

pdflatex -synctex=1 -interaction=nonstopmode %.tex | /home/ddas/sage-6.8-x86_64-Linux/sage %.sagetex.sage | pdflatex -synctex=1 -interaction=nonstopmode %.tex

But you have to replace the path /home/ddas/sage-6.8-x86_64-Linux/sage  with yours.

Also you may write your own script as @Dan advised at here.


Ubuntu 18.04 and systemctl service disappearing

I had the same problem.

Only solution that I found is to copy the service without creating links

sudo cp /path/to/imaservice.service /etc/systemd/system/multi-user.target.wants/imaservice.service

In this way it works.


I'm assuming you didn't uninstall the run times that flatpak applications require. I would recommend reinstalling flatpak and running the following commands:

flatpak uninstall --unused

sudo apt-get remove --autoremove flatpak

sudo apt-get purge flatpak

This should erase the majority of the files left behind from flatpak. I had around 4000 after trying it out. I decided it wasn't for me and had to look for a few hours to find a way to remove the majority of the files. These three commands had reduced nearly 4000 files that dealt with flatpak to 197.

Hope this helps.


The error is stating something is already bound to port 80. There is a default site configuration file in /etc/apache2/sites-available that binds on port 80. This is probably the file you want to edit for binding and not using the /etc/apache2/apache.conf file. If you defined something in apache.conf then it is conflicting with the 000-default.conf file and that is why it is refusing to load.


nautilus is not working...window is flipping

Could likely be from this bug if using 13.10 or maybe even 13.04

https://bugs.launchpad.net/ubuntu/+source/nautilus-python/+bug/1203349

Short term solution is to remove any 0 byte files of the type mentioned or just remove python-nautilus package

sudo apt-get purge python-nautilus

Long term solution - upgrade to  14.04 where this is no longer an issue


How can I install Ubuntu onto a second hard drive along side windows 7?

upon installing Ubuntu it will detect that you have another OS on your hard drive and will ask you weather you want to run Ubuntu along side with it or remove it and install Ubuntu. It will also allow you choose the suitable size for your Ubuntu.
Just make sure that you know how much your C drive -in windows- needs in order not to "harm" it.


Installing ceph on a single machine with cephdeploy ubuntu 14.04 64 bit

This is a recipe that I use for starting Ceph on a single node using ceph-deploy.

export DATA_DEV=sdb
export JRNL_DEV=sdc
export HOST=kyoto
ceph-deploy install $HOST
ceph-deploy new $HOST
echo "osd crush chooseleaf type = 0" >> ceph.conf
echo "osd pool default size = 1" >> ceph.conf
ceph-deploy mon create-initial $HOST
ceph-deploy disk zap kyoto:$DATA_DEV
ceph-deploy disk zap kyoto:$JRNL_DEV
ceph-deploy osd create kyoto:$DATA_DEV:$JRNL_DEV
sudo chmod +r /etc/ceph/ceph.client.admin.keyring


Yes - the software will be preserved.

Yes - after a possible one or two restarts you will be able to use your apps right away.

I have gone through the upgrade myself a couple of times and it works.
Anything not compatible with Xenial will be reported prior to upgrade.

Backup all sensitive data prior to the upgrade, and whilst upgrading be patient and try not to interrupt or cancel in the midst of it because that's the sure and fast way of buggering it up.

If you're really worried, fire up a Trusty VM, install the apps you care about, through in some copies of the data you care about.  Then do an upgrade.  If it works ok, then there!  You've tested the process!  You can then apply the same method to the real rig.


How do I change the shortcut key to launch the dash

Go to Configuration Editor > / > apps > compiz-1 > plugins > unityshell > screen0 > options and edit the Show launcher string to <Alt>Z.


Installed Ubuntu (on its own partition, Windos 8 machine) and lost both boot options in BIOS

For BIOS issues I'd recommend contacting the manufacturer of your motherboard/system/laptop. I'll narrow it down for you if you provide the make and model of your system in your question.

Based on your comment I believe you have an ASUS S46CA you can contact the manufacturer about repairing your BIOS boot options here


Virtualbox Ubuntu switching to virtual terminal problem

In VirtualBox we can switch to a TTY in virtual Ubuntu with

HostF1 ... HostF7

whereHost ist the host key as was defined in the VirtualBox general settings (usually right Ctrl)


Why do I have 3 Evolution's in my /usr/share/applications folder?

Because each of them has different purpose. As @aneeshep suggested, you can see the real names of .desktop files using Terminal. Or go ahead and open those files in Gedit (drag&drop on Gedit's window).

evolution-2.2.desktop is for backward compatibility, normally you don't see it in Applications menu/dash
evolution.desktop is the main launcher with Unity integration
evolution-mail.desktop (Evolution Mail) is to explicitly launch mail component of Evolution

You can remove them, but they'll be back at the latest with the next Evolution update, not to mention that Evolution will disappear from applications menu and you'll break desktop e-mail integration (like mailto: links support etc.).


problem using unrar and adding alternative search paths

The asnswer is for the @enberg guy from https://gist.github.com/enberg/84710b619bdb0b10e945. He made a script to install it.

#!/bin/bash
WORKDIR=`mktemp -d` && cd $WORKDIR

# Get deps
sudo apt-get -q update
sudo apt-get -qy install make libfuse-dev g++

# Get, make and install unrar
wget http://www.rarlab.com/rar/unrarsrc-5.1.1.tar.gz
tar zxvf unrarsrc-5.1.1.tar.gz
cd unrar
make && sudo make install
make lib && sudo make install-lib
cd ..

# Get, make and install rar2fs
wget https://googledrive.com/host/0B-2uEqYiZg3zR1F0b0tmRktiaXc -O rar2fs-1.20.0.tar.gz
tar zxvf rar2fs-1.20.0.tar.gz
cd rar2fs-1.20.0
./configure --with-unrar=../unrar --with-unrar-lib=/usr/lib/
make && sudo make install

# Cleanup
rm -rf $WORKDIR

give an execute permission

chmod +x install_rar2fs_ubuntu.sh

Then run the script from your terminal

sudo ./install_rar2fs_ubuntu.sh


Is it possible to power down my external via the eject button?

In 12.04 we can use Nautilus in order to right click the device in the "Devices" list and choose "Safely Remove Drive" option in the context menu as shown in the next screenshot:

Note that there is also the "Eject" option, which acts the same as when using the notification area's eject icon. Nevertheless, the "Safely Remove Drive" in Nautilus physically ejects the device, leaving the device without power, thus shutting it down.

You clearly tagged your question under 12.10 but I won't move to 12.10 soon, and I can't say if the things have changed that much in Nautilus but give this a try and inform us how is Nautilus managing your devices when safely ejected.

Good luck!


The guest user is not granted the permission to run sudo or pkexec, which (unless you're root, which you're not) are required in order to change another user's shell.

So the only solution occurring to me is booting into a root shell and changing the user's shell as root:

chsh -s /bin/bash user

Where user is your user's username.


Will making a USB ubuntu boot disk wipe my USB stick?

Creating an Ubuntu boot disk on your USB stick will wipe the contents of such USB stick, as far as I know. I'd recoomend to back up your data. But, why use a 30GB disk for that task? a 4GB USB stick will do the work and is quite inexpensive.


Power failure during ubuntu installation killed my drive

Your not being able to boot into Windows is almost certainly caused by GRUB2 having overwritten the MBR, but not having had time to run update-grub before the power failure. Fixing it should be as simple as booting into a Windows install disc and choosing "repair".

The SSD not being detected is trickier, but I have an idea. Is the drive Sandforce 2K based? Is it at least four months old? Had you updated its firmware recently?

IFF the answers to these questions are y/y/n, you have most likely been affected by an infamous bug in the Sandforce controller's firmware, which has been known to cause exactly the issue you describe. If so, fixing it should be as simple as cutting power to the drive completely for a few minutes. If not, I'd say to RMA it.


A solution using cloud images
My problem is the creation of a custom Ubuntu VirtualBox VM starting from a minimal one. The result should consist of a VM running in a local VirtualBox installation (not in the cloud).
This task was formerly carried out using the minimal install mini.iso. But this disk image is now legacy, although still unofficially available.
I wanted a well-documented, long-term solution, possibly based on official releases. Browsing the Internet I found various suggestions, but not a complete solution. Below is a step-by-step guide that is based on such suggestions.
The solution may explain why the "mini.iso" based one is going to be dismissed. In fact the new one is faster to execute and returns a VM that is probably better configured for the use in a VirtualBox environment. In addition, the process might be completely automated (see this or this), while the legacy one requires a manual installation taking a long time.
The solution starts from a cloud image, as suggested in one of the posts on the subject (How to do a minimal install of 20-04).
I divided the process, which is designed for a Linux box, into steps:

install the cloud image
configure the VM
configure the cloud image
define user credentials
prepare for customization

I also give some untested suggestions for its use in a Windows environment.
Install the cloud image
Cloud images are available from several sources. This guide applies to those on the official Ubuntu site, which offers various flavors. I have selected the 20.04 in OVA format, which is easy to use in VirtualBox (link). Editing the URL you find other formats and the repo.
Download the image, and create the VM using File -> Import virtual application in the VirtualBox GUI, without launching it. It may be convenient to change the name in the description (double click on the description line) with a simpler one, like ''minimal-focal''.
Configure the VM
Networking
In the network configuration of the Virtual Machine, configure the network adapter as "NAT", and (in the "Advanced" box) redirect host port 2222 (or whichever you like) to 22. In this way, your VM will be connected to the Internet and accessible through ssh.
Storage
In the Storage configuration of the VM:

Remove the useless floppy driver
Create a new DVD drive and leave it empty

Configure the cloud image
Create a .iso image containing the files that cloud-init will use when the VM boots. In a convenient place, create the following two YAML files:

meta-data:
 instance-id: desktop
 local-hostname: vb-desktop

user-data:
 #cloud-config
 users:
   - name: user
     sudo: ['ALL=(ALL) NOPASSWD:ALL']
     shell: /bin/bash

Here you have the option to configure two details in the VM: the hostname (here the ''vb-desktop'' value for the ''local-hostname'' field in the meta-data file) and the username (here the ''user'' value for the ''name'' field in the user-data file). Check the manual for more details.
Next, create the .iso file (e.g. ciconf.iso) with the command
 $ cloud-localds ciconf.iso user-data meta-data

The ''cloud-localds'' command is in the "cloud-image-utils" package, that (in Debian/Ubuntu) you install with
 $ sudo apt install cloud-image-utils

The same functions should be available also for Windows users.
In the Storage section of the VirtualBox GUI install the .iso file you just created in the IDE drive you created in the previous step.
Launch the VM and wait for the terminal login, then "shutdown ACPI". You cannot log in since you do not have credentials.
Define user credentials
Move to the directory of the VM virtual disk (might be ~/VirtualBox VMs/minimal-focal), and mount the disk image. The qemu package is needed, which is installed with
 $ sudo apt install qemu

To install the disk image proceed as follows:
 $ sudo modprobe nbd max_part=8
 $ sudo qemu-nbd -c /dev/nbd0 ubuntu-focal-20.04-cloudimg.vdi
 $ sudo mount /dev/nbd0p1 /mnt

The ''ubuntu-focal-20.04-cloudimg.vdi'' refers to the image file, replace with your own. In the end, the VM filesystem is available in the /mnt directory.
To create the user credential ''chroot'' to the VM filesystem, change the user credentials (the ''passwd'' command will prompt you for a new password), and exit the ''chroot'' environment:
 $ sudo chroot /mnt
 $ passwd user
 $ sync
 $ exit

Replace ''user'' with the username configured in the previous step. There are limited chances to mess-up your system using the chroot command, so be careful with it. If you do not know about it, please check the man page.
Only when you have safely left the ''chroot'' environment (double check), copy your public key (I assume you have one), inside the VM filesystem:
 $ mkdir /mnt/home/user/.ssh
 $ cat ~/.ssh/id_rsa.pub >> /mnt/home/user/.ssh/authorized_keys

The above step is optional but extremely convenient. In case you do not have a public key there are thousands of tutorials for this (''ssh-keygen'').
When done, unmount the VM disk image:
 $ sync
 $ sudo umount /dev/nbd0p1
 $ sudo qemu-nbd -d /dev/nbd0
 $ sudo rmmod nbd

If you forget to unmount, the VM disk is damaged and you need to restart the whole thing. Double-check before proceeding.
Prepare for customization
Start the machine from the VirtualBox GUI interface and log in using the ''user'' username and the defined password.
The VM is accessible also from the command-line in your PC with
 $ ssh user@localhost -p 2222

(''user'' replaced with your username, 2222 is the port number configured in the first step).
Then use the way you like (I suggest ''ssh'') to finish the work.
Log in the VM and, using a line editor, fix a missing detail in the ''/etc/hosts file'' in the VM: add at the end of the ''localhost'' line the name of the new machine, in the example  ''minimal-focal''.
Next give the following commands:
 $ sudo dpkg-reconfigure keyboard-configuration
 $ sudo apt update
 $ sudo apt upgrade
 $ sudo apt install linux-modules-extra-$(uname -r) tasksel

The first command adapts the VM keyboard to the one you use, while the rest updates the configuration, installs a bundle package containing modules that are missing in a cloud image and the tasksel utility that is useful for customization.
Final check and conclusions
Using the ''tasksel'' command you can install various kinds of bundles, e.g. a LAMP server. But you may decide to install your favorite collection of packages, just like with the mini.iso.
The process described above is conceptually more difficult than that carried out with the mini.iso, but it is faster, taking around 10' to have the machine ready for customization. In contrast, you need to download a VDI which is larger than the mini.iso. Finally, the cloud technology is here to stay, so I hope that this modality will be available for several Ubuntu releases after the mini.iso is finally abandoned.
The final check may consist of installing a desktop distribution, like Xubuntu, using tasksel. The test is significant to check if a display manager can operate correctly. To run the check, clone the VM and call ''tasksel'' from the VM terminal. Next select (with ''space'') the "Minimal Xubuntu desktop". Wait until the installation completes and reboot.
Windows users should be able to use the same strategy, but the steps that require mounting the VM filesystem and the chroot command are carried out using specific fields in the user-data file.


openvpn: this is a generic configuration and cannot directly be used

Just download client.ovpn instead of server-locked.ovpn and all works fine for now via command line. Looks like magic, but works.


Application not shown in Ubuntu Sofware Center

If you installed it manually, using some script provided or a .deb file downloaded from the Internet, and the app is not in the official repositories, the app won't be shown int the Ubuntu Software Center. To uninstall it, you can look at this thread:

How to uninstall .deb package


How do I make and upload a package for my game?

You can use check install

apt-get install checkinstall

checkinstall -D make install

See here for further information:

http://www.falkotimme.com/howtos/checkinstall/


14.04 Simple Scan no longer starts, 'segmentation fault' when run in terminal

What worked for me was:

Delete the files in ~/.cache/simple-scan/autosaves/
Delete the file ~/.cache/simple-scan/state

Found out the error using simple-scan -d.

Hope it helps someone.


In xfce4, how can I associate an icon to an executable

This isn't happening! Instead I'm getting a generic icon.

What I've done:

  Placed the icon zathura.png in /usr/share/app-install/icons (which
  already contains the icon okular.png, which shows properly when I run okular).

That's the right thing to do.

  Added the line Icon=zathura to the file
  /usr/share/applications/zathura.desktop
  (again in imitation of a similar file, okular.png).
  The file, in its entirety, is this:

  [Desktop Entry]
      Version=1.0
      Type=Application
      Name=Zathura
      Comment=A minimalistic document viewer
      Exec=zathura %f
      Terminal=false
      Categories=Office;Viewer;
      Icon=zathura
      Keywords=PDF;PS;PostScript;DjVU;document;presentation;

This is the problem. I believe that it need as absolute path - or at least a file extension. This is because you don't know where the appplication looks by default. For example, cairo-dock is in /usr/share/cairo-dock. So give it the full path like so.

[Desktop Entry]
Version=1.0
Type=Application
Name=Zathura
Comment=A minimalistic document viewer
Exec=zathura %f
Terminal=false
Categories=Office;Viewer;
Icon=/usr/share/app-install/icons/zartha.png
Keywords=PDF;PS;PostScript;DjVU;document;presentation;

  I then set out to try to break the okular icon to see if I can find where the icon gets associated to an executable.  I can't break it!  For instance, if I copy /usr/bin/okular to /usr/bin/fooooo and call that new executable, the window thus created still gets the okular icon, even though there is no fooooo.png or fooooo.desktop, or any .desktop with Name=fooooo or Exec=fooooo.

That's because the link isn't between the name, or executable name, it is with the icon line. Try deleting that, and it will break.


In this case the next command had fixed the problem:

sudo modprobe snd-hda-intel


How to delete a panel in the classic desktop?

The secret key combination with the panels in Oneiric is Alt+Super + Right Click

The Super key is also known as the Win or Windows key.

If you are using Precise (12.04) then for me the same key combination is required.

However, as reported by @tachyons and @dobey the simpler Alt + Right Click is required.

N.B. if you are using Gnome-Classic (No Effects) OR for whatever reason compiz is not running then the key combination automatically defaults to Alt + Right Click

In fact - its the same key combination for any gnome-panel changes such as adding or moving panel applets.


Just open a terminal session and enter:
Code:

sudo shutdown -P now


How do I force Kubuntu 12.10 to boot in 32-bit mode (Linux 3.2.0-34-generic-pae)?

I don't know about Linux 3.5.0-45-generic being 64-bit. That would not possible if your Laptop only supports 32-bit. Putting that aside, your question is about how to set default boot entry. Take a lookt at Grub Customizer. There is one good tutorial here: How do I change the GRUB boot order?. The accepted answer there can be a bit confusing. You can just follow the second answer, which I paste here:

You can also change the grub default boot entry from the command line without having to install any additional tool.  This won't change the order in the list but it will allow a different OS to boot by default, which sounds like what you may want anyway.

First, make a backup copy of /etc/default/grub. In case something goes wrong, you can easily revert to the known-good copy.

sudo cp /etc/default/grub /etc/default/grub.bak

Then edit the file using vim or the text editor of your choice.

sudo vim /etc/default/grub

Find the line that contains GRUB_DEFAULT=0 and set it to GRUB_DEFAULT=x where x is the index of grub menu item to which you would like to boot to by default. Note that the menu items are zero-indexed. That means that the first item in the list is 0 and that the sixth item is actually 5.  So to boot to the sixth item in the list, the line would read GRUB_DEFAULT=5.

Additionally, if you want to use a kernel in the "Previous Linux Versions" menu, you'll want to change GRUB_DEFAULT=0 to GRUB_DEFAULT="2>x" (make sure to include the quotations), where x is the placement of the old kernel on the sub-list (assuming the "Previous Linux Versions" is third on the main list). Remember that the list always begins counting at 0.

Then build the updated grub menu.

sudo update-grub


After running into this problem the following steps got my phone back up and running  (Nexus 4, r214):

Open the terminal app on the phone and validate using password if configured

sudo stop urfkill
sudo rm /var/lib/urfkill/saved-states -rf
sudo reboot

The phone should come back up with the carrier re-enabled.


Gimp installed via snap has missing fonts and theme

I tested the GIMP package on my machine by installing it via snap and here are my results :
Fonts are working properly

The fonts are working fine and they're not missing.
However it might be a possibility that something's broken.
What you can do is firstly remove the existing package from your machine
using the following command

sudo snap remove gimp

Then reinstall GIMP using the following command

sudo snap install gimp

Also, if you've multiple packages installed (that is a previous installation of GIMP and also the snapcraft version) then you will have to launch GIMP from the snap directory like so /snap/bin/gimp

Another thing that I've come across is that there's an issue inside the font package and it's a fatal issue.
Inside the package, PANGO gives warnings related to font-face and scaled-font.
Then LibGimpBASE gave a warning and then the application crashed due to a segmentation fault.

So, not exactly the issue that you've been facing but surely an issue with the fonts.

I'll raise an issue ticket regarding the same.

Till then try the above steps and let me know if it helps.


You can force a paragraph to be RTL by adding Unicode control U+200F RIGHT-TO-LEFT MARK (RLM) to the beginning of the paragraph. Using:

  Crtl+Shift+u Then 200f Enter

For easy entry, you may have to customize you keyboard layout. See reference.

There are more Unicode control characters:

U+200E LEFT-TO-RIGHT MARK (LRM), To do the reverse on a right-to-left environment.
U+061C ARABIC LETTER MARK (ALM), Note: Most users uses RLM instead which is more general and it works for Arabic scripts too.
More at Wikipedia: Bidirectional Text.

References:

Cannot type “ć” on Hungarian layout
Stabilizing characters like < >, { } and [ ]


How do I enable the wifi when the hardware switch doesn't work?

As a temporary fix you can run in terminal:

sudo modprobe -r ideapad-laptop
sudo rfkill unblock all

To make this setting permanent run:

sudo tee /etc/modprobe.d/blacklist-ideapad.conf <<< "blacklist ideapad_laptop"

This issue has been fixed in recent Ubuntu kernels. I suppose in 3.13 for precise too. But it needs to be checked.

I was the author of the patch fixing the issue.


VMware Player warns me of no swap whenever I launch a VM

I didn't have a swap area in my host machine. So I created a swap file as described here and that solved my problem. I'm not getting the warning anymore.


Cannot get basic Content interface example working with Snapcraft

You're so close!

The content sharing interface bind-mounts the slot to the plug's target. To that end, the target parameter must be pointing to an existing directory (bind mounts need to mount on top of something just like any other mount). So in your consumer, instead of using the nil plugin, use the dump plugin and dump an empty shared directory into the root of the snap. Then you'll see provider's $SNAP/src directory show up in consumer's $SNAP/shared directory.

Note that you won't see this from the system perspective. If you ls /snap/consumer/current/shared/ from the system, it'll be the empty directory you packaged into the snap. However, when an application is fired up, the context in which it is run contains that bind mount. Let me prove it:

$ snap run --shell consumer
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

$ ls $SNAP/shared/
file1  file2

snap run --shell runs a shell within the exact environment that would be used for the application in question. So running snap run --shell consumer you're asking for a shell with the same confinement and environment that the consumer app would have. That's why I could use $SNAP there. Note that file1 and file2 are the files contained within my provider's src directory.

One last note: assuming that you want the consumer app to list the contents of the shared directory, you would change it to look like this (no need to use /snap/consumer/current):

apps:
  consumer:
    command: ls -lR $SNAP/shared/


Show current running process with other name

I don't understand why you would want to do this, but if it's just for the sake of curiosity then a quick and dirty

top | sed 's/firefox/whatever/'

appears to work, at least for the default top output - but you should not rely on it being a robust solution.


Welcome to Ubuntu!

You will find current and complete instructions at Ubuntu.com, much more useful than a third party article designed for a version which has reached its End of Public Support, as version 14.04 did in April of 2019. Things have changed for 18.04 LTS.

For one thing, you don't need to create a swap partition, since the modern kernel is fast enough so there's no longer a disadvantage in using a swap file instead. The swap file will be created automatically during installation of Ubuntu, so please don't bother with a swap partition.

The Pre-Installation Hardware steps are especially important. You did not specify your hardware platform, and whether it BIOS/firmware relies on Legacy Boot, whether Legacy Boot is still enabled, of if you have disabled that option and set for the preferred UEFI boot.

Please use UEFI if you can, which probably will require a complete erasure of that external drive and making an entirely new GPT partition table, unless that drive is already prepared with a GPT partition table. You can confirm the partition table type for all drives with this command ( thanks to https://unix.stackexchange.com/questions/120221/gpt-or-mbr-how-do-i-know ) to run from any Linux:

sudo fdisk -l

If you see Disklabel type: dos the drive is MBR-formatted, not GPT-formatted.  If you are free to repartition that external drive with a GPT partition table, please back up everythng on that drive, verify the backup works, then do another backup and verify to different media, as disk partition operations are potentially destructive of data. Then, convert following this article.


Unable to play FIFA videos, StarSports Videos on Firefox 30 (Ubuntu 14.04 64 bit)

This is looks like this is to do with the version of Flash - Linux systems now have to use an old version of Flash.

The short answer is use Google Chrome - command line instructions for installing it are here. Chrome uses an embedded version of Flash (Pepper Flash), which is still updated to the latest version on all distributions.You can also use Chromium and the Pepper flash plugin:

Other answers - which are better for Firefox users (like me):

Use FreshPlayerPlugin, which borrows the plugin from Google Chrome.
Instructions for 14.04:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install freshplayerplugin

You can then open about:addons in Firefox, and enable the plugin under 'Plugins'. It may be easier if you remove the original Flash plugin first, as Firefox seems to prefer using that. It does seem to work (the usual Flash plugin doesn't):

Use Pipelight (instructions here) which sort of uses Wine to pretend to be a Windows machine.


Black logon screen after change of background screen with focalgdm3

I found a solution for my problem and it's here: https://askubuntu.com/a/1197587/1174983. I hope it will help someone.


Why won't it allow me to change the access for disk games

Executables of .exe extensions do not work on Linux systems unless you are using a Windows-compatibility-layer/emulation software like Wine or Crossover. And even then you cannot be 100% sure if the Windows software/game will be installable and runnable on Linux. You can check the Wine AppDB to see a list of Windows software and how much they are supported by Wine on Linux.

For information on changing the permissions of other partitions (the way they are mounted) and such, take a look at this question - How to change permissions to the other drives in a hard disk


Why do I get IP 10.42.0.1 when plugging in an Ethernet cable?

The solution should be as simple as editing your wired connection into Network Manager, then select the tab "IPv4 Settings" and then change the method, from "Shared to other computers" to "Automatic (DHCP)"


A good place to start is the Ubuntu 13.04 Release Notes wiki. Ubuntu.com also maintains similar Ubuntu Documentation wikis for frequently searched for topics such as proprietary drivers for graphics cards, hardware compatibility and many Community wikis.


How can I switch between “wl” and “b43” wifi modules without rebooting?

Have you tried to make and run a script like this:

 #/bin/sh

   Case (wl) in
      networkname = (ip adrs of wl)
      gksu networkname
      nmcli -Cl networkname
      resolv (the ip adr of wl) >>
   endl
   Case (b43) in
      networkname = (ip adrs of b43)
      gksu networkname
      nmcli -Cl networkname
      resolv (the ip adrs of b43)
   endl

and it might work fine this way,


You will find full installation procedure in the following answer https://askubuntu.com/a/152902/91632 and If you need any further I am ready


Yes, you can search on http://packages.ubuntu.com. Make sure to select (filter) on the precise (12.04) distribution.

Alternatively, check the availability of packages using your package management, e.g.:

$ apt-cache policy libapache2-mod-php5
libapache2-mod-php5:
  Installed: (none)
  Candidate: 5.3.10-1ubuntu3.6
  Version table:
     5.3.10-1ubuntu3.6 0
        500 http://nl.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
     5.3.10-1ubuntu3 0
        500 http://nl.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages


If you disable or delete a virtual network, then virtual machines which were using that network cannot start. You can edit the virtual network card for each guest that was using a disabled or deleted virtual network, and change it to a virtual network that is active and enabled. You can then start that guest.


How to access guest VMs from outside network?

Did you restart your network to make your changes active?

Use this:

sudo /etc/init.d/networking restart

so that your bridges become active.


I'd suggest you keep things simple. You can install Apache2; MySQL; PHP and all the required dependencies with a single command.

Installation

From your terminal, type:

sudo apt install lamp-server^

If you have sudo rights, you'll then be prompted for your password. Enter your password, and apt will pull together a list of required dependencies.

It will then ask you if you would like to confirm the installation of these packages.

Press the Y, then the Enter key

During the installation of the packages, you will see your screen change to something like this:

Enter a new root password for MySQL. This is the MySQL administrator password that you will use for making adjustments to databases and user permissions.

You'll be prompted again:

Enter your new root password again, and press Enter

Completion

This will install and start Apache2; MySQL and PHP 7.

The root directory for your website will be:

/var/www/html

You can put your files in this directory, and the web address will be:

http://<ip address of server>/

Notes

Remember, that there is already an index.html inside the /var/www/html that you will probably need to replace or remove.


I did what someone said in the comments and purged the minetest-data. Then went to Synaptic and found Minetest. I was able to download it. I now have Minetest.


Will installing GNOME Shell affect Unity?

Installing GNOME 3 won't remove any unity packages or break anything. You can just try it out and switch between your session in lightdm (the login screen). In the long run though, if you want to continue using GNOME 3, I suggest you use the Ubuntu GNOME Remix.


Will all my files be deleted if I choose 'Erase disk and Install Ubuntu' when installing in a VMWare virtual machine?

If you are installing Ubuntu on a Virtual Machine, only the drives that are components of the virtual machine can be installed to. You can safely check by selecting the "Something Else" option with the installer. Here's an example in Virtualbox:

As you can see from the size and labeling the disk it's considering is most certainly too small to be an actual drive in my machine. It's a good idea to check the sizes of drives and partitions on your system and be familiar with them to avoid any mistakes. The size will be equivalent to the size you chose when you created the disk file (virtual disk) that the Virtual Machine actually uses.

Another indication that you are installing to a disk file and not a physical drive is that the installer is not providing the option to install alongside your host OS (Windows) as the VM doesn't see it.


How to rename undeleted mp4 videofiles according to "encoded date"

Assuming the line of output you have looks something like this (the date format does not matter):
Encoded date               : 2016-11-20

You could rename the files as their dates with a little script...
i=0; for f in *; do printf -v new "$(mediainfo "$f" | sed -nr 's/Encoded date\s+: (.*)/\1/p')-%02d.mp4" "$((++i))"; echo mv -v -- "$f" "$new"; done

I am giving them a final number to ensure files with the same date don't end up with exactly the same name, which would cause some to be overwritten. New filenames will be 2016-11-20-01.mp4 etc or whatever the date format from "Encoded date" is for you. Remove echo after testing to actually rename the files. More readable version:
i=0
for f in *; do
   printf -v new "$(mediainfo "$f" | sed -nr 's/Encoded date\s+: (.*)/\1/p')-%02d.mp4" "$((++i))"
   echo mv -v -- "$f" "$new"
done

Explanation

i=0 start iterating from 0
for f in * for all files in the current directory (replace with appropriate path or glob if necessary)
printf -v new format the new name like this
$(mediainfo "$f" | sed -nr 's/Encoded date\s+: (.*)/\1/p') extract the date info from the Encoded date field
-%02d.mp4" "$((++i))" add a number and extension to the end of each filename
mv -v -- "$f" "$new" rename the files


How to make xlock use the first key I hit as a part of my password

I've just tried both your first example (the one with +usefirst) and the second one (the one with -usefirst); the first one didn't use the first key, but the second one did. This is in 11.04, which has version 1:5.31-1, so maybe it's that; just in case, I dumped it into my junk ppa (ppa:chipaca/junk) and it's building for maverick right now.


The problem is udev runs as root and so runs your script as root, not as you.  You'll want this for your real script, but this is why notify-send isn't sending you the notification when run by udev.  Also the DISPLAY environment variable will need to be manually set, as udev runs in a minimal environment.

Change your script to the following, replacing $USER with your username:

#!/bin/bash
sudo -u $USER DISPLAY=:0 notify-send "Test"

Also to ensure the new rules were (re)read before, run:

sudo udevadm control -R


External HDMI display detected, but not working

I had the same issue with a Dell XPS 13 9360 running Ubuntu 16.04 using a USB-C da200 adapter. Try setting the resolution of the second screen to something low, say 1440x900 or lower. If that makes the second screen work (as it did for me) then you're running into a bug with the adapter, detailed here:

https://bugs.freedesktop.org/show_bug.cgi?id=93578

Updating kernels solved the issue for me. I was on kernel 4.10.xx, upgrading to kernel 4.12.14 worked for me.


Microphone not working in Zoom and Skype

I managed to resolve the problem with Zoom. It turnes out that mic was muted for Zoom appication. But this setting was only visible when Zoom was running and after clicking randomly on Zoom's microphone selection dropdown...


The INPUT chain of rules is only applied to packets into the local host, and the OUTPUT chain only for packets that leave the local host. Both are applied, however, to loopback packets. In that respect, there is a difference between iptables and the older ipchains which has more or less the same syntax.

For basic use like dropping incoming packets, specifying source makes sense with the INPUT chain only, and destination only with OUTPUT chain.

See the man page and play around if you have the chance.


Ubuntu 12.04 does not boot even with nomodeset

It seems like my problem is the same as this, Can't install fglrx or boot computer. I ran the command, /usr/share/ati/amd-uninstall.sh --force on the recovery console to completely remove fglrx. Then I was able to login (using nomodeset on grub) and download the latest ATI driver from the AMD website.

And everything works again, but I still get graphic glitches every now and then, lines running across the screen. It's completely tolerable but I hope someone finds a fix for this. It's also showing the VESA-REDWOOD driver under System Settings > Details.


How can I set the clock to 24 hour mode?

The normal way :

Go to System -> Administration -> Language Support
On the Text Tab, choose your prefered language to display numbers, dates, ...

The advanced way for your Desktop Applet :

Press Alt+F2
Type: gconf-editor & Hit return
Navigate to “Apps > Panel > Applets > Clock_Screen0 > Prefs”
Double-click on the ‘Format’ value. Change it to ‘24-hour'

Login Screen

There was an option in Ubuntu previous versions in the GDM setup GUI (System > Admin > Login Window) but not in maverick, bug is reported on Launchpad


How can I find out if I NEED openjdk-7-jre?

I can tell you that Minecraft certainly uses it. It's basically just Java 7 for Ubuntu.

You could try sudo apt-get purge openjdk-7-jre, then do 'n' when it asks you if you want to remove it. It should list that and other packages that may use it. I'm not sure if you can actually use a command to see if the package is used by other packages, but really it's Java, and those programs can be regular .jar files sometimes.

You might have some programs that are .py that use Python. I once had an error while doing something in Terminal that was how Python outputs errors, but I don't think the program was specifically a Python program.

You could try searching Google for search commands, but I did locate .jar and got nice results.

Hope it helped :D

EDIT

scoutchorton@scoutcbuntu-pc:~$ sudo apt-get purge openjdk-8-jre
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  fastjar jarwrapper libcolorpicker-java libfontchooser-java
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  default-jre* javahelp2* logisim* openjdk-8-jre*
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
After this operation, 8,779 kB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

I have openjde-8-jre, but it's the same method. I have a simulator called logisim that I now know runs off Java. I won't post locate .jar results, because it would take up a lot of space.


Lightdm greeter - theming of option-button

Ok, it is completely not obvious but I found out how to theme this specific widget state of the button.

This

lightdm.option-button:insensitive:insensitive {
background: #whatevercolouryoulike; }

does the trick.


pip is pre-installed in Python virtual environments (virtualenv) because sandboxing pip inside the Python virtual environment is one of the things a Python virtual environment is commonly used for. Everything that is installed by pip is installed inside the Python virtual environment locally by default, not globally the way apt installs packages in Ubuntu by default. Installing packages locally inside the Python virtual environment permits creating a Python virtual environment in your user's home directory and pip and pip3 commands will work in this Python virtual environment without sudo.


How do I 'mount' my external hard drive?

Like a moron, I didn't notice the "mount the volume" button next to the "volume unmounted" notice "Doh!"


What is the bash equivalent of DOS's pause command?

something along the lines of

echo -n "prompt"  #'-n' means do not add \n to end of string
read              # No arg means dump next line of input


Why is my USB Ethernet Card not working in Ubuntu 14.04 Server?

Huh, looks like I found a bug with the way 14.04 is installed.

It turns out that whilst my USB card was eth2 on install, it got reassigned eth1 afterward, and the system tried to connect on eth2 (whatever eth2 may be, unless the onboard modem or wireless card counts as an ethernet interface).

Replacing eth2 with eth1 in /etc/network/interfaces and bringing up the adapter with sudo ifup eth1 solved this for me


Open a terminal (by pressing CTLR+ALT+T) and then change to the directory where the .deb file is. Assuming that the .deb file is in the Downloads folder, type this in terminal:

cd Downloads

and then

sudo dpkg -i your_file_name.deb

If dpkg prompts you for something, just type Y (which stands for "yes"). After that, your package should have been installed correctly.

I hope this helps.


How do I change the Unity launcher color?

I just installed Unsettings and it's excellent, handles the launcher and panel colour, opacity etc. It does a lot of other stuff too. There's a short piece about it here:

http://www.noobslab.com/2012/04/install-unsettings-tweak-tool-on-ubuntu.html


You should probably download the ISO image and install that to a VirtualBox VM (this way you can setup the VM and not have any preinstalled usernames, passwords, softwares, and or hostname. Also, if you install from an ISO Image, the machine will have the latest updates, which is a plus. Do you specifically need an OVA image?


In Ubuntu, you can have multiple versions of Java installed in your system.

Currently, there are several implementations of Java with their respective JDK package.

OpenJDK - openjdk-6-jdk
Sun Java - sun-java6-jdk
and others including IBM Java

You can choose between the versions that you want to use with Ubuntu using the following command.

sudo update-alternatives --config java


Can I upgrade to 16.04 without using the software updater and keeping all my data intact?

You can try sudo update-manager -d That should get you to where you want You may have to run sudo do-release-upgrade too

As the other post mentioned ... you may have to go into the sources and change it. If you change it to any new version then run the above commands it should show the update. If you choose long term support it may not show. His way may also may also work since he is using the Check if a new Ubuntu release is available .. my method  uses Check if upgrading to the latest devel release  is possible For some reason sometimes the "new Ubuntu release" doesn't seem to show for me .. so if his method  doesn't work you can try mine .. one of them should definitely get the update to show


Can phppgadmin access a website database?

Yes, if you have root access to the server.

  Warning: this method not recommended if you don't have a static IP address because you would need to open up your database to the world, which is disabled by default as a security measure, better use the method below.

If you want to ignore my warning:

In postgresql.conf:

listen_addresses = '*'
#or
listen_addresses = 'your-static-ip'

In pg_hba.conf add this to allow remote connections from any IP:

host    all             all              0.0.0.0/0                       md5
#or
host    all             all              your-static-ip/32               md5

Recommended method:

If you can connect to the server with ssh, there is a better/safer method:

Create a local port forwarding tunnel first:

ssh -L 5432:127.0.0.1:5432 your-server.com
#or
ssh -L 5432:localhost:5432 your-server.com

This will forward a local port via ssh to a port on your server. Then you can connect to that port using localhost as host.


Solved, the issue was due to the wrong IP-helper in Cisco core switches.

Many thanks


Bluetooth mouse not auto-reconnecting to laptop

Try to use different tool to pair your Bluetooth device, e.g. blueman-manager (probably Bluetooth device is not "trusted").

I'm using Ubuntu 14.04 and have Microsoft Sculpt Comfort Mouse.
When pairing mouse in Ubuntu's Bluetooth settings dialog, mouse doesn't reconnect after suspend/resume and even after some time of idle.

I unpaired mouse, paired and "trusted" it in blueman-manager and now it works like a charm.


Inkscape not starting after installation on ubuntu 16.04

Inkscape worked after running this command

sudo apt-get install --reinstall libgtkmm-2.4-1v5:i386 libgtkmm-2.4-1v5


Your installation of python2.7 has been damaged; it should contain /usr/lib/python2.7/lib-dynload/pyexpat.so. The most likely cause is a misbehaving program, or a hard disk failure.

You can reinstall python2.7 with the following command:

sudo apt-get install --reinstall python2.7


Your /tmp folder sounds like it is a separate filesystem mounted with the noexec option.

This is an intentional security measure to prevent the execution of programs written to the /tmp folder, but it's not the default setup of Ubuntu.

The script suggests a workaround - use the --target option to specify a different folder.

e.g.

mkdir ~/tmp # Make a temp folder in your home folder
sudo sh ./Torchlight-2012-09-26.sh --target ~/tmp # Tell the installer to use it
rm -rf ~/tmp # remove it afterwards


Try uninstalling the MATE Desktop environment.

Run sudo apt-get remove --purge mate-* to remove MATE.
Run sudo apt-get autoremove.

If something comes up, asking about your default login manager, choose gdm.


How can I install Ubuntu alongside Fedora?

I don't think that Ubuntu (automate) installer is able to detect and configure Logical Volume Manager setup. So, you have to use either Gparted or the lvm tools (e.g. from inside Fedora, or Ubuntu Live CD) in order to shrink the partition and leave some space for Ubuntu and then use the "something else" option to install Ubuntu.

Of course Ubuntu can be installed in a logical partition and if Gparted don't allow you to shrink the partition (because it is "used" as you said) this could be because of the swap partition that automatically mounted even if you boot from a Live image.

So, (assumed that you use the Gparted from Ubuntu Live CD)

Boot from the LiveCD/USB and click on "Try Ubuntu".
Open Gparted, then right click on swap partition and swapoff.
Shrink the biggest partition(right click and resize) and leave some space for Ubuntu. Create a new logical partition.
Close Gparted and begin the installation.
Click on "something else" and there you must see the new created partition.
Click there and then click on "Change" in order to use the partition (create an ext4 filesytem and mount it on root /).

About the second part of your question:

  If so, as I would like Fedora to be my main OS, is there also a way
  to make it the top Grub option?

After the installation finish (with no errors), Ubuntu Grub will replace Fedora Grub in Disk's MBR. And so, you will have Ubuntu as main OS in Grub list. In order to replace Ubuntu Grub with Fedora Grub again, you must boot on Fedora and give the following command

sudo grub2-install --recheck /dev/sda

Above command will reinstall Fedora Grub in Disk's MBR, so everything will back to "normal" (I mean as you already have it, with Fedora as fist OS in Grub list...etc).

(at the moment, I'm not able to add a tutorial-like answer here, with pictures..etc. If someone is, feel free to edit this answer an make it better for everyone.)


Mount a NFS shared directory as physical device in order to use extundelete

Extundelete works on the actual physical device.  The devices found in the /dev/ directory are files with special characteristics.  These character and block devices relate to raw, physical hardware.

While a special type of mount, like a bind mount of network drives make it appear to many programs treat them, there is a difference when it comes to a program such as format, fsck, and Extundelete that is accessing the raw hardware.

You would have to have access through a method such as ssh to the NFS server and run Extundelete on the physical partition using the /dev/[device] argument for the recovery.

The device should be un-mounted promptly to decrease the chances of the deleted data becoming overwritten.


Can I use `purple-facebook` with empathy?

To install the purple-facebook plugin, choose one of the following:

You can try building it from source yourself: https://github.com/dequis/purple-facebook/wiki/Building-on-*NIX
Add a repository, see https://jgeboski.github.io/#package-repositories
Or download a deb-package from the repository and install it manually: http://download.opensuse.org/repositories/home:/jgeboski/

To make 'facebook manager' show up when adding a new account:

Download haze-accounts-extensions-facebookmessenger-0.4-1.noarch.rpm (or any later version) on
https://openrepos.net/content/nodevel/facebook-messenger-account
Extract it into your file-system root, i.e. /.

This should work for empathy and any other client that uses telepathy-haze.


How to select lightdm greeter theme or appearance?

This is a case when configuration is possible by package removal. I can't find other solution.
So we need to remove almost all lightdm greeter packages:

sudo apt-get purge arctica-greeter arctica-greeter-guest-session
sudo apt-get purge kylin-greeter ukui-greeter
sudo apt-get autoremove --purge

and (re)install the most usable one:

sudo apt-get install --reinstall ubuntu-mate-lightdm-theme

and enjoy scrollable list of all available desktop sessions:


Ubuntu VPS supports VPN inside a container via kernel TUN/TAP module and device.
On the other hands, installing VPN software on Ubuntu virtual servers requires the TUN/TAP kernel module to be loaded on the host server, then enabled for the container that requires access.
Please run the following to make sure your container has been allocated TUN permissions appropriately:

# cat /dev/net/tun

This should be returned:

# cat: /dev/net/tun: File descriptor in bad state