What do you mean of functionality?

Lubuntu is an Ubuntu OS with the same repository sources, but with a different desktop environment and set of default applications (packages).

In the matter of desktop, you can also install LXDE and its components on Ubuntu either to try it beside Gnome Shell (Unity on 17.04 and below).


How to safely delete a second Ubuntu installation that I don't need

Start by backing up any important data. Make sure you boot into the 18.04 install and run GParted. Identify the partition with the 20.04 install. If you are running the 18.04 install its partition(s) will be locked. Select the 20.04 install and delete. Don’t be tempted to delete any other partitions that you are unsure of.
If you go ahead with the upgrade to 20.04 it’s a good idea to get 18.04 fully upgraded first.


I receive an error when trying to install Google Chrome

Maybe something went wrong when you imported the key and added the repository - so start over from scratch by deleting the imported keys and removing the Google Chrome repository.

Search the imported Google keys : apt-key adv --list-public-keys
Delete the imported Google keys : sudo apt-key del <key-ID>
Remove the Google Chrome repo : sudo rm /etc/apt/sources.list.d/google-chrome.list

Additionally check the /etc/apt/sources.list file for old Google Chrome entries :
sudo nano /etc/apt/sources.list In case that you find old entries, remove them.

Import the Google keys, add the Google Chrome repository and install Google Chrome this way :

echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo apt update
sudo apt install google-chrome-stable

Note that Google Chrome can only be installed on 64-bit Linux editions - more information here.
The commands are slightly different to those ones you used, perhaps that was the reason why ...


How do I change Wi-Fi Hotspot settings in Ubuntu with GNOME 3?

For some strange reason the default GUI network manager doesn't provide many options. But fortunately there's another tool which does. Open Terminal and run

nm-connection-editor

A GUI network connection manager should appear which will provide more options to manage your hotspot.

Source: This Ask Fedora post

You may also try this CLI method to change your hotspot password as suggested by Akshar Patel.


How to get the default Ubuntu graphic  driver for 12.04?

First of all remove the drivers installed with the .run running

sudo NVIDIA-Linux-x86_64-304.43.run --uninstall

Then refer to the following guide to understand how to install nvidia drivers correctly.

https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia


Have WINE installed - would like to install and run Coreldraw9 from cd. Possible?

I know this doesn't exactly answer your question, but have you considered using a newer program? CorelDRAW9 was released in late August 1999 and is almost 16 years old!

Inkscape is free, modern, and works well in Ubuntu, it may be a slight learning curve from what you are used to, but it is better to learn something modern and up to date!

If you don't like it there is Krita, or if you are actually trying to touch up or edit photos there is GIMP. You may be able to get the program running in WINE but it is not a long term solution, the program pre-dates any modern operating system. You may get it running now, but with each newer operating system the chances of it working decrease, while the features in modern (free) software just keep on getting better.


How can I monitor cloud-init for errors, and trigger a script when it fails?

12.04 is out of support.  There isn't a great answer for cloud-init in that version.

In newer versions of cloud-init, cloud-init writes /run/cloud-init/result.json with content like:

{
 "v1": {
  "datasource": "DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net]",
  "errors": []
 }
}

If there are errors, it will have non-empty value in the errors list.

Also, as cloud-init runs it maintains /run/cloud-init/status.json.

In 17.2, there is a sub-command that can help.  cloud-init status --wait will allow your custom scripts to block until cloud-init is done.  If cloud-init had errors, then status will exit non-zero. (Thanks to Chad Smith for this suggestion).

$ cat > /usr/local/bin/after-cloud-init <<"EOF"
#!/bin/bash
# Block until cloud-init completes
exec >/run/after-cloud-init.txt 2>&1
msg() { read up idle < /proc/uptime; echo "$up:" "$@"; }
msg starting
if ! cloud-init status --wait ; then
    msg "Cloud-init failed with $?"
    exit 1
fi
msg done. put your stuff here.
exit 1
EOF

$ chmod 755 /usr/local/bin/after-cloud-init
$ crontab -e
@reboot /usr/local/bin/after-cloud-init
$ sudo reboot


Ubuntu 12.04 hangs during boot, failed at "Starting NetBIOS name server"

I solved this by remove and re-install gdm in recovery mode.
First time I used root to install gdm, but still can't boot, then I went to recovery mode again as root and then switched to my own user and install gdm with sudo, after reboot everything goes fine!


Ok! I think I got it!

Start the computer taking not of what grub says the version of the linux kernel you have (i.e. 3.0.0-19-generic) then run the command mount -o remount,rw / Finally, run update-initramfs -u -k 3.0.0-19-generic

IMPORTANT: REPLACE 3.0.0-19-generic WITH THE VERSION GRUB2 SAYS YOU HAVE!!!


I accidentally changed a mount option in Disks and can't boot anymore

I backed up , fully erased and reinstalled my SSD and all was working. Then as a test I replicated the problem by changing the settings in Disks. So be careful in that application. Then again reinstalled and all well now.


How to find and replace multiple text lines with corrosponding text?

to substitute the text inside the files in a single shot you can use sed:

sed -i -e 's@margin@new_margin' -e 's@color@color_primary@' -e 's@xxx@zzz@' -e '@rre@768@' /path/to/files/*

-i option say to sed to perform modification in file without print

-e say to sed have more string to be find and substituted

s@ says the '@' is the separator for string_to_find and replacement_string

the latest is the path where the file are, if they are all in one location you can perform this command once.

!!!Execute a backup of your file ALWAYS before make modification with sed in file directly!!!

UPDATE

Thanks to @steeldriver which says in the comment to not modify the source file with sed adding a suffix to the -i options

  -i[SUFFIX], --in-place[=SUFFIX]

I.E.

sed -i_edited 's@margin@new_margin' /path/to/files/examplefile

will result with a new file modified called examplefile_edited


Can I get back from POP!_OS to focal fossa?

Install the ppa-purge tool. It removes a package and reverts back to original packages. The pop-default-settingsfile in /etc/apt/preferences.d is a left over that does not have any function anymore because the PPA to which the preference applies is gone.


Cut specific lines of a file and paste them at the end of another file

Using sed, you can write a set of lines to a different file while deleting it from the current file like so:

sed -i -e 'N, M { w output.txt
d }' input.txt

where N and M are the line numbers. The -i option makes sed save changes to the source file, and here the d command deletes to those lines. At the same time, w output.txt causes the selected lines to be written to output.txt. And yes, those are two separate lines: sed requires that the w command's filename be till a newline.

So you can do something like:

cmd=' { w output.txt
d }'
sed -i -e "1,500 $cmd" -e "1029,1729 $cmd" -e "2696,3446 $cmd" input.txt


How to move PostgreSQL Data Directory to external HDD or pendrive on Ubuntu 18.04?

From Error it looks like you changed data directory but did not configure proper path of it and server is not able to find location of data directory.

You need to make sure that proper configuration is in the place in configuration file according to your PostgreSQL setup.

Find configuration file of your PostgreSQL setup according to your version and crosscheck data dir configuration.

sudo nano /etc/postgresql/<Postgresql_version>/main/postgresql.conf

data_directory = '<path of new dir>'


How do I connect a Cannon Pixma MG3550 printer wirelessly to my laptop?

Please see this site for details as to how to find the network information for your printer, under Network settings confirmation. http://www.canon.co.uk/support/consumer_products/pixma_printer_wireless_connection_setup/mg3550_printer_wireless_connection_setup/

Next, using the Printer settings tool, use the URI of ipp://<address>:631/lpr where address is the IP address you found for the printer. For example, if the sheet the printer printed says the address of the printer is 192.168.1.8, the the URI you'd enter is: ipp://192.168.1.8:631/lpr.

Click 'Forward' and select Canon as the manufacturer. Scroll down to find 'Pixma MG3550`, select it and click 'Forward.' Print a test page.


Does Ubuntu come with a firewall by default?

Yes Ubuntu has a firewall installed by default.

The Firewall in Ubuntu is iptables . It also comes with an easy to use command line frontend called UFW   (Uncomplicated Firewall).

If you want to change any settings, you can use the graphical front end to that command line front end, GUFW

As for your other question, getting a warning when an application connects to the internet:

I don't know of any programs that do this*, but I have written one. Now, this isn't great quality software - it's a quick hack in fact -but it works all right. You'll notice I haven't packaged it in any way, because I don't have any use for it and I don't think its tested well enough to be deployed on Anything That Matters™

It doesn't even have a name, here's how it looks:

(ignore the German captions, they will be in your local language)

And here's how to use it:

Install Python 3
download it and save it as a file on your computer
Via the file properties, mark it as executable
Double click and choose "Run"

The program will issue a warning for every application that tries to access the internet. It will not prevent it from doing so, but it'll let you know. You then have the option of putting it on a "White List" of trusted applications, which causes it to not warn you again about this particular program.

If you start it from a terminal, you'll get a few useful messages about what it's doing.

Again I have to stress, even though it works, I haven't tested it properly (i.e. with many users trying it out).

For the purposes of support, you may send me email about it, I don't mind

* It seems UFW is able to do it!

This section is really better suited for someone managing servers than for desktop users:

UFW comes with an Application Filter. It's configuration is a simple text file at /etc/ufw/applications.d.

To get a list of all the application filters, type

sudo ufw app list

Which should look like this:

Available applications:
  Apache
  Apache Full
  Apache Secure
  CUPS

To get more details on any one application, type - for example:

sudo ufw app info 'Apache Full'

More details are available in the relevant Ubuntu help wiki page

As for the question of default configuration:
By default, Ubuntu ships with no open ports on public interfaces
Source


How to reinstall Ubuntu 13.04 Raring Ringtail safely?

Note:  Re-Installing should not affect any of your documents but, just to be on the safe side, you should do a backup of your documents, including /home hidden files, using something like CloneZilla

Boot your system from CD or bootable USB, and when you get to the installation screen, choose upgrade 13.04 with 13.04 if available, if not choose something else,

and when you get to the partitioning screen keep everything the same, and un-check the Format check-box.

For more info see the Ubuntu Reinstallation site

Source:Ubuntu Reinstallation


bluetooth-sendto --device=12:34:56:78:9A:BC filename works for me. "12:34:56:78:9A:BC" is the Bluetooth device address (bdaddr) of the device. You can get the bdaddr with hcitool scan.


Seems that problem is with your graphics driver for your graphic card, try installing suitable drivers for your card, your cpu is good, so check with your graphic drivers. Check this link for more detail : https://help.ubuntu.com/community/RadeonDriver

Another option is to use LXDE desktop environment rather than unity and gnome classic


Python3.2 error; Unable to install or remove anything

Try running

sudo dpkg --configure -a

To reconfigure your dependencies.

You can also try to manually edit your package status file

Source: http://www.iasptk.com/ubuntu-fix-broken-package-best-solution


What ARM instruction set does the Aquaris M10 support?

The MediaTek MT8163B SoC in the Aquaris M10 uses the ARM Cortex-A53 microarchitecture, which implements the ARMv8-A instruction set.

For Debian/Ubuntu repositories this corresponds to arm64, with GCC & qemu it's known as aarch64.


How to rebuild removed efi boot loader in ubuntu and windows

An EFI partition is a fat32 (or fat12 or fat 16) formatted partition with a specific partition type identifier. Can create such partition with partitoning tools. Then reinstall Grub. Here on Askubuntu, a detailed walk trough is provided where an EFI partition is created, and then Grub is reinstalled on the drive containing the new EFI.


Can't purge libapache2-mod-php5, corrupt registry

I got same error. I was able to purge all apache and php stuff, but can't install libapache2-mod-php5 back. Gives me same error:

Creating config file /etc/php5/apache2/php.ini with new version
ucfr: Corrupt registry: Duplicate entries for /etc/php5/apache2/php.ini
libapache2-mod-php5      /etc/php5/apache2/php.ini
libapache2-mod-php5      /etc/php5/apache2/php.ini
libapache2-mod-php5      /etc/php5/apache2/php.ini
dpkg: error processing libapache2-mod-php5 (--configure):
 subprocess installed post-installation script returned error exit status 3
Errors were encountered while processing:
 libapache2-mod-php5
E: Sub-process /usr/bin/dpkg returned an error code (1)

What I did to solve this, was:

$ sudo nano /var/lib/ucf/registry

and remove duplicated php.ini lines from that file. Not sure, was it pretty thing to do, but it helps.


i found my host without errors after i enable and install MPM file and then restart apache.

sudo a2enmod mpm_prefork
service apache2 restart


Powertop is reporting 0 wakeups/second - can this be right?

This appears to be a bug in PowerTop (I see the same behaviour on my Ubuntu 11.10 64-bit system).  It has already been reported in Launchpad:

https://bugs.launchpad.net/ubuntu/+source/powertop/+bug/834725

If you're interested in tracking progress towards fixing this, I suggest subscribing to the bug report.


You are using wrong command. Use useradd instead of adduser:

sudo useradd -c 'uwsgi user,,,' -g nginx -d /nonexistent -s /bin/false uwsgi


Vertcoin-cli getinfo - gives me an error

Your getinfo parameter isn't correct. Try:

vertcoin-cli -getinfo


Why won't .pdf files containing transparent elements print correctly?

Try to use Okular.
Say if it helped.
You can use apt install okular


Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo rm -f /etc/apt/sources.list.d/*


How to improve Ubuntu 14.04 LTS boot time on a laptop?

I dont know what exactly is going on in PC while it is booting but you can reduce boot time with program called e4rat. It worked for me. But last time I used it I were using Ubuntu 12.10. So I don't know that does e4rat work with Ubuntu 14.04.


Setting up Commerical SSL Certification for Ubuntu

openssl req -new -newkey rsa:2048 -days 365 -nodes -keyout stage.mytestserver.com.key -out stage.mytestserver.csr

rsa:2048 is actually (or should be) a value for the -newkey argument, which was missing from your example.


No option to connect to hidden network Ubuntu 14.0.4

Thank you @Byte Commander. I did indeed need a driver for my Broadcom BCM4331 wireless card. After some research, I found that the driver I needed was on the bootable USB I had installed Ubuntu from, it just wasn't installed for some reason. So, I was able to simply navigate to the pool folder on the bootable USB and install dkms from the main/d folder and the bcmwl-kernel-source from the restricted/b folder. Right after the second install the wireless networks appeared and I was able to connect to my hidden network.


Network status icon vpn start / configure not working

Although this is more of a workaround, logging out and back in worked for me.

There is a bug located here that talks about a related issue that may be the cause.


Why does Wubi give an "installation size" of 18 GB?

WUBI is an abandoned project and is not compatible with UEFI. It is also just for try ubuntu, not really for a long term usage, if you want to use Ubuntu on a long term i recomend you to make a partition for it.


No. You only need a Ubuntu installation CD/DVD/USB to do it. You can run Ubuntu as an OS. You don't need Windows or Mac OS X at all.


I have two suggestions.

1) Simple reinstall:

sudo apt-get purge software-center

sudo apt-get install software-center

2) Remove /var/lib/apt/lists:

sudo rm -rf /var/lib/apt/lists/*

Does this work?


Running Fire Dynamics Simulator/Smokeview on Latest Ubuntu LTS

I was typing the wrong command.  Need to type:
source $HOME/FDS/FDS6/bin/FDS6VARS.sh and
source $HOME/FDS/FDS6/bin/FDS6VARS.sh
to put FDS in the correct filepath (assuming you installed to default filepath, change the filepath if you did not).  You can add both these commands to ~/.bashrc file to load FDS to every Terminal window.
These instructions are in the Wiki here: https://github.com/firemodels/fds/wiki/Installing-and-Running-FDS-on-a-Linux-Cluster , after step 4.  I followed the instructions for "if you do not have modules".
Type which fds to confirm it is in the correct filepath.


Ubuntu 17.04 has reached end of life.  Upgrade to 17.10, or use a long term support release like 16.04. See https://www.ubuntu.com/info/release-end-of-life  for the support life of releases.


Unable to mount my WD My passport 1 TB in Ubuntu 16.04

The exfat file system is not installed by default.

sudo apt-get install exfat-fuse exfat-utils

Reboot and plug had back in.


It could be a DNS server issue. Try pinging an IP instead of a domain name:

ping 8.8.8.8

If that doesn't give you any issues, you should switch to a public DNS service like OpenDNS or Google Public DNS.


Skip updating certain updates in apt-get

First of all, 4.0.9 is NOT the latest stable kernel version for Ubuntu.

The latest stable version is 3.19 that is installed in 15.04 and is getting security and other updates.

Installing unsupported kernel versions is not recommended and is reasonable if there is no other way to use specific hardware.

But if you are sure that you want to use unsupported kernels, update them manually and stop getting stable kernel updates, then remove kernel meta packages by running

 sudo apt-get remove linux-image-generic linux-headers-generic linux-restricted-modules-generic linux-tools-generic

You can not pin versions of these packages at 4.0.9, because there are no such package versions in repositories.


Where is the gnome-shell-extension configuration file?


The same should work with an iPhone. Just enable WiFi tethering in settings, then look that WiFi in Ubuntu and enter the connection password. (By the way, you should be able to connect to your school network in the same manner.)


Drivers lost. Reinstalling Ubuntu, not acces to parallel Windows and no wifi/ethernet

The same happened to me. The solution is really simple. If drivers worked in the past, they probably still do. Try unplugging the wifi adapter and plug it again. It is more complicated with a laptop though.

edit: for the windows not booting, I can only think of getting the iso version of windows and using the repair option, that'll probably work.


My external hard drive keeps unmounting and remounting itself

There have been some people using Mac OSX that have had similar problems (see here and here).

The solution that works for many of them (including me) was to just reformat the drive. Since your drive only stays mounted for a short time you will have to do the reformatting quickly.

You can do this with a tool such as gparted, but be careful you can lose data if you don't know what you are doing.

EDIT:
This worked for about a week. I have since taken the bare hard drive out of the case and placed it in this new enclosure. Things seem to be working so hopefully it was just a problem with the case.


Ubuntu Customization Kit vs. Ubuntu Mate 15.10

UCK main script needs some updates.

Issue 1:

Missing dependency: gfxboot-theme-ubuntu

Solve it with:

sudo apt-get install gfxboot-theme-ubuntu

Issue 2:

A mess with locales. I just didn't check locales I still have installed (no check at all). UCK will take them from the current installation.

Issue 3:

Missing files.

I give you here my modified /usr/lib/uck/customization-profiles/localized_cd/customize_iso, in order to make it works (changes from the original one are tagged "HS"):

#!/bin/bash

###################################################################################
# UCK - Ubuntu Customization Kit                                                  #
# Copyright (C) 2006-2010 UCK Team                                                #
#                                                                                #
# UCK is free software: you can redistribute it and/or modify                     #
# it under the terms of the GNU General Public License as published by            #
# the Free Software Foundation, either version 3 of the License, or               #
# (at your option) any later version.                                             #
#                                                                                #
# UCK is distributed in the hope that it will be useful,                          #
# but WITHOUT ANY WARRANTY; without even the implied warranty of                  #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                   #
# GNU General Public License for more details.                                    #
#                                                                                #
# You should have received a copy of the GNU General Public License               #
# along with UCK.  If not, see <http://www.gnu.org/licenses/>.                    #
###################################################################################

# NAME:
#    customize_iso -- customize iso image outside of root FS
#
# SYNOPSIS:
#    customize_iso [remaster_home] [customization_scripts_dir]
#
# DESCRIPTION:
#    This procedure performs additional customization that needs to
#    happen outside of the image of the root file system:
#        - Configuration of the boot environment
#            - isolinux configuration
#            - gfxboot configuration (language/keyboard support!)
#            - propagation of a new kernel/initrd
#            - Simple bootmanager (directory "install" in image)
#        - Configuration of additional resources outside the root FS
#            - Add-Ons (like sample document/music/video files)
#            - More Add-Ons (like OSS for Win / Mac)
#
# NOTES:
#    Execution of the procedure may require Internet access to download
#    the source of the latest version gfxboot-theme-ubuntu.
#
#    If a local copy of gfxboot-theme-ubuntu is available in the remaster
#    home, it will be used instead of a (possibly updated) download.

SCRIPT_DIR=`dirname "$0"`
REMASTER_HOME=${1:-~/tmp}
SCRIPT_DIR=${2-$REMASTER_HOME/customization-scripts}
ISO_REMASTER_DIR="$REMASTER_HOME/remaster-iso"
REMASTER_DIR="$REMASTER_HOME/remaster-root"
BOOT_LANG=`cat "$SCRIPT_DIR/livecd_locale"`

function failure()
{
    echo "$@"
    exit 1
}

function get_latest_kernel()
{
    set -- $(ls "$REMASTER_DIR"/boot/vmlinuz* 2>/dev/null |
        sed -e "s@$REMASTER_DIR/boot/@@" |
        tr --  '-.' '\t' |
        sort --key=2 --key=3 --key=4  --key=5 --numeric-sort |
        tail -n1 )
    [ "$1" = "vmlinuz" ] && echo "$REMASTER_DIR/boot/$1-$2.$3.$4-$5-$6"
}

# Create a temporary directory to assemble the gfxboot stuff in
BUILD_DIR=`mktemp -d`
if [ -d $REMASTER_HOME/gfxboot-theme-ubuntu ]
then
    cp -r $REMASTER_HOME/gfxboot-theme-ubuntu "$BUILD_DIR" ||
        failure "Cannot copy gfxboot-theme-ubuntu to $BUILD_DIR"
    pushd "$BUILD_DIR" >/dev/null ||
        failure "Cannot change directory to $BUILD_DIR"
else
    pushd "$BUILD_DIR" >/dev/null ||
        failure "Cannot change directory to $BUILD_DIR"
    #-----HS (1)-->
    #DISTRO_CODENAME=`cd "$ISO_REMASTER_DIR"/dists && find . -maxdepth 1 -type d | grep '/' | cut -d '/' -f2` ||
    #   failure "Unable to identify Ubuntu distro codename"
     DISTRO_CODENAME="$(lsb_release -c|awk '{print $2}')"||
        failure "Unable to identify Ubuntu distro codename"
    #-----HS (1)--<
    APT_SOURCES_TMP_DIR=`mktemp -d`
    wget -c http://archive.ubuntu.com/ubuntu/ubuntu/ubuntu/dists/$DISTRO_CODENAME/main/source/Sources.gz -O "$APT_SOURCES_TMP_DIR"/Sources.gz
    #-----HS (2)-->
    #GFXBOOT_THEME_UBUNTU_SOURCE_PACKAGE=http://archive.ubuntu.com/ubuntu/ubuntu/ubuntu/pool/main/g/gfxboot-theme-ubuntu/$(zgrep gz "$APT_SOURCES_TMP_DIR"/Sources.gz | grep gfxboot-theme-ubuntu | sed -n 1p | awk '{ print $3 }')
    GFXBOOT_THEME_UBUNTU_SOURCE_PACKAGE=http://archive.ubuntu.com/ubuntu/ubuntu/ubuntu/pool/main/g/gfxboot-theme-ubuntu/$(dpkg -l|grep gfxboot-theme-ubuntu|awk '{print $2"_"$3"_"$4".deb"}')
    #-----HS (2)--<
    wget $GFXBOOT_THEME_UBUNTU_SOURCE_PACKAGE ||
        failure "Unable to download gfxboot-theme-ubuntu source package from $GFXBOOT_THEME_UBUNTU_SOURCE_PACKAGE"
    #-----HS (3)-->
    #tar xfz *.tar.gz ||
    tar xfz *.tar.gz
    dpkg -x *.deb . ||
        failure "Unable to extract gfxboot-theme-ubuntu source package"
    #-----HS (3)--<
fi

# Build the gfx boot theme
    #-----HS (4)-->
cd usr/share
    #-----HS (4)--<
cd gfxboot-theme-ubuntu
cd po
ln -s pt.po pt_PT.po
cd ..
##if [ "$BOOT_LANG" = "pt_PT" ]; then
##  make DEFAULT_LANG="pt" || failure "Failed to build gfxboot theme"
##else
    make DEFAULT_LANG="$BOOT_LANG" || failure "Failed to build gfxboot theme"
##fi

# Fix list of languages
pushd boot >/dev/null

# Create regexp that matches all language packs on CD
langpack=""
for langpack in `cat "$SCRIPT_DIR/language_packs"`; do
    if [ -z "$LANGPACKS" ]; then
        LANGPACKS="$langpack"
    else
        LANGPACKS="$LANGPACKS|$langpack"
    fi
done

# Rewrite langlist
cat "$SCRIPT_DIR/livecd_locales" >langlist
popd >/dev/null

# Copy to isolinux in image directory
cp -af boot/* "$ISO_REMASTER_DIR/isolinux/" ||
    failure "Error while copying boot files to $ISO_REMASTER_DIR/isolinux"

popd >/dev/null

# Cleanup
[ "$BUILD_DIR" != "/" ] && rm -rf "$BUILD_DIR"

# Copy kernel and initrd, in case it was changed during installation
VMLINUZ=$(get_latest_kernel)
if [ "$VMLINUZ" != "" ]
then
    INITRD="$REMASTER_DIR"/boot/initrd.img-$(echo `basename $VMLINUZ` | cut -d'-' -f 2-)
    if [ -e "$VMLINUZ" -a -e "$INITRD" ]
    then
        echo "Updating kernel:"
        echo "  kernel=$VMLINUZ"
        echo "  initrd=$INITRD"
        cp -f "$VMLINUZ" "$ISO_REMASTER_DIR/casper/vmlinuz"
        cp -f "$INITRD" "$ISO_REMASTER_DIR/casper/initrd.gz"
    else
        echo "Not updating kernel as initrd not present"
    fi
fi

# Misc fixup for Karmic
pushd "$ISO_REMASTER_DIR"/isolinux >/dev/null

# What used to be called "message" is now called "bootlogo"
if [ -f isolinux.cfg -a -n "`grep "gfxboot bootlogo" isolinux.cfg 2>/dev/null`" ]
then
    if [ -f message ]
    then
        echo "Using bootlogo instead of message"
        mv message bootlogo
    fi
fi

# What used to be a gzipped initrd now is a lzma compressed initrd
if [ -f text.cfg ] || [ -f txt.cfg ]
then
    # At least one of the .cfg file will be missing. Drop error message.
    lzused=`grep initrd.lz text.cfg txt.cfg 2>/dev/null`
    lzmacmd=`which lzma`
    if [ -n "$lzused" ]
    then
        if [ -n "$lzmacmd" ]
        then
            if [ -f ../casper/initrd.gz ]
            then
                pushd "$ISO_REMASTER_DIR"/casper >/dev/null
                echo "Recompressing initrd from gzip to lzma"
                rm -f initrd.lz
                gunzip <initrd.gz | $lzmacmd >initrd.lz
                rm -f initrd.gz
                popd >/dev/null
            fi
        else
            if [ -f ../casper/initrd.gz ]
            then
                echo "lzma command not installed"
                echo "Switching permanently to gzipped initrd"
                sed -i -e 's/initrd\.lz/initrd.gz/g' text.cfg txt.cfg
                rm -f ../casper/initrd.lz
            else
                : do nothing - no initrd.gz
            fi
        fi
    else
        : do nothing - initrd.lz not used
    fi
fi

Best regards.


Can't install Tiny Tiny RSS on x64 Ubuntu Server

I contacted the author as I was so desperate for an x64 deb package. Within 1 day he made the package and it now works with the same repository above. Have thanked and will be donating soon! Thought I'd update this question instead of delete so it helps anyone on an x64 Debian-based distro.


You can also edit the /src/Makefile adding -lm to the line where libraries are. I've done it with some other plugins and it worked like a charm.


Can I make the webcam take a picture when an incorrect password is entered?

Based on this post on the Ubuntuforums by BkkBonanza.
This is an approach using PAM and will work for all failed login attempts. Using SSH, a virtual terminal or via the regular login screen, it doesn't matter as everything is handled by PAM in the end.

Install ffmpeg , we're going to use this as a command line way of grabbing the webcam images. Update: ffmpeg is removed when you upgrade to Ubuntu 14.04. We can use avconv in place of ffmpeg in the below script. No need to install anything separately.

Create a small script somewhere, e.g. /usr/local/bin/grabpicture with the following content:
 #!/bin/bash
 ts=`date +%s`
 ffmpeg -f video4linux2 -s vga -i /dev/video0 -vframes 3 /tmp/vid-$ts.%01d.jpg
 exit 0  #important - has to exit with status 0

Change the /dev/video0 with the actual video device of your webcam and choose a path where the pictures are being saved - I just choose /tmp.
In the newer version of Ubuntu use avconv instead of ffmpeg (sudo apt-get install libav-tools).

Make it executable, e.g. chmod +x /usr/local/bin/grabpicture.

Test it, by just calling it: /usr/local/bin/grabpicture. Check if you see files appearing in /tmp/vid....jpg.

Configure PAM to call this on every failed attempt.
Note: do this carefully - if this fails you'll not be able to gain access to your system again in a regular way.

Open a terminal window with root access (sudo -i) and leave it open - just in case you screw up in the next steps.

Open /etc/pam.d/common-auth in your favourite editor, e.g. by doing gksudo gedit /etc/pam.d/common-auth. Keep in mind for the following steps that order of lines in this file matters.

Locate the line below. By default there's one line before the one with pam_deny.so. On my 12.04 system it looks like this:
  auth    [success=1 default=ignore]      pam_unix.so nullok_secure

In this line change the success=1 to success=2 to have it skip our script on success. This is an important step If you failed this step see below how to recover (***).

Right below there, add a new one to call the actual script:
  auth    [default=ignore]                pam_exec.so seteuid /usr/local/bin/grabpicture

Save and close the file. No need to restart anything.

Test it.

In a new terminal window, as regular user, try su -l username to log in as another user with username username (change with an actual one of course). Deliberately enter the wrong password. Check if this result in a new picture.
The same as above, but now enter the correct password. Check if you log in and it doesn't result in a picture being taken.

If the tests have succeeded you can log out from your DE (Unity/KDE/...) and you should see the same when entering a wrong password from the login screen.

(***) How to recover the system if you messed with /etc/pam.d/common-auth file:

Reboot the computer
At grub boot press "e" to edit
Add

init=/bin/sh

to the line starting by "linux"
Mount the system with write access

mount -o remount,rw /

Edit the file and fix

vi /etc/pam.d/common-auth


How to make application toolbar show an icon only?

Finally found it.
Use dconf-editor. Tree path :org/gnome/desktop/interface/toolbar-style


Guest session stopped working on Ubuntu versions later than 16.04

The guest session was intentionally disabled by default due to a security issue, where the guest session was not contained by the AppArmor profile that usually limits guest sessions. This AppArmor profile, among other things, prevents a guest user from using su to switch to other users, or viewing other users' home directories.

You can enable it, if you consider the issue to be manageable on your system, as explained in comment #24 of the bug report or by using this one liner:

sudo sh -c 'printf "[Seat:*]\nallow-guest=true\n" >/etc/lightdm/lightdm.conf.d/40-enable-guest.conf'

To reverse it back to the disabled state, simply do:

sudo rm /etc/lightdm/lightdm.conf.d/40-enable-guest.conf


Trouble Installing Ubuntu 14.04.1 on Gateway GT5404

You must use an application like UNetbootin.

It can create a bootable Live USB drive.

It loads distributions either by downloading a ISO (CD image) files for you, or by using an ISO file you've already downloaded.

http://unetbootin.sourceforge.net/


Elevated privileges.Grants the ability to eject system volumes

Also the profile settings in /root


Follow the instructions on the MariaDB site. I ended up finding the solution using "xenial", but I suppose it would work with "artful" as well.

The problem is that when you run sudo apt install mariadb-server it will pull down the version from "bionic", which is currently 10.1. You should run sudo apt install mariadb-server-10.2 instead.

After installing 10.1, running sudo apt install mariadb-server-10.2 will pull in the version from your custom repository and uninstall all the mariadb-server 10.1 files which are not dependencies.


I have found here about Disper. See link for details.

It can be installed from Synaptic or the terminal.

The command to cycle between clone, extended, internal and external displays should be like this:

  disper --cycle-stages='-e : -c : -S : -s' --cycle

In that case, it would extend to the right. To cycle between the same options but extend to the left:

  disper --direction=left --cycle-stages='-e : -c : -S : -s' --cycle

The command can be then associated to a short-key.

The simplest shortkey might be the Display key (XF86Display) if there is one available on the keyboard. (Because of a bug, in my case that involves an interference with the Super key, so that I prefer to use XF86HomePage.)

Disper will detect displays and use the maximal resolutions by default. If no external display is connected, nothing will happen when the short-key is touched.


Changing Windows dynamic disk partition to basic partition and not the full drive

You cannot change just one partition - you have to change the whole drive. The whole drive is either a Dynamic Disk or Basic Disk.

To convert a Dynamic Disk to Basic you will need to use Windows. It cannot be done in Linux, because Linux can not access Dynamic Disks. See Converting dynamic to basic disk and MS Technet: Change a Dynamic Disk Back to a Basic Disk and this answer on Super User. For detailed instructions with different tools see this tutorial.


ubuntu 14.04 - everything fine except the shutdown

While you see that purple screen, you can press ESC to see exactly what Ubuntu is doing, which may be very useful if this turns out to be a bug, or if you just want to see what is taking so long.

Try going into Terminal and typing sudo shutdown -P now that ought to force Ubuntu to completely shutdown, if not then we may have to dig deeper.


/etc/resolv.conf is auto generated by resolvconf program in Ubuntu. The first line of the file contains:

Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)

It is actually a symbolic link to /var/run/resolvconf/resolv.conf:

lrwxrwxrwx 1 root root 29 Feb  9 22:23 /etc/resolv.conf -> ../run/resolvconf/resolv.conf

So, in a nutshell if you just restart the resolvconf service by the following command /etc/resolv.conf will be auto generated again:

sudo service resolvconf restart

Actually you don't need to restart the computer.


Installing AMD HD 4xxx Propriety Drivers on Ubuntu 14.04

from the error it seems that you need to install the kernels headers. You can do that by installing the linux-headers-generic package.

(In terminal) sudo apt-get install linux-headers-generic

However, did you tried installing the proprietary drivers directly from ubuntu instead from the Amd website. For that (I suggest to do that since it would be automatically updated and easier) install the package fglrx (or if you want a more recent version use fglrx-updates).

sudo apt-get install fglrx


What I was unable to find, though, was an EXTREMELY EASY way to move
  the GRUB to the old disk.

To Copy GRUB from one HDD to another

Yes, this is extremely easy as one command in terminal.

First (to be sure) list the HDDs with the following command

sudo fdisk -l

it will results something like..

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0007329e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    60289023    30143488   83  Linux
/dev/sda2        60289024    71774207     5742592   83  Linux
/dev/sda3        71774208   112734207    20480000   83  Linux

Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0001f627

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048    81922047    40960000   83  Linux
/dev/sdb3        81924094   625141759   271608833    5  Extended
Partition 3 does not start on physical sector boundary.
/dev/sdb5        81926144   486234111   202153984   83  Linux
/dev/sdb6       486236160   621045759    67404800   83  Linux
/dev/sdb7       621047808   625141759     2046976   82  Linux swap / Solaris

as you can see in above example output, there are two disks. /dev/sda and /dev/sdb. If I have GRUB in /dev/sda and I want to copy it(install it) to /dev/sdb I would boot from the HDD where the grub is installed (/dev/sda) and I would give this single command

sudo grub-install --recheck /dev/sdb

Above method will copy the GRUB from the OS where you booted to the second HDD. In case you remove the OS from the first disk, it is possible to have problems with GRUB.

If you want to avoid above (possible) problems, you can attach the second HDD then boot from the OS where grub is handled (usually the latest installed OS) and do

sudo update-grub

GRUB scripts will recognize the other Linux OSs (in second HDD) and you will be able to boot on one of them. You can do that and then install the GRUB of a Linux OS (you prefer, that relies on second HDD) in the second HDD. That way you will avoid any future problems in case you remove an OS from the first HDD. The command is the same.

sudo grub-install --recheck /dev/sdb


how to uplode wordpress site on server using ftp

The files will be where you installed them to.
Just remember that you will need to create a backup of the database as well and restore it on the remote machine.
And remeber to configure the web server config file for the site matching to the local version.


how does a server actually work?

Workflow for a webserver as an example:

Desktop (Ubuntu desktop installation)

Browser

URL contains a domain and parameters
Waits till results arrives and shows them

Computer that has this domain (Ubuntu server installation)

Webserver (Apache)

Program that gets parameters and executes it. Does what it needs to do (create website, content, show a form etc). Could be in combination with a database (MySQL), a coding language (Python, Perl, Javascript).
Send results to desktop

  Is it basically an operating system?

Ehm. No. Ubuntu is the operating system. What makes it a server is the fact you install server software onto it and set it up. Like hosting a website you do with Apache (= webserver). In combination you can also add or have a database (MySQL; databaseserver) or a mailsystem (=mailserver).

  What's the difference between running a server with Ubuntu Desktop and Ubuntu Server?

None whatsoever. You can remove the "desktop" component and have a "server". You can use a "desktop" to install server software like a webserver, printserver, databaseserver, mailserver, template server and so on and call it a server.

  How would I go about doing that with server set up

Ubuntu has a setup that installs it all and creates a basic setup for you using your desktop machine. sudo apt-get install lampserver^ will install the Linux version for Apache, Mysql, Perl and set it up for you such that you can point your browser to http://localhost and it will show a website with "ItWorks!" on it.

If you want this to work remotely you need to purchase a domain, receive an IP adress (and a name for that IP) and then you can use that IP or that name instead of localhost.


How to detect if it was an unexpected power down

Look at the file /var/log/kern.log*, and find the most recent

Jun 28 10:16:08 aardvark kernel: [    0.000000] Initializing cgroup subsys cpu
#   Time/date   hostname  who    usec since boot

That's the first thing that gets logged when the system comes up. The lines of /var/log/kern.log* just before that line are the last events logged before the system went down. If there are no errors or warnings above the [   0.000000] line, or if there is a large interval of time between last pre-crash event and the first boot line, suspect power. It takes some form of UPS or battery backup to be able to log "Power is off".


Gnome terminal filled with weird characters at random

It is a bug in your Python code. The characters are all Unicode 001B, U+001B is the escape character. Your terminal is rendering it as a box with 001B inside. Your Python program is printing escape characters to the terminal, which is interpreting them as Unicode characters. You can reproduce this easily:

$ python
Python 2.7.7rc1 (default, May 21 2014, 11:15:30)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print chr(0x001b)


Ubuntu Software has multiple instances (snap and canonical updates) of software. Which are safest?

https://readyspace.co.id/en/a-technical-comparison-between-the-snap-and-the-flatpak-formats/ gives an overview of Snaps and speaks to the security advantages. In part:

  From the security perspective, snaps are isolated from the system
  using a combination of several mechanisms, including AppArmor,
  SecComp, cgroups, and others. By default, snaps cannot access
  resources outside their sandbox. Granular access is provided through
  interfaces.

Also, Snaps are distributed through a repository operated by Canonical. Since Canonical builds Ubuntu, the same level of security for Ubuntu itself should be provided to the users of Snaps.

Therefore, I conclude the security of a Snap-installed app is on a par with an app included with the original installation of Ubuntu, or an app installed or updated post-installation through Ubuntu Software, and the added sandboxing of a Snap can add to your system's security.  Certainly it is more secure than an app installed by installing a downloaded .DEB or using a PPA.

https://www.darkreading.com/application-security/how-hackers-infiltrate-open-source-projects-/d/d-id/1335072 also adds a little insight:

  In almost all open source projects, contributors must have their work
  vetted by other members before the code is accepted as part of the
  project. The level of review varies with the individual's reputation —
  as they become more trusted, fewer layers of review may be required.
  Especially in the larger, more well-known open source projects such as major Linux distributions, the procedures are well-defined and the
  labor pool large enough to enforce those procedures on a consistent
  basis.


What is BLCR and why does it fail to update?

DKMS is a utility that automatically re-compiles kernel modules (mostly drivers) that aren't part of the Ubuntu kernel distribution every time there is a kernel upgrade.  (Modules need to be compiled against the current kernel.)

BLCR is Berkeley Lab Checkpoint/Restart.  It seems like you installed the blcr-dkms package.


Monitor folder and run command if there is a file there?

You have a few options:

1. Using inotifywait

#!/bin/bash
# set path to watch
DIR="/path/to/sourcedir"
# set path to copy the script to
target_dir="/path/to/targetdir"

inotifywait -m -r -e moved_to -e create "$DIR" --format "%f" | while read f

do
    echo $f
    # check if the file is a .sh file
    if [[ $f = *.sh ]]; then
      # if so, copy the file to the target dir
      mv "$DIR/$f" "$target_dir"
      # and rum it
      /bin/bash "$target_dir/$f" &
    fi
done

Explanation on inotifywait

Set options

To log continuously, you need to set the option -m:

from man inotifywait:

-m, --monitor
    Instead of exiting after receiving a single event, execute indefinitely. The default behaviour is to exit after the first event occurs.

To log recursively, you need to set the option -r:

-r, --recursive
    Watch all subdirectories of any directories passed as arguments. Watches will be set up recursively to an unlimited depth. Symbolic links are not traversed. Newly created subdirectories will also be watched.

If you do not need recursive monitoring, remove the option.

Events

Furthermore, you need to specify event(s) to trigger:

EVENTS
       The following events are valid for use with the -e option:

       access A  watched  file  or  a file within a watched directory was read
              from.

       modify A watched file or a file within a watched directory was  written
              to.

       attrib The metadata of a watched file or a file within a watched direc‐
              tory was modified.  This includes timestamps, file  permissions,
              extended attributes etc.

       close_write
              A  watched file or a file within a watched directory was closed,
              after being opened in writeable mode.  This does not necessarily
              imply the file was written to.

       close_nowrite
              A  watched file or a file within a watched directory was closed,
              after being opened in read-only mode.

       close  A watched file or a file within a watched directory was  closed,
              regardless  of  how  it  was opened.  Note that this is actually
              implemented  simply  by  listening  for  both  close_write   and
              close_nowrite, hence all close events received will be output as
              one of these, not CLOSE.

       open   A watched file or a file within a watched directory was opened.

       moved_to
              A file or directory was moved into a  watched  directory.   This
              event  occurs  even  if the file is simply moved from and to the
              same directory.

       moved_from
              A file or directory was moved from a  watched  directory.   This
              event  occurs  even  if the file is simply moved from and to the
              same directory.

       move   A file or directory was moved from or to  a  watched  directory.
              Note  that  this is actually implemented simply by listening for
              both moved_to and moved_from, hence all  close  events  received
              will be output as one or both of these, not MOVE.

       move_self
              A  watched  file  or  directory was moved. After this event, the
              file or directory is no longer being watched.

       create A file or directory was created within a watched directory.

       delete A file or directory within a watched directory was deleted.

       delete_self
              A watched file or directory was deleted.  After this  event  the
              file  or  directory  is no longer being watched.  Note that this
              event can occur even if it is not explicitly being listened for.

       unmount
              The filesystem on which a watched file or directory resides  was
              unmounted.   After this event the file or directory is no longer
              being watched.  Note that this event can occur even if it is not
              explicitly being listened to.

You need to prepend each of your events, to be triggered, with -e:

-e moved_to -e create

Of course you can set any event trigger from the list.

With the option --format "%f", we make the command output the filename, which we will use for copying and running the file, combined with the set paths.

How to use

Install inotify-tools with apt:

sudo apt install inotify-tools

Copy the script into an empty file, save it as watch_dir.sh
In the head of the script, set both the directory to watch and to copy the scripts to
Run it, and it starts watching your directory.

2. Using python

Without installing anything extra, we can however do the same however with a small python script:

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

source = "/path/to/sourcedir"
target = "/path/to/targetedir"
files1 = os.listdir(source)

while True:
    time.sleep(2)
    files2 = os.listdir(source)
    # see if there are new files added
    new = [f for f in files2 if all([not f in files1, f.endswith(".sh")])]
    # if so:
    for f in new:
        # combine paths and file
        trg = os.path.join(target, f)
        # copy the file to target
        shutil.move(os.path.join(source, f), trg)
        # and run it
        subprocess.Popen(["/bin/bash", trg])
        print(trg)
    files1 = files2

How to use

Copy the script into an empty file, save it as watch_dir.py
In the head of the script, set both the directory to watch and to copy the scripts to (source, target)
Run it, and it starts watching your directory.

Note

Both options above assume the scripts do not need any arguments, but that is obviously the case in a setup like this.


How to add a new disk to pc , install apt program to partition

This is what you do in UBUNTU:
WARNING: Be careful you select the correct hard drive, or you will delete/crash the linux/windows OS on your first hard drive.

If it's not already installed, get 'GPARTED' which will let you select your second hard drive (assuming it's been plugged in).

Select the correct hard drive in Gparted and select 'swap off' on each partition (if they have a lock icon on them. and select 'unmount' for each partition. Then select 'Delete'.
Then click the green tick icon before you go further.
Then right click and select 'New' or 'create new partition'

Click green tick.


Look at date --help:

Usage: date [OPTION]... [+FORMAT]

and it gives a list of date format specifiers.

To get the format you want (assuming you want local time, and all fields padded with zeroes, 24-hour time), use the format specifier [%d-%m-%Y/%H-%M-%S]. That is, run

username@host:/path$ date '+[%d-%m-%Y/%H-%M-%S]'
[19-12-2012/17-16-16]

To redirect to a file, use standard shell redirection (date '+[%d-%m-%Y/%H-%M-%S]' > filename to overwrite the file, or date '+[%d-%m-%Y/%H-%M-%S]' >> filename to append).


Headphones not detected when plugged before boot

this works for me on 18.04, I had several problems and now all solved, try these steps I hope it help.
Step One (headset instead of headphone)
if you have a headset with one jack for both Mic and headphone and it's not working you need to do these :
check if your last three lines in /etc/modprobe.d/alsa-base.conf are similar to:
options snd-usb-audio index=-2
options snd-hda-intel position_fix=1
options snd-hda-intel model=,dell-headset-multi

You probably don't have the last two lines. Add them at the end of the file and save it. with these settings whenever you plugged your headphone into your PC/laptop ubuntu asks you if it's a headset a Mic or a headphone.
Step Two (echo cancellation)
for disabling echo cancellation and some noise open this file :
/etc/pulse/default.pa
and add
load-module module-echo-cancel
some where into it.
and finally Step Three (your answer)
With this method you can restart your audio card module so your headphone can work again without restarting your PC/Laptop :
sudo modprobe snd-hda-intel

it should work :) for doing this at startup do this :
sudo sh -c 'echo "snd-hda-intel" >> /etc/modules'

and even if this method didn't work too :/ you need to disable the secure boot as mentioned here.


How to get back deleted data using sudo rm -rf

The 'rm' command does not employ the Trashcan mechanism of Unity.  You may be able to employ some of the tools mentioned in How to recover deleted files?, however it might already be too late - one of the first steps in a situation like this is "stop using the hard disk"


Can't create files on desktop in Ubuntu 14.04

If you were in your home folder, then you deleted your entire Desktop folder...

Re-creating it with these should work:

cd ~
mkdir Desktop

And try not to use rm -rf without being absolutely sure what will be deleted next time. Especially with sudo.


Cloning - live-only system

It is possible to use other file systems, for example NTFS for a live USB drive with Ubuntu, but you need not develop and test such systems. Instead you can simply clone from the iso file to the USB drive.

Cloning is a very reliable process and likely to succeed. The current Ubuntu iso files as well as most [but not all] major linux iso files are hybrid iso files. It means that they can be burned to DVD disks and cloned to mass storage devices (USB pendrives, HDDs, SSDs, memory cards ...) and the target devices will be bootable with a live system. The iso 9660 file system will be 'inherited' from the iso file.

You can clone from the iso file to a USB stick and use that USB stick to boot Ubuntu live and install Ubuntu into the internal drive.

dd is a cloning tool, but it is risky because it does what you tell it to do without any question. If you tell it to wipe the family pictures it will do it. A minor typing error may create chaos. You must be very careful, check and double-check that everything is correct before you press the Enter key.

Instead I recommend a tool with a final checkpoint,

in Ubuntu 16.04 LTS and newer versions: Startup Disk Creator alias usb-creator-gtk
in Ubuntu 14.04 LTS and newer versions: Disks alias gnome-disks
in Ubuntu 12.04 LTS and newer versions and other main Ubuntu distros: mkusb
in Windows: Win32 Disk Imager
in Windows: Rufus - an extracting tool and a cloning tool
in MacOS: Unetbootin - an extracting tool (not a cloning tool)

Persistent live system

I think you can make a system boot via syslinux/extlinux in BIOS mode using NTFS, but it will be harder to make it boot in UEFI mode without an EFI system partition with the FAT file system. So if you want portability to computers that boot in UEFI mode, you need FAT (or at least things will be much easier that way). You can to make a persistent live system with mkusb and check if that will work well enough for you.

Installed system in a USB drive

An alternative is to create an installed system on the USB drive, installed like into an internal drive, but into a USB drive (pendrive, SSD, HDD ...). See this link, Boot Ubuntu from external drive. Such a system will boot via grub, and there will normally be an ext4 root file system. And it can be portable between computers.


How many files can I have on a single directory?

Ubuntu does not limit the size of a directory, it's imposed by the file system. Each file and directory is an so-called inode. You can use df -i to check the number of inodes in use and available for all mounted filesystems.

I've just created 1 million and one files without issues because my inode limit for my ext4 home partition of 50 GB (46 GiB) is large enough.

I used shell expansion for creating the files, combined with the touch utility:

mkdir test
cd test
touch {0..300000}
touch {300000..600000}
touch {600000..900000}
touch {900000..1000000}

This creates 1000001 files which can be verified with ls | wc -l. Why 300000..600000 and not 300001..600000? Because I was too lazy to put that 1 at the end.

df -i looks like:

/dev/sda6            3055616 1133635 1921981   38% /home

Now remove the test files (cd ..&&rm -f test took much longer, so use rm with the filenames):

rm {0..300000}
rm {300000..600000}
rm {600000..900000}
rm {900000..1000000}
cd ..
rmdir f

and the number of inodes in use decreased immediately after removal of the files:

/dev/sda6            3055616  133634 2921982    5% /home

Note that even if the filesystem allows such large numbers of files, it's a horrible idea to store such large files in a single directory. At least use some subdirectories with a structure like f/i/l/e/filename.ext. Programs do often not expect such large quantities of files.


Here is how I setup my passwordless login.

I log in to Host2 and create a key

$ ssh myself@host2
$ ssh-keygen -t rsa

And follow the prompts. When you are finished you have created your local key and now we need to get it onto the server.

To get it onto the server we use the command ssh-copy-id like so

$ ssh-copy-id wladmin@host1

This will prompt for the wladmin users password.This command will send your key to the server and set you up for passwordless login.

This is all assuming host1 and host2 are linux boxes.


How can launchers be added to and removed from the Unity dash?

Don't know about scenario 1, haven't any HIB games, - I'd look thru any of the  possible places - /usr/local/share;` ~/.local/share; /opt/

As far as 2 - try opening the .desktop you created in a text editor (your launcher is just a .desktop), & add   a Categories= line

Something like this should suffice -

Categories=Game;

Typically game .desktops use this but the above should be ok

Categories=GNOME;GTK;Game;

A log out/in  should show in Dash filter > games, if not then re-open the launcher in your text editor & try adding a %U to end of the Exec= line leaving a space after what's currently there. (shouldn't be needed in these cases


Having loaded and installed Ubuntu 12.04.2 My Display is very large

simply, in the upper-right, click on the power button and click system settings, select displays and then choose your display and configure the right resolution you want


This sounds like a DNS issue.

Add a header to your resolvconf configuration file. Create or edit the file, "/etc/resolvconf/resolv.conf.d/head". Add your preference to it.

/etc/resolvconf/resolv.conf.d/head:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

nameserver 8.8.8.8
search [yourpreference.com]

See override dns nameserver for more information.


To really clean up everything you need to purge a package, otherwise your configuration will be kept and the package is only deleted.
Try

sudo dpkg --purge phpmyadmin


Sort duplicates within a file based upon identifying the duplicates from the content within the first column

I assume you want to get only one duplicated record without the rest records which do not have duplicates:

awk -F, 'a[$1]++{print $1}' my_file

Example:

$ cat shasums
804951ce256f190e77baba24f29b6b1890b3e9df  ./bell.wav
793e3a485bd29d1e5a87493fa566624d4742f215  ./output.sh
b35bd58dd07d7e3375dea1aee4c5e73e470a928b  ./package-lock.json
804951ce256f190e77baba24f29b6b1890b3e9df  ./bell.wav
b35bd58dd07d7e3375dea1aee4c5e73e470a928b  ./package-lock.json
b35bd58dd07d7e3375dea1aee4c5e73e470a928b  ./package-lock.json1
d1847e16de5717f9a35eab98f974c20a867019eb  ./shasums

$ awk -F, 'a[$1]++{print $1}' shasums
804951ce256f190e77baba24f29b6b1890b3e9df  ./bell.wav
b35bd58dd07d7e3375dea1aee4c5e73e470a928b  ./package-lock.json


Upgrading Beta to full version work without bugs?

Technically, a system which has been upgraded from a beta to a final release should be identical to a system on which the final version was installed from installation medium, so any bugs should affect both systems equally. This is what package managers are for, after all.

At least, this worked fine for me during the 12.10 development cycle - maybe one trick is to make sure you upgrade your system often, so there's no large gap between packages' versions. In this case upgrading to "real" final release is just a minor upgrade which is unlikely to break anything any more than any of the previous interim updates.

Still, running a Beta release on a machine which holds "all my programs, files, and data on it" is not advisable - make sure you back up your documents often. And be prepared to cope with occasional glitches.


Are the DigiNotar certificates supposed to be present in Firefox in a clean install?

Yes, these certificates are supposed to be there, exactly because DigiNotar isn't trustworthy. Let me explain.

The story is a bit convoluted: DigiNotar was a Dutch certification authority. In 2011, people ran across fraudulent certificates that had been issued by DigiNotar. Further examination showed that the company's systems had been cracked and compromised. It's assumed that the attacker's intention was to run a MitM attack on some GMail users in Iran with the fraudulent certificates.

After the breach was detected, the Dutch government took over DigiNotar's operations. A short time later, the company went under. DigiNotar's root certificates were revoked and blocked by Mozilla, Google and so forth.

So, why is Firefox still shipped with DigiNotar certificates? Those are what you might call "blocking certificates". They don't have any trust themselves, so they can't hand down any trust to any other certificates down the chain of trust. Because of that, Firefox won't trust any certificates that say, "Trust me, because DigiNotar signed me". And because the "blocking certificates" are there, no new root certificates for DigiNotar (which would be obviously fraudulent) can be installed, too.


Error while installing eclipse for J2EE Developers?

Apparently you have downloaded an incomplete archive. Retry the download (possibly with different mirror) or use Ubuntu package.


Attenuate applications while receiving output from Mumble

This is something that has bothered me for quite some time, so I decided to go fix it. :) As of a few minutes ago, support for this has been merged into Mumble for the next release:

https://github.com/mumble-voip/mumble/commit/0e4d963a5a762520945d01a328d17688fb6c2fd8

You can try it now if you're brave and want to run off of git, otherwise you'll need to wait for the next release. I'll keep this answer updated as this progresses.


Officially notepad++ is not supported for ubuntu.
However you can install it via wine and run through it!

If you don't have wine just type in terminal

sudo apt-get install wine

Then go to notepad++'s website and download the latest version.
Run in in ubuntu with wine(right click the .exe and select open with wine).

Check this video, that will help you.

Alternatively, you can use geany which can be used either in windows or ubuntu.
It's a really cool editor, that can also be use for LaTeX.

Here you can see a C++ code screenshot from geany


This issue seem to stem from the conflict between the OpenJDK and Oracle's own DEB distributions for Focal, especially if you've used the webupd8 PPA in the past to install it. I solved it by forcing the override:
sudo apt -o Dpkg::Options::="--force-overwrite" --fix-broken install
You can also force it directly with dpkg by running
sudo dpkg --configure --force-overwrite -a


Problem solved!

I downloaded the latest drivers for RTL8192CE directly from Realtek here and installed by using the script mentioned under section III in the readme file:

./compat/script/compat-install.sh

and rebooted. Download speed has stayed in the 20-30 MBps range ever since.


Can login on Ubuntu on Wayland, but not on normal Ubuntu

I realize this might be a bit late here, but sudo apt reinstall ubuntu-desktop helped me. Looks like a sudo apt autoremove got a little overzealous.


How to boot a debootstrap-ed system bare metal?

I have described a fully automated working Ubuntu 18.04 host Ubuntu 18.04 guest debootstrap QEMU setup at: Is there any prebuilt QEMU Ubuntu image(32bit) online?

I wonder how long until this link only answer is deleted and I'm forced to copy the answer here and maintain both forks >:-)


Execute command after dpkg installation?

If the script do not takes parameters, add a file in /etc/apt/apt.conf.d/, for example 92local (numbers are used to force execution order of scripts in that directory), with the following content:

DPkg::Post-Invoke { "/path-to/my-script"; };

and remember to make it executable.

Cannot find right now information on how to pass parameter or input to the script.
If can be of help, when running apt on command line, you should find the command line in the environment variable SUDO_COMMAND.


To change your mac address you can try this:

sudo service network-manager stop
sudo ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx - Here you have to add a mac address you want. If you are connecting to the Internet over a wireless connection, then replace "eth0" with "wlan0" (wlan1, wlan2, etc.)
sudo service network-manager restart
ifconfig - check is mac changed

You can read more here.

If this is a hardware problem, I'm not sure if it will work, but try.


Audio Recorder opening on startup in Ubuntu 16.04

Open DASH and search for Startup Applications and look for that program and uncheck it. That should stop its launch at start up.


Installed Gnome on Sputnik 16.04, not seeing what I am expecting

That is the Unity desktop environment, the environment that was pre-installed. To log in to the Gnome desktop environment, you must choose it at the time of login. To do so, click the Unity icon (see below) and choose Gnome.

You can also make Gnome the default desktop environment by editing the environment configuration in /usr/share/lightdm/lightdm.conf.d (for me it was /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf) and changing the line user-session=unity to user-session=gnome.

You could even uninstall Unity completely, with sudo apt remove unity (use --purge if you want to remove its configuration files), but when I did this, I still had to edit the configuration for lightdm to make it recognize Gnome as the default.


Why does the installer make an extended partition for swap by default?

Primary partition is only needed when you want to make it bootable. If you look up wikipedia there's a "full story" about that. Extended and logical partitions have some cons. But if you want a primary swap partition, you can partition it by yourself, it's not hard and you seem like you understand what are you talking about, so it shouldn't be a problem for you. There's a manual partitioning in most installers, or you can use GParted, fdisk, disked and others.

Hope this helps :)


Do not edit the current version in debian/changelog. Create a new build by dch -i then add the custom version.


Why are my USB 2.0 ports stuck in low-speed 1.0 mode?

disable legacy usb from the bios and if you dont have usb 3 also disable backwards compatibility mode in the usb settings in bios.


How not to maximise windows across monitors on 20.04?

After unplugging the monitor restarting the machine and then plugging the monitor back dual monitors are not maximising the windows across both screens.


Hit Alt+F2 and type 'additional drivers'

You should then see if you have any driver installed or to install for either wireless or graphics card

It may for instance come up with a choice to download and install an fglrx package for your graphics card

Let us know if it is installed.

If it is not, then install it.

If it is installed, then it may require some other work such as deactivation or reinstalling.


-t vfstype
              The  argument  following the -t is used to indicate the file system type.

  The filesystem types which are currently supported include: adfs,
  affs, autofs, cifs, coda, coherent, cramfs, debugfs, devpts, efs, ext,
  ext2, ext3, ext4, hfs, hfsplus, hpfs, iso9660, jfs, minix, msdos,
  ncpfs, nfs, nfs4, ntfs, proc, qnx4, ramfs, reiserfs, romfs, squashfs,
  smbfs, sysv, tmpfs, ubifs, udf, ufs, umsdos, usbfs, vfat, xenix, xfs,
  xiafs. Note that coherent, sysv and xenix are equivalent and that
  xenix and coherent will be removed at some point in the future - use
  sysv instead. Since kernel version 2.1.21 the types ext and xiafs do
  not exist anymore. Earlier, usbfs was known as usbdevfs. Note, the
  real list of all supported filesystems depends on your kernel.Mount Man Page


How do I disable low and critical battery notifications in 14.10?

Are you sure you want to do this???

OK, go into a terminal by pressing Ctrl+Alt+T and type the following commands:

gsettings set org.gnome.settings-daemon.plugins.power critical-battery-action 'hibernate'
gsettings set org.gnome.settings-daemon.plugins.power percentage-low 5
gsettings set org.gnome.settings-daemon.plugins.power percentage-critical 3
gsettings set org.gnome.settings-daemon.plugins.power percentage-action 2
gsettings set org.gnome.settings-daemon.plugins.power use-time-for-policy false

Obviously, set the percentages to something you like!


Is it possible to restore the original quality of a YouTube video after downloading it?

You can't download low-quality and UP-convert anything in order to get better quality using any plugin - be it audio or video. Period. You could use some filters to clean up garbage / noise but that's it.


I stopped mDNS with " sudo service avahi-daemon stop" but it keeps restarting

You need to stop socket. You can use this command:

sudo systemctl stop avahi-daemon.socket avahi-daemon.service

Also you can disable service forever and restart the system:

sudo systemctl disable avahi-daemon.service
reboot

To revert it run:

sudo systemctl enable avahi-daemon.service


Cannot connect wireless internet with an Atheros AR9285 802.11b/g/n wi-fi adapter

Yes, you are right, the network center does not show awailable wireless networks. To see those you have to click on the wifi-symbol at the right top corner of your display.

Then you are able to choose the network, you want to connect and Ubuntu will ask you for the wifi-key.


How do I make my laptop act as an NTP server in LAN without connecting to the internet?

I stumbled with a fix. :-)

Edit the file /etc/ntp.conf

#add these
server 127.127.1.0 iburst
fudge 127.127.1.0 stratum 10

And comment out all other servers. :-)

P.S. I'm not sure about the iburst. I guess it can also be not included.


How to install latest version of Urban Terror on Ubuntu 12.04?

The standard solution is to add getdeb games repository and install the games from there. The problem is that the original getdeb repositories are bit unreliable as they often go down. Therefore better option is to add getdeb repository mirror that has all the same stuff and is more reliable. The downside is that updates come with slight delay but I would not worry about that.

Easy way to add repository is by opening Software center and Edit-> Software sources -> Other software -> Add (or something like that :)
In the case of getdeb mirror enter this line (you can remove "apps" if you don't want to get also software from there):

deb http://mirrors.dotsrc.org/getdeb/ubuntu precise-getdeb apps games

If you are also interested in the source code then you can also add this the same way:

deb-src http://mirrors.dotsrc.org/getdeb/ubuntu precise-getdeb apps games

If after adding repositories close Software center, open Terminal and enter (you can copy this - in terminal copy/paste can only be done with mouse) this:

sudo apt-get update

At this point you would also need to enter your password.
If that doesn't produce any errors (as it shouldn't) you just managed add new software sources to your Ubuntu.

You can now install Urban Terror by opening Software center and searching for it.
Alternative is to continue in the terminal:

sudo apt-get install urbanterror

After some waiting you can start shooting.

UPDATE: If somebody is reading this to learn how to install the game on any other version than 12.04 (Precise) then replace the "precise" in the repository line with your version of Ubuntu.
For example: deb http://mirrors.dotsrc.org/getdeb/ubuntu saucy-getdeb apps games

The same thing from command line:

$ sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu saucy-getdeb games" >> /etc/apt/sources.list.d/getdeb.list'

The original answer also did not include information about adding the repository key. This can be done from command line with:

$ wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -

Or one could download the repository key file and import it at the "Authentication" tab of "Software and updates" window.


Wanting to set up a VNC connection between my Linux Laptop and Windows desktop

To do this securely, you have at least 3 options:

VNC over Secure Shell (SSH)
Real VNC Personal edition ($30) which has security options
Remmina Remote Desktop Client

VNC over Secure Shell requires the most work of you. You'll need to setup a SSH Server, VNC server, and forward the port on your router to the SSH server.

Real VNC Personal edition is apparently much easier since the security is built in.

Remmina Remote Desktop Client allows you to connect directly to your Windows 7 PC using RDP (assuming you're running Win7 Pro or higher; Home edition doesn't have RDP.)

How you do each one is a whole post in and of itself, but you can Google the answers pretty easily. Hope this helps.


TLP (Power saving) - Will configuration remain after uninstall?

No, TLP does not modify system files. After uninstall all settings are gone (after a system restart).

Btw: there is no TLP setting to "disable USB ports"


Running this in the terminal fixed the problem:

$ xdg-mime default caja.desktop inode/directory


Why does the right click menu show on the other screen in Chrome?

It seems to be a bug in Chrome/Chromium, which is said to be fixed as of Chrome version 47.0.2500.


Run multiple line as a single line command bash

Firstly you could replace the && with ; which is equivalent to the line breaks in your multiple-line code. Secondly I don't think you need the && (or ;) after the then statement.

The difference between the && and ; line breaks is that && will run the next block of code if and only if the previous block has executed properly.


the package linux-firmware does not install...see below.please help

You installed some custom linux-firmware-free package that conflicts with linux-firmware.

You can fix it by

sudo apt-get remove linux-firmware-free
sudo apt-get install linux-firmware


Problem with GIMP, it doesn't show correct image as in compair with Photoshop!

Unfortunately, GIMP is not 100% compatible with PSD-files since it does not support all features of Photoshop. It especially does not support layer style (I think that is why the Facebook-button is black). See this or this forum thread for more information.


How can I easily share the output of a command or a text file with others?

How to easily share all or part of some text file (or the output of a command)

You'll paste the file or command output to Ubuntu's "pastebin" service, and then allow others to look at it by simply sharing a link, or use it yourself to further copy and paste a few lines into your question.

  Note: If your problem involves the Software Center, Update Manager or apt-get not working, you may have to use the Alternate Method near the bottom of this answer.

1. Start the terminal

The terminal allows you to interact with your system by typing commands, instead of using the mouse/cursor. It's not hard to use when you have instructions, and can make some tasks very easy to accomplish.
Press the Ctrl+Alt+T keys together (at the same time) to start the terminal. This will work for everyone using regular Ubuntu, but if you're using...

Lubuntu: Click on the Start button, go to Accessories, and click on LXTerminal
Xubuntu: Right-click anywhere on the desktop, and click on Open Terminal Here
Kubuntu: Click on the Start button, type konsole in the Search box, and click on Konsole

You will get a window with a solid background, showing your username and your computer name, like the below (size/colors may differ!):

2. Install pastebinit, a small tool to paste text from the terminal

In your terminal, type sudo apt-get install pastebinit and press Enter
Enter your password and press Enter (what you type won't show, don't worry)
When asked Do you want to continue?, type Y and press Enter, and wait for the prompt (user@machine) to return.

3. Pastebin the file or command and paste its URL on AskUbuntu

Go back to your browser, select the exact filename (or command) whose content you were asked to paste, and press Ctrl+C to copy it to the clipboard.

A filename may look something like /etc/apt/sources.list, while a command may simply be something like dmesg or grep -i failed /var/log/auth.log. The answer or comment will tell you explicitly if it's a file or a command.

Now, for a file, type pastebinit in the terminal, follow with a space; then right-click on the cursor and click on Paste to paste the filename you copied.

Press Enter, and after a few seconds you will see a link of the form http://paste.ubuntu.com/ as shown below. Move your mouse over it, and it will be underlined -- then right-click and click on Copy Link Address to copy it link to your clipboard:

But for a command, copy and paste the command in the terminal first, and then type
 | pastebinit after it, and press Enter (see screenshot below)

The | symbol may be obtained by pressing Shift+\, which is usually below the Backspace key.
Move your mouse over the link--it will be underlined--right-click and Copy Link Address as explained above.

4. Paste the link into your AskUbuntu question/comment

Go back to your browser, and add a comment (or edit your question) with the Pastebin link - just press Ctrl+V to paste it. Save the edited question or add the comment, and that's it!

5. Optional: View your pastebin link, and only paste selected lines from it into your AskUbuntu

You can also paste the link into your browser's address bar, or click on the link after you've added/edited it to AskUbuntu, to view it on pastebin. It will look similar to this:

Notice the line numbers. You can also copy and paste selected/requested lines from here directly into your AskUbuntu question.
Please enclose the pasted lines with the <pre> and </pre> tags as shown below, so that it appears as separate lines in the question instead of being jumbled together:

Alternate way to pastebin a file using an editor

This may be useful if you are having a problem with Software Center, Update Manager or apt-get and cannot install pastebinit; it only works for files, not commands.

Select and copy the filename from AskUbuntu into your clipboard with Ctrl-C.
Open a terminal as shown in Step 1 and type gedit, followed by a space, and then right-click to paste the filename as in Step 3 and press Enter

Lubuntu users type leafpad instead of gedit; Kubuntu users type kate

The editor will open with the file:

Click anywhere inside the editor window, and press Ctrl+A. All the text should now be highlighted in another color:

Now press Ctrl+C (or the Copy button, if you know where that is) to copy the entire file to the clipboard.
Go to your browser, and open paste.ubuntu.com. Type your name/nickname in the Poster: box; then click in the Content: box and press Ctrl+V to paste the text you just copied from the editor in there:

Click on the Paste button, and in a few seconds you'll see the text you pasted:

Select the address shown in the address bar (highlighted orange above), copy it with Ctrl+C, and then go back to AskUbuntu and paste it in as explained in Step 4.
Alternately, select a few lines, copy them and then paste them in AskUbuntu as explained in Step 5.


NFS_AutoMount not mounting readynas shares Ubuntu server 14.04

According to your successful manually mount your MOUNTS option must be:

  MOUNTS=( "rw|readynas|/media/TV/|/mnt/tv/|nfs_automount_rw_testfile" )

(without /c at the beginning)


Likewise for me. And I have the suspending problem too. However, the workaround for the suspending issue is to:

sudo nano /etc/systemd/logind.conf

and find the line that says "HandleLidSwitch=" and erase what is there, and put "HandleLidSwitch=ignore"

Save and reboot. You should be able to close your lid and open it without hanging issues.

I have a Compal JHL90.


Simply, you can add your command to /etc/rc.local and it will be executed on system startup.

sudo echo "xmodmap -e \"keycode 94 = backslash\"" >> /etc/rc.local


Dual boot, Win 7 and Ubuntu 14, does not show ubuntu after restart

Hi Have you tried to install the Grup loader in the Ubuntu partition!
It needs to be in the boot partition SDA, dont choose one of the numbered partitions, cause then it is not wissible during boot!
Have fun.


Lubuntu allow non-admin to mount drive without admin password

Give your user account an entry in /etc/sudoers to use mount. Or you could always mount ntfs partition at boot time by adding a line to the end of /etc/fstab. First create a directory in /mnt and alter permissions and ownership using chmod and chown. Add the line to fstab, reboot and test.

The fstab method will be best.

As root or via sudo:

Create a directory to mount sdc7 to.
Alter new directory's permissions and ownership.
Mount sdc7 to new directory.
Using su check that users can access the file system.
Enter command ls -l /dev/disk/by-uuid, note the UUID of sdc7.
Open /etc/fstab in a text editor. Each line is a record, fields separated by tabs. Add new line reading something like:

UUID={uuid@5} {path of @1} ntfs defaults 0 3

Save and reboot your system, if the boot sequence reports unable to mount... the UUID is probably wrong.

(If you're new, commands apropos and man will help.)


I was having the same issue. I solved it by locating the deluged "auth" file (/var/lib/deluge/.config/deluge/auth in my case) and adding a new user there:

localclient:0cblablablablablaandmoreblaed5f:10
my_username:a_secret_password:10

More info in Deluged Authentication docs


Sound card not detected - Ubuntu 20.04 - sof-audio-pci

As I said the sound driver I was running was sof-audio-pci, which had no normal firmware at the moment.

I searched nearly 3 hours trying to solve this headache and finally found the solution, just disable this "sof" driver and fall back to intel:

Do:

sudo gedit /etc/default/grub

Change

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash snd_hda_intel.dmic_detect=0"

Then do:

sudo update-grub

and Reboot.

You can check if soundcards are detected with:

aplay -l

Source


Screenlets malfunction after upgrading to 18.04

bash script to install screenlets in 18.04.x x64 Bionic

Note: Only for clean installation. Not tested on upgrades from previous versions to 18.04

To Run (without sudo):

~$ chmod +x ./screenlets.sh && ./screenlets.sh

Content of script:

#!/bin/bash
echo "Screenlets Setup. Wait..."
function screenlets(){
  clear
  sudo rm -rf /etc/apt/sources.list.d/screenlets*
  # Dependencies
  sudo apt -y install software-properties-common
  sudo dpkg -l python-wnck
  if [ $? == 0 ]; then
    echo "OK"
  else
    sudo apt -y install libwnck22
    wget -c http://archive.ubuntu.com/ubuntu/pool/universe/g/gnome-python-desktop/python-wnck_2.32.0+dfsg-4_amd64.deb
    sudo dpkg -i python-wnck_2.32.0+dfsg-4_amd64.deb
    sudo apt --fix-broken -y install
  fi
  sudo dpkg -l python-gnomekeyring
  if [ $? == 0 ]; then
    echo "OK"
  else
    wget -c http://archive.ubuntu.com/ubuntu/pool/universe/g/gnome-python-desktop/python-gnomekeyring_2.32.0+dfsg-4_amd64.deb
    sudo dpkg -i python-gnomekeyring_2.32.0+dfsg-4_amd64.deb
    sudo apt --fix-broken -y install
  fi
  # Screenlets Setup
  sudo add-apt-repository -y ppa:screenlets/ppa
  sudo sed -i 's/bionic/xenial/g' /etc/apt/sources.list.d/screenlets-ubuntu-ppa-bionic.list
  sudo apt update
  sudo apt -y install screenlets screenlets-pack-all
  sudo rm -rf /etc/apt/sources.list.d/screenlets*
}
screenlets &> /dev/null
echo "Done"

To remove:

sudo apt -y purge python-wnck python-gnomekeyring libwnck22 screenlets screenlets-pack-all && sudo apt -y autoremove && sudo rm -rf /etc/apt/sources.list.d/screenlets* ~/.config/autostart/screenlets-daemon.desktop

source: maravento


Atheros AR9285 / Lenovo G560 wireless not working after installing 13.04

I've had same issue - it is VERY LOW LEVEL - see my post on it here:

info about wireless being greyed out on Lubuntu 13.04, after an OS upgrade

Try that - wish you luck


Double Triple-Click brings up Switcher -- how do I change this to revert Triple-Click to be middle click again?

Found the solution to the switcher problems.

The "tiny switcher" was CompizConfig Settings Manager's  Window Management > Application Switcher. Disable keys that activate it. It sucks.

Go to Ubuntu Unity Plugin > Switcher tab make sure keys are enabled there. That's the "very nice looking switcher" that most people probably just think of as Ubuntu's default switcher.

Still have absolutely no idea why double triple-clicking pulls up switcher.

Still don't know how to revert triple click to middle click / open link in new background tab.


Perl to the rescue!

perl -pe 'BEGIN { $n = 1 } s%\[H%

% && $n++' filename

-p reads the input line by line and prints whatever the code does with it
BEGIN { ... } is run before the program is entered
s%pattern%replacement% replaces pattern with replacement.
\[ needs a backslash, because [ is special in regular expressions
&& $n++ If the substitution is successful, it returns true, so the next command is run: and it increments the counter $n.


Is there any version of Ubuntu that does not require PAE?

Try the non-pae mini cd. It will boot into netboot, and download the needed files

Link

This is a simple iso file for the kernel and the drivers. You just boot this as you would a normal iso, but it has a text based installer. You nearly just press enter all the time. You have to give once the username and then password. At partitioning you just select the the guided one (without LVM) and on the package selection you select Xubuntu desktop.


Gvim gives warning: 'Unable to register window with path'

It means the menus (File, Edit, Tools, Syntax, Buffers, Window, Help) will not be displayed on hovering at the top of the screen when the gvim window is the active window.

It is a bug and has a work around.

gvim(){ /usr/bin/gvim -f "$@" & true; }


Wireless drivers failing to build when make command is run

This driver is included in Ubuntu repositories for Ubuntu 15.10 and 16.04.
It can be also installed to Ubuntu 14.04.4 with 4.2 kernels (see the offline guide).

Most likely it will install on the previous kernels, but that is not guaranteed.

It can be installed for wily or xenial by

sudo apt-get install rtl8812au-dkms

You need to uninstall all other drivers for this adapter first.

You can install this driver offline this way:

Download these files to your Home directory

http://mirrors.kernel.org/ubuntu/pool/main/d/dkms/dkms_2.2.0.3-1.1ubuntu5.14.04.5_all.deb
http://mirrors.kernel.org/ubuntu/pool/universe/r/rtl8812au/rtl8812au-dkms_4.3.8.12175.20140902+dfsg-0ubuntu1_all.deb

Run in terminal

sudo dpkg -i dkms*.deb rtl8812au-dkms*.deb


Swap is turned off after reboot on Ubuntu 18.04

The problem was that the NTFS file system on which I placed my swap file was not configured to mount automatically in /etc/fstab, but it got only mounted automatically later somewhere.

I added this in /etc/fstab, it seems to work now:

/dev/sdb4 /media/oleg/5C2C1D0A2C1CE0B6 ntfs-3g rw,nosuid,nodev,allow_other,default_permissions,blksize=4096 0 0

And this line remains telling linux to use swap file after reboot.
    /media/oleg/5C2C1D0A2C1CE0B6/swapfile none swap sw 0 0


Ensuring ethernet is configured before continuing init scripts

This is a pretty specific use case you have with DRBD in line after networking.  As I don't have much DRBD experience, I'm not sure how fast it will try to establish.  Perhaps you could get by with simply detecting when the IP is bound to the interface instead of waiting until a ping responds (which adds that latency to the mix).

Perhaps something like;

#!/bin/bash
# Fetch Interface
BONDED_INTERFACE=$(cat /proc/net/dev | grep 'bon' | awk -F: '{print $1}')

# Determine Network Status
if [ "$BONDED_INTERFACE" ]; then
    BONDED_IP=$(/sbin/ifconfig ${BONDED_INTERFACE} | sed -n  -e '/Bcast/p' | cut -d : -f 2 | awk '{print $1}')
    while [ "${#BONDED_IP}" -le "0" ]; do
        echo "No IP Present on The Interface";
        BONDED_IP=$(/sbin/ifconfig ${BONDED_INTERFACE} | sed -n  -e '/Bcast/p' | cut -d : -f 2 | awk '{print $1}')
    done
    echo "The Interface IP is: $BONDED_IP";
else
    echo "No Bonded Interface Found";
fi

I suppose outside of debugging the above script would make more sense calling a sleep for a time duration rather then echoing it's output.

If this still isn't quite what you want, perhaps there is something to be done in NetworkManager or maybe trying to detect the link state (carrier sense).  Hope I was some help.


Cannot install current version of php5-intl

Note the [security] next to the package version - that indicates it is a security update, and available in the trusty-security repository.

You have an extremely odd configuration that enables the trusty and trusty-updates repositories, but not trusty-security. The order of importance (and safety, and dependency) is trusty, trusty-security and trusty-updates - you should have trusty-security enabled if you have trusty-updates enabled. Using http://security.ubuntu.com is not the same as enabling trusty-security, in case you are wondering. Are security.ubuntu.com updates eventually merged into normal updates?

By the way, there's an easier way to print the .list files you have, with filename headers:

head -n-0 /etc/apt/sources.list /etc/apt/sources.list.d/*.list


Is there any Ubuntu software to draw math?

I found excellent project called Xournal++ to fulfil my needs: https://github.com/xournalpp/xournalpp

Xournal++ is a handwriting notetaking software with PDF annotation support. Written in C++ with GTK3, supporting Linux (e.g. Ubuntu, Debian, Arch, SUSE), macOS and Windows 10. Supports pen input from devices such as Wacom Tablets.
Features:

Support for pen pressure, e.g. Wacom Tablet
Support for annotating PDFs
Fill shape functionality
PDF Export (with and without paper style)
PNG Export (with and without transparent background)
Allow to map different tools / colors etc. to stylus buttons / mouse buttons
Sidebar with Page Previews with advanced page sorting, PDF Bookmarks and Layers (can be individually hidden, editing layer can be selected)
enhanced support for image insertion
Eraser with multiple configurations
Significantly reduced memory usage and code to detect memory leaks compared to Xournal
LaTeX support (requires a working LaTeX install)
bug reporting, autosave, and auto backup tools
Customizeable toolbar, with multiple configurations, e.g. to optimize toolbar for portrait / landscape
Page Template definitions
Shape drawing (line, arrow, circle, rect, splines)
Shape resizing and rotation
Rotation snapping every 45 degrees
Rect snapping to grid
Audio recording and playback alongside with handwritten notes
Multi Language Support, Like English, German (Deutsch), Italian (Italiano)...
Plugins using LUA Scripting

They have an unstable bleeding edge PPA:
sudo add-apt-repository ppa:andreasbutti/xournalpp-master
sudo apt update
sudo apt install xournalpp

There is also a PPA for stable releases. In addition to amd64, it also hosts packages for ARM, PowerPC and other architectures on supported versions of Ubuntu:
sudo add-apt-repository ppa:apandada1/xournalpp-stable
sudo apt update
sudo apt install xournalpp


Is Ubuntu Server 18.04 supported on HP ProLiant DL 360p Gen 8

Load Ubuntu 16.04 first, followed by a release upgrade of Ubuntu 18.04 next.  Tried it out THREE times, and was successful THREE times. Work on DL360 Gen8 servers and earlier.
-rad


Launch OpenStack Autopilot: Stuck "waiting for machine" while attempting to conjure-up Landscape

Can't comment yet but will post this as a suggestion.

This happened to me lately. When starting to deploy the applications, conjure-up will first deploy Ubuntu on the machines you chose for the applications using MAAS, and then set up LXD containers on those machines (unless you chose not to). You can monitor the status of the deployment from the MAAS web UI. The installation of the applications will not start unless Ubuntu has been successfully deployed on the machines in question. If your machines show successful deployment, check to see of the LXD containers have been set up. If not, you would have to go through the logs on the machines to figure out the problem.

For me, deployment of Ubuntu was failing due to a misconfiguration in the machines' BIOS. Once I fixed that, everything went smoothly.


Asus E402M is not (yet) listed as certified compatible:
https://certification.ubuntu.com/models/?query=asus

For brightness: Brightness fn key shortcut doesn't work on ASUS laptop

There are links to other suggestions there, also.


Lenovo G40-45 AMD Driver match for Ubuntu 14.04 LTS

I have the same model of Lenovo laptop. I achieved the battery life last longer with this guide in Spanish. The battery have the same performance than Windows 8.
http://www.taringa.net/posts/linux/18073964/Optimizacion-de-energia-Dell-Inspirion-5521.html


How can Unity be made more friendly to multiple monitors on a laptop?

This should probably be raised as a new Unity bug on Launchpad but a quick solution is to run that command when resuming using these forum instructions


use linux I/O redirection, standard operator >

sudo tcpdump 'port 80' and src host 192.168.1.4 > /tmp/http.log
cat /tmp/http.log

you should mention your source address in place of "192.168.1.4"


The OP reported solving the problem. He wrote:

The first step of my solution was in:

Unity doesn't load, no Launcher, no Dash appears
Not the first solution but the second where I had to use the T. Doing the same in graphical mode, I saw that it asked for a password. Then it went on. Then did the sudo reboot again.

After the reboot I end up in an empty black screen with no prompt. I can typ but no command is accept(there is local echo).(i see that i am in tty7 but no prompt).
I went to tty1, logged in, went to startx and got again an empty desktop on tty7 and tty8. So I went to tty2.
ren the sudo apt-get install pastebinit && pastebinit /var/log/Xorg.0.log
On advise used the sudo apt-get autoremove.
then sudo reboot.

Problem was solved. I got my desktop back. Still not sure which password the system wanted.


How does mounting (or unmounting) a partition affect the performance of the system?

In my opinion, keeping it mounted or unmounted should have negligible if any affect on your system's performance.  I have a 2 TB external that stays mounted all the time and I haven't noticed any ill effects on my system.  I just have it set to spin down when it's not being accessed so it doesn't wear out.  Now if you have search software set to index that drive and things of that nature, then yeah it might have an effect on those services, but overall I don' think it would hurt anything to leave it mounted.


Can I have a user execute sudo commands without being an administrator?

Ubuntu has taken care of these issues for you, you don't need to worry about the Standard user or even the Administrator using the Super User priviledges all the time. In order to be able to use the sudo command, the Standard User needs to be listed in the /etc/sudoers file; the Administrator is automatically listed in this file. To add a user to this file, type the following command at the terminal:sudo nano /etc/sudoersYou will see the following lines:%sudo ALL=(ALL:ALL) ALLJust add the name of the user who is to be able to use the sudo priviledges below these lines. To save the file, press Ctrl + o and to exit, press Ctrl + x.Unless the user is listed here, she won't be able to use the sudo command, and it will return the error "The user"(the user name) is not listed in the sudoers list. This incident will be reported.


Upgrade to 12.04LTS dumps to busybox on boot

This is caused by an odd configuration as well as a change in boot scripts.

First, the mirrored device, /dev/md0 does not have a partition table. It is treated as a raw block device with a filesystem directly on it. In emergency cases, this allows the backing device (/dev/sda2 or /dev/sdb2) to be booted directly. There was previously an short-lived installation of LVM on this partition, but this was deemed unneeded so the device was reinitialized as a raw ext3 device. This did not successfully remove all traces of LMV, however. This results in the utility wait-for-root returning 'LVM2_member' as the device type. It has done this all along.

Second, updates to the boot script 'scripts/local' changed the mount command from:

mount ${roflag} ${ROOTFLAGS} ${ROOT} ${rootmnt}

to:

mount ${roflag} ${FSTYPE:+-t ${FSTYPE} }${ROOTFLAGS} ${ROOT} ${rootmnt}

Mount now fails because we are forcing the type of filesystem into the mount command. In this case, the type 'LVM2_member' doesn't work at all - we need ext3 instead. The old version worked because mount was easily able to determine that this was an ext3 filesystem.

The short-term work-around for this is to pass in rootfstype=ext3 on the kernel boot line. This ignores the improperly auto-detected filesystem type and specifies ext3 to mount.