How can I get hunspell to use Australian English?

G'day mate! There are actually a few myspell dictionaries that the Hunspell engine will happily use.  I'm British and I found it frightfully upsetting when a filthy Canadian dictionary kept overriding my native tongue. I don't know why you colonial types can't just learn English rather than trying to break it...

Anyway, you probably just need to install the myspell-en-au package.

$ apt-cache search myspell-en
myspell-en-au - English_australian dictionary for myspell
myspell-en-gb - English_british dictionary for myspell
myspell-en-us - English_american dictionary for myspell
myspell-en-za - English_southafrican dictionary for myspell

Failing that, there is an OpenOffice addon dictionary. You can download this, extract it (rather than installing it) and copy out the en_AU.dic and stick it up your /usr/share/hunspell/dicts/ directory.

For clarification, my /usr/share/myspell/ directory is full of symlinks to /usr/share/hunspell/ and /usr/share/hyphen (part of the openoffice.org-hyphenation package). It seems —at least in terms of packaging dictionary files— the two projects have been merged which sort of makes sense as Hunspell is compatible with the same dictionaries.


How can I upgrade sqlite3 to at least 3.4.2 (or newer)?

There is an untrusted PPA here with version 3.5.9 of SQLite.

Note - as all PPAs - they are not from canonical so I cant vouch for their authenticity.

However his stable PPA comment is

"To give you a bit of confidence in this PPA, I'd like to point out that I'm an official Debian Maintainer with upload rights to the Debian distribution itself."


Gateway timeout when running apt-get update

This is not obvious what is your network config. I do not have enough reputation score to ask more info in comment, sorry
Looks similar to "Unable to connect" error with apt-get: possible proxy?
I believe 135.245.192.7:8000 is the proxy server and port.
"Gateway timeout" tells us the proxy is busy.
Please try some other time.
Or do you have a chance to change the proxy?
Please compare the proxy setting in browser and current APT settings, probably in /etc/apt/apt.conf or /etc/apt/apt.conf.d/proxy.conf. As per your questions you have access to internet via browser.
Here are references for the apt proxy

https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-set-the-proxy-for-apt-for-ubuntu-18-04/

Acquire {
  http::Proxy "http://user:password@proxy.server:port/";
  https::Proxy "http://user:password@proxy.server:port/";
}```

apt.conf "Acquire::http:Proxy "proxyserver:port" seems not to be used (Ubuntu 13.04 under Virtual Box on Win7)


How can I install 64-bit Ubuntu 15.10 on my UEFI-IA32 Bay Trail tablet?

Here are the things that currently work with Ubuntu 15.10 on the most common Bay Trail hardware.

Touch
Sound (only on some)
USB and USB OTG
Orientation, Gyroscope (very few)
ACPI, Battery Detection, Brightness (most tablets do not sleep correctly)

WiFi and Bluetooth do not work for 99% of Bay Trail SDIO chips.

Prerequisites

OTG cable, I recommend an OTG hub
Keyboard and mouse
USB drive (≥ 4GB)
Tablet charger
USB WiFi adapter (optional)

Section 1 - Prepare your USB drive

Download Universal USB Installer
Download the latest Ubuntu 15.10 ISO image (64-bit)
Use Universal USB installer to put Ubuntu on the USB drive
Download this bootia32.efi file, and place it in the /efi/boot folder in the USB drive
Download Grub-efi-ia32 and Grub-efi-ia32-bin AMD64 and place them at the root of the USB drive (the top of the drive)

Section 2 - Prepare your device

Depending on your desired setup, there are a few different options here. If you wish to dual boot Windows and Ubuntu, you must do your partitioning from within Windows. If you wish to use Ubuntu as the sole OS for your device, you must do your partitioning from within Ubuntu. If you wish to use Ubuntu as the sole OS for your device, you will need to back up any files that you want to keep, using external storage such as a cloud drive, flash drive, or SD card.

Dual Boot - for those who want it all

From within Windows, right-click (tap and hold) the start button, and select Disk Management
Right click the Windows partition (usually C:) and select Shrink Volume
You must shrink the partition to make at least 10GB of free space after it
No more partitioning is necessary from within windows, so now we reboot

Section 3 - the fun stuff

It is recommended that you Try Ubuntu Before Installing, this way you can at least see if Ubuntu will work on your device at all. Either way, you can start the installation process.

Starting Ubuntu

Here is where you will need to plug in your keyboard and USB drive.
Open PC settings > Update and Recovery > Recovery > Advanced startup > Restart now
When the Choose an option menu appears, click Use a device, and select the prepared USB drive
The device should now reboot, and show you this:

Choose Install Ubuntu and press Enter

Installation - the nitty gritty

Here is where we separate the dual booters from the single system users. It will get very complicated, so I recommend a cup of coffee and some ice cream.

Dual Boot Install

Go through the normal Ubuntu installation procedure, until you get to the Installation Type screen
Select Something Else and click continue
Click the empty space you made with Windows Disk Management
Press the + button to make a new partition
Copy all the settings found in the picture below.

Settings:
   Type = Primary
   Location = Beginning of this space
   Use as = Ext 4 Journaling File System
   Mount point = `/`

Leave 1GB of space after the new partiton

Create another partition after the one you just created, Use As: Swap area

Click Install now
Continue the installation as usual, when it finishes, do NOT remove your USB drive.

Single OS installation - for the loyal

Go through the normal Ubuntu installation procedure, until you get to the Installation Type screen
Select Erase disk and install Ubuntu
Continue installation as usual, when it finishes, do NOT remove your USB drive

Booting the Installed OS - a new beginning

Follow the procedure to boot to the USB drive again
When the GRUB boot menu appears, enter the command line by repeatedly pressing the C button
Enter the following into the command line

  linux (hd0,gpt2)/boot/vmlinuz-version-generic root=/dev/mmcblk0p2
  initrd (hd0,gpt2)/boot/initrd.img-version-generic
  boot

(You will need to change the bold text to suit your needs)

Installing Grub-efi-ia32 AMD64 - contradictory synonyms

Once you have successfully booted into your fresh Ubuntu installation, there is much that needs to be done before it can be reliably rebooted.

Open terminal, and enter these commands

sudo apt-get remove grub-efi-amd64
sudo apt-get remove grub-efi-amd64-bin

(If you get any errors, you may need to connect to the internet, and run sudo apt-get update)

Go to the root of your USB drive, and install the two files you placed there, in this order

grub-efi-ia32-bin
grub efi-ia32

(Double-clicking them should open the Ubuntu Software Center for easy installation)

After the files have been installed, open Terminal, and type

sudo update-grub

If you didn't receive any errors through this process, you should be able to reboot into Ubuntu (or Windows) without your USB flash drive.

I am not in any way affiliated with products, entities, companies, projects, or people that may be mentioned or linked to in this tutorial.


As a general rule, a desktop system's /home partition should be much larger than the root (/) partition. Your 20GB for root (/) is likely to be more than adequate for all the programs and other system files you're likely to need. User files should be stored in /home, so it could well need to be much bigger, particularly if you store multimedia files (photos, music, videos, etc.).

That said, if you really do have need for this resizing, there are lots of questions and answers here about it, like this one. The fact that you're using GPT isn't really very relevant, since the tool you'll use for this task (GParted) works on both MBR and GPT.


how to resize an encrypted logical volume?

You should concern that when your volume is encrypted it means everything on it,is encrypted; even your file table and you should connect to it through your encrypting application.if you are using as a volume for a virtual machine first mount it (It will automatically done when you start VM) then its mounted.

generally you can copy all the data to another bigger volume.sounds like your file is something like loop files in Linux.that contains an operating system or data.its not easy to type every detail on commands as i'm on mobile browser.but if you don't know how to make bigger file, format it,copy all data and mount again, tell that I'll help you later

Second edit:

Like I misunderstood,thought you are working on a file.its a logical partiton but nothing changed at whole story.i guess secret is behind your encryption fact.


Is there an equivalent of Windows' Remote Desktop?

I would recommend X2go. It's very similar to RDP and highly efficient even over low-bandwidth, high-latency connections. Clients for all systems, including a plugin for Firefox, etc. It works over ssh and integrates with PulseAudio so you can use VoIP, for instance. Read more on http://www.x2go.org

The x2go client requires a session command to execute upon logging in. For example, to use Unity 2D, use the session command: gnome-session --session=ubuntu-2d. This was found by looking in the file (on the host) /usr/share/xsessions/ubuntu-2d.desktop and copying value of the Exec=... line. If you want to use some other session, you can use the value from another file in /usr/share/xsessions/, but it seems that anything requiring 3D acceleration will not work.


As described in my comment: apt-get install is for installing software which is not yet present on your computer. For doing the same job as update-manager does, you have to run apt-get upgrade i personally prefer apt-get dist-upgrade because it also installs kernel upgrades etc. Probably update-manager acts more like dist-upgrade. man apt-get is a good help page...

Now to the answers of your questions:

1. how can a computer update itself without authorization?

update-manager (the gui tool). Works only as a front-end. In the background there is aptd which is triggered by systemd. If you want to run updates, update-manager tells aptd over systemd to run the updates, while aptd is running as root.

The permission check itself is technically not necessary: While starting update-manager, it also asks aptd via systemd for which you won't be asked for a password.

For the auto updates, you should have a look at the script /etc/cron.daily/apt which runs as root once per day.

The process list while updates get installed shows something like this:

14537 ?        SNl    0:02   /usr/bin/python3 /usr/sbin/aptd
14625 pts/57   SNs+   0:00     /usr/bin/python3 /usr/sbin/aptd
14661 pts/58   DNs+   0:00       /usr/bin/dpkg --status-fd 43 --unpack --auto-deconfigure /var/cache/apt/archives/freshplayerp....deb

2. how can a locked situation become unraveled before my very eyes without any intervention by me?

The locking probably comes from the apt-get update above, or from another test. It resolved by itself because it just finished its job.

For checking this, you can run the following command while apt-get is locked:

ps ax | grep apt


As best as I can tell, zcache was removed from the kernel as of version 3.11:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1256503

I would recommend looking at zswap instead. It's enabled just as easily:

Edit /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash zswap.enabled=1"

sudo update-grub
Reboot

To verify it's enabled:

dmesg | grep zswap

And to check to see if it's done anything (it will only kick in once your system starts swapping):

sudo sh -c 'cd /sys/kernel/debug/zswap && grep . *'

For more information about zswap:
zram vs zswap vs zcache Ultimate guide: when to use which one


No, unfortunately it is one way only. You can detach a tab into a new window, but you cannot attach a terminal window as a tab to another terminal window.


If you want to try Ubuntu but not lose your Android, you can use a dual-boot setup. There is a working solution for Ubuntu 13.04 on the XDA mobile developer forum. See also bug 1078391.


WiFi switched off after Update for 14.04 today

Was your kernel updated?  If so you need to rebuild the broadcom driver module.

There are two options for dealing with broadcom chips.

Option 1 is to use the proprietary driver (bcmwl kernel source) which must be rebuilt after each kernel update.

Option 2 is to use the b43 fw cutter reverse engineered driver.  This driver is kernel agnostic and it looks like your device is supported.  Might be worth using this driver instead of wl (bcmwl kernel source) as it will survive kernel updates.

http://linuxwireless.org/en/users/Drivers/b43/#Supported_devices shows your device is supported by the b43.


Try holding down shift and pressing the restart button at the same time. This will open up a BIOS menu, and within it there should be a setting to "boot from flash drive" instead of hard drive. Doing that should work.


Exit shell script in error handle function without exiting the terminal

Use bash's trap builtin to spawn a bash instance upon the script's exit:

trap 'bash' EXIT

From help trap:

trap: trap [-lp] [[arg] signal_spec ...]
    Trap signals and other events.

    Defines and activates handlers to be run when the shell receives signals
    or other conditions.

    ARG is a command to be read and executed when the shell receives the
    signal(s) SIGNAL_SPEC.  If ARG is absent (and a single SIGNAL_SPEC
    is supplied) or `-', each specified signal is reset to its original
    value.  If ARG is the null string each SIGNAL_SPEC is ignored by the
    shell and by the commands it invokes.

    If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell.

So by running trap 'bash' EXIT, bash will be read and executed when the shell receives the signal EXIT; spawning an interactive shell will consequentially have the effect of preventing the terminal from closing:

function error_exit
{
   echo "Error: ${1:-"Unknown Error"}" 1>&2
   exit 1 # This unfortunately also exits the terminal
}

trap 'bash' EXIT
# lots of lines possibly calling error_exit
cd somewhere || error_exit "cd failed"
rm * || error_exit "rm failed"
# even more lines possibly calling error_exit


Files, aka nautilus, has a feature where folders can be expanded in a tree view style in the main pane. Under "Preferences", check "Allow folders to be expanded" on the View tab.

If you are specifically looking for the traditional navigation tree in the left pane, you will need to move to another file manager, because nautilus dropped that feature some time ago. Both Thunar and PCManFM are excellent light-weight file managers that are GTK based, so fit well within a gnome environment, and that support tree view in the left pane. Alternatively, you can try forks of nautilus that maintained that feature, i.e. nemo, an early fork of nautilus 3, or caja, the continuation of nautilus 2. Which is the best? Very personal, so you probably should try them and decide for yourself.


Why is my wireless network adapter acting in a strange way? (Ubuntu 14.04)

Please open a terminal and do:

sudo cp /usr/lib/pm-utils/power.d/wireless /usr/lib/pm-utils/power.d/wireless.bak
gksudo gedit /usr/lib/pm-utils/power.d/wireless

When the file opens, make the following changes; I refer to the line number in the file on my 14.04 system:

Line 38: iwconfig_ac="power on" instead of off
Line 41: *) iwconfig_ac="power on" instead of off
Line 75: false) wireless_powersave on ;; instead of off

Spacing, spelling, etc. are crucial so proofread carefully. Save and close gedit. Reboot and check:

iwconfig

If this is unclear, I have posted my amended file here for reference: http://paste.ubuntu.com/8020443/

On my 14.04 system, after reboot, power management is on for both AC and battery.


tl;dr: update your grup installtion at MBR or EFI or make sure it is at least on the same version than your grub files in /boot.

Just had the same problem

error: symbol `grub_fshelp_find_file_lookup' not found

this tells you: your grub installation at the mbr or within EFI is outdated and does not match the new modules in /boot.

in my case, i have a Acer Aspire V3-372 Notebook that refused to boot anything other than /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi, no matter how i changed the EFI settings. So i had manually replaced this by the /boot/efi/EFI/debian/grubx64.efi binary. After upgrading from jessie to stretch, i had to copy grup over again.


LXD moving containers/snapshots to another drive

The big problem with LXD is that (currently) it only seems to support just one storage pool. In particular, this becomes somewhat of an issue if you would like to run part of your containers in one disk volume and part in another. Say, have some "fast" containers in an SSD volume and some "slow" containers in an HDD volume.

Should you wish to only run your containers in a single volume, the solution is simple as hell:

stop your containers
stop LXD (service lxd stop)
move your whole /var/lib/lxd directory to your new storage pool
create a symlink to your new storage pool
start LXD (service lxd start)
you're done

For instance, if you have your new storage mounted under /mnt/largepool in a subdirectory named lxd, then create the link like this:

ln -s /mnt/largepool/lxd /var/lib/lxd

This way, you will have your containers on your new storage volume.

Please beware that if you are using BTRFS or ZFS as storage backends, you might wish to create the necessary subvolumes on your new storage first, so your containers happen to be located in their own subvolumes. For instance, if you have btrfs and have containers named c1 and c2 and have the directory /mnt/largepool/lxd/containers already in place, before the actual moving of files, create subvolumes:

btrfs su create /mnt/largepool/lxd/containers/c1
btrfs su create /mnt/largepool/lxd/containers/c2

This would make it easy to create container snapshots afterwards.

I hope this information was helpful.


AUTHENTICATION ERROR after upgrade from 16.04 to 18.04

I had ensured that I had backed up my Ubuntu system and data files prior to upgrading to 18.04 and, in the absence of any concrete help, after some research re loading data and settings back into various programs I decided that I could afford to reinstall Ubuntu from a live DVD using the option to reinstall Ubuntu overwriting existing data - so that is what I did.
Slightly weird thing is it loaded Ubuntu on a 16GB partition and left all my existing data on a separate partition (400GB).
So, at last it is up and running - now I just (he says) have to reload some apps and set them up.


How to access Folder/Subfolders/Files using nested loops for file conversions?

Finally figured it out, most probably there is a more efficient/optimised way to do it, but for now whatever works. But ffmpeg didn't take spaces in names so had to rename all of them by replacing space with underscore.

In Videos folder which has the different tutorials, running this works -

for f in * ; do
  for g in "$f"/Main/* ; do
     ffmpeg -i "$g" -s 854x480 -c:v libx265 "$f"/Converted/$(basename $g)
  done
done

Here, $f gets the names of the folders, and then $g gets the names of the files themselves, along with their paths and extensions.


VLC is lagging when playing HD videos over my home network

Thanks "AbrahamVanHelpsing" for your replies and sorry for the delay.
I have finally fixed my issue and thought it may be helpful for others as well..

After struggling I found out that nothing was wrong with my VLC setup. I could actually just have left the default settings. The problem was my connection speed...

I was convinced that it wouldn't be the issue since my router is supposed to provide up to 150 Mbps (so nearly 20 MB/s). Well, as it turned out I was wrong... I checked my connection speed by transferring a file from my server to my laptop (using the scp command line) and was amazed to see a poor 970 KB/s transfer speed.

this rate was of course not enough. To watch a HD movie over a network you need at least 2.5 MB/s.

Following this article, I understood that it is advised to reboot your home internet connection from time to time. I then restarted my router and the problem was gone! The scp transfer was progressing around 5 MB/s, letting me smoothly watch my HD movies :)

Ps: I also installed XBMC and the result is just amazing!

Thanks again for your time and I hope this thread will be useful to others.

Chris


How can I check the information of currently installed WiFi drivers?

The following commands are run in a terminal. Open one by Ctrl+Alt+T.

To check what drivers your wireless adapter is currently using, you may run the following command:

sudo lshw -C network

lshw lists information on your hardware
-C network filters the output to only show the network class.

In the output, look for the entry with description: Wireless interface.

Here's the output from my Ubuntu:

alaa@aa-lu:~$ sudo lshw -C network
[sudo] password for alaa:
  *-network
       description: Wireless interface
       product: RTL8723AE PCIe Wireless Network Adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:08:00.0
       logical name: wlan0
       version: 00
       serial: 24:ec:99:21:c9:29
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=rtl8723ae driverversion=3.8.0-27-generic firmware=N/A ip=192.168.1.74 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
       resources: irq:17 ioport:3000(size=256) memory:c3000000-c3003fff

In the configuration line (line before last), you'll see the driver currently being used by my card. I've highlighted it in the output.

Alternatively, you can use the command:

lspci -nnk | grep -A2 0280

lspci lists information on your PCI connected cards
-nnk instructs lspci to output more information about these cards (including the driver being used)
| pipes the output to the next command
grep 0280 filters the output to show lines containing 0280, which is the PCI class code for wireless PCI controllers in Ubuntu.
-A2 shows two more lines of information.

Here's the output from my Ubuntu:

08:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723AE PCIe Wireless Network Adapter [10ec:8723]
    Subsystem: Realtek Semiconductor Co., Ltd. Device [10ec:0724]
    Kernel driver in use: rtl8723ae

Once you determine the driver you're using, you can use the following command to show more information about it:

modinfo <driver-name>

To check what wireless drivers you currently have installed, but not necessarily being used by anything, you can do the following command:

find /lib/modules/$(uname -r)/kernel/drivers/net/wireless -name '*.ko'

The above command will list all drivers you have installed. This will probably be an exhaustive list, because these are preinstalled drivers on your Ubuntu to make it possible for people to use their wireless drivers as soon as they install Ubuntu.


./variabletest requires the file you are running to be in the current directory. Run ls and see if variabletest is displayed, if not, cd to the directory where it is stored the run the program from there. If you are not sure where your file is located, run

  readlink -f (nameoffile here).

This command will show you the path to your file for example you can have

  /var/www/nameoffile

as the output. You the need to

  cd  /var/www

then run your programme from there.


ath10k driver not working, hence wifi adoptor QCA6164 not recognised

Follow the procedure from there: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1436940
and it will work

As a summary, and assuming you are on version 16.04, open a terminal:

 1. sudo rm -r /lib/firmware/ath10k/QCA6174/
 2. cd /tmp ; wget https://github.com/kvalo/ath10k-firmware/archive/master.zip
 3. unzip master.zip ; sudo cp -r ath10k-firmware-master/QCA6174/ /lib/firmware/ath10k/
 4. cd /lib/firmware/ath10k/QCA6174/hw2.1/ ; sudo mv firmware-5.bin_SW_RM.1.1.1-00157-QCARMSWPZ-1 firmware-5.bin
 5. cd /lib/firmware/ath10k/QCA6174/hw3.0/ ; sudo mv
    firmware-4.bin_WLAN.RM.2.0-00180-QCARMSWPZ-1 firmware-4.bin
 6. sudo reboot


Access files on Ubuntu PC from Windows PC

You can use Mobaxterm for this by using the target ip.

You can connect to your ubuntu machine from windows using ssh port. This Connects to ubuntu machine terminal directly and there you have access to all the files on ubuntu machine where with one click you can transfer files from Ubuntu to Windows and from Windows to Ubuntu.

There is no need for any extra applications on ubuntu machine. Just ssh port should be opened and work

In setup screen just enter your hostname or ip address with port 22 leaving username untouched if required. Then save and connect. It connects to your ubuntu machine using ssh port. It might ask for credentials for the first time. You can save them if you want, so for the next time just click the saved ip address and it will open ubuntu's terminal directly

You can access all the files on ubuntu machine using the side menu on side toolbar as shown on the below image


Which version is compatible with my 8 year old dell?

With specs like those I would say 12.04 32bit but you might want to try something lighter like Lubuntu or Kubuntu.

As for your second question I want to say no. You can open the documents with MS office formats using LibreOffice but I'm not sure that you can install that in Ubuntu.


Raring (13.04, not 14.04) is not available anymore, as it's not an LTS release and it's too old.

Change your sources to a newer version in /etc/apt/sources.list, then it should work again.

if you already got 14.04 sources in your sources.list, simply delete the raring entries.


I'd like to give for free several landscape images I made, to be used as desktop backgrounds in future releases

Contact one of the maintainers of Ubuntu's Wallpaper listed at  https://launchpad.net/ubuntu-wallpapers


A disk read error occurred on Windows after installing Ubuntu 12.10

Can you still boot to "Ubuntu"?

If so, start Ubuntu and navigate to GParted. Start it and use the program to check your Windows partition. Often GParted can fix these errors.

Good luck, BTW. You can also use GParted from a live CD/USB.


apt-file regex: find multiple packages at once using or

The problem is related to the source of files apt-file is matching. It uses the Contents files in /var/lib/apt/lists/, which do not contain the leading /.

# lz4cat /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_Contents-amd64.lz4 | grep httpd.exp
usr/lib/apache2/modules/httpd.exp               httpd/apache2-bin
usr/share/doc/lighttpd/expire.txt               universe/web/lighttpd-doc

So just skip the leading / in your regexp and you are fine. I also would recommend to escape dots \. since `.* only means to match any character. In this case it might give you the expected results, but only because there are no other matches.

# apt-file search --regexp 'usr/lib/apache2/modules/httpd\.exp|usr/lib/apt/apt\.systemd\.daily'
apache2-bin: /usr/lib/apache2/modules/httpd.exp
apt: /usr/lib/apt/apt.systemd.daily

The reason why it did work for apache2-bin: /usr/lib/apache2/modules/httpd.exp is because apt-file is taking care of leading slashes and removes them in the search pattern.

But this is only applied to the beginning of the pattern and it does not recognize the or operator and does not remove the leading slash from the second search part. The second search part /usr/lib/apt/apt.systemd.daily does not match because of the missing leading slash in the Contents file.

Addendum

as mentioned by N0rbert apt-file --regexp is using Perl Regular Expressions
the relevant part from man apt-file outlines the problem of this question in the BUGS, QUIRKS section

  The Contents files do not include a leading slash on paths.  This means that /bin/ls is listed as bin/ls in the Contents file.  If you are looking for something in a top-level directory, it is often better to omit the leading slash.

  The search algorithm will attempt to work around the leading slash, but it will not work in all cases.  As
         a workaround, try to pull the leading slash to the beginning of regular expressions.  For example, use
         "/(?:usr/bin/vim|sbin/lvm)" instead of  "/usr/bin/vim|/sbin/lvm".


Why do I need to run source command for .bashrc alias to get applied?

.bashrc is read only once, when bash starts. It is just so by design (and has always been). If you make any subsequent changes to .bashrc, they won't be applied until .bashrc is re-read. By running source .bashrc, you make exactly this - you tell bash to re-read that file.
Of course you can also start a new copy of bash (by eg. starting a new terminal session), this will cause the new bash process read the .bashrc file again (but there will be no changes in the old session).
BTW. .bashrc file is a script, and by sourcing it, you execute the commands placed in that file. The commands define aliases in your case, but there can be virtually any commands placed in that file.


A quick search for "mod_rewrite logging" gave me this URL which answers your question.

RewriteLog /home/path/to/desired/log/file.txt
RewriteLogLevel 5

For more information on how to configure Apache on Ubuntu, see Ubuntu Server Guide - HTTPD for details.


How Do I Get Rid of "Broken NVIDIA RandR detected, falling back to RandR 1.0"?

Install winetricks and run winetricks orm=backbuffer glsl=disable. This will fix the error mentioned.


Down load "pulse audio volume control", package name: pavucontrol;
Go to the Configuration Tab
Specify the HDMI port as Off


"'/usr/share/app-install/desktop/software-center.menu': Not a directory" error when trying to reinstall the software center

/usr/share/app-install/desktop/software-center.menu isn't supposed to be a directory, but a file.

Try removing it directly: sudo rm /usr/share/app-install/desktop/software-center.menu

Followed by a reinstallation: sudo apt-get --reinstall install software-center


Ubuntu does not start after 5.8.0.28 generic kernel update

Just keep using 5.8.0.26. Periodically check for a newer kernel version than the broken 5.8.0-28-generic by using:
$ ls /boot/vm*
/boot/vmlinuz-3.16.60-031660-generic    /boot/vmlinuz-4.14.188-0414188-generic
/boot/vmlinuz-4.14.110-0414110-generic  /boot/vmlinuz-4.14.70-041470-generic
/boot/vmlinuz-4.14.114-0414114-generic  /boot/vmlinuz-4.14.78-041478-generic
/boot/vmlinuz-4.14.120-0414120-generic  /boot/vmlinuz-4.14.89-041489-generic
/boot/vmlinuz-4.14.134-0414134-generic  /boot/vmlinuz-4.14.98-041498-generic
/boot/vmlinuz-4.14.140-0414140-generic  /boot/vmlinuz-4.15.0-126-generic
/boot/vmlinuz-4.14.153-0414153-generic  /boot/vmlinuz-4.15.0-128-generic
/boot/vmlinuz-4.14.165-0414165-generic  /boot/vmlinuz-4.4.0-197-generic
/boot/vmlinuz-4.14.170-0414170-generic  /boot/vmlinuz-5.0.1-050001-generic
/boot/vmlinuz-4.14.177-0414177-generic

Keep in mind my list is unusual.
When you see something newer than the broken version on your screen reboot and select the most current option of plain old menu option "Ubuntu" and see if it works OK.
You don't have to do anything special to get the newer version it installs with regular updates. You don't have to do anything special to delete the older versions other than sudo apt autoremove after you confirm the current newest version is working OK.

TL;DR
Ignore answers advising to purge just a single package. There can be many packages for a specific kernel version:
$ apt list | grep 4.15.0-126

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

linux-headers-4.15.0-126/now 4.15.0-126.129~16.04.1 all [installed,local]
linux-headers-4.15.0-126-generic/now 4.15.0-126.129~16.04.1 amd64 [installed,local]
linux-hwe-tools-4.15.0-126/now 4.15.0-126.129~16.04.1 amd64 [installed,local]
linux-image-4.15.0-126-generic/now 4.15.0-126.129~16.04.1 amd64 [installed,local]
linux-modules-4.15.0-126-generic/now 4.15.0-126.129~16.04.1 amd64 [installed,local]
linux-modules-extra-4.15.0-126-generic/now 4.15.0-126.129~16.04.1 amd64 [installed,local]
linux-tools-4.15.0-126-generic/now 4.15.0-126.129~16.04.1 amd64 [installed,local]

There is clearly more than just:
linux-image-4.15.0-126-generic/now 4.15.0-126.129~16.04.1 amd64 [installed,local]

installed as another answer suggests.
Let's say you try to remove just one:
$ sudo apt purge linux-image-4.15.0-126-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-hwe-tools-4.15.0-117 linux-hwe-tools-4.15.0-118 linux-hwe-tools-4.15.0-120
  linux-hwe-tools-4.15.0-122 linux-hwe-tools-4.15.0-123
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  linux-image-4.15.0-126-generic* linux-modules-extra-4.15.0-126-generic*
0 upgraded, 0 newly installed, 2 to remove and 59 not upgraded.
After this operation, 179 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 823126 files and directories currently installed.)
Removing linux-modules-extra-4.15.0-126-generic (4.15.0-126.129~16.04.1) ...
Purging configuration files for linux-modules-extra-4.15.0-126-generic (4.15.0-126.129~16.04.1) ...
Removing linux-image-4.15.0-126-generic (4.15.0-126.129~16.04.1) ...

Afterwards you still have:
$ apt list | grep 4.15.0-126

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

linux-headers-4.15.0-126/now 4.15.0-126.129~16.04.1 all [installed,local]
linux-headers-4.15.0-126-generic/now 4.15.0-126.129~16.04.1 amd64 [installed,local]
linux-hwe-tools-4.15.0-126/now 4.15.0-126.129~16.04.1 amd64 [installed,local]
linux-modules-4.15.0-126-generic/now 4.15.0-126.129~16.04.1 amd64 [installed,local]
linux-tools-4.15.0-126-generic/now 4.15.0-126.129~16.04.1 amd64 [installed,local]


The problem is (I think) is that you don't have sufficient permissions. If you are a sudoer, just run it again, except with sudo:

You need a "modeline", and then tell it to xrandr
To set your modeline, use cvt:

$ sudo cvt width height refreshrate

Example:

$ sudo cvt 1680 1050 60

Note: It probably isn't necessary to run sudo on cvt.

This gives you:

# 1680x1050 59.95 Hz (CVT 1.76MA)  hsync: 65.29 kHz; pclk: 146.25 MHz
Modeline "1680x1050_60.00"  146.25           1680 1784 1960 2240  1050 1053 1059.    1089 -hsync +vsync

Provide this to xrandr (example):

$ sudo xrandr --newmode "1680x1050_60.00"  146.25  1680 1784  1960 2240  1050 1053 1059 1089 - hsync +vsync

You will then add it to the possible resolutions:

$ sudo xrandr --addmode VGA-0 1680x1050_60.00

I hope this answers your question.


Do I still need the separate gnome packages in 17.10.1?

In your specific example, the network-manager package provides the system service, and network-manager-gnome provides the panel applet/indicator, and connection editing application.

You may still need it to edit VPN or Wireless configurations, for example, though I don't think the applet is used with gnome-shell.


passwd does not read passwords non-interactively e.g. via STDIN generated by pipe, as an alternative you can use chpasswd which reads password via STDIN but has a security issue.

The problem is chpasswd expects passwords to be given in clear text, following the format:

username:password

To make us somewhat less explicit we can save the passwords sequentially in separate lines in a file corresponding to the output given by the awk -F: '$3 >= 1000 && $1 != "nobody" {print $1}' /etc/passwd command. Remember you need to maintain the sequence of the output of the command while saving passwords in the file.

Then we can use paste to generate the format chpasswd wants on its STDIN.

For example:

paste -d: <(awk -F: '$3 >= 1000 && $1 != "nobody" {print $1}' /etc/passwd)\
          /password/file | sudo chpasswd

Here /password/file contains the relevant passwords.

As a safety measure, we can remove the /password/file file afterwards.


Why does Ubuntu's default screenshot app not work properly?

It sounds like you're seeing a race condition between the application redrawing after the orange selection mask is applied and the screen contents being captured.  So I would suggest filing a bug report.  Remember to say what desktop you're running (Unity 2D, Unity 3D, Gnome 3, etc) since the compositing features could affect the behaviour.

One work around would be to use one of the other two modes (whole screen or whole window), and crop the result with an image editor like Gimp afterwards.  Since these modes do not involve you masking an area of the screen first, you shouldn't run into this problem.


I'm using 16.04 LTS and was told today 18.04.1 LTS is available. Should I upgrade?

Changing upgrade options to Never is a good idea so that you don't accidentally click the Upgrade button when you aren't prepared.

The first thing you should know is no backup is made when you upgrade. So you should perform a full system backup. You can buy a 16 GB, 32 GB or 64 GB USB Flash drive for this purpose at a reasonable price.

The second thing you should do is search on 18.04 above in the Ask Ubuntu Search Bar and see all the other users that are having problems after upgrading. Be forewarned! Pay special attention to software you use and if it is supported or not.

The third thing tp be aware of is the new Gnome interface on the horizon and that stated intentions that the Unity interface you are used to is about to dropped in the next two to five years (or perhaps longer). This is a good chance to get a Live USB with 18.04 on it and play with the new interface for a couple weeks / months to see if you like it.

The fourth thing you can do, assuming you can shrink Windows enough, or have enough empty disk space is create a partition to clone your 16.04 to and run the 18.04 upgrade on the clone. This could potentially save you $$$ and time learning ahead of time that something is broken. I've created a script just for this purpose: Bash script to clone Ubuntu to new partition for testing 18.04 LTS upgrade

I hope many people take care upgrading to 18.04 and test it thoroughly before making the leap because it's saddening to see those who unwittingly plunge into chaos.

I've upgraded 16.04 to 18.04 many times since late April 2018 and I must say it is getting better each time but I still use 16.04 as my go-to OS 99% of the time.


using the downloaded upgrade packages from one laptop to another

I love this trick. It should work fine. Perhaps the files are owned by the wrong user. What I do is first install an ssh server on the machine with updates. sudo apt-get install openssh-server

The copy them into place from the other machine:

cd /var/cache/apt/archives
sudo scp <user>@<machine with updates>:/var/cache/apt/archives/* .

The dot tells scp to put them in the current directory.


HP Proliant can not reboot on ubuntu 18.04.2 server

I found something out on older HP DL360 servers from Gen8 going backwards. The interesting thing is that I've tried this THREE times. This work-around works!
Load Ubuntu 16.04...FIRST.
THEN...do a release upgrade to 18.04.
Again, I've tested this THREE times.  All THREE times were successful.
I have 3 DL360 Gen7, 2 DL360 Gen8, 1 DL320 Gen6, 7 DL320 Gen3.  This solution works on both DL360 and DL320 servers.  NOTE: The DL320 Gen3 are OEM'd as Cisco WAVE-574 servers. Simply remove the internal USB, load Ubuntu or CentOS, and...voila! BTW, CentOS 7 does work on all of these versions of DL360s and DL320s.  I've not tried loading CentOS 8 yet...that's next.
Hope this helps...  ;)
-rad


How to block everything except http(s) and DNS in iptables?

As you should know, ufw itself is somehow a front-end for iptables, it's a program for managing a netfilter firewall.

If you are not really good at using iptables I strongly suggest using ufw instead. you can even use gufw, a graphical interface to use ufw even easier than it's already is.

Is ufw safe?

I can assure you that by using ufw you are safe, because it's the same thing with a lot of predefined and reliable rules to protect your machine.

By default it's allow outgoing connections and denies incoming ones, so for example no one can ssh into your machine.

Lets have a look around:

First make sure ufw is disabled:

sudo ufw disable

Now lets remove all iptables chains and rules:

sudo iptables -F
sudo iptables -X

And use iptables -L to have look at default iptables chains and rules, which should be three chain and all of them are accepting everything.

lets enable ufw:

sudo ufw enable

Now if you have a look at iptables rules using iptables -L, you will see a lot of rules has been set by ufw to protect you, which they are good enough to relay on.

Also, if you run: sudo ufw status verbose, you'll get a simple output that tells you whats going on:

Status: active
Logging: off
Default: deny (incoming), allow (outgoing), disabled (routed)

How to block everything except http(s) & DNS using iptables?

If you insist to use iptables, first disable ufw then remove all chains and rules using -F and -X switches.

sudo ufw disable
sudo iptables -F
sudo iptables -X

Policies:
Then we should set policies. policies are default behavior, when a packet does not match to any rules that been defined, these policies will be applied on them:

sudo iptables -P DROP INPUT
sudo iptables -P DROP OUTPUT
sudo iptables -P DROP FORWARD

Then to allow outgoing DNS:

sudo iptables -A OUTPUT -p udp --dport 53 -j ACCEPT

And to allow outgoing http(s):

sudo iptables -A OUTPUT -p tcp --dport 80 -j ACCEPT
sudo iptables -A OUTPUT -p tcp --dport 443 -j ACCEPT

Finally, we are going to only allow related and established incoming traffics:

sudo iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT


Can I plug a Ubuntu Laptop into a Ubuntu Laptop?

Yes you can
The orange Ethernet cable is a crossover cable. The purpose is to create an Internet of just two computers. Assuming the two laptops have Ethernet ports, you can do that.
Note: You don't need a special crossover cable with any recently built computers. Any standard Ethernet cable will do. The Ethernet sockets are now smart enough to connect two computers directly with a regular Ethernet cable.
Since the two laptops are not setup to dynamically assign IP addresses to the other, (something normally done by routers) you will have to setup static IP addresses for both. You can do this in the Network Manager.
Once you got the local networking figured out, you can use various ways to access either specific folders, or mount partitions.

To mount a partition (or partitions) see Network File System
and Setting up NFS: How to.
To share a folder within your home folder, see the Ubuntu to Ubuntu
part of this answer.

Hope this helps


VBoxClient: VBoxClient (seamless): failed to start. Stage: Setting guest IRQ filter mask Error: VERR_INTERNAL_ERROR

Virtual Box and Guest Additions v6.0.6 has released and fixed this problem
(For v5.x.x, it would be v5.2.28 or later).

Update Virtual Box Guest Additions on Guest OS,
following Virtual Box and Guest Additions update on Host OS.


Try to activate the wifi module

sudo ifconfig wlan0 up

or connect your pc with the ethernet cable and then install the proprietary drivers.


I want to update apache 2.4.7 to 2.4.25, will it destroy my current configuration?

In my case I had modified one of the system configs so apt-get asked me if I want to keep my changes or not. I chose to see the differences and it was 1 modified line.


What package places thumbs into .local/share/previews

It's the Unity Dash. If you right-click on a file in the Dash, a bigger preview is created, which is placed in this folder to speed up loading the next time.

You can test this by right-clicking an image or video file in the Dash and then see the newly created thumbnail in the folder.


Resize partitions Meizu MX4 Ubuntu edition

this is happening because  the volume you gotta shrink or expand is the one u are using ( is mounted ) you better use a Live distro in order to do so....sysresccd ( http://www.sysresccd.org/)

basically make a live usb of that distro ....and u will be able to modify
your partition ....keep in mind that u can't edit mounted partitions
and u can't un-mount partitions being used by the sys op you running.


How can I make the unity sidebar visible permanently (as in, in all circumstances) in unity 2D?

There are a couple of dconf settings you can use to control the launcher auto-hide capabilities.

12.04 & 11.10

To make the launcher always visible:

dcom write /com/canonical/unity-2d/launcher/use-strut true
dcom write /com/canonical/unity-2d/launcher/hide-mode 1

12.04

In 12.04 you can control this behaviour in a GUI.

As the picture shows - firefox overlaps the launcher but the launcher doesnt hide because the default is not to autohide.

Linked Question:

How do I configure Unity 2D?


14.04 Not authenticating on chsh command

PAM has a pretty tight hold on chsh. As you can see form /etc/pam.d/chsh, it's doing a check:

# This will not allow a user to change their shell unless
# their current one is listed in /etc/shells. This keeps
# accounts with special shells from changing them.
auth       required   pam_shells.so

There's also a man page for this check (man pam_shells) which tells us the following:

pam_shells is a PAM module that only allows access to the  system if the users shell is
listed in /etc/shells.

It also checks if /etc/shells is a plain file and not world writable.

So by the sounds of it, you don't have a /usr/bin/zsh line in /etc/shells. Let's add one:

echo $(which zsh) | sudo tee -a /etc/shells
chsh -s $(which zsh)

Either that or your current shell isn't listed on there. If you're stuck on something like rbash, that might not be a listed example and that might stop you from changing shell.

I tested (removed the zsh line from /etc/shells, loaded zsh and tried to chsh) but saw a very different error message:

You may not change the shell for 'oli'

So it's probably not this.


The question should be "BSD vs Linux" (Gnu/Linux), If you read a little bit about their history you get a really better Idea how they are differ from each other, I  suggest having a look at these Wikipedia pages:

FreeBSD
GNU Project
Linux Kernel
Linux distribution

Typically Ubuntu is a Gnu/Linux based distribution, while freeBSD is a whole operation system from BSD family, they both are unix-like.

Linux distributions like Ubuntu are more bleeding edge which makes them a better option for home users, also Linux supports of hardware is much better than of BSD (sooner support of new hardwares).

Most of desktop environments and softwares are available for both of them, however in my opinion installing software in Linux distributions is much easier and faster than FreeBSD which most of the softwares should be installed by port system (source code). there are also binary packages available for FreeBSD which don't get regularly updated as I remember, I might be wrong).

Other nice articles to read:

10 differences between Linux and BSD
whats is the difference between Linux and bsd
Linux vs. BSD: Which Should You Use?


Ekiga
It might work for you - it is the FOSS alternative to Skype.


Cinnamon and Nemo has several dependencies that other packages that you might have installed use:

apt-cache depends cinnamon nemo
cinnamon
  Depends: gir1.2-clutter-1.0
  Depends: gir1.2-glib-2.0
  Depends: gir1.2-gmenu-3.0
  Depends: gir1.2-gtk-3.0
  Depends: gir1.2-muffin-3.0
  Depends: gir1.2-networkmanager-1.0
  Depends: gir1.2-soup-2.4
  Depends: libatk1.0-0
  Depends: libc6
  Depends: libcairo2
  Depends: libcanberra0
  Depends: libclutter-1.0-0
  Depends: libcogl-pango12
  Depends: libcogl12
  Depends: libcroco3
  Depends: libdbus-glib-1-2
  Depends: libgdk-pixbuf2.0-0
  Depends: libgirepository-1.0-1
  Depends: <libgjs0-libmozjs185-1.0>
    libgjs0c
  Depends: libgjs0c
 |Depends: libgl1-mesa-glx
  Depends: <libgl1>
    libgl1-mesa-glx
  Depends: libglib2.0-0
  Depends: libgnome-desktop-3-4
  Depends: libgnome-keyring0
  Depends: libgnome-menu-3-0
  Depends: libgstreamer0.10-0
  Depends: libgtk-3-0
  Depends: libjson-glib-1.0-0
  Depends: libmozjs185-1.0
  Depends: libmuffin0
  Depends: libnm-glib4
  Depends: libnm-util2
  Depends: libpango1.0-0
  Depends: libpolkit-agent-1-0
  Depends: libpolkit-gobject-1-0
  Depends: libpulse-mainloop-glib0
  Depends: libpulse0
  Depends: libstartup-notification0
  Depends: libx11-6
  Depends: libxfixes3
  Depends: libxml2
 |Depends: dconf-gsettings-backend
  Depends: <gsettings-backend>
    dconf-gsettings-backend
  Depends: gconf2
    gconf2:i386
  Depends: python
  Depends: cinnamon-common
  Depends: gnome-session-bin
  Depends: gjs
  Depends: gnome-settings-daemon
  Depends: gsettings-desktop-schemas
  Depends: gnome-icon-theme-symbolic
  Depends: gkbd-capplet
  Depends: gir1.2-accountsservice-1.0
  Depends: gir1.2-gconf-2.0
  Depends: gir1.2-gkbd-3.0
  Depends: gir1.2-gnomebluetooth-1.0
  Depends: gir1.2-gnomedesktop-3.0
  Depends: gir1.2-cogl-1.0
  Depends: gir1.2-gdkpixbuf-2.0
  Depends: gir1.2-pango-1.0
  Depends: gir1.2-polkit-1.0
  Depends: gir1.2-upowerglib-1.0
  Depends: gir1.2-caribou-1.0
  Depends: gir1.2-javascriptcoregtk-3.0
  Depends: gir1.2-webkit-3.0
  Depends: libjs-jquery
  Depends: python-gconf
  Depends: python-lxml
  Depends: python-dbus
  Depends: python-imaging
  Depends: python-pyinotify
  Depends: mesa-utils
  PreDepends: multiarch-support
    multiarch-support:i386
  Recommends: gnome-control-center
  Breaks: gnome-control-center
  Breaks: gnome-control-center:i386
  Conflicts: cinnamon:i386
nemo
  Depends: desktop-file-utils
    desktop-file-utils:i386
  Depends: gsettings-desktop-schemas
  Depends: gvfs
  Depends: libglib2.0-data
  Depends: nemo-data
  Depends: shared-mime-info
    shared-mime-info:i386
  Depends: libatk1.0-0
  Depends: libc6
  Depends: libcairo-gobject2
  Depends: libcairo2
  Depends: libexempi3
  Depends: libexif12
  Depends: libgail-3-0
  Depends: libgdk-pixbuf2.0-0
  Depends: libglib2.0-0
  Depends: libgnome-desktop-3-4
  Depends: libgtk-3-0
  Depends: libnemo-extension1
  Depends: libnotify4
  Depends: libpango1.0-0
  Depends: libx11-6
  Depends: libxml2
  Suggests: eog
 |Suggests: evince
  Suggests: <pdf-viewer>
    acroread-bin:i386
    okular
    epdfview
    evince
    evince-gtk
    gv
    viewpdf.app
    xpdf
    zathura
 |Suggests: totem
  Suggests: <mp3-decoder>
    mpg123
    mpg321
    opencubicplayer
    vlc
    vlc-nox
  Suggests: xdg-user-dirs
  Recommends: eject
    eject:i386
  Recommends: gvfs-backends
    gvfs-backends:i386
  Recommends: librsvg2-common
  Recommends: <nemo-fileroller>
  Conflicts: nemo:i386

So to remove them you must remove them one by one checking that no other packages has explicit dependency of them. Non explicit dependencies are Recomends and Suggests.

About the error it might be that you (or Cinnamon/Nemo) have shared a directory that it couldn't share and now you are seeing this "error". The solution is find what directory is this renaming it or just drop the sharing as stated here.


Can't boot after a dd, BIOS reports no bootable drives

Did you format either drive and ensure that they are marked as bootable? There is usually a flag that marks a disk bootable. You may want to check that with the liveCD or liveUSB


Why hasn't 14.04 (64-bit) claimed my Intel PRO/100 VE ethernet connection?

So I manged to fix this problem myself by recreating the bootable USB stick with a different tool and reinstalling from scratch. I did try two installations from the previous bootable USB stick with same results.

As I used the same verified ISO I can only assume that it was the tool I used to create the bootable USB stick (although I don't understand how/why). I won't name/blame the tool I used though. I think it was probably down to using an old version and/or choosing the wrong options when creating it.

Moral of the story: Use a simple and up to date tool for creating bootable USB stick. Probably best to go the one most recommended in your distributions doc! What worked for me was Ubuntu 'Startup Disk Creator'.


let's check out unetbootin you could do it with your senses.


Ign (Ignore) means that it will ignore the repo, if there is no change in a repo it will say Ign. Anyway it's nothing wrong, it is the way it should be. This simply indicates that nothing has changed in that repository since you last checked.
A Hit just means that it did a request, and found out that the file hadn't been updated.


Can I transfer my mdadm Software raid to a new system in case of hardware failure?

I actually had to do this recently. psusi is correct, they do transfer, although simply installing mdadm did not work on my particular installation.

I had to do the following:

#install the raid manager
sudo apt-get install mdadm
#scan for the old raid disks
sudo mdadm --assemble --scan
#all turn up present, but both appear as device md0
#move the disks that don't appear in scan to md1
sudo mdadm --assemble /dev/md1 /dev/sdf1 /dev/sdd1

I also updated my mdadm.conf to reflect the change in the second array moving from md0 to md1.

Your mileage may vary.


Why to use ordinary kernel if there's realtime one?

Realtime kernels can guarantee a certain response time to a process. For example the process has to read each 10ms the values from an control system. In realtime you can assure that no value is dropped.

If you  don't operate some kind of manufactoring control system, you simple don't need it.

The overall system performance may be better if the kernel has not to guarantee every process a time slice in a period. (Better I/O utilization, lower process switch overhead etc etc)

To sum up: Realtime does not increase the throughput of a system.


How do I repair my software RAID5 disks?

It looks a bit like you managed to knock off all four drives from the array?  I think you get some kind of achievement badge. :-)

You should be able to just re-add them to the array:

sudo mdadm /dev/md1 --re-add /dev/sd[bcde]

Then watch cat /proc/mdstat to see it rebuild them.

See man mdadm for more.


Will converting my first partition to EXT4 make me lose boot info?

Answering my own question. As I found out, boot flags are a windows thing, so Ubuntu wouldn't bother about them in any way. Deleting the partition and recreating a EXT4 in it's place worked perfectly fine and didn't change anything in terms of booting the system.


virtualbox installation through apt gets stuck on ubuntu 18.04 bionic beaver

turns out, disabling secure-boot did the trick. hence the question is resolved.


ubuntu Terminal takes too long to load - only first time

Add this line to the top of .bashrc and .profile:

set -x

and set +x at the bottom of those two files

Edit: I should've added an explanation of what these two commands do.
Bit late, but here they are.


On Ubuntu Pulse Audio is designed to run in userspace. Running Pulse Audio as a service in system wide mode is possible but not recommended as it may cause too many other issues, and other applications in userpace (e.g. Avahi) or applications that rely on pulseaudio in userspace  can not communicate with the sound server.

Only in case we run Pulse Audio as a user configuration files in ~/.config/pulse/ will be read. Otherwise only settings from /etc/pulse are valid. Therefore any changes to settings of Pulse Audio running in system-wide mode can not be defined in any user's HOME.

The recommended way to temporarily suspend pulseaudio for running Wine with ALSA would be:

pasuspender -- wine <options) <windows-program>

To stop pulseaudio running as a user we can issue

pulseaudio -k

This can also be included in a script or alias. Per default pulseaudio will then immediately respawn. If we had disabled this we start pulseaudio simply by

pulseaudio

Settings from ~/.config/pulse will overriding global settings in /etc/pulse if present.
Note that we do not need (and should not use) root permissions for both commands.


Try to install and run it to the home folder (for example into ~/Software/matlab) without root privileges.

Previous versions such as R2008b work normally. For such installation you can create the following desktop-file:

cat << EOF > ~/Desktop/matlab.desktop
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/home/$USER/Software/matlab/bin/matlab -desktop
Name=MATLAB
Icon=/home/$USER/Software/matlab/X11/icons/matlab64c_icon.xpm

EOF


How can I check how much space specific packages occupy?

Could not resist expanding a bit, completely based on heemayl's concept, to make a script with two options:

Only output the (total) size of an installed package (but without its dependencies, since dependencies are practically always shared, so which package should have it on its "account"?)

an example:

    $ check_size gimp
    6644.1K

or:

Produce a more verbose report on the directories, the files, their sizes and total size of installed files (obviously most lines are skipped):

    $ check_size gimp --verbose

    Directories:
    ====================
    /usr/share/man
    /usr/share/man/man1
    /usr/share/menu
    /usr/share/pixmaps
    /usr/share/python
    /usr/share/python/runtime.d

    Installed files:
    ====================
    48K /usr/lib/gimp/2.0/plug-ins/sample-colorize
    5,5M    /usr/bin/gimp-2.8
    52K /usr/lib/gimp/2.0/plug-ins/curve-bend
    52K /usr/lib/gimp/2.0/plug-ins/file-psd-load
    52K /usr/lib/gimp/2.0/plug-ins/filter-pack
    52K /usr/lib/gimp/2.0/plug-ins/pagecurl
    52K /usr/lib/gimp/2.0/plug-ins/video
    56K /usr/lib/gimp/2.0/plug-ins/color-rotate
    56K /usr/lib/gimp/2.0/plug-ins/file-ps
    56K /usr/lib/gimp/2.0/plug-ins/print
    56K /usr/lib/gimp/2.0/plug-ins/selection-to-path

    Total size:
    ====================
    6644.1K

How to use

Copy the script below into an empty file, save it as check_size in ~/bin (or elsewhere in $PATH), without language extension.
Make the script executable
If you just created the directory ~/bin, run source .profile, or log out / in.
Run it by either the command:

check_size <package>

for just the size, or:

check_size <package> --verbose

for the verbose information

The script

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

files = []; drs = []; sizes = []
get =  subprocess.check_output(["/bin/bash", "-c", "dpkg -L "+sys.argv[1]]).decode("utf-8").splitlines()
for l in get:
    if os.path.isfile(l):
        info = subprocess.check_output(["du", "-h", l]).decode("utf-8")
        sizes.append(float(info.split()[0].replace("K", "").replace(",", ".").replace("M", "")))
        files.append(info)
    else:
        drs.append(l)
try:
    if sys.argv[2] == "--verbose":
        print("\nDirectories:\n"+20*"=")
        for l in sorted(drs):
            print(l)
        print("\nInstalled files:\n"+20*"=")
        for l in sorted(files):
            print(l.strip())
        print("\nTotal size:\n"+20*"=")
        print(str(sum(sizes))+"K")
except IndexError:
    print(str(sum(sizes))+"K")


How can I mount an external drive with the permission to execute programs from it?

Your problem is not related to mounting points or permissions.

You need to install ia32 library because Linux 64-bit adt bundle comes with a 32 bit adb.

Try this:

sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5


You can try removing the fgrlx, installing the freefem and then reinstalling the fgrlx.


I can't get my Broadcom BCM4331 wifi on 14.04 to work

I just copied the driver information from the lspci command, and searched it on this site. I found the answer in Wi-Fi working on Macbook Pro 8.2 on Ubuntu 12.04.

I had to change a few things to make it work for me. Here's what I did:

Run the following in the terminal:

sudo apt-get install b43-fwcutter firmware-b43-installer
sudo dpkg-reconfigure firmware-b43-installer

And a lot of extracting will happen.

Then enter:

dmesg | tail -2

You'll get a response like this:

[ 5866.172626] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 5870.282827] applesmc: FS! : read arg fail


mount drive at boot attached to asus wireless router

This row from fstab works fine on my kubuntu 15.10

//192.168.1.1/usbRouter /home/user/myshare cifs username=<yourusername>,password=<yourpwd> 0 0


I just went through this myself, I was able to fix it by doing:

sudo apt-get purge nvidia-*
sudo ubuntu-drivers autoinstall
reboot


Ubuntu 14.04 doesn't detect my second monitor

I found the solution : I just used an adapter VGA to DVI between my second monitor and my computer and it's ok now.


Set custom resolution which is not native from monitor

What Terrance said.  Your monitor likely will not do it and display either a blank screen or a jumbled mess.  You might or might not be able to recover, depending upon whether the monitor survives the abuse.

Easiest way to play with your monitor's capabilities is under Windows -- anything from XP on up.  Right click on the desktop and follow the links to monitor settings.  After you change settings, you will get a yes/no dialog box to keep that resolution.  If your experiment fails and you can't see the box, Windows will revert to the previous setting after a few seconds.

If Windows recognizes the make and model of your monitor, you might not be allowed to set a resolution outsied the monitor's known capabilities.

Again, as Terrance said, you could fry the monitor hardware, depending on how good its built-in abuse defenses are.


Okay, found the culprit.

It was 'dhclient' that was running in the background which was fetching DHCP address and updating the interface configs!!

Found this out by trial and error.

Would be great if i could figure this out from any of the system logs, that indicates dhclient process trying to update the configs. This would have saved time to troubleshoot! Where can I look for such logs?


Will BIOS boot mode Ubuntu install be able to boot when firmware "Fast Boot" is "Ultra Fast"?

Ultra Fast no longer boots BIOS mode Ubuntu
When changing "Fast Boot" from "Fast" to "Ultra Fast" (BIOS+MBR) indeed Ubuntu does no longer boot in its text console.
Boot enters the ASRock UEFI Setup Utility instead
That is a luck. Now there is no need to clear the CMOS to enter the Setup utility again, just change the "Fast Boot" value and reboot.
Ultra Fast requires EFI/UEFI mode Ubuntu
After converting the existing Ubuntu installation from CMS/BIOS boot into EFI/UEFI boot the same machine is able to boot Ubuntu using Ultra Fast boot mode. Access to UEFI setup utility is no longer possible using F2 or Del key combinations during boot.


Does the full disk encryption in the Ubuntu 18.04 installer encrypt all partitions?

"Full" Disk encryption

I was eager to give 18.04's Full Disk Encryption a try.

With previous versions of Ubuntu, Full Disk Encryption did not work with flash drives.

After making an encrypted install to USB I examined the results with both Disks and GParted.

The encrypted extended partition was fully encrypted. Swap is a file within this partition, (and not a partition on it's own), and thus is also encrypted.

The Boot partition is not encrypted. The disk must first be booted before it can be decrypted.


when a .war is deployed in Glassfish, what's the path to WEB-INF?

Use /WEB-INF/duke.gif

However, you need to access it as a resource from the servlet context.

In your JSP:

<%
   ServletContext ctx = request.getServletContext();
   InputStream stream = ctx.getResourceAsStream("/WEB-INF/duke.gif");
%>

I hope this helps...


I have the same problem with Thunderbird 68.10.0 and Enigmail 2.1.8 on Ubuntu 18.04.5. The system is up-to-date.
The following works for me:

kill all thunderbird instances
start thunderbird in safe mode with add ons disabled

$ thunderbird --safe-mode
check "Disable all add-ons"
click "Continue in Safe Mode

disable the enigmail plugin via the plugin administration

Tools->Add-Ons->Enigmail disable

restart thunderbird in normal mode, it should not freeze anymore.
activate the Enigmail plugin again via the plugin administration

    Tools->Add-Ons->Enigmail enable

It works for the current session, after a restart with enabled Enigmail add on there freezes again.


Can't install KDE on Ubuntu minimal 16.04

The right command is

  sudo apt-get install kde-core

If you want KDE + all the softwares that goes with it ( like Konqueror ) use

  sudo apt-get install kubuntu-desktop

Let me know if it worked.

- - -EDIT- - -

The first command no longer works since Kubuntu 9.10 release

Maybe this can help Help installing kubuntu-desktop on Ubuntu 16.04


Dualbooting Windows 8.1 Pro and Ubuntu 13.10

Boot into the Ubuntu live cd and use gparted (sudo apt-get install gparted). You can resize the windows partition, then boot windows and it will auto-run a disk check before login, because it will detect the size change.


Installing ubuntu without DE but only Zoom video conference app?

Yes it is possible to run Zoom without a desktop environment, but obviously, you need more than a text console. The application will expect a graphical stack to run on, so you need xorg or wayland. The application will expect to connect to audio and webcam, so you need that set up as well.
That might actually be relatively easy when the software is packaged as a .deb installer, because then, the APT system automatically can pull in all required dependencies.
Having a lightweight desktop environment installed still will make life easier, against only a very small extra overhead.


Cron job not running for a specific user for nodejs

The error message means that something you are trying to run is a script which most likely has the following shebang line:

#!/usr/bin/env node

Essentially, this means "find the first executable file called env in this user's $PATH". The PATH variable holds the list of directories that contain executables. The problem is that cron has its own environment, and therefore its own PATH, and that does not include the directory where the node command is. So you need to edit your crontab file and change it like this:

PATH="/usr/bin:/bin:/home/user/.nvm/versions/node/v11.6.0/bin"
33 * * * * /home/user/.nvm/versions/node/v11.6.0/bin/feeder nodename priv_key

Make sure you add the directory and not the file. So if your node is /home/user/.nvm/versions/node/v11.6.0/bin/node, you need:

PATH="/usr/bin:/bin:/home/user/.nvm/versions/node/v11.6.0/bin"

and not:

PATH="/usr/bin:/bin:/home/user/.nvm/versions/node/v11.6.0/bin/node"

Then, save the crontab and you should be fine. If your un into similar problems, repeat the procedure: redirect the stderr and stdout to a file by apending > /tmp/somefile 2>&1 to the end of the cron command, check the error message and add the directory containing whatever else it needs to the path in a similar way:

PATH="/usr/bin:/bin:/path/to/node:/some/other/path"


What are there so many Ubuntu 14.04 LTS AWS AMIs for the same release?

AMIs are static images and cannot be changed. Even if they could be updated, they shouldn't be (at least not the public AMIs).

The reason for this is that automated deployments rely on precisely-known infrastructure and environments. Suppose I have a piece of code that is dependent on some library that is pre-installed on the AMI, and I know that that code works with the current AMI. If I create a CloudForamtion template to launch an instance with that AMI id and run that piece of code then it should always work. Forever.

However, if the AMI was allowed to be "updated" and that update causes the library to be changed, then my code may or may not be compatible with the latest version of the library, potentially causing the code to fail. It doesn't matter if the library update was done with good intentions (i.e. a bug fix); it needs to be the decision of the application writer to update the AMI, and not the AMI maintainer.

If you are using something like CloudFormation to manage your environment, then the AMI ids will be stored in your templates (ideally version controlled!) and updated if and when you are ready to test a new version. Compatibility with a new AMI should be tested just as thoroughly as you would any new feature.


Ubuntu 18.10 broken and crispy font rendering issues

The use of Font Manager didn't help the situation much. Use the Tweaksapplication, and make the settings look like this...


How do I install Ubuntu on a Chromebook?

There's a Chrome app called Crouton that lets you do this without removing ChromeOS, but your device has to be in Developer Mode first, which means that your device is in an unsafe mode so I wouldn't recommend it unless you know exactly what you are doing and are aware that this could potentially break your device.

That said, good instructions for enabling developer mode and running Ubuntu can be found at this link. on HowToGeek.


how to set Eclipse workspace to specific folder by default

Eclipse stores it's UI preferences in <eclipse_home>/eclipse/configuration/.settings/org.eclipse.ui.ide.prefs. The parameters in that file are described in the online documentation (for Luna) here But basically you need to set three parameters:

RECENT_WORKSPACES=/your/workspace/location
SHOW_RECENT_WORKSPACES=false
SHOW_WORKSPACE_SELECTION_DIALOG=false

Setting the bottom two parameters to false causes Eclipse to automatically load the first workspace from the RECENT_WORKSPACES value.


The cause is the driver support on Linux: less optimized drivers are the culprit.

I'd advise you to install TLP: it's great for managing power and  its out-of-the-box settings are good to go.


How to disable the default apache server

Running the following command should work:

service {apache2,httpd} stop

and you may also run:

chkconfig apache2 off


In /etc/xdg/autostart you should see a .desktop file for every indicator, its name will begin with 'indicator'.
Here's an example of a bluetooth indicator (indicator-bluetooth.desktop):

[Desktop Entry]
Type=Application
Name=Indicator Bluetooth
Exec=/usr/lib/x86_64-linux-gnu/indicator-bluetooth/indicator-bluetooth-service
NoDisplay=true
StartupNotify=false
Terminal=false
X-Ubuntu-Gettext-Domain=indicator-bluetooth

Open the .desktop file that corresponds to the indicator you want to remove, and find the 'NoDisplay' line and change the value to true (as in my Bluetooth example).
If the line does not already exist, you can add it.


"no ums support in radeon module" error when booting to the Ubuntu 16.04.1 installer with nomodeset on 2011 MacBook Pro

BIOS provides VESA graphics support but this is low resolution. When an OS loads it switches to User-space Mode Setting to provide better graphics. (UMS) But 10 years ago it was decided that Kernel Mode Setting (KMS) was preferable to UMS. It took a lot of work to do but but all modern hardware (like Nvidia and AMD/ATI cards) now support ONLY KMS. An older machine can still do UMS but only with legacy drivers. I don't know if your macbook GPU has UMS or KMS (but I would guess it is KMS.) See this link:
http://www.phoronix.com/scan.php?page=news_item&px=MTI2ODA

The Linux kernel got more aggressive and now does KMS for Grub (so that the splash screen can have high res graphics!) Sometimes this causes problems. Using the nomodeset boot option prevents loading of KMS until after Grub hands off control to the main kernel.

I have a newly built quality machine. It boots many different distros but won't do Ubuntu 16.04. I get the 'black screen'. I edited the boot options to eliminate all options EXCEPT ro and added nomodeset. (At a minimum, eliminate splash.) Now it boots fine. But I do see the "no UMS support in Radeon module warning" in my boot log. I think this is a bug in the kernel used by Grub. Try booting with only the ro and nomodeset boot option. (And, if that works, you will have to edit your grub file again after Ubuntu is installed to make the change permanent.)


First start the ubuntu and update you GRUB(booting in ubuntu) by running the following commands:

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

and visit:-
http://www.howtogeek.com/114884/how-to-repair-grub2-when-ubuntu-wont-boot/

Try to install window8 in different partition and run type "msconfig" -> select boot option and manage your boot list of window8 or ubuntu .

You can also try easyBCD software for booting.


Is an online Ubuntu terminal emulator available?

A perfect solution for your demand to "play around with some terminal commands from official Ubuntu packages" would be to use the LXD demo server that lets you try out the LXD container hypervisor, which is available for installation in the Ubuntu repositories. With LXD you can use a system container running on top of the bare metal installation of the Ubuntu operating system.

LXD demo server specifications are :

Limit of 30 minutes per session
Limit of 5 sessions per IP
2 shared CPU cores
512 MB of dedicated memory
10 GB of dedicated disk space
IPv6 only network connectivity

Example from an Ubuntu 16.04 system container running on top of the Ubuntu 16.10 system :

cl@cl-uw-1:~$ lxc start uc-1604-1
cl@cl-uw-1:~$ lxc exec uc-1604-1 bash
root@uc-1604-1:~# xmodmap
The program 'xmodmap' is currently not installed. You can install it by typing:
apt install x11-xserver-utils
root@uc-1604-1:~#

Example from performing the same on the evaluation LXD 16.04 LTS server operating system :

As you can see, you are able to play around with commands on original Ubuntu without having to install anything. This can be done (for free) from where ever you are just by using a web browser. Open the
LXD demo server in the web browser, accept the terms of the service and start using it.

If you like and want to use LXD containers on your system, just execute : sudo apt install lxd
Learn more about LXD in the documentation and in the comprehensive blog post series from the the technical lead and upstream project leader for LXC / LXD at Canonical Ltd. - Stéphane Graber.


What is the default icon set in Ubuntu 16.04?

Ambiance GTK is the default theme and Ubuntu Mono (dark) is the default iconset

(Ubuntu tweak tool can be used to change it if you want to match Ubuntu with your QT)


Hp Pavilion DV5 doesn't remember brightness settings across reboots

open up the system settings and goto ----> SCREENS then set the brightness level
hope this will help


Closing laptop lid suspends Lubuntu, since upgrade

It's a confirmed bug.

This trick work for me (Lubuntu 13.10):

Set "HandleLidSwitch=ignore" in "/etc/systemd/logind.conf" and restart.

source: https://bugs.launchpad.net/ubuntu/+source/xfce4-power-manager/+bug/1222021


How to get back unity webapps to firefox integration?

Your solution got me thinking. It might be very easy to edit out their mistakes. Now...

Disclaimer: I don't use webapps. I installed Youtube for the purpose of solving this issue. This may not work with all webapps, you will have to try each one and post in comments so we can work it out together if you can't on your own. I post this as an answer because comments are way to short.

Let's start from the top, the command you call to run a webapp is called unity-webapps-runner. I don't know how it operates, I don't know how to fix it. What I do know is that you can very easily replace it with a bash script that launches Firefox. I am not a pro bash scripter, but this works:

#!/bin/bash
for i; do
if [[ $URL = "1" ]]; then
firefox $i;
exit;
fi
if [[ $i = "-d" ]]; then
URL="1";
fi
done

What the script does is that it will wait until the -d argument appear and take the next argument as a URL for Firefox.

Save this file in your ~/ directory as unity-webapps-runner and make it executable. Rename unity-webapps-runner in /usr/bin/ to something like unity-webapps-runner-classic. I presume you know you need root permissions for these actions and I presume you have knowledge concerning these particular procedures. Paste your ~/unity-webapps-runner to /usr/bin/ and try to launch a webapp, Youtube first to see that I haven't tricked you.

That should be it. Now it will launch a tab/new window in Firefox instead of the Ubuntu Browser. You could ofc replace firefox in the bash script with chromium or google-chrome or any other browser to make them launch instead.


You can't test a lens without installing it.  If you don't want to do that on your system you can always use a VM.

You can use DFeet to watch what's going on over DBus, but it does require a fairly good understanding of what should be going on over DBus to make sense of it.


dpkg: is it ipossible to split ${shlibs:Depends}?

You can do this by specifying the appropriate arguments to dpkg-shlibdeps; in your case, something like

dpkg-shlibdeps -dDepends -emain_binary \
               -dRecommends -esolib1.so -esolib2.so ...

Then use ${shlibs:Depends} and ${shlibs:Recommends} in the appropriate locations.

If you’re using dh overrides, use

override_dh_shlibdeps:
        dpkg-shlibdeps ...

You’ll find a (somewhat more complex) example of this in the Wine package. That runs dh_shlibdeps again because its dpkg-shlibdeps override only handles one package.


can't set up java for R under ubuntu 14.10

I think I've solved this situation:

Based on a comment from steeldriver , I dug into the Software Center and added several "add-ons" to the gcc installation.  I suspect that adding either libc6-dev or gcc-multilib was what I needed.

On a related note of probable interest to R users who want to install JGR : I had to install at least one of  libpng12-dev, libpng3 , and libpng++dev to get the package png to install (in R), which is required for JGR to install.


The easy answer is: don't have so much swap.

When you really run out of memory (as in, you've used all RAM and swap), the kernel will invoke it's out of memory killer, which (in many situations) will kill off the offending program. As long as you still have swap space, the kernel thinks everything is fine. If you can't use 4G of swap usefully, don't provide 4G of swap.

There are only two situations I can think of, where lots of swap is useful:

hibernation. And that's not very reliable on many machines, suspend is usually more reliable, and rebooting is usually faster.
Programs with big memory leaks (so you can safely swap out the leaked memory, as it's not being very useful in RAM)

More hints:

logging in on a VT (Alt-F1) is usually faster than trying to start gnome-terminal, when you are thrashing.
There's a magic SysRq keypress for invoking the OOM killer.


How to block a common user use startx command?

The propably simplest way is to change the ownership of the startx binary (normally in /usr/bin/startx) in a way that only the owner (root) can execute that file. You can do this e.g. by entering sudo chmod 0744 /usr/bin/startx into a terminal.


can't open eclipse internal web browser after set MOZILLA_FIVE_HOME

The package for WebKit might have been updated to a new version in your current Linux Ubuntu distro. For example, as said here https://www.eclipse.org/swt/faq.php#browserlinux , it is called something like libwebkit2gtk. You might want to search for such a package with a package manager like synaptic or from the command line with apt-cache search


Multiple OpenVPN server instances on a single machine

It is, assuming you have static IPs. You simply provide them what address they should listen on in their config file.

local a.b.c.d

That line should be missing or commented out by default, causing the daemon to listen on all available interfaces.

If your IPs are dynamically assigned, there is not built-in way that I know of, and you'll probably have to resort to updating the config file in ifupdown scripts.


Failed install of 14.04 computer shut down during install but after download

Recover Pictures

First item of business is to recover high-value files.  You haven't specified how you managed the boot partitions, or if you're using GRUB as the boot manager.

It is my hope that only the Ubuntu partition is damaged.

Remove the installation media (CD/DVD/USB) and try to
boot.
If GRUB is functioning, you'll have to toggle through choices about which OS to boot, choose Windows 7.
Insert a blank dvd or attach USB storage, whatever - and offload (backup) your important items.

Re-Attempt Installation

Use Ubuntu to manage your partitions and delete the partially-installed Ubuntu partition
Reinstall Ubuntu 14.04 by having your computer connected to stable power or an UPS
I also recommend that you connect to internet via ethernet cable because USB Wireless will lose functionality during the install process.

This will allow updates to be downloaded during the install
It may also allow for driver's to be automatically installed


Wifi is not working on Lenevo G50-70 UBUNTU 14.04 LTS and no harware detection

This is an example how to view your Wifi device. Example taken from http://ubuntuforums.org/showthread.php?t=2240673&page=2

danielmartin@danielmartin-Lenovo-G50-70:~$ sudo lshw | grep [Ww]ireless ; sudo lspci | grep [wW]ireless
[sudo] password for danielmartin:
description: Wireless interface
product: RTL8723BE PCIe Wireless Network Adapter
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=rtl8723be driverversion=3.13.0-34-generic firmware=N/A ip=192.168.1.72 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter
danielmartin@danielmartin-Lenovo-G50-70:~$

There are also temporary and permanent fixes you can do quoted from the same thread.

A temp fix is to run:

sudo rmmod rtl8723be && modprobe rtl8723be

If this works, you can make it automatic by creating a conf file as follows -

touch Desktop/modules

This will create a file named "modules" on your Desktop. Now open it with your text editor, and put (copy-paste) the following line in it -

SUSPEND_MODULES="$SUSPEND_MODULES rtl8723be"

Proofread, save and close the file. Now copy it to the location where it should be -

sudo cp Desktop/modules /etc/pm/config.d

Reboot > suspend > resume, and let us know if it worked. Basically, it tries to do the same thing as the combination of the rmmod/modprobe commands sotiris2 suggested, only automatically and elegantly.


Print errors for Brother HL-5340D on Ubuntu 12.10 / 13.04

I was hitting this exact same issue today when trying to print PDFs. I was also using the Br-Script3 driver but switched to the Brother MFC9840CDW Foomatic/Postscript driver.

I would rather use the (correct) former driver, but it appears to be an issue that has not been resolved and this is an adequate workaround for my purposes.


How to remap keys in Ubuntu 18.04 (GNOME Shell)

Using xkb worked.

Edit this file: /usr/share/X11/xkb/symbols/pc. Don't forget to use sudo with something like sudo -i gedit /usr/share/X11/xkb/symbols/pc

It'll be fairly straight forward what's going on in there. Key is defined on the left, and effect is defined on the right. Maintain the indentation and all that.

Should work for any kind of remapping.

You'll need to log out and back in (or use the following commands) for changes to take effect:

setxkbmap fr # if you are using french azerty layout
setxkbmap us # if you are using US qwerty layout
... And so on


15.10 Window Manager don't load properly

After fiddling around for some hours I got tired of searching which config was the problem (as the other user worked fine) and just backed up my old home directory by renaming it, creating a new one instead - reboot and done.
A fresh start where I took from my old folder just the configurations I needed for some applications.


Nvidia problem with Vostro 3700 in Maverick

Try to install bumblebee to have both the Intel and Nvidia cards working simultaneously:
https://launchpad.net/~hybrid-graphics-linux

sudo apt-get install git
# type password
git clone http://github.com/MrMEEE/bumblebee.git
cd bumblebee/
sudo ./install.sh
optirun glxgears
# check the speed and compare to running:
glxgears
# If you have google-chrome installed, you can try it with/without optirun and report the FPS values on the mailing list:
optirun google-chrome http://webglsamples.googlecode.com/hg/aquarium/aquarium.html


How to remove this title bar off window from gnome-shell?

Simply add this extension to get rid of the title bar and reclaim your screen space:

https://extensions.gnome.org/extension/723/pixel-saver/

It has the added benefit that you still get maximise/minimise buttons but these are now stowed away in the top panel.


Trouble creating 3TB ext4 partition due to msdos-partition-table-imposed error

The traditional partition table format used on PCs includes a 32-bit field to record the number of sectors a particular partition covers.

With 512 byte sectors, this sets the maximum partition size at 2TB (512 * 232).

If you need a partition larger than 2TB, you will need to repartition the drive using the GUID Partition Table (GPT) format for the disk.  If you are not trying to boot off this new disk, you are unlikely to run into any compatibility problems.

Using GParted, you can do this by going into Device->Create Partition Table and select "gpt" from the list.


Convert Ubuntu 20.04.2 LTS to Ubuntu Studio

The process of Ubuntu Studio installation is straight-forward.
You need to install relevant main task-package by
sudo apt-get install ubuntustudio-desktop^

If you know your own creativity area, then install more tasks:

Task Package
Purpose

ubuntustudio-audio^
Audio recording and editing suite

ubuntustudio-fonts^
Large selection of font packages

ubuntustudio-graphics^
2D/3D creation and editing suite

ubuntustudio-photography^
Photograph touchup and editing suite

ubuntustudio-publishing^
Publishing applications

ubuntustudio-video^
Video creation and editing suite


Is it possible to UNDO a (failed) partition cloning made with the dd command to an external hardrive?

Not really.

Cloning writes raw blockdata to your drive, making it extremely hard to recover information if you choose a bad path.

That said, you might be able to send it off to a professional data recovery team, but that's expensive and there's no guarantee that it'll work.

To recover your drive to a usable state, simply open up GParted or your Disk utility and create a new partition on your drive.

Recovering data itself might be possible in very rare conditions, if by some miracle you stopped the clone before it reached into a second partition. If this is the case, you'd just have to rebuild the partition tables in their exact position. Unfortunately, this is harder than it looks and is usually impossible.

Finally, there have been some reports of photorec working, but that isn't the norm. YMMV.

dd is very often and aptly referred to as Disk Destroyer. Take extra care when using that command.


No, apt-get is not deprecated. The man page of apt has this to say about apt vs. apt-get (and apt-cache):

  SCRIPT USAGE AND DIFFERENCES FROM OTHER APT TOOLS

  The apt(8) commandline is designed as an end-user tool and it may change behavior between versions. While it tries not to break
         backward compatibility this is not guaranteed either if a change seems beneficial for interactive use.

  All features of apt(8) are available in dedicated APT tools like apt-get(8) and apt-cache(8) as well.  apt(8) just changes the
  default
         value of some options (see apt.conf(5) and specifically the Binary scope). So you should prefer using these commands (potentially
  with
         some additional options enabled) in your scripts as they keep backward compatibility as much as possible.

apt also gives a warning that says

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

if it detects there is a pipe. For example:

$ apt show python | grep Package

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Package: python
APT-Sources: http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

As for your questions,

  do i have to replace all apt-get commands with apt?

No, you don't have to replace apt-get with apt. Rather if you were using it in scripts, you should stick to apt-get because it has a stable CLI API and guaranteed backward compatibility.

  is apt-get dangerous?

apt is as dangerous as apt-get: you should only install software from sources you trust.

  can i use apt in Ubuntu 15.10?

Yup, you can. The problem here is you are still using Ubuntu 15.10, which is now unsupported! Please upgrade to 16.04, which is a LTS version.

  will my programs still work?

By programs, I assume you mean scripts. Yes, they will still work since apt-get is not deprecated. In fact, you should prefer to use apt-get in scripts for backward compatibility as suggested by apt's man page.


Unable to connect to Ubuntu 14.04 guest from Ubuntu 14.04 host in VirtualBox

It depends on how you have set up networking in Virtualbox between the host and the guest. The two most common set-ups are NAT or Bridged.

In the NAT (Network Address Translation) case you will have to set up port forwarding to access the guest from your host. AFAIK, this is the default for Virtualbox and you will likely be using that if you have not changed the network settings when you creted the VM (Virtual Machine).

Setting up Port Forwarding is not difficult, but how it works is more difficult to understand than using Bridged. In NAT mode, the guest uses the IP address of the host.

The easiest is to use Bridged. You have to set this up when the virtual machine is turned off. Go to the Network tab in Virtualbox for the VM and set the Attached to: field to 'Bridged Adapter' and start the VM.

In Bridged mode the VM gets its own IP address on your network (via DHCP).

After the VM has started, log in and give the command ifconfig in a terminal window. This should give you the IP address of the guest machine.
You can then SSH from your host to the guest: ssh <username>@<guest IP>.

Alternatively, after the VM has started, log in give the command hostname in a terminal window. This should give you the hostname of the guest machine.
You can then SSH from your host to the guest: ssh <username>@<hostname>.

You can omit username@ if you want to ssh using the same username as on your host.


you can use xbacklight and set a custom shortcut using your brightness down key to use xbacklight.
You can do that as follows
run the following command in your terminal (Ctrl+Alt+T)

sudo apt-get install xbacklight

Under system settings -> keyboard -> shortcuts -> custom shortcuts add the following custom shortcut.

xbacklight -[percentage]

Replacing [percentage] with a number. I would suggest 5.

A different way to do it is using Oblitum.
This program will change the /sys/class/backlight/intel_backlight/brightness file for you.
To install it follow these instructions

run go get github.com/oblitum/backlight

the tool is the single generated executable installed under $GOPATH/bin.

There's a .desktop file that should be copied to ~/.local/share/applications/ and a corresponding svg icon that should be copied to ~/.local/share/icons/backlight/.

Please, edit the .desktop file with a text editor for setting the correct icon path. This must be a fully expanded path.

There's a backlight.sh script to relax file permissions of the backlight system files. It should be copied to /etc/init.d/ and after that the command sudo update-rc.d -f backlight.sh defaults 99 should be executed for registering the script to execute on boot.

I hope this helps although it's a bit late


problem to install webdm on Ubuntu Core 16

webdm was the previous name of snapweb.

Try instead:

snap install snapweb


You cant install ecofonts to replace your fonts automatically because the software is made for Windows only but you can use the TTF installed in the windows version to be used on your documents:

Make a new directory /usr/share/fonts. Can be /usr/share/fonts/miscttf.
copy the ttf from the install package to that folder.
Update the available ttf fonts on your system using ttmkfdir mkfontdir fc-cache /usr/share/fonts/miscttf

Or you can just double click on the ttf file and click install:

How do I install fonts?

After that you will be able to use the ecofonts on your documents and print them instead of the normals ones available.


The modinfo on the other Linux distribution shows me it's still on Linux 2.6.33. The driver you refer to is removed in recent Linux versions:

commit b0006e69615868f3dfdfe2bd64eb11973f1208fc
Author: Christian Lamparter <chunkeey@googlemail.com>
Date:   Fri Mar 25 20:21:55 2011 +0100

    ar9170usb: purge obsolete driver

git branch -a --contains b0006e69615868
  remotes/origin/HEAD -> origin/master
  remotes/origin/linux-3.0.y
  remotes/origin/linux-3.1.y
  remotes/origin/linux-3.2.y
  remotes/origin/linux-3.3.y
  remotes/origin/linux-3.4.y
  remotes/origin/linux-3.5.y
  remotes/origin/linux-3.6.y
  remotes/origin/linux-3.7.y
  remotes/origin/master

This indicates to me that ar9170usb was removed from 3.0 onwards. I think it will be hard to get this module into a recent Ubuntu release.

So, taking a step back, getting the newer driver fixed seems a bit more constructive. In case you're on Ubuntu 12.04, try the backported Quantal kernel linux-image-generic-lts-quantal package. If that doesn't fix it or if you're on Quantal already, try a more recent "mainline" kernel to see if your issue is fixed "upstream". This answer explains how to install pre-built mainline kernels in Ubuntu.


Xlib: extension "GLX" missing on display ":0". Asus k53s

Completely disabling the Nvidia GPU , then installing bumblebee, plus mesa glx and gl libraries worked, however now I have a GPU which is useless.  Thus, if anyone has a fix that allows use of the GPU, even if for other applications such as GPU accelerated software (CUDA or OpenCL) , or some graphics based applications.  Otherwise it seems pointless to even have a Gforce on the PC, when everything seems to work perfect with ATI software, and now synaptic available openCL headers, etc...


I don't have the option to install Ubuntu alongside Windows 7; which partition can I delete?

Note that deleting a partition will delete all data on that partition. So first of all, copy your files on the last partition to other partitions.

Then when installing Ubuntu, choose Something Else and select that last partition for Ubuntu. Format it to ext4, and select the / mount point.


Reboot only shuts down and doesn't actually boot again

Turns out the problems was related to Intel AMT and the "mei" driver (solution found here ).

Putting this into /etc/modprobe.d/blacklist.conf fixes the reboot issue,

blacklist mei


Are there any packages lets one to learn shell interactively via terminal?

fish is as close as possible to what you want. Simply install fish with:

sudo apt install fish

and run it:

fish

While it doesn't give you tutorials, it is by far the most beginner-friendly shell


Simply choose your / partition ( dev/sda6 ) and click on resize and add some of the unallocated space to there the tool GParted is perfect for that. Since Linux kernel version 2.6 you can resize / even without reboot, but If the unallocated space comes before /, then you will have to boot from a Live CD or USB and move your / to somewhere before the unallocated space. To make a Live CD or USB you can use the "Startup Disk Creator" utility which comes pre-installed on Ubuntu.

You can also have a look at this more detailed question/answer:

How to extend my root (/) partition?


Lots of people ask this question between mid-December and the first week of January when a lot of the development team steps away from the keyboard to enjoy some time doing other things, like spend time with family. Updates generally resume around the 10th of January most years so long as there are not major security vulnerabilities discovered over the holidays. If you haven't seen anything by January 15th, then it's time to investigate.


Turn on num lock before request for passphrase to unlock full encrypted disk

You should enter your BIOS before booting and there should be an option allowing you to turn on numlock at startup.


How do I get a 4k monitor on DisplayPort 1.2 to show as one screen?

I'm working on the same issue with a Panasonic TC-L65WT600, and while I haven't found a perfect solution, I came across this workaround that did somewhat work for me.

Add the line

Option "Xinerama" "1"

to your xorg.conf Section "ServerLayout".

This is counterintuitive, because in effect this breaks both Xinerama and RandR. The NVIDIA driver has its own implementation of Xinerama and RandR, and by enabling the regular Xinerama extension, it conflicts with NVIDIA's implementation, the effect being both are disabled.

I haven't tested this thoroughly to see if it breaks anything else, but it's worth a try as a temporary workaround...


Wifi doesn't work after suspend after 16.04 upgrade

16.04 runs on systemd. Try the following:

sudo systemctl restart network-manager.service

If this works, you can create a script to automate it.

Open a terminal and type the following:

sudo nano /etc/systemd/system/wifi-resume.service Now paste the script in there with a right click. Exit with CTRL + X and press Y to save. Now to activate it: sudo systemctl enable wifi-resume.service

Script:

#/etc/systemd/system/wifi-resume.service
#sudo systemctl enable wifi-resume.service
[Unit]
Description=Restart networkmanager at resume
After=suspend.target
After=hibernate.target
After=hybrid-sleep.target

[Service]
Type=oneshot
ExecStart=/bin/systemctl restart network-manager.service

[Install]
WantedBy=suspend.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target

Hope this helps. It works on my laptop.