I managed to get the full Ubuntu 20.04 Unity desktop GUI running using
VcXsrv by installing the GNOME Desktop the ubuntu-wsl2-systemd-script and then appending the following to my ~/.bashrc file.
Initially, Ubuntu is root access only, so create a normal account with sudo privilages;-
sudo adduser username
sudo usermod -aG sudo username
exit

From now on, start WSL using that account.
wsl.exe -d distroname -u username

NOTE:
The ubuntu-wsl2-systemd-script calls systemd using --system-unit=basic.target
thus does not start the gdm or lightdm service, so edit the enter-systemd-namespace and start-systemd-namespace files and change --system-unit=basic.target to --system-unit=default.target prior to installation.
# runs only if 1st level shell
if [ $SHLVL = 1 ] &&
   [ -d "${srv_path="/mnt/c/Program Files/VcXsrv"}" ] &&
   [ -f "${srv_exec="$srv_path"/"${srv_name=vcxsrv.exe}"}" ] &&
   [ -d "${sys_path="/mnt/c/Windows/System32"}" ] &&
   [ -f "${tasklist="$sys_path"/tasklist.exe}" ] &&
   [ -f "${taskkill="$sys_path"/taskkill.exe}" ]; then
   # find a Windows Process ID
   function find_wpid {
     echo $("$tasklist" | grep "$1" | awk '{print $2; exit}')
     }
   # kill a Windows Process ID
   function kill_wpid {
     "$taskkill" /PID $1 /F /T >/dev/null
     }
   # export the Windows %UserProfile% path in Linux Format
   export WIN_HOME="$(wslpath "$($sys_path"/cmd.exe" /c "<nul set /p=%UserProfile%" 2>/dev/null)")"
   # Find the current WSL2 local IP address
   srv_addr="$(ip route | awk '{print $3; exit}')";
   # shutdown old instance of VcXsrv if running
   if [ "${gfx_wpid=$(find_wpid $srv_name)}" ]; then
     kill_wpid $gfx_wpid
     unset gfx_wpid
   fi
   # start a new instance of VcXsrv
   "$srv_exec" :0 -ac -wgl -fullscreen -notrayicon -dpms &
   # wait for startup success
   while [ -z $gfx_wpid ]; do gfx_wpid=$(find_wpid $srv_name); done
   # Start Windows Pulse Audio if installed
   unset srv_exec srv_name
   if [ -f "${srv_exec="$srv_path"/pulse/bin/"${srv_name="pulseaudio.exe"}"}" ]; then
      # shutdown old instance of Pulse if running
      if [ ${snd_wpid=$(find_wpid $srv_name)} ]; then
        kill_wpid $snd_wpid
        unset snd_wpid
      fi
      # delete the expired Pulse config
      if [ -d "${snd_conf=$WIN_HOME"/.config/pulse"}" ]; then
        rm -r "$snd_conf"
      unset snd_conf
      fi
      # Start a new instance of Pulse
      "$srv_exec" --use-pid-file=false --disable-shm=true --exit-idle-time=-1 &
      while [ -z $snd_wpid ]; do snd_wpid=$(find_wpid $srv_name); done
      export PULSE_SERVER=tcp:"$srv_addr";
   fi
   # setup Ubuntu Desktop
   export DISPLAY="$srv_addr":0;
   # setting below: 0 = llvmpipe (faster), 1 = software rasterizer
   export LIBGL_ALWAYS_INDIRECT=0
   export XDG_CONFIG_HOME=$HOME/.config
   export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
   export XDG_SESSION_DESKTOP=ubuntu
   export XDG_SESSION_TYPE=x11
   export XDG_CURRENT_DESKTOP=ubuntu:GNOME
   export XDG_SESSION_CLASS=user
   export XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
   # cleanup expired vars
   unset tasklist sys_path srv_path srv_exec srv_name srv_addr
   # script stays here until gnome-session logout or failure
   gnome-session
   # shutdown VcXsrv
   if [ $gfx_wpid ]; then
     kill_wpid $gfx_wpid
     unset gfx_wpid
   fi
   # shutdown Pulse
   if [ $snd_wpid ]; then
     kill_wpid $snd_wpid
     unset snd_wpid
   fi
   unset taskkill
   # shutdown the shell
   exit 0
fi

NOTE:
When all is up and running, go to Ubuntu's Settings -> Privacy -> Screen Lock and turn off the screen lock options. Trying to log back in after a screen lock for some reason results in an infinite loop when asking for your password. If that happens, just shutdown the WSL distro and on next start all is OK again.
Optional Audio Support
Download and unpack mingw64-pulseaudio-13.0.7z. Edit the \mingw\etc\pulse\default.pa file and replace line 38 containing load-module module-waveout sink_name=output source_name=input with:
load-module module-waveout sink_name=output source_name=input record=0
load-module module-native-protocol-tcp listen=0.0.0.0 auth-anonymous=1

Save the changes, rename the mingw folder as pulse and move it into your C:\Program Files\VcXsrv folder.
I am unsure if this step is required, however I also installed these apps via...
sudo apt-get install alsa-tools-gui pavumeter pavucontrol

GDM3
Solved a problem that the GDM service starts instead of GDM3;-
sudo systemctl start gdm3.service
sudo dpkg-reconfigure gdm3

HELP
Can someone solve the problem that when running gui apps like Synaptic and
BleachBit as root are marked as still running when they have been closed down.


graphic card and drivers for ubuntu 18.04

By default, Ubuntu uses the open source nouveau driver for NVIDIA cards. I recommend you switch to the proprietary NVIDIA driver, you can do this by opening the dash and searching 'drivers', which will show an application which opens a window that then searches for drivers, from there you can select the circle next to 'nvidia-driver-390', and then click Apply in the bottom corner of the window. You'll need to restart after it has finished downloading and installing the NVIDIA graphics driver.


Unable to install kde connect on lubuntu

I suppose that you forgot to add universe repository. The kdeconnect package is located in it in all current Ubuntu versions.

You have to:

add the repository with sudo add-apt-repository universe
install KDE Connect with sudo apt-get install kdeconnect


The answer still isn't black and white. There are two different drivers (and soon a third that aims to superset both). There is still no clear winner between the two. Here's a snippet from the Arch wiki:

  The open source driver is currently not on par with the proprietary driver in terms of 3D performance on newer cards or reliable TV-out support. It does, however, offer better dual-head support, excellent 2D acceleration, and provide sufficient 3D acceleration for OpenGL-accelerated window managers, such as Compiz or KWin.

Which works best for you will likely still depend on your hardware and the applications you want to run. Expect it to be an iterative and occasionally frustrating process.

If you're asking about buying suggestions, I'd personally avoid them until they can deliver a driver that works. That is their aim but progress to date has been slow. If you want high performance and parity between Windows and Linux, you buy Nvidia. If you want a solid open driver stack (for KMS, Wayland, etc) you get something with an Intel IGP.


Create a new file (res.sh) and past it into

#!/bin/bash
xrandr --output LVDS --mode 1024x768

and, in your terminal, type :

sudo chmod +x res.sh

and a create a new .desktop file into : /usr/local/share/applications/

gksudo gedit /usr/local/share/applications/res.desktop

and past it :

[Desktop Entry]
Type=Application
Terminal=true
Name=Resolution
Icon=/path/to/icon/res.svg
Exec=/path/to/file/res.sh

now you can change resolution by luncher


How to find all files with zeros, including filenames with spaces?

This is a bit of a red herring - find is capturing the files and printing the names correctly. All you need to do is have awk print the whole record instead of just the first two fields:

find -type f -printf "%S\t%p\n" 2>/dev/null | awk '{if ($1 < 1.0) print $0}'

or instead, tell it to only split on tabs, not any whitespace:

find -type f -printf "%S\t%p\n" 2>/dev/null | awk -F"\t" '{if ($1 < 1.0) print $1 $2}'


How do I change UUID of a disk to whatever I want?

If you used ext for it:

tune2fs /dev/{device} -U {uuid}

From man tune2fs

  -U UUID

  Set the universally unique identifier (UUID) of the filesystem to UUID.  The format of  the  UUID  is  a series  of  hex  digits  separated  by hyphens, like this:  c1b9d5a2-f162-11cf-9ece-0020afc76f16. The UUID parameter may also be one of the following:

clear  clear the filesystem UUID
random generate a new randomly-generated UUID
time   generate a new time-based UUID

  The  UUID  may  be  used  by  mount(8), fsck(8), and /etc/fstab(5) (and possibly  others)  by  specifying UUID=uuid  instead  of  a  block special device name like /dev/hda1.


How do I stop sound coming from my speakers with a faulty headphone socket?

This is what I did to stop the sound from being played from my built in speakers even when the headphones are connected.

Goto "Ubuntu Software Centre", search for "GNOME ALSA Mixer" and install it.
Reboot the machine if required.
Open "GNOME ALSA Mixer". Check the 'Mute' below the column named "Mono". Uncheck the mute under other columns.
Yippee ! You should now hear sound only from the headphones and not from the built in speakers.

Please try this and let me know if it works for you. This is for Ubuntu 12.04 LTS.

In case you don't see the column named "Mono", just try this out. In the GNOME ALSA Mixer, check active the headphone Jack Sense tab below the volume control options. This solved the problem for me.


Can I test a link with an antivirus before accessing it?

I have found this page virus total that allows you to paste an url and then it runs almost 70 signatures to analyze it searching for virus.


do-release-upgrade --quiet / -q No definition of what it does

Okay so I looked into this by testing it, I Installed a virtual Ubuntu 10.04 edited some config files and ran do-release-upgrade -q,

It ran exactly the same I had all the same questions to answer regarding mysql passwords, and modified configs.

This led me to look at the code to figure what it exactly does. The code for do-release-upgrade is here

Looking through it looks like using the -q option simply omits a tiny bit of output.

This is the only stuff it omits as far as I can tell.

if not options.quiet:
    print _("Checking for a new ubuntu release")

..

if not options.quiet:
      print _("No new release found")

...

if not options.quiet:
      print _("Release upgrade not possible right now")
      print _("The release upgrade can not be performed currently, "
              "please try again later. The server reported: '%s'") % m.new_dist.upgrade_broken
    sys.exit(NO_RELEASE_AVAILABLE)

It looks like this does nothing else other than omit the above output, which in the grand scheme of the upgrade output is minute to say the least.


Can I continue playing music after suspending my laptop?

The best way to save power AND play music is to just turn off the display

Hibernate will not work. Hibernation means your computer saves its current state to the hard disk, and shuts down completely. You can't play music if your computer is off -- in the same way, you can't if it's hibernated.

Ubuntu actually suspends the computer when you close the lid, which is slightly different than hibernate in that it uses just a little bit of power and can resume instantly, but it makes no difference - the speakers, CPU, etc. are all still off.

Set Ubuntu to "Do Nothing" when the lid is closed, and disable wireless if necessary

The laptop component using the most power is usually the display; by setting the laptop to "Do Nothing" when you close the lid, it will turn off the display--saving a significant amount of power--and let your music continue playing.

You can change this from System Settings...Power:

The CPU can use power if it is active, but Ubuntu manages this intelligently; playing music is not a CPU-heavy activity on any recent laptop.

If the music is on your hard disk, you can also try turning off wireless networking to save a little more power.


Update: Now available for 16.04.2 users.

You need to enable this repository for latest xserver:

https://launchpad.net/~canonical-x/+archive/ubuntu/x-staging

It will give you xserver 1.19.3 assuming you were already using 16.04.2 (HWE)

You also need an nvidia driver with the May bug fixes.
I'm using the 375.66 driver from here

https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa

Do a complete purge and reinstall of the nvidia drivers.
e.g.

sudo apt purge nvidia*

and then reinstall, perhaps by the GUI additional drivers tool.
Then make a file
/etc/modprobe.d/zz-nvidia-modeset.conf with contents:

options nvidia_375_drm modeset=1

make sure you have Optimus enabled in Bios (it's "Hybrid" in my Thinkpad P50), and off you go. Definitely no more flicker. I don't know how stable it is yet, time will tell.

Long and detailed answer here: Screen tearing on Nvidia GTX960m


Error editing connection: did not find a connection with UUID '(null)'

Edit the file /etc/networking/interfaces and put a # in front of EVERY line.  This will comment them out.  NOTE you will need to use sudo and suggest command

sudo nano /etc/network/interfaces

Next, stop and restart the NetworkManager.service with:

sudo systemctl stop NetworkManager.service
sudo systemctl start NetworkManager.service


Shutdown slow in 13.04, hangs on shutting down processes

Been a while, but I eventually found out that tlp was the culprit. It wasn't really doing any better that laptop-mode-tools (worse, even, as it couldn't control the backlight) so I just reinstalled that and the problem was solved.


Indicator menu from gtk.Builder ui string

The problem is that your Indicator object (ind)  is not a class variable, it's scope is only in the __init__ function. This means it is being destroyed by Python's garbage collection once your class finishes initation. To fix this, replace ind with self.ind:

self.ind = appindicator.Indicator("jes_test_menu", "indicator-messages", appindicator.CATEGORY_APPLICATION_STATUS)
self.ind.set_status(appindicator.STATUS_ACTIVE)
self.ind.set_attention_icon("new-messages-green")
self.ind.set_menu(menu)


CyberPanel installation problem to Ubuntu 20.04.1 LTS

You need to enable universe repository, because nghttp2, idn2 and virtualenv are available from universe.
sudo apt-get install software-properties-common
sudo add-apt-repository universe


There are two questions here, I'll try to help.

lxd init requires the LXD installation to be brand new with no containers already created. The command you're looking for is dpkg-reconfigure -p medium lxd which will allow for reconfiguration of the network bridge.

You can also use this command to address your second issue and try again to create the bridge.


How do I get Unity back after Gnome Shell install?

Removal instructions are here:

How do I install and use the latest version of GNOME?

(Though I don't know how well it will work)


Live usb/cd is not booting on Asus M599X evo motherboard having UEFI bios?

Try to access a boot options screen. Most firmwares let you do this by pressing F2, F10, F12, or some other key at boot time. (Look for a prompt about this or consult your manual.) With any luck, you'll see two options for how to boot your CD, one in BIOS mode and one in EFI/UEFI mode. They aren't likely to be labelled this logically, though; you might see something like "Boot CD" and "Boot CD (UEFI shell)". Try both of those options. It's possible that your board is having problems with whichever mode it's selecting by default, but that the other one will work.


no audio on windows guest after installing vbox guest additions

Use PulseAudio (the sound system Ubuntu uses directly).

If you don't have that available, I suggest you update VirtualBox to a newer version.


As we discussed in a chat, the reason was that NTFS filesystem in question has been dirty and contained cached metadata. An attempt to re-mount it resulted in:

The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)
Failed to daemonize.
Version 2016.2.22AR.1 integrated FUSE 28
Mounted /dev/sda2 (Read-Only, label "", NTFS 3.1)
Cmdline options:
Mount options: allow_other,nonempty,relatime,ro,fsname=/dev/sda2,blkdev,blksize=4096
Ownership and permissions disabled, configuration type 7

After fixing it with
ntsfix
OP was able to remove the file.


Missing desktop icons with Nemo on Ubuntu 16.04

Note, from http://www.webupd8.org/2016/03/nemo-with-unity-patches-available-for.html

  Nemo 2.8.6 is available in the official Ubuntu 16.04 repositories
  however, it can't be used to draw the desktop under Unity and it comes
  with Cinnamon dependencies.

A patched version is available here:

http://www.webupd8.org/2013/10/install-nemo-with-unity-patches-and.html


What's the difference between auto and manual modes in update-alternatives?

automatic mode
          When  a  link  group  is in automatic mode, the alternatives system ensures that the links in the group
          point to the highest priority alternative appropriate for the group.

manual mode
          When a link group is in manual mode, the alternatives system will not make any changes  to  the  system
          administrator's settings.

Like the above excerpt from man update-alternatives says:

Automatic mode:

Changes will be made by the system to the settings of the administrator of that system if this change will ensure that the best option or choice of settings will always be used for that application(s).
Manual mode:

Changes will not be made by the system to the settings selected by the system administrator. And so the system admin's choice will be kept and used at all times.


How to include locally build Python package system-wide?

Use checkinstall to build a deb file and install it.

Checkinstall will replace de 'make install' part of the standard compilation. Instead of just copying the files to their target directories it will build and install a deb file.

If you can't use checkinstall, you could create a dummy package using equivs. Note that this can create problems when updating or uninstalling and it's only recommended for expert users. It has a known tendency to grow out of control, so use it with care.

Install equivs:

sudo apt-get install equivs

Create the control file:

equivs-control python-numpy

This will create a template control file called python-numpy (the name doesn't matter)edit it python-numpy so it looks like this:

### Commented entries have reasonable defaults.
### Uncomment to edit them.
# Source: <source package name; defaults to package name>
Section: misc
Priority: optional
# Homepage: <enter URL here; no default>
Standards-Version: 3.9.2

Package: python-numpy
Version: 9.9
# Maintainer: Your Name <yourname@example.com>
# Pre-Depends: <comma-separated list of packages>
# Depends: <comma-separated list of packages>
# Recommends: <comma-separated list of packages>
# Suggests: <comma-separated list of packages>
# Provides: <comma-separated list of packages>
# Replaces: <comma-separated list of packages>
# Architecture: all
# Copyright: <copyright file; defaults to GPL2>
# Changelog: <changelog file; defaults to a generic changelog>
# Readme: <README.Debian file; defaults to a generic one>
# Extra-Files: <comma-separated list of additional files for the doc directory>
# Files: <pair of space-separated paths; First is file to include, second is destination>
#  <more pairs, if there's more than one file to include. Notice the starting space>
Description: <short description; defaults to some wise words>
 long description and info
 .
 second paragraph

The more data that you give to it, the better the deb will be. I have only modified 2 fields:

Package: The name of the package that you want to build. For a dirty solution use python-pynum
Version: Use a number high enough to keep apt-get from updating it.

A better (but untested by me) solution could be to create a different package name, something link python-pynum-dummy, and use in the Provides line put python-numpy. This should be cleaner.

Finally build the deb.

equivs-build python-numpy

And install it.


License concerns of using Ubuntu's color scheme and fonts in an open-source app

These three snippets were taken from the official Ubuntu Intellectual property rights policy webpage.

  Canonical owns and manages certain intellectual property rights in Ubuntu and other associated intellectual property (Canonical IP) and licenses the use of these rights to enterprises, individuals and members of the Ubuntu community in accordance with this IPRights Policy.

  Use of Canonical's copyright, patent and design materials

  You can only use Canonical’s copyright materials in accordance with the copyright licenses therein and this IPRights Policy.
  You cannot use Canonical’s patented materials without our permission.

  Trade dress and look and feel

  Canonical owns intellectual property rights in the trade dress and look and feel of Ubuntu (including the Unity interface), along with various themes and components that may include unregistered design rights, registered design rights and design patents, your use of Ubuntu is subject to these rights.

Ubuntu's color scheme and fonts falls under the category of various themes and components in the last paragraph of the preceding text block.


I do not think VMware Player supports OpenGL 3D for linux as yet. Linux support may come in future versions [probably the next one]. Compiz will definitely not work.

Only Directx windows runs on full throttle. Compiz-windows-clones[so called] work neatly.


You can upgrade just the kernel by running the following command:

sudo apt-get update && sudo apt-get install linux-image-generic

If you need headers for building kernel modules as well, you can also install them like so:

sudo apt-get update && sudo apt-get install linux-generic

It will update both linux-image-generic & linux-headers-generic.


Gnome-terminal + Vim and Ctrl-Shift mappings

I think the problem here is that you are trying to get vim, which expects to run in a terminal, to recognize a CTRL-SHIFT sequence.  While it's possible for X to recognize such combinations, applications that run in a terminal (or, these days, a terminal emulator) cannot.  This is because, historically, terminals could only send and receive seven- or eight-bit sequences of ASCII data across a serial connection (though this could include "escape sequences" that position the cursor, scroll or delete lines, change color and other helpful effects).

There are 32 "Control Codes" in the ASCII character set, including the familiar CTRL-A through CTRL-Z.  But there are no corresponding ASCII codes for "CTRL-SHIFT" A through Z.  Now, gnome-terminal itself can recognize these codes (CTRL-SHIFT-V, for instance, will paste text from the clipboard), but vim will not be able to have direct access to it.

Of course, it may be possible (I don't know) for a terminal emulator to be set up to convert CTRL-SHIFT key presses to an escape sequence which can then be recognized by a vim mapping.

=======

UPDATE

You might be interested in gvim, which is a graphical version of vim that runs as an X program rather than a terminal program.  Maybe gvim will be able to understand CTRL-SHIFT codes?


How can I disable the dash "Run" command history in Ubuntu 16.04?

Simple, either directly in dconf-editor as in below screenshot (click on set to default after highlighting)  or in terminal,

gsettings set com.canonical.Unity.Runner history []

A log out/in  will reflect the stored history being cleared


What's the best way to try newer versions?

In April this year, the next LTS version (16.04) will be issued.  You will be able to upgrade to it directly from 14.04 LTS. It will contain up to date versions of btrfs and the kernel.

Upgrading to 15.10 (non-LTS) will require you to work through the intermediate upgrades (> 14.10 > 15.04 > 15.10).

Are you able to wait 2-3 months?


Here was my solution, which worked using Ubuntu 14.04 LTS. Took me 1.5 days to figure out :-/

I could not do this without a multi USB adapter. I needed at least 2 USB ports. Here's what I did.

Plug the multi USB adapter in.
Plug the wireless keyboard & mouse dongle.
Load Windows 10 and shrink the C drive so that you have enough room for a Ubuntu partition and a swap drive (note that Windows will prevent you from doing this, so you need to follow instructions here)
Create two new partitions: one for Ubuntu and one for swap - swap doesn't have to be huge. I use a couple of Gig, but I don't think you even need that to be honest.
When you turn on the SP4, hold down the + volume button until the UEFI screen appears.
Disable Secure Boot and TPM.
Make sure USB Storage appears at the top of the list in Boot config.
Boot up Windows, open a command prompt as Administrator and type bcdedit /set {bootmgr} displaybootmenu yes and hit enter. This will make sure the Windows Boot menu appears on turning on the SP4 - note this also gives you many more boot options, so can be very useful.
Now put your Ubuntu Live USB in and reboot and install Ubuntu from the USB stick (your wifi/bluetooth USB and mouse will hopefully work - mine did but only with the multi USB adapter). Note that if "Install alongside windows" is missing, then click "Something else" instead. You need to assign ext4 root (/) partition, swap partition, and also select the Windows Boot Loader partition as the Ubuntu EFI partition. Do NOT format the EFI partition !!!

When I rebooted, the Ubuntu GRUB2 loads up and gives you the choice to either load Ubuntu, or open the Windows Boot Loader.

Note - it may not actually be necessary to enable the Windows Boot Loader menu, but it didn't work when disabled for 15.10.

If anything goes wrong you can always download an SP4 Windows 10 Recovery ISO from Microsoft's website, and there's always the recovery partition on the SP4. Overall I'd recommend turning on the Windows Boot Loader menu as it gives you more boot options.

Anyway, good luck !


I'm really not sure what your asking.. but the quickest way to install a fresh 13.10 install is to download the iso from http://www.ubuntu.com/download burn it to a DVD and go from there.


I came across a similar error make [1]: Leaving directory on Ubuntu 18.04.
You need to install in /opt - it is a directory where to install unbundled packages, each in its own subdirectory.
I install luajit in /opt (instead of /home):
# cd /opt
# ./configure ; make ; make install
The system automatically redirects the installation to the /usr/local folder. This error disappears for me:
ln -sf luajit-2.0.5 /usr/local/bin/luajit
==== Successfully installed LuaJIT 2.0.5 to /usr/local ====


3.41GB truecrypt file not syncing on ubuntu one

This is a really bad idea. If you got this working, you would have to upload the entire 3.41 .tc file every time you made any changes within it.

For a better option, see this question here on Ask Ubuntu. Skip my answer posted there, and scroll down to @jadahl's answer for a better way to make this work.


Is it necessary to monitor cron/anacron?

If you are doing that, then most of the relevant tasks are done. You could get Log Viewer 2.32.0 (current) to view all the logs on the PC. It is in the software manager.

The answer to the question is NO. You DON'T have to monitor those things. It's nice to know where to find them and IF you needed to examine them for whatever reason.


User experience of Ubuntu 17.04 on Dell Inspiron 7560

I have this exact model, but I have already bought it with Ubuntu 16.04LTS preinstalled. I have formatted it and installed Kubuntu 17.04.

There were some difficulties in partitioning; I had to do it manually using KDE Partition Manager, because I wanted to keep the original partitions and just make a big one for Kubuntu. When I decide to format it again, I will not do this; I'll just let the system erase all and make its own partition scheme.

Everything is running just fine, no problems. I am a Brazilian user, and my DELL came with an ABNT2 type keyboard. Working just fine.


At least for 14.04, apt-file says:

[romano:~] % apt-file search netinet/sctp.h
libsctp-dev: /usr/include/netinet/sctp.h

so to compile any code that #includes the file sctp.h you need to install the package libsctp-dev and its dependences via

sudo apt-get install libsctp-dev

If you want to do this at low level (kernel direct syscall access etc.) you should probably replicate all the boilerplate code of the library --- why would you do that? You don't do that with sys_open() and friend, you use libc to get these nicely wrapped up.

Get more info about this (and any) package with apt show libsctp-dev.


Wire app ver 33.2872 from Ubuntu 18.4.1 repo,

So I have sorted this question myself, the answer is simple. As the Wire App uses Firefox, it turns out that the persons Firefox was set to "always use private browsing", once this was altered in settings, the problem was resolved with the Wire App!
Thank you.
Chris.


The issue

The problem is that you've set -w 0.2. When value is below 1, deadline (-w) and timeout (-W) values are ignored. This has been mentioned previously in this question. When you use -w 1 , your script (which I slightly modified to remove useless bits) works properly:

$ ./ping_server.sh
waiting for ServerXY ....................
Server is back online

$ cat ./ping_server.sh
#!/bin/bash
printf "%s" "waiting for ServerXY ..."
while ! ping -c 1 -n -w 1 147.153.237.192 &> /dev/null
do
    printf "%c" "."
done
printf "\n%s\n"  "Server is back online"

Solution

Obvious solution is to use -w 1. If you do intend on using a value lower than 1 second, the timeout command should be better:

$ timeout 0.2 ping -c 1 147.153.237.192
PING 147.153.237.192 (147.153.237.192) 56(84) bytes of data.
64 bytes from 147.153.237.192: icmp_seq=1 ttl=124 time=2.61 ms

--- 147.153.237.192 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 2.612/2.612/2.612/0.000 ms

Again, use it with ! operator in the loop:

#!/bin/bash
printf "%s" "waiting for ServerXY ..."
while ! timeout 0.2 ping -c 1 -n 147.153.237.192 &> /dev/null
do
    printf "%c" "."
done
printf "\n%s\n"  "Server is back online"

Of course the opposite can be applied to showing message only if server is up and report when server goes down, example:

$ while ping -q -c 1 172.16.127.2 >/dev/null ; do sleep 1; done ; echo "Server stopped responding"
Server stopped responding

Note however, this is not perfect:

we're pinging with just 1 packet every second. Low bandwidth, poor connectivity, bad hardware in between the server and client pinging the server will trigger the loop to exit and make false positive notification
We're relying on pinging, that is using ICMP echo. Firewalls or even individual servers block responses to ping/ICMP echo. You could use nc of ncat (which is an improved version of nc). Something like in the loop above will work fine instead of ping:

nc -w5 -z 172.16.127.2 80

What this does is connect to server on 172.16.127.2 on port 80. -z is to avoid I/O - just connect and disconnect. -w is to wait for 5 seconds before reporting failed connection. Of course this is a pretty good for when you have server under your control and you know the port 80 is open. UPD can be used fine, but if there's firewall in place, TCP is probably preferred.

A hidden benefit here is that if you have some service running on specific port ( such as HTTP on port 80 or RTSP on 554 ), failing to connect to port may serve as indicator your service needs a restart.
Of course, nc and ping can be a bit spammy. Better way would be to have server check-in with   another central server, send a periodic report, maybe each hour; that way if your server misses a "punch time" you can generate errors. Better way is to use a service such as Nagios, which does that. But at this point we're getting into the realm of enterprise-level computing with multiple servers. If you have something like Raspberry Pi at home, you probably  don't need anything complex.


Facing unity problems after upgrading to Ubuntu 12.04

Try this in terminal:

sudo apt-get install mesa-utils


How to transfer songs to iPod 6 (iOS 10.x) via ubuntu 16.04?

It most likely will not work unless your device is jailbroken. You can browse your file system and download music from an Apple device on Linux however you cannot transfer music to it. You will also notice that the file names for your songs are extremely un-helpful for sorting if you do choose to download them to your PC, such as AMYQ.mp3, FGBC.mp3, and so on.


Brightness control not working- Ubuntu 12.04 LTS - Macbook pro 5,5

I have a MacBook Pro 7,1 (Mid2010) and have installed the "nvidia-current" drivers.

For me worked the following method:

Type in Terminal:

user@MacBookPro:~$ sudo nvidia-xconfig

I have done that, because the "/etc/X11/xorg.conf" file was missing. After that command
it should have been created.

Then open the file:

user@MacBookPro:~$ sudo gedit /etc/X11/xorg.conf

Add in the 'Section "Device"' following line:

Option "RegistryDwords" "EnableBrightnessControl=1"

After that the Section should look like this:

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection

Then after a restart the brightness controls worked perfectly fine for me.

Hope this helped you.


Redirect bash output to file every 1 second

tcptrack is a ncurses-based tool, I don't think it makes sense to try capturing its output - what you see are the escape sequences. I think if you do netstat -t every second, you would get a log very similar to what you are trying to achieve.
(Btw., you might want to add yourself as "NOPASSWD" sudoer for netstat.)


Unable to mount Windows partition - Not hibernated or Fast restarted


I know basically of two Linux distributions with VERY little image sizes:

Puppy Linux which needs only about 90MB for its  boot image on your USB, or
DSL (DamnSmallLinux) which says it runs from a 50MB image.

I never used one of those so I can't tell you which of them is more comfortable to use, but I think both of them should be enough for a rescue job. I hope you have fun with them. ;D Greetings and good luck!


Are any Zotac Zboxs suitable as HTPC / media centres?

I've been running a Zotac Zbox HD-NS21 for a couple of years as a dedicated mythbuntu frontend. Early on I noticed the HD ran pretty hot and it eventually failed. I jettisoned it and now run from a live usb stick. No issues. I'm currently running 12.04.3 64 bit with nividia 303.88, VDPAU normal. It's solid.


Update package which has newer versions in repos but can't be found in backports?

I think I fixed my specific problem by adding the Kubuntu Precise Backports which has a newer version of libtag1-dev (1.8-1~ubuntu12.04~ppa1).

sudo add-apt-repository ppa:kubuntu-ppa/backports
sudo apt-get update
sudo apt-get install libtag1-dev

Not quite sure though, if that fixes my actual problem with taglib-ruby or even breaks my system on the next update


How to change the file manager from Nautilus to Marlin

To install Marlin in 11.10, enter the following commands in Terminal:

sudo add-apt-repository ppa:marlin-devs/marlin-daily
sudo apt-get update
sudo apt-get install marlin

Source: http://www.webupd8.org/2011/05/elementary-file-browser-marlin-is-now.html

Once Marlin has been installed, follow these instructions to set it as your default file manager:

Open Marlin → Edit → Preferences → click Make my default file manager

Source: http://ubuntuportal.com/marlin-fast-file-browser-and-low-resource-2/


Try with this PPA:
https://launchpad.net/~nvidia-vdpau/+archive/cutting-edge-multimedia/+packages

It provides VLC and FFMPEG, so dependencies should work. Of course, remove the other PPA.


Save print server authentication credentials

To get rid of the "Authentication Required to Print" dialog this is done by directly editing the file, /etc/cups/printers.conf as follows:

Open a terminal window:
Stop the cups server:
sudo service cups stop
Edit the printers.conf file.

sudo gedit /etc/cups/printers.conf

Near the top of file /etc/cups/printers.conf is a line:

AuthInfoRequired username,password

Insert a "#" char in the first column (or, just delete the line):

#AuthInfoRequired username,password

Save edited file
Restart cups server:

sudo service cups start

This should fix the problem.

Reference


Authentication required to Mount a Device

It sounds like you may have removed yourself from the "sudo" group - did you edit your user group memberships recently?  In order to use sudo, you need to be a member of this group, or specifically added to the sudoers file.  However, if you remove this group membership, only someone with root authority can add it back or make a change.  You won't be able to install anything new, either.

Note that prior to 12.04, Ubuntu used the "admin" group instead of the "sudo" group, where Debian used the "sudo" group.  So, if you upgraded to 12.04, it's possible that you may have been a member of the admin group rather than sudo.  Either or both will work, but I'd imagine that "sudo" should now be the preferred group for administrative users.

To confirm if this is your problem, try entering "groups" at a commandline in the terminal.  If you don't see either "admin" or "sudo" (one or both), then this is your problem.  If you do see one of them, then you may need to directly edit your /etc/sudoers file (as root, of course).

But don't despair, there is a way to get around this, although it's not as simple as most people would like.  You will need to gain root access, which can be done at startup with a little work.

First, you need to log in to a single user console mode: here is a good how-to for that.  It tells how to fix a variety of causes for the problem you are having (apparently).  It's slightly dated, and uses "admin" group instead of "sudo", so substitute accordingly.


Ubuntu 16.04 + libssl0.9.8 - has no installation candidate?

There has been a version bump for Xenial Xerus:

sudo apt-get install libssl1.0.0

is what you need...

References:

Ubuntu Packages: libssl1.0.0 (1.0.2g-1ubuntu4.1 and others) [security]


Prevent usb tethered device from claiming default route?

Open Networking > Wired Connections > Click on Android USB Tether > IPv4 > Routes > Tick "use only for resources on this network".

This will make it skip adding the default route to this connection, making whatever other connection the default one.


"set /a" was not implemented in cmd until WINE 1.5.20

Depending on what you're trying to accomplish you may be able to work around this by doing the math with a bash script that outputs to a text file, then assigning the contents of the file to a variable from inside WINE like so:

set /p option=<file.txt


How to edit target path of broken symbolic link from GUI?

I use thunar as my default file manager, and here is what I suggest to get a similar behavior like mc.

Create a simple shell script, and save it somewhere you like, for the demonstration purpose I saved it at my $HOME:

#!/bin/bash
if [ -L "$1" ];
then
 new_address=$(zenity --entry)
 ln -sf "$new_address" "$1"
else
 zenity --error --text 'This is not a link'
fi

Add a new custom action which runs this script, for example in thunar:

Now I can right click on files and select 'relink', and it will asks for a new address for that link:

This is obvious that you have to install zenity package to use this script, I think you can manage to use it in different file managers.


This specifically relates to snaps that use X11. In other words, snaps are not running unconfined, but if the confinement of the snap includes access to X, then yeah: it has access to X. It does not involve snaps that don't use the unity7 or x11 interfaces. The issue described in that blog post is a well-known limitation of X, and is one of the reasons alternative technologies are being developed (e.g. Mir).
Gustavo Niemeyer has written a good blog post that discusses this. I'll quote here for posterity and completeness:

The security minded will observe that X11 is not in fact a secure protocol. A number of system abuses are possible when we hand an application this permission. Other interfaces such as home would give the snap access to every non-hidden file in the user’s $HOME directory (those that do not start with a dot), which means a malicious application might steal personal information and send it over the network (assuming it also defines a network plug).
Some might be surprised that this is the case, but this is a misunderstanding about the role of snaps and Snappy as a software platform. When you install software from the Ubuntu archive, that’s a statement of trust in the Ubuntu and Debian developers. When you install Google’s Chrome or MongoDB binaries from their respective archives, that’s a statement of trust in those developers (these have root on your system!). Snappy is not eliminating the need for that trust, as once you give a piece of software access to your personal files, web camera, microphone, etc, you need to believe that it won’t be using those allowances maliciously.
The point of Snappy’s confinement in that picture is to enable a software ecosystem that can control exactly what is allowed and to whom in a clear and observable way, in addition to the same procedural care that we’ve all learned to appreciate in the Linux world, not instead of it. Preventing people from using all relevant resources in the system would simply force them to use that same software over less secure mechanisms instead of fixing the problem.
And what we have today is just the beginning. These interfaces will soon become much richer and more fine grained, including resource selection (e.g. which serial port?), and some of them will disappear completely in favor of more secure choices (Unity 8, for instance).


How to list dependent packages (reverse dependencies)?

apt-cache rdepends packagename should do what you want


Broken package ubuntu-keyring (Ubuntu 15.04 64 bit)

For any one who has the same problem, a big change this happen because of the big number of PPAs you have added, try to remove some of them and update the system.
Hope this can help.


Unable to detect graphics card in 12.04 LTS

The display of the graphics card name in System Settings often does not work (just search askubuntu, there are dozens of questions about it and the answer is always the same...). I wouldn't worry about it and only trust other tools to find out which graphics driver is in use.

Your laptop obviously has a recent Intel CPU, which includes a graphics unit. This is the reason, an Intel graphics card is shown in lspci.

Your xorg.conf hints that atm you are using fglrx, and it seems to be working. To see, if the driver is really active, simply try to run fglrxinfo. Another tool that you might take a look at is amdcccle, the catalyst control center. It will give you a lot of details (if fglrx is installed).

Since you installed the driver from the AMD website, "additional drivers" will not show any driver in its list as active (since you didn't use official driver packages for Ubuntu, but the download from the AMD website).

I don't know about your laptop specifically, but you might find this guide useful: Installing Catalyst with Intel/AMD hybrid graphics

Oh, and btw, the preferred way to install the driver downloaded from the AMD website would be to make distribution specific packages and then to install those. By this, you can ensure that it stays working when you get Kernel updates. If you simply install it, it might be, that you have to reinstall it every time, a Kernel update is installed.


Due to your comment under your question if i understand correctly you solved the main problem but now you ask " But I can't write anything to it".

That is why you cannot write > "drwxr-xr-x 2 root root 4096 Mar 16 10:03 www"

You have to mount /mnt/earth/www with a mask of www user


The lenny directory has been removed.  Now at http://deb.opera.com/opera/dists/ we find only the following (Debian-related) directories:

sid/                    29-Nov-2012 14:21    -
squeeze/                29-Nov-2012 14:21    -
stable/                 29-Nov-2012 14:21    -
testing/                29-Nov-2012 14:21    -
unstable/               29-Nov-2012 14:21    -
wheezy/                 29-Nov-2012 14:21    -


How to resume the interrupted upgrade from 14.10 to 15.04?

This worked for me (running this after a reboot) it started off where the upgrade was interrupted.

sudo dpkg --configure -a


The two problems are separate.

The second problem means that there is an instance of another package related software running -- for example an update. Try ps -eaf | grep apt or ps -eaf | grep dpkg. If you really get stuck, try restarting the computer (yeah, this is not the canonical way of solving things, but might be the easiest one).

As for the first problem, why are you trying to compile and install it from the tar.gz archive? Look here, it is possible to install it using a Ubuntu package.


Start the same "sessions" after shutdown

If you do not want to use standby (for short time inactivities) or hibernate (for longer ones), you could try to check the key

/apps/gnome-session/options/auto_save_session

in gconf-editor, but bear in mind that reopening the same apps (conversely to freeze/hibernate) do not take you to the same exact working desktop.

Moreover, I have to admit I have not tested the solution, so may not work.


So maybe its crazy for me to answer this, having just joined Canonical 3 months ago (today!) and having only run Ubuntu out of curiosity for the few years before joining Canonical. It might even be silly for me to answer it, given that I am on the server team, and Ubuntu definitely has a very large focus on making "Linux for Humans", ergo, the desktop.

To me, the release cycle is everything. Yes there are some things that will never go back to Debian, because these things are somewhat counter to Debian's philosophies. But these are by-products of the greater goal of usability.

When Ubuntu was started, the idea was simple. Debian was awesome then, and is still awesome today. I ran it exclusively for several years and it served me well on laptops, desktops, and especially on servers, being a server kind of guy. But that release cycle was so slow that all of the cool whiz bang stuff that people were producing on Linux was just not making it into the stable releases, and the unstable development release that had all of these things was un-installable (no official isos) and broken quite often.

So by saying "we're going to limit our focus to a couple of architectures, and a subset of packages" (the "main" archive in Ubuntu), the Ubuntu project was able to commit to releasing a tested, stabilized OS with all of that cool new stuff in it. They were also able to commit to carrying a bit of a delta from Debian that was highly focused on usability. By committing capital investment to it, Canonical was able to commit to having the technical staff available to make that happen.

One awesome part of that was that they (I say they, because I am not an Ubuntu member yet) could still keep a lot of the wide breadth of Debian software by creating the "universe" archive. Even better, a community (MOTU) grew up around that to make sure it received some stabilization before release as well.

So, to sum it all up with an analogy.. Ubuntu is to Debian, as your local restaurant is to the local farmer's market. Chef Ubuntu goes to the Debian farmer's market periodically, finds the best fresh ingredients, mixes them with his own special blend, and produces food for his intended audience. For people who enjoy cooking, they can, and do, just go down to the market and get what they need.


Please give more information. What you mean by "it doesn't work"?
Did you configure your network-manager.
Show result of sudo ifconfig


To establish dual monitors with LXDE, install Arandr from Synaptics.  Then follow the instructions in this "How To".
http://lxlinux.com/#14


Ubuntu 16.04 setup crashed, stuck in temporary guest session

Even though we do not know for sure it may be that Dell installed a customized version of Ubuntu.
  It is also to be expected that it did not come with recent security updates.
  Thirdly Ubuntu does not run as expected.

These three facts together with

  Ubuntu is incredibly easy to install

make me believe that your best option here would be to just re-install it. This involves getting an USB key with a recent Ubuntu 16.04.2. for installation. You can download the image for free directly from Ubuntu. Then you would need to create a bootable USB stick (instructions for previous Ubuntu versions, for Windows, and for MAc OS are further down on the the same page).

Boot with this USB key (press F12 while booting) rather than from the hard drive (you may have to choose legacy BIOS) to then choose "Try out Ubuntu" for a live session. It is there where you should be able to connect to your WiFi. The credentials you give here are kept and will also be used after installation.

Only after the live session including WiFi works as ecpected your can proceed with "install Ubuntu". It should not take you much longer than 20 minutes (which will be far less than any repair attempt of an unbootable broken system)


How can I run docker commands after "docker run" from a script?

I think what you're missing is the -d parameter to run it in the background

docker run -d --name "Test" gcr.io/tensorflow/tensorflow:latest-gpu

Doing that starts up the container without transferring you into it. So that way your script can continue to run other commands.

Now if you need to actually "move some files around" within the container, what you can do is mount your script as a volume and run it.

docker run -d -v$(pwd):/my --name Test gcr.io/tensorflow/tensorflow:latest-gpu bash
docker exec -d Test bash /my/script.sh

So that way you mount your preset working directory into the container and then within the container run that script, while continuing along in your original script. so then add

docker exec -it Test bash

and now you are in your container, after having run the script.

or, you can just run several docker exec commands instead of mounting a folder.

#!/bin/bash
docker run  -d --name Test gcr.io/tensorflow/tensorflow:latest-gpu bash
docker exec -d  Test bash cp /x /y
docker exec -d  Test bash cp /y /z
docker exec -it Test bash


this can happen if you have some buggy bios. May be your bios is not booting from DVD.
Alternatively you can try booting from some USB drive.

In my system pressing F9 at system start up pops out a choice of devices from where you can boot.


How do I resolve unmet dependencies after adding a PPA?

APT is a package management system for Debian and other Linux distributions based on it, such as Ubuntu. For the most part, APT is easy to use for installing, removing, and updating packages. In rare instances, often when you are mixing in third-party dependencies, there is a chance that apt-get may end up giving you an error telling you that a package installation could not be completed.

Solutions:

It is always a good idea to back up configuration files like /etc/apt/sources.list, so you can revert the changes if needed.

If the error shows something like this:

<some-package>: Depends: <other-package> (= version) but this-version is to be installed

Then make sure that the restricted and universe repositories are enabled. Hit Alt+F2, type software-properties-gtk and hit Enter.

Under Ubuntu Software tab, enable all the repositories.

One possible cause of unmet dependencies could be corrupted package database, and/or some packages weren’t installed properly. To fix this problem, hit Alt+Ctrl+T to open terminal and try to run one of the following commands:

sudo apt-get clean

or,

sudo apt-get autoclean

apt-get clean clears out the local repository of retrieved package files (the .deb files). It removes everything but the lock file from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/. apt-get autoclean clears out the local repository of retrieved package files, but unlike apt-get clean, it only removes package files that can no longer be downloaded, and are largely useless.
One of the most basic fixes to resolve dependencies problems is to run:

sudo apt-get -f install

The -f here stands for “fix broken”. Apt will attempt to correct broken dependencies. If you manually installed a package that had unmet dependencies, apt-get will install those dependencies, if possible, otherwise it may simply remove the package that you installed in order to resolve the problem.

Then run:

sudo dpkg --configure -a

Then run this again:

sudo apt-get -f install

If the output is:

0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

That means it failed.
Next solution is to run:

sudo apt-get -u dist-upgrade

If it shows any held packages, it is best to eliminate them. Packages are held because of dependency conflicts that apt cannot resolve. Try this command to find and repair the conflicts:

sudo apt-get -o Debug::pkgProblemResolver=yes dist-upgrade

If it cannot fix the conflicts, it will exit with:

0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.

Delete the held packages one by one, running dist-upgrade each time, until there are no more held packages. Then reinstall any needed packages. Be sure to use the --dry-run option, so that you are fully informed of consequences:

sudo apt-get remove --dry-run package-name

Since removing the package you are trying to install may not be ideal, you might also try finding a repository that has the packages you need to satisfy the dependencies.

Finally, if all else fails, you can attempt to satisfy the dependencies yourself, either by finding and installing the necessary packages, or by installing them from source and then creating “deb” packages for them.

Disable/Remove/Purge PPAs:

PPAs (Personal Package Archive) are repositories hosted on Launchpad. You can use PPAs to install or upgrade packages that are not available in the official Ubuntu repositories.

One of the most common causes of unmet dependencies are PPAs, especially when used to upgrade the existing package in Ubuntu repositories. To solve the problem you have three options: disable, purge (revert back to original package in Ubuntu repositories) or remove PPA.

Disable:

Disabling a PPA means no more updates for the packages installed from that PPA. To disable a PPA: Open Software Center > Edit > Software Sources Or,

Hit Alt+F2 and run software-properties-gtk.

Click on Other Software tab, you'll see that each PPA have two lines here, one for the compiled packages and one for the source, Uncheck both lines to disable a PPA. Here you can also add and remove PPAs.

Purge:

Purging a PPA means, downgrading the packages in the selected PPA to the version in the official Ubuntu repositories and disabling that PPA. PPA Purge does exactly that. To install PPA Purge run the following command:

sudo apt-get install ppa-purge

But, considering the question apt is broken, the above command will fail. So use this command

mkdir ppa-purge && cd ppa-purge && wget http://mirror.pnl.gov/ubuntu/pool/universe/p/ppa-purge/ppa-purge_0.2.8+bzr56_all.deb && wget http://mirror.pnl.gov/ubuntu//pool/main/a/aptitude/aptitude_0.6.6-1ubuntu1_i386.deb && sudo dpkg -i ./*.deb

To use PPA Purge:

sudo ppa-purge ppa:someppa/ppa

If 'ppa-purge' command fails for some reason, you can't run 'ppa-purge' again unless you re-enable the PPA (To enable the PPA follow the same steps as disabling a PPA and Check the both lines of a particular PPA to enable it).

Note: PPA Purge doesn't remove PPAs (may be in future), So you'll have to manually remove the PPA.

Remove:

If the package installed from a PPA doesn't exist in official Ubuntu repositories then using PPA Purge is not recommended, because there's nothing to be downgraded and PPA Purge wouldn't delete it either. To remove a PPA and installed packages run the following commands: (Ignore the first command if you don't want to remove the installed packages)

sudo apt-get autoremove --purge package-name
sudo add-apt-repository --remove ppa:someppa/ppa
sudo apt-get autoclean

Alternatively you can use Y PPA Manager to disable/remove/purge PPA's (Details at the end of answer).

Preventive Measures:

So how can we avoid this from happening in the first place?

Keep Ubuntu Up to date. Ubuntu automatically notifies when updates are available, you can also check for available updates by clicking on Session Indicator in Unity panel:

Or, Hit Alt+Ctrl+T to open terminal and run following commands:

sudo apt-get update
sudo apt-get upgrade

Update: Synchronizes your list of available packages with the servers in source repositories.
Upgrade: Downloads & installs any newer versions of your installed packages.
If you decide to add other repositories to sources.list, make sure that the repository is meant to work (and known to work) with Ubuntu. Repositories that are not designed to work with your version of Ubuntu can introduce inconsistencies in your system and might force you to re-install. Also, make sure that you really need to add external repositories as the software package(s) you are looking for may already have been introduced into the official repositories! Source
Remove duplicate PPAs. Y PPA Manager (installation guide at the end of answer) can easily scan and remove duplicate PPAs.

Hit Alt+F2 and run y-ppa-manager to open Y PPA Manager.
Once open, double click or hit Enter on Advanced.
In resulting window select Scan and remove duplicate PPAs and click OK.

Getting Help:

When asking for help on Askubuntu or any other help forum, you should include the output of the following commands in your question:

Output of actual error:

sudo apt-get install package-name
This will show your sources.list:

cat /etc/apt/sources.list
This will show the list of PPAs (If any):

cat /etc/apt/sources.list.d/*

Additional Sources:

'apt' Ubuntu Manpage
'apt-get' Ubuntu Manpage
'apt-get/how-to' Community Ubuntu documentation
'Repositories/Ubuntu' Community Ubuntu documentation
'Repositories/CommandLine' Community Ubuntu documentation

Y PPA Manager:
 Y PPA Manager is an one stop shop for all of your PPA needs.

Here are some of its features:

search packages in all Launchpad PPAs
list and download packages in a PPA
add / remove / purge a PPA
backup and restore PPA sources
remove duplicate PPA sources

To install Y PPA Manager, open terminal by hitting Alt+Ctrl+T and run following commands:

sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install y-ppa-manager

Considering the question, apt is broken, so use these commands instead

sudo su

and

32 Bit:

mkdir y-ppa-manager && cd y-ppa-manager && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/launchpad-getkeys_0.3.2-1~webupd8~oneiric_all.deb && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/y-ppa-manager_0.0.8.6-1~webupd8~precise_all.deb && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/yad_0.17.1.1-1~webupd8~precise_i386.deb && dpkg -i ./*.deb

64 Bit:

mkdir y-ppa-manager && cd y-ppa-manager && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/launchpad-getkeys_0.3.2-1~webupd8~oneiric_all.deb && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/y-ppa-manager_0.0.8.6-1~webupd8~precise_all.deb && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/yad_0.17.1.1-1~webupd8~precise_amd64.deb && dpkg -i ./*.deb


How to play sound by Front Mic In sounds?

You probably need to install the pulse loopback device.

Executing this in a shell

pactl load-module module-loopback

will load the module for the session, and

sudo sh -c ' echo "load-module module-loopback" >>  /etc/pulse/default.pa '

will save the configuration for future sessions.

Credit.


How to prevent x11vnc attacks: attempts to unauthorized logins?

There are many ways to solve this problem. Here is my solution.
Stop all connections to x11vnc except localhost
The easiest way to do this is to start x11vnc with the -localhost option. If you setup x11vnc to startup at boot as a systemd service you have have a file /lib/systemd/system/x11vnc.service where you may have a line like:
ExecStart=/usr/bin/x11vnc -auth /var/run/lightdm/root/:0 -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared -localhost

Note, the last option is -localhost. This option means x11vnc will only listen to the localhost IP address, which is 127.0.0.1. This special IP address always refers to the computer itself. This means only the computer where x11vnc is installed can access x11vnc. Other computers will need to access x11vnc indirectly using ssh tunnel.
Setup openssh-server
You will need the openssh-server running in the same computer running x11vnc. Open a terminal by pressing Ctrl+Alt+T and enter the command:
sudo apt install openssh-server

This will install the ssh server. See configuring the ssh server instructions for security related information. I recommend you enable key based login and disable password based login for ssh.
Setup ufw and fail2ban
ufw is installed in Ubuntu but may not be enabled. Enter the following two commands in the terminal:
sudo ufw enable
sudo ufw allow ssh

to enable ufw and allow ssh connection from other computers. If you already have ufw enabled and have setup rules to allow x11vnc connections, you may want to delete those rules.
Similarly install and configure fail2ban. Follow one of the tutorials on how to configure fail2ban for ssh.
If you are behind a router...
and have setup port forwarding for the port 5900 (or something similar) now is the time to change that. You want to change that rule to port 22 so that connection requests for ssh are forwarded instead of connection requests for x11vnc.
Note, ports 5900 and 22 are the default ports for the respective services vnc and ssh, if you have changed the default, you will need to make corresponding adjustments.
How to remote connect to x11vnc now?
We are done with setting up the computer running x11vnc. Now we need to make some changes to the computer that you use to remotely connect to this computer.
Note: all the changes and commands below this line is for the client computer used to connect to the `x11vnc. I will call this computer the laptop.
Use ssh tunnel using command line:
Use the following command at the terminal
ssh user@host -L 5900:localhost:5900

where user is the username in the computer running x11vnc and host is the hostname or IP address of that computer. This command must continue to run as long as you want to keep remotely connected to the host computer. Don't close the terminal while this is running.
If you haven't setup your x11vnc server to start at boot, you can setup the ssh tunnel and using the same command start the x11vnc server in the remote computer. If you want to do that, use the command:
ssh user@host -L 5900:localhost:5900 x11vnc -localhost

While one of these commands are running in the terminal of the laptop, run the app you use to connect to the remote computer as usual.
If you use Remmina to connect to the x11vnc server ignore this command line section and read on.
Setup Remmina
If you use an Ubuntu laptop to remotely connect to x11vnc then you probably use the app called Remmina. This app has the capability to do the ssh tunnel built-in, so you don't have to open a terminal and type the command.
Edit the setting of the VNC connection you have setup in Remmina for your remote connection and go to the SSH Tunnel tab as shown below:

Make sure the following are enabled/checked:

Enable SSH Tunnel
Tunnel via loopback address
Same server at port 22

as shown in the picture above. Save the new Remmina setting and try to connect. If all went well only you should be able to connect to your x11vnc server and no one else will.
Connect from Android
OP asked for instructions for connecting to the remote computer running x11vnc from an Android phone/tablet in the comments.
Install and setup bVNC in the Android device
bVNC is available in the Google Play store.
When you open bVNC for rhe first time, you will see some permission requirements. Review them and decide if you want to accept them or not. Then you will see a page of feature lists. Press the Close button at the bottom right of the page to get to the settings page.
Change the connection type from Basic VNC > Secure VNC over SSH and you will see the following screen:

Fill up the settings as follows:

Connection type: Secure VNC over SSH (as noted above)
Title: Give it a meaningful name indicating which computer the connection is for.

SSH Tunnel Settings

SSH Server: This is the IP address or host domain name for the x11VNC computer. This is the server address you would have entered for basic VNC setup.
22: The default ssh port is pre-filled as 22. Change it only if you have changed the openssh-server default settings in the computer running x11VNC.
SSH Username: This is the user name you use to login to the computer running x11VNC when you sit in front of it.
SSH Password: This is the password you use to login to the computer running x11VNC when you sit in front of it.
SSH Passphrase: This is needed only if you have setup a passphrase when you generated the private-public key pair. The private-public key pair can be used instead of the SSH Password above.
Use Key: This tells bVNC to use the private-public key pair instead of the user password.
Manage Key: This button will take you to another page where you can generate the the private-public key pair and share the public key so that it can be added to the set of "Authorized Keys" in the computer running x11VNC. This is needed only if you check the box to Use Key.
Configure AutoX: Disabled. Leave as is.

VNC Connection Settings

Localhost: Leave as is.
5900: Leave as is unless you have changed the default VNC port in the computer running x11VNC.
VNC Username (optional): Add the user name if you have setup an user name within x11VNC configuration.
VNC Password: add the VNC password here if you have setup it up within x11VNC configuration.
Keep: Check this box to save the VNC password in bVNC.

After setting up bVNC you should be able to connect to your remote computer running x11VNC from the Android device.
Setup Private-Public Key Pair in bVNC
If you have setup your ssh-server in the computer running x11VNC to use only key based logins, then you won't be able to use passwords under SSH Passwords above. In that case you will need to check the box Use Key and use the Manage Key button above to generate and somehow get the public key to the correct folder and file in the computer running x11VNC.
Press the Manage Key button to see the following window:

First, you need to generate a new private-public key pair. Press the Generate New Key button, and keep Type to RSA. The default Bits size of 2048 should be okay.
You will be asked to move your finger on the Android screen for a while to generate entropy for the random number generator and the keys will be generated.
You will need to get the public key to your computer running x11VNC in one of the three ways listed as the three buttons:

Share Public Key
Copy to Clipboard
Save Public Key to File

The first may be the easiest. Click the Share Public Key button and select Gmail (or whatever email you use) and send it to yourself.
You may also specify a file name such as rsa.pub and click send it to file button, and send that file as attachment to yourself.
To import the public key into the computer you will have to physically (locally) login to that computer.
Check if you already have the folder /home/$USER/.ssh in your Home folder and if so, if you already have a file called /home/$USER/.ssh/authorized_keys. In a terminal use the command:
ls ~/.ssh

If you see contents of the folder including authorized_keys then you have them.
If you already have the file authorized_keys you will need to add the contents of the public key into that file. Open that file in a text editor and the saved rsa.pub sent via email from your phone in another editor window and copy the contents from one to the other appending at the end of authorized_keys.
If you don't have the authorized_keys file, and the .shh folder, then use the following commands to create them:
mkdir -p /home/$USER/.ssh && touch /home/$USER/.ssh/authorized_keys

Then copy and the paste of the contents of rsa.pub into the authorized_keys using a text editor of your choice.
If you have just created these folder and file, you will need to change the permissions of the folder and file so that only you can read them. Use the following command to change the permissions. Note: the ssh server won't read the file if the folder and file do not have the strict permission. This is a safety measure.
chmod 700 /home/$USER/.ssh && chmod 600 /home/$USER/.ssh/authorized_keys

Note: You can replace $USER with your login name in the computer running x11VNC.
Test if you can login from bVNC using the key without using SSH Password.
Once you are sure that key based authentication is working, disable password based ssh login following the ansers to this question: Disable password authentication in ssh
Hope this helps


Ubuntu randomly not detecting USB devices and networking randomly not working?

I found the solution to my problem thanks to some help from the Ubuntu facebook group.

Basically i had to use the command

sudo apt-get autoremove

This is to remove packages installed by other packages which are no longer needed.

This fixed every problem that I was having.  I hope this helps anybody who is having this problem.


There's an easy to use GUI called "arandr" for changing your monitor settings. It's a GUI frontend for the xrandr command line utility.

You can use the xrandr utility from command line to switch back and forth between single and dual screen. In my zshrc (or your Bash login file if you use Bash) I have defined the 'single()' and 'dual()' functions for this.

Your outputs will probably be different - I have one HDMI and one VGA - look for an xrandr tutorial for more detail. In this example, the VGA output is my primary monitor, and the HDMI monitor is to the right of my primary monitor.

# set dual monitors
dual () {
    xrandr --output VGA-0 --primary --left-of HDMI-0 --output HDMI-0 --auto
}

# set single monitor
single () {
    xrandr --output HDMI-0 --off
}

I like this because at any point I simply send the single or dual command to my terminal and turn my second monitor on and off.


There is a setting to hide notifications while the lock screen is enabled:

You can also modify this setting via the command line:

gsettings set org.gnome.desktop.notifications show-in-lock-screen false

But, since you asked, you can also use gdbus on the command line with the --session parameter and org.gnome.ScreenSaver to determine if the screen is locked.


How can I install Ubuntu on an old MacBook without a CD or USB drive?

I had the same problem with the optical drive in my MacBook from late 2006 after pouring milk into it late one night and did get a working install this way. Booting from USB is hit or miss with Macs (both PowerPC and Intel). I have made it work on an iBook Clamshell after running late versions of Tiger (but not after running earlier versions), but I have never been able to do it on an Intel Mac, except for a Mac OS X install disk from an USB optical drive (but not Ubuntu live dvds from the same drive).

This is a method to install Ubuntu on your MacBook using FireWire Disk mode. You will need another Mac with FireWire and a FireWire 400 cable. If the other Mac has FireWire 800, you will need a FireWire 400 to 800 cable. And you will need a disk to backup your Mac OS X install. (You also need this backup of Mac OS X to extract the firmware for your iSight webcam after the install.)

Maybe borrow another Mac from somebody if you don't have two. The other Mac must run Mac OS X 10.4.7 or later (PowerPC or Intel doesn't matter), since otherwise it will not be able to "see" the disk in the MacBook. (PowerPC Macs used APT, not GUID partition tables, so only after the Intel transition did the operating system get the ability to see GUID disks.)

What you basically do is install the Live DVD to one partition and install onto the rest of the disk from that partition. If you want to dual boot, you can restore your Mac OS X install to the partition we used for the Live DVD after installing Ubuntu on the other partition, but if you just want Ubuntu, then keep the other partion as a restore partition. Before partitioning, you will need to know if you want to dual boot or not to decide how large the partition you will use for the Live DVD should be. If you want to dual boot, you will have to make it as large as you want your later Mac OS X partition. If not, then it will just need to be large enough to fit the live .iso.

(I am not using the English localisation of neither Mac OS X nor Ubuntu, so the exact worthing of buttons and such might be slightly off in these instructions, but the gist of it is right.)

Here is how you do it:

Backup your Mac OS X install to an external FireWire or USB drive. Use Carbon Copy Cloner from Bombich software (not Time Machine) if you want to dual boot. (We need an exact clone that we can restore to one of the partitions on your MacBook later, and since we can not use the Mac OS X Install disk to restore from a Time Machine backup since the optical drive doesn't work, we need an exact clone that we can restore with Disk tools from the other Mac.) NB: If you want to dual boot, make shure that your Backup does not take up more room than the size you will use for the Mac OS X partition later. (Delete all unnessecary stuff from your home folder if it is too large.)
Download and install rEFInd and restart your MacBook twice (not one time, but two times) and shut it down again.
On the other Mac, download Ubuntu live DVD 14.04 32 bit or 14.10 32 bit. After it is downloaded, click it and press Commando+I to get the "Get info" window. You need the information in this window later.
Connect the FireWire cable to the other Mac and start your MacBook while holding down the T key. A FireWire symbol appears (looking like a flux capasitor) and on the other Mac, your hard drive appears in the Finder.
Open Disk tools. (In the Tools folder inside the Program folder.)
Select your MacBook's disk in the left panel and click the partition tab.
Make a new partition by hitting the + on the lower left side. Drag the dividing line between the partitions upwards or downards untill it is the size you want. a) Single boot. If you want to just have Ubuntu on the MacBook, you will have to make it the size of the live iso file we downloaded earlier (look at the "Get info" window now). Add an extra gigabyte just to be shure (since sometimes a gigabyte is 1024 MB and sometimes it is 1000 MB). b) Dual boot. If you want to dual boot with Mac OS X, you will need to make your partition the size you want your Mac OS X partition to become later. Remember that this has to be bigger than the backup clone you made in 1 to work.
Make the new partition MS-DOS (FAT32) formatted by writing a name in the field to the right of the partition layout and selecting MS-DOS and then "delete" (or "Partition". Can't remember exactly).
Drag the .iso file from the Downloads folder into the left panel of Disk tools.
Click the "restore" tab and drag the Ubuntu live iso into the "From..." field and the new partition you made in 7 into the "To..." field and click "Restore".
Quit Disk Tools.
Eject the two partitions from the MacBook in the finder by clicking the eject buttons on the right side of their names.
Shut down your MacBook. (Hold down the power key untill the MacBook shuts down if it doesn't shut down immideatly.)
Disconnect the FireWire cable.
Restart your MacBook.
Choose "Windows" when the rEFInd window shows up. It thinks it is windows because the disk is formatted FAT32.
Choose install and go through the usual questions. (Tap to click is on by default, so be careful with your trackpad.) I usually choose not to update the installer, as it often seems to fail for me, but check the Fluendo restricted multimedia package, that is really nice to have. When you come to the place where you should choose where to install, choose "Manual setup" (or whatever it is called). DO NOT choose erase the whole disk and install (since the live iso you are running is also on the disk).
Delete the other partition of the disk (the HFS+-formatted one) and make a Swap partition the same size as your RAM and another EXT4 partition that you make your root partition. Press "format" after setting the disk up as you like. (DO NOT repartition the FAT32 partition or do anything else with it at this time.)
Install and when asked, choose to install grub on your root partition. (The EXT4-partition.)
Restart.
Dual boot only. Shut down your MacBook. Connect your Backup USB or FireWire disk to the other Mac. Reconnect your MacBook to the other Mac with the FireWire calbe and start the MacBook while holding down T. Choose "Ignore" when asked what to do with partitions Mac OS X can not read. Open Disk Tools (Apple menu->Recent items->Disk tools) and format the FAT32-partition to Mac OS X extended (choose the partition in the left panel (not the disk, only the partition) and use the delete tab to name it and make it Mac OS X Extended (Journaled). Go to the Restore tab. Drag your Backup disk to the "From..." field and the newly made Mac OS Extended (HFS+) disk into the "To..." field and press the "restore" button. Quit Disk Tools when it is finished restoring. Eject the other partitions and disks in the Finder and disconnect the FireWire cable. Restart your MacBook and at the rEFInd window you will now find Mac OS X and Linux.

Then you need to install firmware for the isight camera and fan control. (See my blog post for an explanation of how to do this.)


apt-get update fails (oom killer executed on /usr/lib/apt/methods/https memory hog)

OOM killer is triggered when your instance runs out of ram so
clearly you have to little of it for what you want to do.

You have two ways of solving this.

Decreasing the amount of ram consumed during your apt-* work
by stopping all memory consuming services before doing the upgrades etc.
Adding / Increasing a swap to your instance to off-load memory to
disk You can see this question regarding adding swap in
ubuntu if you aren't certain


PS3 controller on Sixad disbales Broadcom Bluetooth

sixad -r
will restore regular bluetooth.


Mouse Stutter for USB Mouse in Ubuntu 20.04

Turns out this issue is indeed a MS problem, and is fixed by modifying the following, on the windows machine hosting VMWare:

run: GPEDIT.msc

navigate: Local Computer Policy > Computer Configuration > Administrative Templates >Windows Components > Remote Desktop Service > Remote Desktop Session Host >Remote Session Environment

modify: "Use WDDM graphics display driver for Remote Desktop Connections"
* value: DISABLED

Reboot the VMWare host machine.

Here's a more lengthy explanation: https://borncity.com/win/2019/10/30/windows-10-v1903-mouse-stutter-with-rdp-sessions/


.txz is short for .tar.xz, just as .tgz is short for .tar.gz. You can unpack it like a .tar.xz archive:

Run tar xf *archive*.txz, since tar will automatically figure out how an archive is compressed and decompress accordingly.

Assuming you downloaded this file (or that one), linked to from here and listed under "Ubuntu 14," there are a few points to keep in mind:

Most archives for software kindly keep everything in a top-level folder, but this one doesn't! Therefore, I suggest creating a cinelerra folder, putting the archive in the folder (or downloading it to there in the first place, if you haven't already), and unpacking it there:

mkdir cinelerra
cd cinelerra
wget http://cinelerra.org/2015/downloads/cinelerra-4.6.mod-ubuntu-14.04.1-x86_64.txz
tar xf cinelerra-4.6.mod-ubuntu-14.04.1-x86_64.txz

Generic instructions for installing software from compressed tar archives are often instructions for installing from source, as source code is commonly packaged this way. However, Cinelerra is distributed for Ubuntu as a precompiled binary in a compressed tar archive. Thus, as the README file says:

Run `./cinelerra` from this directory.  That's it.


how to record audio and video in gstreamer

Maybe you need a "queue" before the "muxing":

gst-launch-1.0 -e v4l2src ! queue ! x264enc ! h264parse ! queue ! qtmux0. alsasrc ! 'audio/x-raw,rate=44100,depth=24' ! audioconvert ! audioresample ! voaacenc ! aacparse ! queue ! qtmux ! filesink location=test.mp4


The blog you are following doesn't list general steps of setting up wifi-ap with hostapd.
For 12.04 more complete step by step details can be found here:

wifi-hotspot-setup-on-ubuntu

The detailed step-by-step answer is already posted here at Ask-Ubuntu:

How to setup a wi-fi hotspot (access point mode)?.


The VPN server is not accepting the strongSwan default proposals, so you need to enter Phase 1 & 2 algorithm proposals in NetworkManager-l2tp's IPsec configuration dialog box.

See the package's README file for Phase 1 & 2 Algorithms that Windows uses :

https://github.com/nm-l2tp/NetworkManager-l2tp/tree/1.2.10#example-workaround-for-3des-sha1-and-modp1024-broken-algorithms


Ubuntu 14.04 black screen without login after switching GPU to NVIDIA using prime-indicator

Try with bumblebee instead https://launchpad.net/~xorg-edgers/+archive/ubuntu/ppa Also please post more information next time e.g. your GPU model :P


Vino/VNC is a common choice.  Full instructions for setup are in the community wiki here.  You can connect with Remmina.


apache won't index folder from another mount

There are several things that could be changed in your configuration. In order to help you, I'm providing here the following guide, based on the default Apache2's configuration.

Deal with the file system permissions

In order to access the files, the Apache's user www-data needs to have read permissions to the files and read-execute permissions to the directories, also in this number read-execute permissions to the whole path. If you do not have any special requirements, I would suggest you to use the other users permissions.

Let's assume the directory you want to index via the web server is named bar and it is located in the home directory of the user foo. By default he directories /home and /home/foo must have 755 permissions. The last bit in the octal number 755 means all other users have read-execute permissions (content rad access) to the files inside /home/foo.

So let's create our directory /home/foo/bar and let's assure it (and its path) has r-x permissions for the other users:

mkdir -p /home/foo/bar                            # create the directory
find /home/foo/bar -type d -exec chmod o+rx {} +  # apply o+rx for the dirs recursively
sudo chmod o+rx /home /home/foo                   # this step is optional

Now let's create three test files and assure they have read permissions for the other users:

touch /home/foo/bar/file.{1..3}                  # create three empty test files
find /home/foo/bar -type f -exec chmod o+r {} +  # apply o+r for the files recursively

In order to allow www-data to write content in /home/foo/bar you can change the group ownership of the directory and add rwxs group permissions (more details):

find /home/foo/bar -type d -exec chgrp www-data {} +
find /home/foo/bar -type d -exec chmod g+rwxs {} +

Test by creating another three empty files:

sudo -u www-data touch /home/foo/bar/file.{4..6}

Deal with the Apache's configuration

By default, within the main configuration file /etc/apache2/apache2.conf, for security reasons, the access to the root directory / is restricted. I would suggest you to do not override these rules via the virtual host configuration and remove <Directory /> tags (and the enclosed directives).

In particular, if you are creating an Alias to a directory outside of your DocumentRoot, you may need to explicitly permit access to the target directory (source Apache Module mod_alias).

Let's first create .htpasswd file with enough permissions (add more security by using 2FA - p.6):

htpasswd -c /home/foo/.htpasswd foo               # authentication for the username 'foo'
chmod 400 /home/foo/.htpasswd                     # restricted the permissions
sudo chown www-data:www-data /home/foo/.htpasswd  # change the ownership

According to the above, the relevant part of you virtual host configuration file should be something like this:

<VirtualHost *:80>

    # Other configuration directives

    Alias "/bar" "/home/foo/bar"

    <Directory "/home/foo/bar">
            #Require all granted
            Options +Indexes +MultiViews +FollowSymLinks
            IndexOptions +FancyIndexing

            # Allow using of a .htaccess files
            AllowOverride All

            # This section could be moved in .htaccess file
            <IfModule mod_authz_core.c>

                <IfModule mod_authn_file.c>
                    AuthType Basic
                    AuthName "Type some hints here..."
                    AuthUserFile /home/foo/.htpasswd
                </IfModule>

                Require valid-user

            </IfModule>

    </Directory>

</VirtualHost>

Enable the relevant modules and restart Apache2 to apply the new configuration:

sudo a2enmod authz_core authz_user authn_file
sudo systemctl restart apache2.service

Sample result

Update:

I'm assuming the problem belongs to file system's permissions issue. Probably the most easiest way, to solve it, is to mount the target directory inside the DocumentRoot directory by using bindfs as it is described in this answer.

Working solution:

Here's the final solution: abandon the idea of getting Alias to work correctly for my externally mounted folder and instead take @pa4080's workaround advice and usebindfs to mount the folder to /blah2 in the webroot. I was unsuccessful in getting /etc/fsab to correctly initialize my bind, so I decided to write an init script for the task.

First, install bindfs:

apt-get update
apt-get install bindfs
mkdir /var/www/example.com/blah2

Next I created a script file /var/www/scripts/blahbind.sh to be run on startup:

#!/bin/bash
bindfs -o force-user=www-data,perms=a=rX /blah1/blah2 /var/www/example.com/blah2

Then give it correct permissions:

chmod 750 /var/www/scripts/blahbind.sh
chmod +x /var/www/scripts/blahbind.sh

Next I created a service script:

vi /etc/systemd/system/blahbind.service

With the contents:

[Unit]
Requires=mydrive.mount
After=mydrive.mount
Description=bind /blah1/blah2 to example.com/blah2 folder

[Service]
ExecStart=/var/www/scripts/blahbind.sh
Type=oneshot
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Note, mydrive.mount should be replaced with the drive of the /blah1/blah2 folder.  Get a list of mounts with systemctl list-units --type=mount.

Confirm that the service script works by running

sudo service blahbind start

Then enable the service to persist on reboot with:

sudo systemctl enable blahbind.service

And then, my simplified Location block, sans Alias in example.com.conf

   <Location /blah2>
            Options +Indexes +MultiViews +FollowSymLinks
            IndexOptions +FancyIndexing
   </Location>


I had this problem with Ubuntu 14.04 and Gnome classic...

Fixed it by going to Applications -> System Tools -> Language and support.
On the Language tab, i switched "Keyboard input method" from "none" to "iBus".
Logout/login or restart computer, and it worked like a charm :)


How to change the default permissions of files created by transmission-daemon?

You can specify a umask in transmission's config file (/etc/transmission-daemon/settings.json). Umask we normally represent in octal, but unfortunately, json does not support that, so we have to convert it to base 10. You can do this in the shell like this:

$ echo $(( 8#022 ))
18

That's the default, but you probably want 002, which is the same in decimal, so

sudo editor /etc/transmission-daemon/settings.json
# change "umask": 18 to "umask": 2 and save
sudo reload transmission-daemon # tells transmission-daemon to re-read the config
                                # file. This is important, otherwise, the changes
                                # will be lost

Another thing. If you change the group ownership of the download dir, and add the setgid bit on it, all files created in that directory will have the same group ownership as that directory.

sudo chgrp "$USER" /path/to/transmission/download/dir
sudo chmod g+s /path/to/transmission/download/dir

It will not affect files that already exist. See http://mywiki.wooledge.org/Permissions for more.


debuild - secret key not available (someone elses key)

debuild asks for the key of the user who last edited the changelog. If you are uploading to a PPA then your package must be different from its equivalent currently in the repositories and so you should have edited the changelog.

Use dch to update the version and changelog, then rebuild. debuild will ask for your key. (If you're not sure what version numbers to use take a look at the Launchpad help docs.)


can anyone assess my g parted screen capture

It would appear that you overwrote everything on your drive. Did you have a separate partition on your main hard drive that was mounted in Windows as drive D:? If so it would appear that it is gone.

If you have that partition backed up, this will help you restore your files.

Boot into your Ubuntu install CD and repartition your drive to include a data partition that you can mount in Ubuntu.

Format the partition to either ext3 or ext4 and make it as large as you like.

Reboot so you boot from your internal hard drive and plug in your drive with the backup and copy all the files to the new partition you just created.

I'm not sure what you want to know about the initrd.img file, but reading the Wikipedia entry might put your mind at ease. I don't think its your problem.

Your system is just two partitions. One large partition that is your Ubuntu OS, and a small boot partition needed to boot Ubuntu. If you didn't back up your data you are out of luck. If its backed up just restore it by following the instructions above, or a myriad of others on the web.


From the gray "Windows...." line in the "Select Device" window, you seem to have selected "Windows printer", which is why you are getting prompted for Windows Workgroup stuff. Cancel these popups, and pick something else.


Clementine has high CPU usage even after shutting it down

I would like to confirm I'm having exactly the same issue:
Basicly, when I "quit" clementine (by rightclicking the indicator icon and hitting "quit", not just using the close button), the process will remain active, and will keep doing whatever it was doing in the background.

Sometimes the cpu load will simply jump to 25-150% (don't ask me where that 150% comes from... "top" acting strange), and of course, that won't change by "quitting" the application.

Worse yet: start clementine again, and it'll spawn a new process instead of using the existing one! That second process can be extremely cpu-consuming as well.

(@nitstorm 's comment) There is nothing on the interface indicating that clementine is doing anything in the background.

Now I found a solution to this problem: according to http://code.google.com/p/clementine-player/issues/detail?id=2088 , it looks like it's a bug due to compatibility issues between clementine and the nvidia drivers.
One of the bug reports has posted the following command:

Exec=env __GL_NO_DSO_FINALIZER=1 clementine

I can confirm after a few tests, the above command fixes the issue.

To make life easier in ubuntu, you can change the clementine command in the menu editor.

--

EDIT: In the menu editor, it seems you can't just use the command, so I made a script like this:

#!/bin/bash
Exec=env __GL_NO_DSO_FINALIZER=1 clementine

Saved as clementine.sh (don't forget to "chmod 755" the script to make it executable), and linked the Clementine menu entry to this script instead of the default command.
Works like a charm now, even when started from the dash instead of the launcher (if you have clementine set as default for music).


Error message "failed to download repository information" when attempting to check for updates via update manager

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

alternately you can go into Software Center and select Software Sources, select Other Software and remove the conflicting ppa's.

The first option worked on a friends system when he couldn't update his system.
Option 2 i recently did when I started constantly having issues with PlayDeb.net being unresponsive. Hope this was some what helpful


Write Permissions denied to LAN mounted drive

Unless you specify otherwise cifs mounts with owner = root and permissions of 755 by default.

You can set dir_mode to 777 which allows everyone on your client system r/w access to your mounted share by adding that to your list of options:

mount -t cifs //192.168.8.XXX/Public -o username=root,password=secret,dir_mode=0777,file_mode=0777 /mnt/NAS

OR you can simply take possession of the mounted share by adding a uid=gatorback ( if that is your client user name ) to your list of options:

mount -t cifs //192.168.8.XXX/Public -o username=root,password=secret,uid=gatorback /mnt/NAS


How do I render Ubuntu unusable by deleting the full disk encryption key?

Just overwriting the LUKS header will work, overwriting the whole drive is way overkill for LUKS & would take possibly hours longer.

The LUKS header could be 1MB or 2MB or bigger  depending on the type & number of keys, ArchWiki advises to wipe/overwrite the first 10MB:

dd if=/dev/urandom of=/dev/sdx2 bs=512 count=20480

Note the correct partition sdx2 or whatever it is, you can check with a live dvd/usb and lsblk or blkid and confirm with the cryptsetup command below, this will tell you if partition sdx5 for example is a LUKS device:

cryptsetup -v isLuks /dev/sdx5

Also from ArchWiki:

  Note: It is crucial to write to the LUKS encrypted partition ( /dev/sdx5 in this example)
  and not directly to the disks device node. If you did set up encryption as a device-mapper
  layer on top of others, e.g. LVM on LUKS on RAID then write to RAID respectively.

You could only (or additionally) delete all the luks keyslots, leaving no keys, if you know a working passphrase. See man cryptsetup or a web version here, with:

cryptsetup -v luksRemoveKey  <device>

or

cryptsetup -v luksKillSlot <device> <key slot number>

Also note about SSDs (also from ArchWiki):

  When wiping the header with random data everything left on the device is encrypted data.
  An exception to this may occur for an SSD, because of cache blocks SSDs employ. In theory
  it may happen that the header was cached in these some time before and that copy may
  consequently be still available after wiping the original header. For strong security
  concerns, a secure ATA erase of the SSD should be done (procedure please see the
  cryptsetup FAQ 5.19 ).


From this article in Wikipedia:

In Unix-like computer OSes (such as Linux), root is the conventional
name of the user who has all rights or permissions (to all files and
programs) in all modes (single- or multi-user).

And the use of the account:

It is often recommended that no-one use root as their normal user
account, since simple typographical errors in entering commands
can cause major damage to the system. Instead, a normal user account
should be used, and then either the su (substitute user) or sudo
(substitute user do) command is used.


Autohide "Drop Down Terminal" from the side

To change the position of the terminal, first run

gnome-shell-extension-prefs

A window should appear which lists all the installed GNOME shell extensions. Click the cogwheel (or something similar) icon next to the "Drop Down Terminal" entry. A preferences window should pop up. Select "Right" for Position.

You may have to re-login to see the change.


As suspected, the problem was DNS related.

I was able to fixed by manually providing my DNS Servers.

Go to your Network Connections then look for IPv4 Settings and change Method from Automatic (DHCP) to **Automatic (DHCP) addresses only**.

Then below this, in the DNS servers section, enter your preferred DNS. I used Google's DNS 8.8.8.8, 8.8.4.4. Separate your DNS with a comma.


Custom Ubuntu based iso won't boot if "USB Legacy Emulation" is disabled

I would suggest using Rufus so you can either use Legacy or Other. One of them will work. Been there done that.


Ubuntu server can no longer get address from DHCP

It looks like you're mixing more than one issue into the description of your problem -
whether this machine gets its IP configuration from DHCP or you set it statically shouldn't affect the list of services hosted on this machine that are available to other machines on the network.

Let's focus on DHCP here. Please post output of:

cat /etc/network/interfaces
ip l l
ethtool eth0

Assuming that the part where your machine sends out DHCPDISCOVER messages actually works - what is your DHCP server on your network? Do you have access to its logs?

Can you verify that the DHCPDISCOVER messages are reaching it?

Have you assigned a static address in your DHCP server's configuration for your server or is it getting the IP address from the pool?

Are other devices getting IP configuration from that DHCP server successfully?


Disk Image Mounter: Value too large for define data type

I don't know what nautilus does here but you can mount the image on the command line without any problems.

Create a directory where you want to mount it, e.g. sudo mkdir /media/AutoCAD (if you want to use an existing directory it should be empty)
Type sudo mount -o loop /path/to/file /path/to/mountPoint, e.g. sudo mount ~/downloads/AutoCAD.iso /media/AutoCAD
Access the files via /media/autoCAD with any application
When you are done unmount it again with sudo umount /media/AutoCAD (it is umount, not unmount)
If you want delete the directory again with sudo rmdir /media/AutoCAD