What is the way to submit a patch to fix all the damage that LP: #600941 causes?

First thanks for all the bug work you've done up until now. Its great that you'd like to get involved with fixing this bug!

The best way is to report a new bug against precise, and make it clear that it is a regression caused by LP:#600941. Give it the tag 'regression-updates'. It would also be good to mention it in the comments of LP:#600941, so that users will see that when they are investigating hitting the regression themselves. The regression-updates tag will ensure that your bug is triaged and responded to quickly. So yes, first start with this:

ubuntu-bug nagios-nrpe-server

Since it affects all releases, it doesn't matter where you do this (better that you do it on a platform you can leave alone so you can verify fixes).

Right now precise ISO's probably aren't installable, but you can try them here:

http://cdimage.ubuntu.com/daily/current/

You can also take an oneiric machine onto precise by editing the sources in /etc/apt/sources.list* and changing oneiric to precise, then doing apt-get update && apt-get dist-upgrade. There are transitions and big changes going on though, so don't do this on a production system!

To submit the fix, the best way is to use Ubuntu Distributed Development. Assign the bug to yourself, and then use these steps:

bzr branch lp:ubuntu/nagios-nrpe
cd nagios-nrpe
<edit files that need editing>
dch -D precise -i 'Fixing regression caused by bug 600941. (LP: #XXXXXX)'
debcommit
bzr push lp:~nutznboltz/ubuntu/precise/nagios-nrpe/fix-lpXXXXXX
bzr lp-propose

XXXXXX is your new bug #

You can find more about how to do this at https://wiki.ubuntu.com/DistributedDevelopment

Please don't hesitate to come ask in #ubuntu-devel and/or #ubuntu-server on Freenode as well.


How to override persmissions on my external HD?

See if you can try changing the ownership of the drive:

sudo chown -R username:username /media/mount-point(drive name)

Edit: if you are having a Read Only issue reference this post:
external hard disk READ ONLY


How To install fingerprint-gui on new Lenovo Ideapad-520-15IKB in Ubuntu or Linux Mint?

It seems that some device is deactivated by BIOS Setup
see dmesg | grep -i tpm

Setup BIOS to enable 'Security Chip', and the fingerprint sensor device in 'Security' section and in 'I/O ports' section.

With my (old) Lenovo Thinkpad i had to edit the bios setup from 3 distinctive section areas.


Trying to install 13.04 and computer won't detect bootable USB drive as a bootable USB drive

First things first here. If the machine keeps re-booting, then there is either a problem with the hardware or a driver that is loading when Windows boots. If you have recovery media for Windows, suggest you try to boot with that first to determine what may be happening. If the hardware is somehow in a bad way, no amount of "just reinstall or install something else" will resolve the issue.

Does your BIOS have the option to make sounds when it fails on POST? If so, and that is turned off, enable that option and restart the machine. The POST (power-on self test) errors are there to make noise for a reason. They let you know if hardware is failing, but many manufacturers turn it off to prevent end-user complaint.

Have you tried grabbing the GParted bootable ISO and loading that? At least you might see how the machine sees your hardware. Would also suggest trying the Ultimate Boot CD as a way to boot into your hardware and run diagnostic tests. There are a number of utilities that can provide assistance.

Once you have run the tests, you will hopefully have an answer as to the root cause of the failure. Sometimes, a bad driver can cause this (from a recent install) or failing memory or a hard disk failure. Once you determine the issue that way, you can properly take action to recover your system.


Arista Transcode turns subtitle to gibberish

It was not Arista's fault. When I re-encoded the srt file in UTF-8 (using an online encoding service) the problem was gone. So apparently for some reason some of the strings were not properly encoded in UTF-8.


How to use VirtualBox on a Ubuntu Server without any desktop

These are the steps for creating an Ubuntu virtual machine:

Create virtual machine

VBoxManage createvm --name Ubuntu10.10

Create hard disk

VBoxManage createhd --filename Ubuntu10.10 --size 5120

Register the virtual machine

VBoxManage registervm '/home/user/VirtualBox VMs/Ubuntu10.10/Ubuntu10.10.vbox'

Set OS type

VBoxManage modifyvm Ubuntu10.10 --ostype Ubuntu

Set the memory or RAM (in MB)

VBoxManage modify Ubuntu10.10 --memory 512

Create a storage controller

VBoxManage storagectl Ubuntu10.10 --name IDE --add ide --controller PIIX4 --bootable on

Note: --add is for adding type of system bus like ide/sata/scsi/floppy

--controller is for choosing type of chipset
--bootable says if the controller is bootable

Attach the storage

VBoxManage storageattach Ubuntu10.10 --storagectl IDE --port 0 --device 0 --type hdd --medium "filename"

Note: filename is the ISO image location, like

/home/user/Downloads/ubuntu-10.10-desktop-i386.iso

Add features you may need

VBoxManage modifyvm Ubuntu10.10 --vram 128 --accelerate3d on --audio alsa --audiocontroller ac97

set the type of networking

VBoxManage modifyvm Ubuntu10.10 --nic1 nat --nictype1 82540EM --cableconnected1 on

Note: options include none, null, nat, bridged, intnet, hostonly, vde

Start the virtual machine

VBoxManage startvm Ubuntu10.10

In summary

create a named virtual device
create a virtual hard drive
register the virtual machine
set OS type
set RAM
create and set storage controller
Attach storage
Add features
set networking type
start machine

And you can always Google it to find other resources.

Official source
Unofficial source


Here is a guide to public key authentication with Putty.


How to install KDE Plasma without installing full Kubuntu Desktop?

As DK Bose said, I tried executing this command:

~$ sudo apt-get install plasma-desktop

And voila, it worked! It certainly does. It neither installed full kde-desktop, nor installed any more annoying apps nor modified my bootup configuration. I'm now using KDE without any problems, and the best part is my PC doesn't slow down.

Thanks to DK Bose and the Ask Ubuntu community who put efforts to solve my problem. I appreciate their efforts.


Send or Move a window from one monitor to another with a shortcut key under Ubuntu 12.04 and nvidia 8600 GT without proprietary nvidia drivers

If you're using Compiz (used with Unity 3D), there is a nifty plugin that does exactly that, and also moves windows to different parts of the monitor, if desired.

I only know how to set it from CCSM (CompizConfig Settings Manager). You can install CCSM and the compiz plugins by running

sudo apt-get install compizconfig-settings-manager compiz-plugins

The CCSM plugin is called "Put", and is in the "Window Management" section of CCSM.

Enable the "Put" plugin by checking it. Next click the "Put" plugin. You can set a shortcut key in the "bindings" tab for "Put to Next Output".  By default, it's disabled, but is easy to set. In this example we've set "Put to Next Output" to Super+Right and "Put to Previous Output" to Super+Left.

If you are not familiar with CCSM, you can get it from the standard repository, but be warned... it can be dangerous to play around with certain settings that you don't understand, so be careful.  I've used it a lot over many versions, and can't live without it, but it allows you to chop off your foot if you're not paying attention.  don't be too afraid, but don't think it will protect you from yourself.

More info on Compiz: http://wiki.compiz.org/


What spelling dictionaries does Ubuntu use?

Some apps are using a common dictionary (such as Evolution, which use aspell-* packages). Some apps are using their own dictionary, such as Libreoffice, which uses libreoffice-l10n-[language code] and language-support-writing-[language code] packages.


Launcher for a specific Chromium profile in Xubuntu?

You can select the profile to use from the command line with the --profile-directory option:

chromium-browser --profile-directory="Profile 1"
chromium-browser --profile-directory="Default"

To know the list of available profiles look into ~/.config/chromium:

$ ls ~/.config/chromium
./                            Profile 1/
../                           Safe Browsing Bloom
Certificate Revocation Lists  Safe Browsing Bloom Prefix Set
Channels                      Safe Browsing Cookies
chrome_shutdown_ms.txt        Safe Browsing Cookies-journal
Crash Reports/                Safe Browsing Csd Whitelist
Default/                      Safe Browsing Download
First Run                     Safe Browsing Download Whitelist
Local State                   Safe Browsing Extension Blacklist
pnacl/                        Safe Browsing IP Blacklist

Source: http://peter.sh/experiments/chromium-command-line-switches/


After searching the web several times for some minutes, the best page I found was this

It explains the remapping of keys for keyboard layout colemark. But it can be used with QWERTY/QWERTZ, too.

The remapping of above forum posting gets done with the command line tool setxkbmap.

Update: I did not use setxkbmap, since it felt like a tool from the last century. Today (year 2016) Linux has IBus. But up to now I found no time to solve my idea with ibus.

There is a tool which looks promising (ibus typing booster). But I have not tried it up to now.


The renderer key tells netplan what backend to use. The options are networkd, NetworkManager, and sriov.
You have an example that does not match the errors you show: you have renderer: networkd in your yaml. So what is NetworkManger supposed to be in your notices? That is an invalid backend as it is missing an "a". Plus not what you have in your yaml.
If you want NetworkManager to handle the configuration of the connection your file should have only this:
network:
  version: 2
  renderer: NetworkManager


Add Google Chrome to Default Applications

I solved it! Somehow I had a corrupt google-chrome.desktop in my ~/.local/share/applications/ folder. I found the file in /usr/share/applications/ was valid. After deleting the bad one in my ~/.local/share/applications/ folder, logging out and back in, everything is back to normal. I can select Google Chrome from Default Applications and everything is golden.


Virtualbox * No suitable module for running kernel found [fail]

I am also running ubuntu 14.04 with kernel 3.19.0. What worked for me was manually grabbing the .deb package from virtualbox for vbox 4.3.34.

This can then be installed 'sudo dpkg -i /path/to/deb/file'

Hope this helps


Dell Inspiron 3551 Unresponsive Touchpad

You can fix it by switching off i2c_hid  and setting nopnp in boot parameters this way

Run

sudo -H gedit /etc/default/grub

In the open window edit line

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

it should look this way

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.nopnp"

Save file and run

sudo update-grub
Run

echo "blacklist i2c_hid" | sudo tee /etc/modprobe.d/i2c-hid.conf
sudo depmod -a
sudo update-initramfs -u
echo "synaptics_i2c" | sudo tee -a /etc/modules

Reboot.


Problem in installation of Ubuntu in Virtualbox

your iso image is 64 bits, you need to download a 32 bits "x86".
Good luck


Does the multiarch feature in 11.10 mean the death of force--architecture installs?

There is indeed no need for --force-architecture anymore with multi-arch support with a some notes:

The libraries on which the package depend must support Multi-arch
Even if multi-arch is supported, it's possible for a library package to make the system install either the 32-bit version or the 64-bit one, but not both. So, the package in question should not have a need to depend on such a library unless there is no 64-bit equivalent necessary.
Many packages from third-party websites do not set the necessary dependencies. Before multi-arch, a dirty hack called ia32-libs was created. This would contain the 32-bit libraries for multiple packages, and therefore it was easy for the maintainer to say "just install the ia32-libs package." In most cases, the dependencies are mentioned for the 32-bit sysems, so you should install those, but for the 32-bit architecture by adding :i386 after each package as in:

sudo apt-get install libgl1-mesa-glx:i386 libc6:i386


You have to run tcpdump with sudo or as root, else it wont be able to acces the network interface in promiscuous mode. And if you want to monitor anything else that intheface 0, you have to use -i option.

So something like:

sudo tcpdump -i wlan0

would do it. Use

ifconfig

to see which network interfaces that are configured. And

iwconfig

to identify which one is WiFi.


I am having a problem running Exodus Wallet on Ubuntu 17.10

1.sudo apt-get install libgconf2-4
2.run exodus


Which 14.04 distro for Core2 Duo with 4 GB RAM? 32 bit?

I would recommend reading For better performance should I install 32-bit or 64-bit? and I installed a 64-bit OS in a 32-bit processor

But the truth is, if you do not have the following hardware specs ready, 64 bit is not for you yet:

CPU is 64 bit capability
Motherboard that supports 64 bit (It should if the CPU is 64 bit)
At least 4 GB of RAM. IF you have less than 4 GB it is recommended to stay on 32 bit because 64 bit will not have a optimal performance.

To test this out, simply insert the Live Ubuntu DVD/USB on your computer and see if it runs. If it runs and you see the desktop, then you have a 64 bit capable CPU. If you get a architectural error then you can only use the 32 bit version of Ubuntu.

Another way to check this is to run the lscpu command. Here is what mines look like:

cyrex@cyrex:~$ lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    2
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 60
Stepping:              3
CPU MHz:               800.000
BogoMIPS:              6811.87
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              8192K
NUMA node0 CPU(s):     0-7

If you see the line that says CPU op-mode it shows that it supports 32 bit and 64 bit. The Architecture line shows what Ubuntu arch I am using at the moment, which would be the 64 bit one.

Lastly, I am sure (I might be wrong so please correct me) that all Core 2 Duo are 64 bit capable. I just checked all Core 2 Duo Processors and none of them were 32-bit only. I checked all 2006, 2007 and 2008. So if you could add what model your CPU is, it would help more.

If I am correct, then for your case I recommend 64 bit. You have 4 GB of RAM and a good CPU for Ubuntu 64 bit.


'/home/ron/.npm/bin' not a valid identifier

The error is on line 24 of your ~/.profile file:

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/ron/dev/npm/bin: /home/ron/.npm/bin

Specifically, it's the space you have here:

... /usr/local/games:/home/ron/dev/npm/bin: /home/ron/.npm/bin
                                           ^
                                           |---- Space, bad!

So, open that file (run nano ~/.profile in a terminal) and remove the space:

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/ron/dev/npm/bin:/home/ron/.npm/bin

While you're at it, you can also remove the 1st of the two export PATH... lines. You only need the second.


Is sharing the root folder with write access with a virtual machine dangerous?

Usually the purpose of a VM is to isolate a system from the host. If you're sharing the entire file system, I see not much profit in using a VM any more.
 If guest and host OS are the same, just use the host. If they're different, probably a dual-boot setup would be better.

From the security aspect: as soon as you make the host disks or file systems accessible to the guest, malware on the guest can access and infect or destroy it as well.


Installing non-standard fonts in xubuntu 13.04

By default, if you choose "Open with", Firefox downloads the file in /tmp.

By default, if you choose "Save file", Firefox downloads the file in the Downloads subdirectory of the home.


Boot-Repair --- recovering Ubuntu after installing Windows 8

When you install Windows, it thinks it is the Only operating system on your computer so it replaces GRUB with it's own boot-sector. Try upgrading ubuntu from a live USB or CD. It had worked for me with Ubuntu 12.04 LTS. Good Luck !


Sound not working after installing ubuntu 12.04 LTS on compaq presario v3000 (32 bit)

Include pci=realloc kernel parameter in boot loader, It will fix sound, wireless and CPU overheating.


You do not need to use the command line or program in Linux any more or less then any other OS. If you wish to do so, you may find it easier.

Many Ubuntu users never program or use the command line.

For the most part, Python is the same on any OS.

One thing you should understand, however, is Linux is not a drop in replacement for Windows and in general your windows applications / programs will not easily run on Linux.

I suggest you boot Ubuntu and see if you like it. You can also test it in Virtualbox.


I feel that UEFI is the problem, your boot-sector is locked which prevents it's modification.

To solve this issue , You have to first go to BIOS settings by pressing , Del or whatever function key that takes you to that BIOS Setting menu.

Look for secure-boot option and disable it , save settings and restart.

Repeat the Ubuntu installation process after reformatting drive and it will work.


Here's another scenario that would cause the problem

chris@chris-desktop:~$ sudo cp Downloads/Ankit.pdf Desktop/Ankit.pdf
[sudo] password for chris:
chris@chris-desktop:~$ ls -l Desktop/Ankit.pdf
-rw-r--r-- 1 root root 19769 Jan 11 05:52 Desktop/Ankit.pdf
chris@chris-desktop:~$ cp Downloads/Ankit.pdf Desktop/Ankit.pdf
cp: cannot create regular file `Desktop/Ankit.pdf': Permission denied

In this case I already created a file in the destination directory with sudo so that it was owned by root.  The file can not be overwritten by a normal cp command as user and results in a 'Permiision denied' error.


Skype can't connect with mobile broadband internet

You should google around and see if your ISP is blocking Skype.

In Ireland where I am, a number of networks did this when they first started selling 3G handsets to try to protect their call revenue stream.

If you post your network provider and country, it might be possible to assist in finding more info.

One network provider I'm aware of blocked Viber, Whatsapp and Skype until enough business users complained then they were unblocked for bill pay customers but if you were on a pay as you go phone (top up as you use it) then they still blocked it until eventually they gave up on that too because their competitors started allowing these services and they had to enable it for competition reasons.

But here it sounds like everything is working fine with your connection and I would suggest, it is your mobile broadband provider that is causing the problem one way or another.  If you ring and ask they will most likely deny it.  Your best bet is to see if other users of the same network and reporting similar issues online.

source for ISP's blocking VOIP services:
http://www.boards.ie/vbulletin/showthread.php?t=2056591510


When you call a exec family method it doesn't create a new process, instead exec replaces the current process memory and instruction set etc with the process you want to run.

As an example, you want to run grep using exec. bash is a process (which has separate memory, address space). Now when you call exec(grep), exec will replace current process's memory, address space, instruction set etc with grep's data. That means bash process will no longer exist. As a result you can't get back to terminal after completing the grep command. That's why exec family methods never returns. You can't execute any code after exec; it is unreachable.


HP Stream 13-C004TU Notebook for Ubuntu Install

I am writing this on an HP Stream 13 (Same as 11, just larger screen). The only issue (kinda a big one) that I have run into with this running Ubuntu 14.10 is with the eMMC they have for a boot drive. I don't know all the terminology, but here it is in plain language. There is a tiny partition on the eMMC that is confusing Ubuntu. I think it's called or labeled RPMP, and Ubuntu can't access it. It is at the beginning sectors of the drive, so Ubuntu tries to read it, but can't. This significantly slows the boot time (Approx. 4 minutes for me) and has also interfered when installing new kernel updates through the Ubuntu Software Center. I read somewhere that there is a fix, but I haven't seen it yet. I am hopeful that it makes it's way into Ubuntu 15.04, or this could be a very annoying computer to have.


How to completely disable the touchpad device on my computer? (It's back on after a reboot)

The command to disable touchpad

The command to disable touchpad is:

for 14.04:

gsettings set org.gnome.settings-daemon.peripherals.touchpad touchpad-enabled false

for 15.04 +:

gsettings set org.gnome.desktop.peripherals.touchpad send-events disabled

Add it to Startup Applications

The most pragmatic (and simple) solution then is to add the command to Startup Applications.

Like in many cases when commands involve screen, xrandr, keyboard or touchpad settings, You will need to add a small break however to prevent possible local procedures to overrule the command, so it should be:

for 14.04:

/bin/bash -c "sleep 15 && gsettings set org.gnome.settings-daemon.peripherals.touchpad touchpad-enabled false"

for 15.04+:

/bin/bash -c "sleep 15 && gsettings set org.gnome.desktop.peripherals.touchpad send-events disabled"

Open Dash > Startup Applications > Add. Add the command above, according to your Ubuntu version.

Now shortly after login (within 15 seconds) your touchpad is disabled automatically.
Of course you can play with the 15 seconds a bit to optimize for your system.

Edit

From your comment, it turns out the touchpad is (re-) enabled after a while, which means some process is enabling the touchpad.

Usually, it is extremely difficult to find out which process is causing this kind of changes. Even if you could, it would not be sure you could eliminate the cause.

The good news however is that gsettings (which is used to check/control the touchpad) is extremely "low on juice". That means that it will be no burden to your system whatsoever to have a background script keep an eye on the current state, immediately disabling the touchpad again if it is enabled somehow by some process.

If you run 14.04

Use the script below

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

key = "org.gnome.settings-daemon.peripherals.touchpad"

def check_set():
    currstate = subprocess.check_output([
        "gsettings", "get", key, "touchpad-enabled",
        ]).decode("utf-8").strip()
    if currstate == "true":
        subprocess.Popen([
        "gsettings", "set", key, "touchpad-enabled", "false"])

while True:
    time.sleep(2)
    check_set()

If you use 15.04+

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

key = "org.gnome.desktop.peripherals.touchpad"

def check_set():
    currstate = subprocess.check_output([
        "gsettings", "get", key, "send-events",
        ]).decode("utf-8").strip()
    if currstate == "enabled":
        subprocess.Popen([
        "gsettings", "set", key, "send-events", "disabled"])

while True:
    time.sleep(2)
    check_set()

To use it

Copy the script into an empty file, save it as no_touchpad.py
Add the following command to Startup Applications:

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

I am afraid the only alternative is to disconnect the touchpad physically, as mentioned by Serg.


How do I force `sudo` to ask for a password each time when a specific command is used?

As noted in other answers, sudo can set a timeout on the cached credential timestamp. This can be done specifically for a given command using Defaults in sudoers:

Defaults!/bin/rm timestamp_timeout=0

Always remember to edit sudoers with visudo. I recommend a drop-in file in /etc/sudoers.d instead of editing /etc/sudoers directly. For example:

sudo visudo -f /etc/sudoers.d/always-ask-pass-for-rm

From the manpage for sudoers:

  Defaults

  Certain configuration options may be changed from their default values
  at run-time via one or more Default_Entry lines. These may affect
  all users on any host, all users on a specific host, a specific user,
  a specific command, or commands being run as a specific user. Note
  that per-command entries may not include command line arguments. If
  you need to specify arguments, define a Cmnd_Alias and reference
  that instead.

Default_Type ::= 'Defaults' |
                 'Defaults' '@' Host_List |
                 'Defaults' ':' User_List |
                 'Defaults' '!' Cmnd_List |
                 'Defaults' '>' Runas_List

Default_Entry ::= Default_Type Parameter_List

Parameter_List ::= Parameter |
                   Parameter ',' Parameter_List

Parameter ::= Parameter '=' Value |
              Parameter '+=' Value |
              Parameter '-=' Value |
              '!'* Parameter

Note that it does say you can affect "commands being run as a specific user", but doesn't mention commands being run by a specific user, so it might not be possible to constrain it only for your user. The examples in the manpage don't include anything for that.


There is a project on GitHub called Garmin-Forerunner-610-Extractor. The name confuses a little bit, but at the moment the following Ant-devices are supported:

Garmin Forerunner 60
Garmin Forerunner 405CX
Garmin Forerunner 310XT
Garmin Forerunner 610
Garmin Forerunner 910XT
Garmin FR70
Garmin Swim

There is no specific ubuntu-package at the moment, but the program consists of a simple Python script.


HOW TO DELETE PARTITION/FORMAT USB:
sudo su
fdisk -l    to list and find drive, in this case /dev/sdb
probably delete partition, then n to create new partition which i gave number 1
now format the usb:
note that the last number is 1 from partition 1
 mkfs.vfat -F 32 /dev/sdb1
here is the article:
Open a new Terminal window. In most Linux systems there is a shortcut to do this in the Accessories folder of the main menu.

2
Type "sudo fdisk -l" (without the quotes) to see a list of the drives currently on the system. Plug the USB flash drive into the computer. If your system automatically mounts it, right-click the drive and select Eject.

3
Type "sudo fdisk -l" to see the device ID of the USB flash drive. Type "mkfs.vfat -F 32 /dev/sdb1" to format the USB flash drive with the FAT32 file system, or "mkfs.ext2 /dev/sdb1" to use ext2. In both cases replace "/dev/sdb1" with the ID of your drive listed by the fdisk command. Be sure to put the "F" parameter in upper case, because there is also an "f" parameter, and do not include the quotes in any of these command


Corsair Padlock USB does not list under /dev/sd*

I found a Corsair Padlock 2 wasn't appearing and the clue was in /var/log/syslog. It needed a partition table first! Resetting the key completely wipes the device, which includes the partition table.

I installed gparted and ran gksudo gparted. When it opened, I created a new partition table and added a partition on the device. Thereafter, it worked as expected.

This is a different issue to the OP but it came up in Google for me so I add it here for the benefit of others.


I Use follow Following Steps In Windows to Bring "Install Install Inside Windows" Button.

Mount Ubuntu 13.04 ISO Using demon tools. (In My Case, Virtual Drive is G:)
Then open G: in CMD

Now Use Following Code

`G:\>wubi.exe -force-wubi (This is For 32bit Machine)`

`G:\>wubi.exe --force-wubi (This is For 64bit Machine)`

`This Code Work for me, In you case It want, You can try alternate code from 32bit for 64bit and for 64bit use 32bit code. Its work 100%`


"bad mirror archive" : What should I put as the "mirror of ubuntu archive" on installation of ubuntu?

How old is this Mac? PowerPC hasn't been on most mirrors since 6.04, so you'll need to find somewhere that's specifically mirroring ports.ubuntu.com


There are 2 methods to get around this issue:

Upgrade VirtualBox
Remove the problematic Extension Pack

1. Upgrade VirtualBox

Several ways to do this but for a pure commandline method try the following; first adding repository details for Wily Werewolf (copying and pasting one line at a time):

echo "deb http://download.virtualbox.org/virtualbox/debian wily contrib" | sudo tee -a /etc/apt/sources.list
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update

Then install some support files and then  VirtualBox itself:

sudo apt-get install dkms
sudo apt-get install virtualbox-5.0

And on my Wily installation this gets the latest version:

2. Remove the problematic Extension Pack

Rather than install a greater version of VirtualBox, as demonstrated in poin t) you could simply remove the offending extension pack. On my own system:  first list the Extension Packs installed:

andrew@ilium~$ vboxmanage list extpacks
Extension Packs: 1
Pack no. 0:   Oracle VM VirtualBox Extension Pack
Version:      5.0.8
Revision:     103449
Edition:
Description:  USB 2.0 and USB 3.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM, Disk Encryption.
VRDE Module:  VBoxVRDP
Usable:       true
Why unusable:
andrew@ilium~$

The uninstall the Extension Pack:

andrew@ilium~$ sudo VBoxManage extpack uninstall "Oracle VM VirtualBox Extension Pack"
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully uninstalled "Oracle VM VirtualBox Extension Pack".
andrew@ilium~$

Now VirtualBox should start...


How to find the PPA of the Skype package?

Skype isn't part of a ppa, it's part of an official repo. Usually to view info about a package you'll be in the sub page of a ppa, however for this you aren't as skype is just part of the partner repo, and isn't in a ppa.


Kdocker arbitariily stopped working - docked apps are completley gone

After about a day or two, the problem just disappeared, as suddenly and arbitrarily as it came.
Notably, this had nothing to do with a restart, which I tried yesterday multiple times to no avail - but today I just woke up (with the computer still on from yesterday, only suspended) and the problem got fixed.
I'll leave this answer for anyone wondering how to solve the issue (just wait, apparently), but if anyone has this and manages to debug and figure out how to actually solve it, do answer, I'm curious!


Resizing partitions can be a bit tricky if you have never done it before. A good way to do it is by using a Live CD called GParted, which will help you manage your partitions after you download it and burn it to a CD / USB.

Once you have booted from the CD, open the program called 'GParted' and you'll be able to resize a partition by following these instructions (Basically, they tell you to go to the 'resize' option in the 'partitions' menu. On that menu, you'll be able to resize the partition freely).

Finally, to be able to install Windows on your drive, I think you'll have to format the unallocated space you created to NTFS. Again, the GParted guide is very useful here.


Keep a folder on my computer in sync with a folder on my android device

I solved similar problem by the following actions.

Steps for Android device:

switch Wi-Fi on;
install SSH server - SimpleSSHD;
start SimpleSSHD server.

Steps for computer (my laptop runs Ubuntu 16.04.5 LTS MATE):

switch Wi-Fi on (in the same network as Android);
enable key-based SSH authentication by running scp -P 2222 /home/$USER/.ssh/id_rsa.pub android@11.22.33.44:/data/data/org.galexander.sshd/files/authorized_keys (where 11.22.33.44 is an IP address of the Android device) and enter password shown on screen of Android device in SimpleSSHD window.
install SSH FS with sudo apt-get install sshfs;
create SSH FS mount point (/media/MyAndroid in my case);
install FreeFileSync and create synchronization job for /media/MyAndroid and local folder;
mount Android device with sshfs android@11.22.33.44:/storage/sdcard1 -p 2222 /media/MyAndroid/ (where /storage/sdcard1 is a folder to be mounted, 2222 is SSH server port), enter SSH password when prompted;
launch FreeFileSync job when needed to synchronize Android device and local folder;
unmount SSH FS mount with sudo umount /media/MyAndroid or fusermount -u  /media/MyAndroid (and then one can stop SimpleSSHD on Android device).

This looks first-time difficult, but works great.

You can try to automate this with RealTimeSync (I did not tried, I sync twice a week manually).

Note: if you want to sync external SD-card (normal dedicated microSD) you need to get root access and install SD Card Fix (tested on my Android KitKat 4.4.4 device).


since @jonathonf recently removed most of his PPAs from public access, you cannot use it publicly anymore.

so you need to remove this by

add-apt-repository -r ppa:jonathonf/python-3.6

Note, if you need Python 3.6, an alternative to the jonathonf PPA is the deadsnakes PPA. Use sudo add-apt-repository ppa:deadsnakes/ppa, cf. How do I install Python 3.6 using apt-get?


(stty raw; cat > received.log) < /dev/<your_serial_port>

Originally from here.


I tried to uninstall a program using apt-get but I can still use it

emacs is a metapackage, meaning it is a package that does not contain anything and just depends on a more specifically named package, in this case emacs24. Try (since you've already removed the metapackage):

sudo apt-get autoremove

Because the emacs24 package is still installed, you can still use emacs, because emacs24 is the one that actually contains the executable.


Menu Bar in Top of Desktop not visible for some Applications like Rhythmbox

I had the same problem and I found that the menu bar depends on which session you use not on the new and old user. If you use gnome classic you ain't going to find ordinary menu bar but by clicking on RB icon (name) on the the desktop top bar you will find everything you want.


Is there a difference between "sudo apt-get install cuda" and "sudo apt-get install nvidia-cuda-toolkit"?

The "difference" is that there does not exist any package with the name cuda, so you can not install it - the package nvidia-cuda-toolkit though does exist (see the explanation below) :

apt policy cuda
N: Unable to locate package cuda

apt policy nvidia-cuda-toolkit
nvidia-cuda-toolkit:
  Installed: (none)
  Candidate: 8.0.44-0ubuntu1
  Version table:
     8.0.44-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu yakkety/multiverse amd64 Packages

The Compute Unified Device Architecture (CUDA) enables NVIDIA
graphics processing units (GPUs) to be used for massively parallel
general purpose computation. nvidia-cuda-toolkit contains the nvcc compiler and other tools needed for building CUDA applications. Learn more about the details on the official NVIDIA Accelerated Computing Portal -> NVIDIA CUDA Toolkit


Can't access anything through GUI after killlall Xorg Command

Definitely looks like you're having an issue with your graphics driver. Try $ xrandr --verbose on your shell to see all the available modes,
you then can use: xrandr --ouput DVI-1 --mode 36000x1080 (if this shows up under --verbose, also mind that you may need tochange DVI-1 to match your video output port)


How can I disable tap to click on Asus A55VD?

You can add the following lines at the end of your .bashrc:

#Disable touchpad tap
synclient TapButton1=0
synclient TapButton2=0
synclient TapButton3=0

with nano ~/.bashrc or gedit ~/.bashrc from terminal.

Also you can create a simple script disableTap.sh anywhere as follows:

#!/bin/bash
synclient TapButton1=0
synclient TapButton2=0
synclient TapButton3=0

add executing permission from right click menu and add it to startup from settings (or type startup on unity dash).

Alternatively you can create an init script or systemd unit associated to that script.

Check all synclient's available options at  http://www.x.org/archive/X11R7.5/doc/man/man4/synaptics.4.html


Is it possible to fully automate the kvm install of ubuntu-core (ie without any terminal prompts)

after following guides or tutorials to build custom images it seems to be a common question how to preconfigure it.

One answer I found in article was using e.g. an USB thumb drive plugged into the device that initializes core (think in a factory or other phys deployment). In your example you can very much do the same with another virtual drive provided to the guest providing the same data.

Since I'm usually a big fan of customization via cloud-init there is a way to do it that way as well (less device centric, more cloud thinking) which is described in the same thread. It even comes with a great example github project how to use it.

I personally think using cloud-init has slightly higher entry cost to set things up but will allow you a much more reliable and flexible image customization as cloud-init can do so much more.


The sda4 partition (~46GB) is definitely /(root).

The sda7 (~700GB) is not /home (/home is also under /) and it's not in use by the currently installed Ubuntu; maybe a leftover from a previous installation.

And you still have NTFS (Windows) partitions there.

Whatever you decide to do, DO NOT TOUCH SDA2 (EFI partition).

That said, you can remove all NTFS partitions if you really don't need Windows. Then, in order to maximize the resources in a sane way, here are a few suggestions:

Having a swap partition of +130GB is a huge waste of space. With +8GB RAM you barely need 2GB! Right-click and swapoff then resize accordingly and move it to the right.
Backup sda7's contents if applicable and remove the partition altogether.
Resize sda4 in order to use all the remaining unallocated space.

Notes: The above suggestions assume you already deleted the NTFS parttions. You need to use GParted in a live session. Partitions cannot be "in use" (mounted) for this operations. Even in a live session swap will be used hence the need to swapoff. Finally, there's no point in removing sda1 base there's very little to gain in terms of space and you shouldn't be moving the EFI partition anyway (and to make use of that space you would need to move all the other partitions to the left with increased risk of data loss).


What is the difference between Terminal, Console, Shell, and Command Line?

Short answer:

terminal = text input/output environment
console = physical terminal
shell = command line interpreter

Long answer:

Console and terminal are closely related. Originally, they meant a piece of equipment through which you could interact with a computer: in the early days of unix, that meant a teleprinter-style device resembling a typewriter, sometimes called a teletypewriter, or “tty” in shorthand. The name “terminal” came from the electronic point of view, and the name “console” from the furniture point of view. Very early in unix history, electronic keyboards and displays became the norm for terminals.

Terminal

In unix terminology, a terminal is a particular kind of device file which implements a number of additional commands (ioctls) beyond read and write. Some terminals are provided by the kernel on behalf of a hardware device, for example with the input coming from the keyboard and the output going to a text mode screen, or with the input and output transmitted over a serial line. Other terminals, sometimes called pseudo-terminals or pseudo-ttys, are provided (through a thin kernel layer) by programs called terminal emulators. Some types of terminal emulators include:

GUI applications running in the X Window System: Xterm, Gnome Terminal, Konsole, Terminator, etc.
Screen and tmux, which provides a layer of isolation between a program and another terminal
Ssh, which connects a terminal on one machine with programs on another machine
Expect, for scripting terminal interactions

The word terminal can also have a more traditional meaning of a device through which one interacts with a computer, typically with a keyboard and display. For example an X terminal is a kind of thin client, a special-purpose computer whose only purpose is to drive a keyboard, display, mouse and occasionally other human interaction peripherals, with the actual applications running on another, more powerful computer.

Console

A console is generally a terminal in the physical sense that is by some definition the primary terminal directly connected to a machine. The console appears to the operating system as a (kernel-implemented) terminals. On some systems, such as Linux and FreeBSD, the console appears as several terminals (ttys) (special key combinations switch between these terminals); just to confuse matters, the name given to each particular terminal can be “console”, ”virtual console”, ”virtual terminal”, and other variations.

See also Why is a Virtual Terminal “virtual”, and what/why/where is the “real” Terminal?.

Command line [interface]

A command line is an interface where the user types a command (which is expressed as a sequence of characters — typically a command name followed by some parameters) and presses the Return key to execute that command.

Shell

A shell is the primary interface that users see when they log in, whose primary purpose is to start other programs. (I don't know whether the original metaphor is that the shell is the home environment for the user, or that the shell is what other programs are running in.)

In unix circles, shell has specialized to mean a command-line shell, centered around entering the name of the application one wants to start, followed by the names of files or other objects that the application should act on, and pressing the Enter key. Other types of environments (with the notable recent exception of Gnome Shell) usually don't use the word “shell”; for example, window systems involve “window managers” and “desktop environments”, not a “shell”.

There are many different unix shells. Ubuntu's default shell is Bash (like most other Linux distributions). Popular alternatives include zsh (which emphasizes power and customizability) and fish (which emphasizes simplicity).

Command-line shells include flow control constructs to combine commands. In addition to typing commands at an interactive prompt, users can write scripts. The most common shells have a common syntax based on the Bourne_shell. When discussing “shell programming”, the shell is almost always implied to be a Bourne-style shell. Some shells that are often used for scripting but lack advanced interactive features include the Korn shell (ksh) and many ash variants. Pretty much any Unix-like system has a Bourne-style shell installed as /bin/sh, usually ash, ksh or bash. On Ubuntu, /bin/sh is Dash, an ash variant (chosen because it is faster and uses less memory than bash).

In unix system administration, a user's shell is the program that is invoked when they log in. Normal user accounts have a command-line shell, but users with restricted access may have a restricted shell or some other specific command (e.g. for file-transfer-only accounts).

The division of labor between the terminal and the shell is not completely obvious. Here are their main tasks.

Input: the terminal converts keys into control sequences (e.g. Left → \e[D). The shell converts control sequences into commands (e.g. \e[D → backward-char).
Line edition, input history and completion are provided by the shell.

The terminal may provide its own line edition, history and completion instead, and only send a line to the shell when it's ready to be executed. The only common terminal that operates in this way is M-x shell in Emacs.

Output: the shell emits instructions such as “display foo”, “switch the foreground color to green”, “move the cursor to the next line”, etc. The terminal acts on these instructions.
The prompt is purely a shell concept.
The shell never sees the output of the commands it runs (unless redirected). Output history (scrollback) is purely a terminal concept.
Inter-application copy-paste is provided by the terminal (usually with the mouse or key sequences such as Ctrl+Shift+V or Shift+Insert). The shell may have its own internal copy-paste mechanism as well (e.g. Meta+W and Ctrl+Y).
Job control (launching programs in the background and managing them) is mostly performed by the shell. However, it's the terminal that handles key combinations like Ctrl+C to kill the foreground job and Ctrl+Z to suspend it.

 Recycled from Unix & Linux


I just had this same problem and solved it by removing my ~/.cache and ~/.config/xfce4-session folders. After that I just ran 'service lightdm restart' so it would repop the session choices and my normal Xfce desktop was there.


How to install specific version of Chromium on Ubuntu?

The version you're trying to install for 18.04 is wrong. Correct version is 79.0.3945.79 there's also newer 79 version available.

You can add Chromium Team official repository:

git clone https://git.launchpad.net/~chromium-team/chromium-browser/+git/snap-from-source

Here's the list of available packages in 18.04 click here


CRON: Starting new cycle while the last one is still running?

It should execute normally. It is exactly the same case as when you run the same script on different Terminals.
The script works on both.

If you don't want this to be the case, then create some conditions in the script so that it waits for the last one to finish.

And as Alex's comment suggest, you can easily test this by having an infinite loop in a script which gets executed by a cron job.


Installing Ubuntu on MacBook Pro VirtualBox

The procedure is pretty much identical to windows computers. You get the ISO for Ubuntu, and configure a new VM through the Virtualbox GUI how you like it. After configuration is complete, double click the VM to open, and choose your ISO file. Then, wait for it to boot up. After that, go through normal installation. When it asks you to restart, restart. When it asks you to remove install media and press enter, press enter. VirtualBox will automatically remove the install media for you.


How can I change the screen brightness on Zenbook UX305 with media-buttons?

I am having the same problem with the newer UX305CA. Apparently it is really common since the hardware is not recognized, so I just assigned a new shortcut. Following this answer:
sudo apt-get install xbacklight

Then assign new shortcut:

Settings > Keyboard > Shortcuts > Custom Shortcuts > +

Add those two:

Brightness up: xbacklight -inc 10
Brightness down: xbacklight -dec 10

Then click on each of the Disabled and select the new shortcut. In my case I used Alt+F5 and Alt+F6 (since I use Ctrl+F5 for web dev).
If you want, you can also mess with the boot options to fix it:

Hi,
I have the same problem. there is a workaround although.
add "acpi_osi=" at the and of the kernel boot parameters.
to permanently do this edit /etc/default/grub as root and add "acpi_osi=" at the end of GRUB_CMDLINE_LINUX_DEFAULT then run "update-grub" as root
after that brightness and all other hotkeys work but the ambient light sensor is no longer detected. But this is not a big problem since there is no standard ambient light regulation of screen brightness anyway


Brightness control with hotkeys doesn't work. Ubuntu 18.04

Brightness control can be achieved with the GNOME shell extension Adjust Brightness Icon as a work around. It places a clickable icon on the top bar which cycles through a number of brightness options.

Install GNOME extensions if you have not already done so and select the extension. This will place an icon on the top bar which allows you to cycle through different settings of brightness.

If you don't have GNOME extensions installed this guide provides a handy reference.


VLC configuration file on Ubuntu 18.10 when installed with snap

/snap/vlc/current/bin/vlc-snap-wrapper.sh seems to be passing the argument --config=$SNAP_USER_COMMON/vlcrc when invoking VLC.

Looking on the snapcraft website https://snapcraft.io/docs/environment-variables#SNAP_USER_COMMON it looks like the typical value for $SNAP_USER_COMMON is $HOME/snap/<snap package name>/common

Putting this all together the path to your vlc config should be $HOME/snap/vlc/common/vlcrc. It can confirm this is the location on my system (Ubuntu 18.04)


Thanks to A.B. I found that the CSS settings are imported into gtk.css in the GTK theme you use. The CSS file itself is named lightdm-gtk-greeter.css and should be in /usr/share/themes/(theme)/apps/


Try playing around with the rts and the frag parameters for iwconfig on wlan0.  Those parameters are for adapting to noisy environments.  You probably are set to the max for rts, so that means it is disabled (see the man pages, man iwconfig).  Select a lower value for rts, and make the frag one less than that.  For example, picking two random values (try several yourself):

sudo iwconfig wlan0 rts 250
sudo iwconfig wlan0 frag 249


Try

sudo apt-get purge openjdk-8-jdk
sudo apt-get install openjdk-8-jdk

And then go to "Show Applications"  and check if appears


Using time -v to calculate execution time. Command not found

That means the time that you are using is the bash shell built in time which the only option is -p and you cannot even use -V, instead use the actual command with specifying its full path:

/usr/bin/time -v ./a.out

the man page is for the above command that if you do which time, will see /usr/bin/time. For the bash built-in time, you can help time.

Further reading:

Where can I find the location of folders for installed programs?
How can I get help on terminal commands?


sudo find / -xdev -iname '*vlc*.desktop'

Installed via snap then:

sudo snap remove --purge vlc

via apt:

sudo apt purge vlc

You may be seeing the available apps from "Software" store.


unhandled error message within file manager,

The following steps should fix the problem:

Create user dirs inside your home directory (issue Ctrl+Alt+T to launch Terminal)

mkdir Documents Music Videos Desktop

(normally, there should be also Pictures and Downloads dir, but they exist in your home, so I omitted them)
Boot into single user mode and try to fix the errors if any exist.

choose fsck from recovery menu. From it's output, remember the disk node which will be /dev/sdXY. X is letter, and Y is partition number. For example, most systems have /dev/sda1 though your home partition may be placed on another.
choose root. It will give you the root shell prompt.
type fsck -p /dev/sdXY. sdXY should be replaced with your remembered disk node. This will automatically repair all fixable errors. Found files will be placed inside the lost+found directory.

Once you have finished, resume normal boot (hit Ctrl+D)
Update your user dirs

xdg-user-dirs-update

Distribute found files into corresponding directories.


Usually this means you've forwarded the port to the wrong IP address on the LAN.

Your NAT router receives incoming traffic on port 57757, and sends it to a particular IP address and port on the LAN.

By default, Ubuntu doesn't filter incoming connection attempts with a firewall. So unless you've changed firewall settings in Ubuntu, an attempt to open a connection to any TCP port, 1 through 65535, will either:

accept the connection, if the port is open
reject the connection attempt, if the port is closed

If ports were filtered by a firewall, then you'd get what you're seeing--no response to a connection attempt. But:

unless you've changed firewall settings (e.g., ufw, iptables), no ports are filtered, and
in any case, you can connect to port 22 on the LAN, so it's open.

When you forward a port to a nonexistent machine with a NAT router, it sends incoming traffic on that port to the nonexistent machine, which is to say that it sends it into a black hole; it is effectively dropped.

That causes exactly the situation you've described. So you can most likely fix this by making sure the port is being forwarded to the correct IP address on the LAN.

If that turns out not to have been the problem...

...then you'll have to do some troubleshooting.

Is the port specified for the LAN side correct? That is, assuming you haven't changed the SSH server's configuration, is port 57757 on the WAN side set to forward to port 22 on the OpenSSH server? (You may want to double-check this.)
Maybe there's some problem with the specific port you've chosen (57757). Try a different one and see if that works better.

(If it doesn't, and you proceed with these instructions, either change it back or replace "57757" below with the new number.)
Try restarting the OpenSSH server. That may help if there is a network problem. If that doesn't help, try restarting the router and cable/DSL/ISDN modem too.

If for some reason you cannot restart all three devices, I recommend restarting whatever you can. If you can't restart the OpenSSH service, at least you can restart the service and (more likely to fix this) take the interface down and bring it up again.

To restart the OpenSSH server:

sudo restart ssh

To bring the network interface down, first figure out what interface it's on:

ifconfig

Typically, for a machine with a single Ethernet card and/or a single wireless card, the Ethernet is eth0 and the wireless is wlan0.

If the wired Ethernet connection is what you want to take down and restart, run:

sudo ifdown eth0

Then run:

sudo ifup eth0

Alternatively, you can run:

sudo ifconfig eth0 down

Followed by:

sudo ifconfig eth0 up

If the machine is using NetworkManager to manage the interface on which the OpenSSH server is running, I still recommend trying the above ways, but you can also try disconnecting and reconnecting in NetworkManager.

For an Ethernet connection, also try unplugging the cable and plugging it back in. For a wireless connection, try turning it off with the hardware switch (if there is one), and back on again.

Something strange is going on here and none of this takes very long--it's worthwhile to be thorough before undertaking more painstaking troubleshooting steps.
How are you attempting to access it from the WAN side? If you're using a machine on the LAN to do this (just connecting from the LAN to your router's WAN IP), this is only supported for some routers. After all, a router's job is to route traffic between the WAN and LAN sides, not to route traffic from one side to itself. Support for connecting to forwarded ports on the WAN IP from inside the LAN is actually the exception rather than the rule, though many home/office routers do have this feature.

So if you're not testing the port forward from a host on the WAN side, you should do so. Your options for this are:

Connect yourself from the WAN side. This works if you have access to a machine there, for example, SSH access to a remote machine at school, work, a friend's house, or similar.
Connect the test machine between the router and whatever provides its Internet connection. If you have a cable/DSL/ISDN modem with an Ethernet port and your router is plugged into that, you can connect a switch to the modem and connect the router to the switch. Connect a computer to the switch. First see if that machine just gets Internet access--these days, many ISP's provide two or more separate IP addresses. If it doesn't, go to your router's setup page and check its WAN IP and WAN subnet mask, then statically assign an IP address to the switch-connected machine that is within the same subnet.

This method has some disadvantages. It's a pain! Also, it's theoretically possible for an ISP to configure their network incorrectly so that the test machine connected to the switch could access the Internet. (Unless it's your ISP's intention to let you connect with more than one WAN IP and you happen to have picked a WAN IP for the test machine that your ISP has assigned to you, traffic between it and a true WAN host should be blocked/dropped by the ISP. But some ISP's have weird practices, so who knows?) If this happens, it won't likely cause anyone serious problems (and even if it did, you only have it connected for up to a few minutes). However, it could potentially be seen as an attempt to obtain additional access beyond the bounds of your subscription, and--more importantly--if another user has that same IP, it could intefere with their connection. Therefore, if you want to try this method, don't try to access the Internet from the test machine, stop immediately if you find the test machine can access the Internet, and don't attempt this at all if it's prohibited or advised against by your ISP. (And don't use this if the WAN side of your router is an office LAN, without consulting your network administrator first. That's not an ISP and there's no assumption that resources are provisioned to prevented undesired access.)

There is a variation on this technique that is sometimes more appropriate. Your router probably gets its connection information--IP address, subnet mask, the IP address of the gateway (router) on the WAN that it uses when it doesn't know where to send something, and information about DNS servers--from your ISP, via DHCP, through the cable/DSL/ISDN modem. This is why you have to have the router plugged into the modem to give it the necessary configuration to make the results of WAN-side testing meaningful. But the router will typically remember this information, so long as it is actually connected to a network on the WAN side. So you can connect the router, modem, and test machine, but then, quickly, and before doing anything with the test machine besides making sure the switch sees it as connected, disconnect the modem.
Use an free service on the Internet to test your ports. Since inserting a test machine between your router's WAN interface and the Internet (above) is highly involved--and since it will show a port as accessible even if it's inaccessible due to being blocked by your ISP (which is also true of connecting to the router's WAN IP from the LAN side)--it's usually better to use a web-based port scanning service.

There are many port scan services. (Some sport the phrase "check your firewall" with the idea that most people are trying to block rather than facilitate access.) This is one. If you choose to use that one, click Proceed, type 57757 into the text box, and click Use Specified Custom Port Probe. For the purposes of getting a server to run, you want it to be "open." "Closed" means the port is accessible but the server is not running (and thus the connection attempt was rejected). "Stealth" means the port was inaccessible--it's as if no machine was located there (or as if the port were forwarded where there's no machine).

OK, so you've determined it really isn't accessible from the Internet. Potentially you can scan it (ideally from the WAN side) to get details, though often this won't give helpful information.

If you want to do this, then on the WAN side, you can run:

sudo nmap -sS -sV -p57757 -vv WAN-IP

If the port is shown as filtered, that confirms that packets sent there are probably going nowhere (or are blocked/dropped along the way).
It's worth checking to see if the problem is arising from the port exposed to the WAN being different from the port the server is actually listening on. Forwarding port 55757 on the WAN to port 22 on the LAN machine should make things work out fine, but perhaps somewhere (the server, the client) something is assuming the port number is the same from the server and client's perspective.

Presumably you cannot forward port 22 through the router. Perhaps your ISP blocks that port. But if you can do that, do that!

Otherwise, you can make the OpenSSH server actually listen on port 57757.

To do this, back up the server configuration file:

cd /etc/ssh
sudo cp sshd_config sshd_config.old

Then edit it:

gksu gedit sshd_config

Or use a console text editor if the machine doesn't have a GUI:

sudo nano -w sshd_config

Near the top of the file, this block of text appears:

# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

Just change the Port 22 line at the top, to say Port 57757 instead.

You could add a port rather than changing it. I recommend testing with the simplest effective configuration, though.

See man sshd_config for more details about configuring the OpenSSH server.

Save the file, quit the text editor, and restart the SSH server with:

sudo restart ssh

Now change the port forward on the router so port 57757 forwards to port 57757 (not 22) on the OpenSSH server, and see if it's accessible from the Internet.
If it's still not working, see if maybe Ubuntu's firewall actually is blocking traffic originating from outside the LAN.

(This is unlikely if you didn't configure it this way yourself, but if all your settings are right and none of the above steps revealed anything about the problem, it's worth checking.)

Run:

sudo iptables -L

By default, in Ubuntu, the output looks like:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

This is a simple permissive policy, essentially equivalent to not running a firewall. (Indeed, if the netfilter firewall module weren't compiled into your kernel, your system would behave the same way as with the above settings, although the iptables command, which queries netfilter's settings, wouldn't work of course.)

If your configuration doesn't look like that, read man iptables to figure out what they're doing, and/or edit your question (or, if you're a different person with a similar problem reading this, post a new question) to include them. Please note that, potentially, your iptables rules could disclose sensitive information about your configuration. Practically speaking, this is usually not the case--with the possible exception of rules about specific hosts that are blocked, or if your configuration is very bad/insecure--typically the usefulness of this information to an attacker, especially for a machine on a home/office LAN behind a NAT router, is minimal.


How to find and install latest Ruby version using RVM?

The following command will install latest stable version of ruby:

rvm install ruby --latest


Ubuntu 20.04 very slow, RAM doesn't add up

first check the bad sectors and the health of your hdd(i suggest upgrade to ssd)
second 4gb
Second 4gb of ram is the minimum ammount nowdays so check if your computer is able to upgrade to 8gb.


Wi-fi in Ubuntu suddenly is not available

You need to disable Secure Boot in BIOS.

You probably did not upgrade your system for a long time and now installed a new kernel that requires Secure Boot disabled to load 3rd party modules.

See Why do I get "Required key not available" when install 3rd party kernel modules or after a kernel upgrade?


Linux is very flexible, and indeed you can have the setup you want. The common data partition(s), however, will need to be formatted with a file system that also Windows can access: that means in practice the ntfs file format as the only modern and robust file system that both Windows and linux can access.
12G for Ubuntu is a bare minimum, which you may rapidly reach. I recommend at least 15 GB, but better 20GB because you also leave your user configuration data on the system partition.
Your data folders (Documents, Videos, etc,) can all reside on your common ntfs formatted data partition. That way, these files are also available from within Windows.
Move these data folders over to your common data partition. On their original location, put symbolic links that refer to these folders. Symbolic links in Linux are very powerful and, for the user, feel and act exactly like a real folder. Thus, your data remains equally easily accessible from within your home folder, even if it now resides on a different partition. You can do the same for any other folder you want to share between the two operating systems.
Caveat when working with two operating systems on the same volumes

Make sure the file systems on your mounted drives are regularly checked. The system partition of Ubuntu is automatically checked. So will be the system partition of Windows (I presume). Your mounted ntfs partitions that contain your data, however, should regularly be checked from within Windows. Only the MS Windows tools are capable to thoroughly inspect and repair the proprietary ntfs file system format.
Make sure to shut down Windows completely (i.e. no hibernation, no fast-start) before using the partitions with Ubuntu. Only then it is ensured that the partitions are correctly closed before you access them with Ubuntu.


Your server is set to not follow symlinks. Add this line:

Options +FollowSymLinks -SymLinksIfOwnerMatch

to your http.conf. For more info: http://www.hackersgarage.com/symbolic-link-not-allowed-or-link-target-not-accessible.html

You will also need to add browse access for others to each folder, all the way up to /home/somekittens/Dropbox/Project/Joomla/. i.e.

sudo chmod o+x /home
sudo chmod o+x /home/somekittens
chmod o+x /home/somekittens/Dropbox
chmod o+x /home/somekittens/Dropbox/Project
chmod o+x /home/somekittens/Dropbox/Project/Joomla


Using Python Interactively as a CLI calculator

1) how to set the number of decimal places for answers to calculations

For floating point operations (in python2) you have to use float numbers instead of integers, see:

>>> 3/2
1
>>> 3/2.0
1.5
>>> 3.0/2
1.5

If you are using python3, then the result is floating, even of both operands are integers:

Python 3.4.2 (default, Oct  8 2014, 13:08:17) [GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 3/2
1.5
>>> 3/3
1.0

To perform integer division in python3, use // operator:

>>> 3//2
1
>>> 3//3
1

  2) what do I need to do to be able to use mathematical functions like sqrt, sin, arcos, log

Those functions live in the math module, the simplest way to have them available is:

>>> from math import *
>>> sqrt(4)
2.0

Be careful though, as it may pollute your namespace (if there are variables or functions with the same names as in math module). It is safer to use:

>>> import math
>>> math.sqrt(4)
2.0


Copy filename in Nautilus, pastes different formats in Terminal vs normal text field

I found two workarounds for this:

right click in your terminal and select "paste filename"
this will result in '/home/fred/a c', there seems to be no shortcut for this.
alternatively you could press ctrl+l in nautilus, this will show you the folderpath. After copy and pasting this in your terminal you can use tab completion to get the filename.


Black Screen on lubuntu 17.10 after display resolution change, a half solution

Create a display.sh or monitor.sh script and test it to make sure it works as intended.

Then add a fullpathame to the script as a display-setup-script entry in your /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf.

Example of a monitor.sh script (modify to match your manual commands that work):

#!/bin/bash

cvt 1920 1080 60
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --addmode VGA1 1920x1080_60.00

The /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf file:

[Seat:*]
display-setup-script=/usr/local/bin/monitor.sh

Important note:

Be sure the script works.  If the script has errors your Lightdm GUI login manager will fail with a The system is running in low-graphics mode error. If that happens use Ctrl+Alt+F3 and comment out the line with the script while you fix the script.  You can restart lightdm with:

$ sudo systemctrl restart lightdm


Cannot properly install mongod due to GPG error on Ubuntu 20.04

importing the public key with

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D68FA50FEA312927


reinstall ubuntu
change the grub order so that if you do nothing Windos will start as first.
You can use an easy-to-use the GUI application called Grub Customizer to make your life a little bit easier. As the name suggests, you can do much more than just reordering GRUB menu entries with it.

You can install it by typing the following in the Terminal:

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

see How do I change the GRUB boot order?. (note change the time out from 10 to 5, so Windows wille start after 5 sec. if you do nothing).


how to install adobe reader in ubuntu 18.04 in dell inspion 14 laptop

Essential commands taken from this website:
https://linuxconfig.org/how-to-install-adobe-acrobat-reader-on-ubuntu-18-04-bionic-beaver-linux
Install all Prerequisites

Open Terminal, press keys: CTRL+ALT+T

sudo apt-get update; sudo apt install gdebi-core libxml2:i386
libcanberra-gtk-module:i386 gtk2-engines-murrine:i386 libatk-adaptor:i386

wget ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i386linux_enu.deb

sudo dpkg -i AdbeRdr9.5.5-1_i386linux_enu.deb

Run Adobe Reader:

acroread


MaaS ssl error vmware vcenter 6 connection

this what someone on ppa bug tracker suggested and worked.

Downloading the self-signed certificates from your VMware system and configuring your system to consider them trusted should work. The process I use for this is as follows:

$ sudo -i

openssl s_client -connect 10.230.8.210:443 -showcerts < /dev/null

mkdir /usr/share/ca-certificates/custom

nano /usr/share/ca-certificates/custom/vmware.crt

dpkg-reconfigure ca-certificates

Note, however, that this only works if the self-signed SSL certificate for the VMware system has a properly configured common name (or subject alternate name) so that the SSL library can match the IP address or hostname to the connection string.

In MAAS 2.x, you can work around this issue by adjusting the power parameters for your VMware servers. In our lab environments, we use the following command line to add a VMware chassis:

maas profile machines add-chassis chassis_type=vmware username=vmware-username password=vmware-password protocol='https+unverified' hostname=vmware-api-ip-address prefix_filter=maas

(This will add all VMs named "maas*" to MAAS.)


Why can't I access a shared folder from within my Virtualbox machine?

You have to mount your folder on your VM.

First you need to install Guest Additions (although I already did this during the installation).

Start your VM
Devices > Insert Guest Additions CD image...
I had to manually mount the CD: sudo mount /dev/cdrom /media/cdrom
Install the necessary packages: sudo apt-get install make gcc linux-headers-$(uname -r)
Install the Guest Additions: sudo /media/cdrom/VBoxLinuxAdditions.run

Now you can mount your share using:

mkdir ~/new
sudo mount -t vboxsf New ~/new

Where New is the name of your shared folder.

Now you can access the shared folder at ~/new.

Note: this is not permanent. To permanently mount your folder you should add the following line to /etc/fstab (sudo nano /etc/fstab):

New /home/user/new vboxsf defaults 0 0

Obviously you should replace user in /home/user/new by your own username.


"racoon" brand mouse: back/forward buttons not working

I checked and it was imwheel who interfere with the ability to use back/forward buttons.
So instead of executing imwheel normally, I use:
imwheel --kill --buttons "4 5"
With this config, the buttons back/forward works


Progressing - Partial answer

Create  the file asus-nb-wmi.conf in /etc/modprobe.d/:

sudo touch /etc/modprobe.d/asus-nb-wmi.conf

Edit the file :

gksu gedit /etc/modprobe.d/asus-nb-wmi.conf

Enter : asus-nb-wmi

Save

Reboot

On reboot, the backlight level is kept at the same level as before rebooting.

Unfortunately, it does not work for a cold boot.


How to get Processor ID from any linux command

From comments:
sudo dmidecode -t processor | grep -E ID |  sed 's/.*: //'

The sed command is used to remove the line prefix: "       ID: " as explained in this popular answer:

How to use Sed to replace all characters before colon?

Explanation:
First part pipes string to sed.
The second is a basic sed substitution. The part between the first and
second / is the regex to search for and the part between the second
and third is what to replace it with (nothing in this case as we are
deleting).
For the regex, . matches any character, * repeats this any number of
times (including zero) and : matches a colon. So effectively it is
anything followed by a colon. Since .* can include a colon, the match
is 'greedy' and everything up to the last colon is included.


When trying to build the OONF package for DLEP implementation there occurs a error with tomcrypt.sh not being found, how do I install tomcrypt?

You may be interested in this:

https://www.howtoinstall.co/en/ubuntu/utopic/universe/libtomcrypt-dev/

Basically, run this in Terminal:

sudo apt-get install libtomcrypt-dev


Ubuntu 16.04 on VMWare Workstation 14, shows in tab view, but no console!

Try editing the machine settings to remove the CD/DVD drive and possibly any other virtual SATA device (the virtual hard disk likely was installed as a SCSI device regardless of how your physical disk(s) is attached).

Then reboot.  Then shutdown and re-add them.

I had the exact same problem on first boot of Ubuntu 16.04 under VMware Workstation 14.1.1 following "easy install".  I had to forcibly power off the VM.  When I powered it back on Workstation threw up a dialog complaining that there was no physical device to back SATA 0:1 (the CD/DVD).


Installed KDE on 12.04, how do I remove Gnome?

Try to remove ubuntu software center using synaptic package manager?

else

from terminal :

sudo apt-get --purge remove ubuntu-desktop


After the first update ubuntu 12.04 lost wireless alltogether

Your device 168c:0036 is not covered in the default ath9k driver installed with Ubuntu 12.04. You can update the driver with:

sudo apt-get install linux-backports-modules-cw-3.10-precise-generic

If you have installed the compat-wireless suite, you will probably need to remove it first:

cd ~/compat-wireless-3.6.6-1-snpc
sudo make uninstall


What is ubuntu doing on bootup during black screen?

Create a file /etc/modprobe.d/local-b43.conf containing the line

options b43 allhwsupport=1

Then, run the following commands

sudo rmmod b43

sudo modprobe b43

I think you are using a Broadcom (BCMxxxx) wireless card. The message is telling you to pass an option to the b43 kernel module to activate support for your wireless driver.


Several questions about upgrading from 11.04 to 13.04

I have a directory called /soft where I have several softwares that I have installed manually. If I make the upgrade on the operating system is there a way to mantain that directory, or ubuntu will just delete it all?

I have no idea. However, I like to believe that it will not delete it. The upgrade process upgrades packages and libs and all that, but not delete directories. I think they're clever enough to know that people create directories, even in the root directory. Also, don't forget that when upgrading through the Update Manager GUI, Ubuntu gives you a list of the packages and libs that will be upgraded, removed, and no longer needed, at which point you can choose to cancel the upgrade. I also found this: How does the Ubuntu upgrade process work? Look at the second, long answer. I haven't read it all, but it could contain some insight.

And what about documents such as the /home/{myuser}/Documents, what will happen to them?

Everything in your /home folder should stay as it is. I upgraded from 12.10 to 13.04 a few days ago, and everything in the /home folder was intact.

Will the installed softwares remain intact?

Well, it's yes and no, but more yes. The software will remain intact, but they might be broken and not work properly. For example, after my recent upgrade, VMware Workstation was not working. I had to dig through the answers and the Ubuntu forums to find out what exactly needed to be done, and I eventually got it to work. On the other hand though, other softwares work perfectly fine.

Is it advisable to upgrade the OS via terminal or is it better to format and install it all from scratch considering that there is a large gap between the OS versions?

It is advisable to install all from scratch, not because of the "large gap", but because of software being rendered inoperable. If it's feasible for you to backup your data, install from scratch, bring back the data, and re-configure everything, then I guess a fresh install is better. But again, an upgrade is much less of a hassle =/.

In any case, always backup your data before an upgrade.


apt install gccgo-go doesn't install gccgo in Docker image

From packaging point of view - the /usr/bin/gccgo executable is contained exclusively in gccgo package.
The gccgo-go package contains only /usr/bin/go executable by itself and it depends on gccgo-9 package which provides /usr/bin/gccgo-9 executable. Alternatively golang-go package provides its own /usr/bin/go.


External hardrive containing folders hidden on windows

You can delete those folders, it won't hurt anything, but Windows will put them back every time it touches that drive.

If you plan on using both Windows and Ubuntu with this hard drive, you may want to create a .hidden file on the root of the drive. Inside this file, write the names of files you want your file manager to hide, like this:

$RECYCLE.BIN
System Volume Information

then save it and restart the file manager. Note that this only works with certain linux file managers; also, if your Windows PC is set to show hidden files, the .hidden file may show up in File Explorer.


How to download videos from any site using terminal based command?

You can also use youtube-dl for that. Just copy the url of the video. In case you don't know about the link. Just right click & see View Frame Info you'll see the video url there. Then

youtube-dl videourl


System Monitor shows only 1.1GB swap, where as there is 15GB swap

Following KGIII's comment, I fixed it as follows
Check if /swapfile is being used instead of swap partition
$ sudo cat /proc/swaps
Filename                Type        Size    Used    Priority
/swapfile                               file        1158220 0   -2

Now, to change swap from using /swapfile to partition, I followed this blog. Although it does the reverse, the required commands are available.
Turn off /swapfile
$ sudo swapoff /swapfile

Edit /etc/fstab file to use swap partition instead of /swapfile. Commented existing line and added new line. UUID can be obtained from gparted (right click on swap partition and select information)
UUID=530e52cc-8a1d-400b-bbde-b47c0246586d none            swap    sw              0       0
# /swapfile                               none            swap    sw              0       0

Format the swap partition
$ sudo mkswap /dev/nvme0n1p8

Set swap to use the partition
$ sudo swapon /dev/nvme0n1p8


Every IPv6 address, even link-local ones, automatically subscribe to a multicast group based on its last 24 bits. If multicast snooping is enabled, the bridge filters out (almost) all multicast traffic by default. When an IPv6 address is assigned to an interface, the system must inform the network that this interface is interested in that particular multicast group and must be excluded by the filter. The following is a good introductory video: https://www.youtube.com/watch?v=O1JMdjnn0ao

Multicast snooping is there to prevent flooding the network with multicast packets that most systems aren't interested. You can disable multicast snooping in small deployments without noticing any big difference. But this may have significant performance impact on larger deployments.

You can disable snooping with:

echo -n 0 > /sys/class/net/<brif>/bridge/multicast_snooping

If you want to protect your VMs from unwanted traffic and unnecessary packet processing, you can leave snooping enabled but also enable a multicast Querier on the network. A Querier will periodically broadcast query packets and update snooping filters on switches and bridges. It is possible to enable a Querier on your system with:

echo -n 1 > /sys/class/net/<brif>/bridge/multicast_querier

If you have snooping enabled, you must also have a querier on the network.

There's no need to enable STP. It's probably safer to turn it off, unless you know that you're bridging segments that result in circular paths. It's also irrelevant if you have SLAAC enabled (ie autoconf=1, accept_ra=1). Enabling PROMISC mode on the bridge implicitly disables snooping.

Here's a nice summary of the modern challenges of IPv6 Neighbor Discovery (ND) and Multicast Listener Discovery (MLD).


This can be done using the Zeitgeist Activity Log Manager :

Add the Zeitgeist PPA:

sudo add-apt-repository ppa:zeitgeist/ppa

Install the latest version of Zeitgeist:

sudo apt-get update
sudo apt-get upgrade

Restart zeitgeist-daemon:

zeitgeist-daemon --replace

Install activity-log-manager

sudo apt-get install activity-log-manager

Open up Activity Log Manager and click the Logging active button in the bottom right corner of the window to disable logging:

Click it again to re-enable logging.


Purged old package with:

sudo apt-get purge mysql-workbench*

and installed new package with flag --force-all as below:

sudo dpkg --force-all -i mysql-workbench-community-6.0.6-1ubu1204-i386.deb

and it solved my problem.


Endless "Out of memory" error during live DVD boot process

I was able to solve this problem in my personal situation, which appears to have been a corrupt partition table. Windows is still not bootable at this time.

The first step was to remove the hard drive from the computer.

Next up was to make the hard drive an external hard drive. I had a SATA to external USB case. Attaching the drive to the computer would eventually result in a system freeze/crash.

The trick is to boot into a live CD or other Linux partition. When the drive is attached launch GParted or other tool used for writing partitions.

Create a new partition on the attached drive, you'll be warned that all data will be lost (perfect since it already has been).

TestDisk should be run and used for recreating  the old partition table. Note that you may be able to do this directly if you're fast enough.

Grub (boot loader) will need to be reinstalled onto the drive. It may be appropriate to do I recovery of Windows first then install grub so that Windows can be found.

None of these steps should make data recovery worse than it already is. Just don't add steps in there to create new partitions.


Where does Compton look for its conf file?

Uh, why not try it yourself? Just do
gedit ~/.config/compton.conf (yes it's there)
But I believe you've long found your answer. This answer is for anyone who wants an answer here and now. Have a nice day!


If im using nouveau there is no way to use vdpau with it?

Related bug

  Bug #1002224 “Please include gallium vdpau and xvmc driver suppo...” : Bugs : “mesa” package : Ubuntu
  https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1002224

As far as I can see we'll have to wait for Debian to fix it.

And there's an unofficial PPA software source you can check out

  Updated and Optimized Open Graphics Drivers : Oibaf
  https://launchpad.net/~oibaf/+archive/graphics-drivers/


How to make and restore incremental snapshots of hard disk

To explain cprofitt's answer (as his answer is incremental, as I will explain)...

First you need to know about hard links.

Hard links point to the data that is actually on the disk (the physical location) and you can access the data using the hard link. Each file and directory is a hard link to the location of the data on the physical disk. Therefore if there are two files (hard links) pointing to the same location then the data is only stored once.

The process given by cprofitt involves:

Rotate the backups to create a spot for a new one. ("Today's backup" from yesterday becomes "Yesterday's backup", "Yesterday's Backup" from two days ago becomes "Two Days ago's backup" and so on)

The list keeps growing as long as you want it, however in the script it only has 4 snapshots. (It does the whole process again for the next level (e.g. a week - "This week's backup") and rotates those, so that is why it has only 4).
The moving is done in reverse to prevent overwriting

Copy the latest snapshot you have done (e.g. "Yesterday's backup") to the spot for the new one (e.g. "Today's backup"), making new hard links to the existing files without copying the file. So all the files in the new snapshot are pointing to the same location as the previous one.

An illustrated example

In the picture below, files of the same colour that have the same file name are hard links to the same file on disk. Here we are just dealing with two snapshots and a few files, but the example scales. (Except for the fact I am moving snapshots the opposite way to scripts in cproffit's answer)

The process is this:

There is a snapshot of the system.
The snapshot is copies (creating hard links to the existing files)
Rsync is run to update the snapshot. When files are changed, it stores the new file as a new copy on the hard disk (so the older snapshot is not changed). In this example, File B has been changed. Note: we now have only 1 copy of File A and File C and two copies of File B stored on the hard disk
Rotate the snapshots (in this case snapshot 0 'falls off' and is deleted and I rename snapshot 1 to snapshot 0)
Copy the snapshot agin (repeat of step 2)
Rsync again. (Repeat of step 3). Now we have 1 copy of File A and 2 copies of both File B and File C

A simplified version of the [first] script (not to be run, just as a stepping stone) is this:

#!/bin/bash

# Delete the snapshot we don't want (has 'fallen off')
rm -rf /root/snapshot/home/hourly.3 ;

# Rotate the snapshots by shuffling them back
mv /root/snapshot/home/hourly.2 /root/snapshot/home/hourly.3 ;
mv /root/snapshot/home/hourly.1 /root/snapshot/home/hourly.2 ;

# Copy the snapshot (creating hard links to the existing files)
cp -al /root/snapshot/home/hourly.0 /root/snapshot/home/hourly.1 ;

# Do the rsync ...
# step 4: rsync from the system into the latest snapshot (notice that
# rsync behaves like cp --remove-destination by default, so the destination
# is unlinked first.  If it were not so, this would copy over the other
# snapshot(s) too!
rsync -va --delete /home/ /root/snapshot/home/hourly.0 ;

Now the full script(s) has the full explanation here (as cprofitt linked to) and it is more thorough but it is basically as above. The other script is for grouping snapshots and the other part of cprofitt's answer talks about making the process automatic (using cron) and verifying that the backup was sucessful.

You can change the names, so instead of the directories being called "hourly..." they are called something else and the script is run manually.

To restore the whole lot, copy the latest snapshot (or a previous one) back to the directory you were taking the backups of.

To restore a single file that is still in a snapshot, go the snapshot and copy it back to where it belongs.

The backup media can be a external hard drive (must be ext2/ext3/ext4). If you were backing up / (mainly /boot, /home, /etc /root and /usr) then, say...

You mount the external drive, perform the backup and create the latest snapshot.
Unmount the drive.
Remember you deleted a file (even from the trash) that you wanted.
Connect the external drive and retrieve the file.
Do a backup (just to be sure)
Disconnect the drive and go travelling...
Realise that a laptop and lava do not mix.
With your new laptop running a live cd, format the internal drive, mount you external drive and then cp -a /media/external/snapshot-0/* /media/internal-drive (assuming snapshot-0 is the latest snapshot)
Install grub to the MBR (yes it has to be seperate) - or use dd to backup the mbr, like cprofitt has said at the bottom of his answer.
Reboot.

The script needs to be refined (to only get the stuff you want) and the procedure aove assumes that you don't have a /home partition. If you do (or had) create a new one on the disk and mount it in place with mount /dev/sdxy /media/external/home before copying.


Restricting Internet access of applications in Ubuntu

This might be not as easy as you might want, firewalls can be a tricky topic. A widely used Linux firewall is 'ufw' it is part of the standard install. There is a graphical interface called 'gufw' which has an easy setting mode for getting started quickly, but also allows to fine tune rules in the graphical application.
Just install it with the line

sudo apt install gufw

However, please note that all Linux firewalls I am aware of are based on  ports, not with applications. Actually the firewall only sees network traffic going in or going out, but I can not tell which application sent that traffic. All applications send their traffic to a certain port, e.g. Port 80 for standard HTTP traffic. You can very fine tune what happends to your traffic based on ports and it can get complicated very quickly (for example with FTP) but you can not say for example firefox can send traffic on port 80  but chrome can not. I do not know how the windows firewall does it, or whether it only seems to do that. I just now that the dialog there gives a list of applications.

So if you can work out your problem based on ports that your application use, you have all fexlibility you need. What I like about the gufw tool is that is has a rather safe quick setup mode that is quite useful to quickly lock up a mobile computer completely when using a public hotspot and just open a single hole for a specific port only.

Hope it helps.


gpg: keyserver receive failed: Connection timed out

It looks like firewall blocking port 11371 which is used by gpg. Force it to use port 80 to get gpg key.

sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 C1289A29

Alternate Command

gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C1289A29


Recommended partitioning for an Ubuntu 18.04 installation

I can only show you how I partitioned my disk for Ubuntu 18.04 Mate on my old 2010 netbook with a memory of 1gB.

Swap is big because of my small memory


In Ubuntu 18.04, xgraph is not available in the repository. You might have to consider installing my manually downloading .deb packages.
Open up a terminal and paste the following commands one by one.

sudo apt install perl libxt-dev libx11-dev libxmu-dev
wget http://archive.ubuntu.com/ubuntu/pool/universe/x/xgraph/xgraph_12.1-17_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/libx/libx11/libx11-6_1.6.4-3ubuntu0.2_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/libc6_2.27-3ubuntu1_amd64.deb
sudo dpkg -i *.deb


Turning on and off HP Probook 4530S touchpad

Problem is still unsolved.

But if nobody has any thoughts about how to fix that - here is a possible solutions to help those, who can see this topic (guys from russian linux forums helped me).

You can type in your console:

syndaemon -t -i 2 -d

This means, that your touchpad will be disabled until 2 seconds after your typing will passed.

But there is a way to fix problems with turning off\on your touchpad and with enabling LED works properly... But this way is complicated.
You must download this patches http://abhinandh.com/post/4336662463/getting-the-double-tap-on-the-led-to-disable-touchpad
One patch is for kernel and one for xorg server. Also you have to change function parameters.


Contacts / Address Book equivalent to OS X 'Contacts'

I would recommend you to use Evolution Address book.
Add it in Software Center or from terminal - sudo apt-get install evolution

Or use Kontact from KDE desktop - can be installed with sudo apt-get install kontact.

Smartphone should sync with online services, no need to sync contacts with pc!

Personally i prefer Thunderbird.


Remove video driver:

sudo sh /usr/share/ati/fglrx-uninstall.sh

sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*

Remove your xorg.conf

sudo rm /etc/X11/xorg.conf

Reinstall xorg completely

sudo apt-get install --reinstall xserver-xorg-core libgl1-mesa-glx:i386 libgl1-mesa-dri:i386 libgl1-mesa-glx:amd64 libgl1-mesa-dri:amd64

sudo dpkg-reconfigure xserver-xorg

Reboot

sudo reboot

This should bring Ubuntu's video drivers and x the same way as it would be a fresh install.

Reset Unity

dconf reset -f /org/compiz/
unity --reset-icons &disown


It seems to be that I didn't google enough before offer the bounty.

This issue is reported by dell community in this post.

Following some of the advises of this thread, I've solved the problem updating software manually via terminal.

I've executed this sequence of steps:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get -f install
sudo update-grub

I've been prompted to either overwrite my current cfg for grub or keep the old one.  We need to chose to overwrite it.

After this, I've executed the software updater successfully, restart, cross my fingers, and it has been worked.

Thanks for all the advises.


Can't boot into graphical desktop after installing SELinux

After trying every probability like how a computer plays chess; I used this solution and it worked.

1.root@ubuntu:~# apt-get install lxdm

I booted up in a graphical environment, and I tried sestatus command in terminal and it said it was working; however my wifi stopped connecting even though I used iwconfig it said it wasn't connected to anything. I am using an Asus 900ha mini netbook pc. Think like a computer to fix a computer is what I learned today. Try every possible solution even if it is a lot  and I promise you most likely will fix the problem!


How can I automate the backing up of cron jobs?

Yeah another cronjob for the automation but in terms of collecting everything together, there are a few directories you want to cater for:

/etc/cron.*
/var/spool/cron/crontabs/

Back those up, and you should have everything. You can do that with:

sudo tar cvf cron-backup.tar /etc/cron.* /var/spool/cron/crontabs


du checks all files and sums them up. It cant get into root-only spaces, so it can't tally all data. Try sudo du.

du measures each file while df reports the free/taken space. It reports everything, but can be thrown off by bad files, missing sectors, etc. It measures the PHYSICAL free space, not the space you can use.

Whenever checking a hard drive, use du.

SRC: Why do "df" and "du" commands show different disk usage?


The top answer in the page you linked to should contain enough information about how to do this.

A .desktop file is one of many files in /usr/share/applications containing the information about software applications which should be launchable in the desktop environment.

Note: this is for applications that will be made available to all users.  Naturally, due to permissions, if you do this with a Wine application it simply won't work for other users.

To create such a file you can copy-paste from another file into a new file, also with the extension .desktop, and just change the relevant details.

Follow the precise instructions in that answer and it should work.  If not, then come back and specify what you tried and what happened (in a new question).


After upgrade to 12.04 wireless keeps dropping on BCM4312

So far, what has worked for me is booting using an older kernel (2.6.32, selected from the GRUB menu at start), and then calling sudo modprobe b43 at a Terminal. Then just clicked on "Enable wireless" if it isn't enabled.

Since I'm a bit of a noob, I don't know if this is a good idea or if I'm screwing everything. But I got wi-fi =D.


Host local database using ubuntu for external applications

LAMP would be overkill. That is intended for hosting a website.

If you only need a database you can install MySQL. But that might be overkill too. There is also SQLite (it is a "light" database and I would opt for that).

MySQL:

sudo apt-get install mysql-server

SQLite:

sudo apt-get sqlite

  SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world. The source code for SQLite is in the public domain.

MySQL Workbench can used for MySQL administration:

sudo apt-get install mysql-workbench

SQLiteman can be used for sqlite3 administration:

sudo apt-get sqliteman


I believe that lack of dhcp server may be a problem here. In such a case you will need to setup static IP in interfaces (make sure about dhcp with whoever manages the network)

iface eth0 inet dhcp

dhcp means that interface should look for dhcp server which will assign IP to it.

And if there's no dhcp server in the network something like this may be needed:

iface eth0 inet static
address 192.168.1.50
netmask 255.255.255.0
gateway 192.168.1.1

These are just examples - all depends on actual network.

If unsure whether you have dhcp in your network or not - you can try to run dhclient command which will try to assign IP from dhcp to your interface. If there's no result - there's apparently no dhcp in your network or it may not work properly.

I hope that will help at least to diagnose the problem a bit.