Boot-Repair created too many grub menu entries for Windows

Every time I've run boot-repair it adds a 5 extra Windows boot options to my main grub menu that do not work. In your case it has added 11 extra entries!
grub.cfg shows the problem
The secret can be found within /etc/grub/grub.cfg file:

### BEGIN /etc/grub.d/25_custom ###
    menuentry "Windows UEFI bootmgfw.efi" {
search --fs-uuid --no-floppy --set=root D656-F2A8
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}

menuentry "Windows Boot UEFI loader" {
search --fs-uuid --no-floppy --set=root D656-F2A8
chainloader (${root})/EFI/Boot/bkpbootx64.efi
}

menuentry "EFI/ubuntu/fwupx64.efi" {
search --fs-uuid --no-floppy --set=root D656-F2A8
chainloader (${root})/EFI/ubuntu/fwupx64.efi
}

menuentry "Windows UEFI bootmgfw.efi sda1" {
search --fs-uuid --no-floppy --set=root 9478-B6E2
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}

menuentry "Windows Boot UEFI loader sda1" {
search --fs-uuid --no-floppy --set=root 9478-B6E2
chainloader (${root})/EFI/Boot/bkpbootx64.efi
### END /etc/grub.d/25_custom ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/nvme0n1p2)' --class windows --class os $menuentry_id_option 'osprober-efi-D656-F2A8' {
    savedefault
    insmod part_gpt
    insmod fat
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root  D656-F2A8
    else
      search --no-floppy --fs-uuid --set=root D656-F2A8
    fi
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
menuentry 'Windows Boot Manager (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-efi-9478-B6E2' {
    savedefault
    insmod part_gpt
    insmod fat
    set root='hd0,gpt1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  9478-B6E2
    else
      search --no-floppy --fs-uuid --set=root 9478-B6E2
    fi
    chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/30_os-prober ###

The section 30_os-prober contains the "good" Windows grub menu entries you want to keep. Section 25_custom contains the bogus entries created by boot-repair. You can't edit the grub configuration file because it will simply be overwritten the next time update-grub is run.

Section 25_custom was created by Boot Repair
On my system:
$ locate 25_custom
/boot/efi/boot-repair/log/20171111_224241/nvme0n1p5/25_custom
/boot/efi/boot-repair/log/20171208_030854/nvme0n1p5/25_custom
/etc/grub.d/25_custom

Take a look at the extra Windows options that were setup (and don't work):
$ cat /boot/efi/boot-repair/log/20171208_030854/nvme0n1p5/25_custom
#!/bin/sh
exec tail -n +3 $0

menuentry "Windows UEFI bootmgfw.efi" {
search --fs-uuid --no-floppy --set=root D656-F2A8
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}

menuentry "Windows Boot UEFI loader" {
search --fs-uuid --no-floppy --set=root D656-F2A8
chainloader (${root})/EFI/Boot/bkpbootx64.efi
}

menuentry "EFI/ubuntu/fwupx64.efi" {
search --fs-uuid --no-floppy --set=root D656-F2A8
chainloader (${root})/EFI/ubuntu/fwupx64.efi
}

menuentry "Windows UEFI bootmgfw.efi sda1" {
search --fs-uuid --no-floppy --set=root 9478-B6E2
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}

menuentry "Windows Boot UEFI loader sda1" {
search --fs-uuid --no-floppy --set=root 9478-B6E2
chainloader (${root})/EFI/Boot/bkpbootx64.efi

These are the erroneous entries boot-repair created in /etc/grub.d/25_custom that were subsequently compiled into \boot\grub\grub.cfg.

Reverse Boot Repair's change to 25_custom
Use sudo -H gedit /etc/grub.d/25_custom and delete everything except the first three lines:
#!/bin/sh
exec tail -n +3 $0

The file now contains two lines with text and one blank line.
Save the file.
Run sudo update-grub.
Reboot.

Now your menu is no longer bloated with five bogus Windows menu entries that don't work.
Double-check there are three lines in 25_custom
Run this command and verify 25_custom has three lines:
$ wc /etc/grub.d/25_custom
      3       6      30
#     ^       ^       ^
#     |       |       +--- Number of characters
#     |       +----------- Number of words
#     +------------------- Number of lines

I added the # comments to decipher wc (word count) output.


The 404 error messages are saying that there is no installation candidate for Ubuntu 16.04. However, I went to check the Geonode PPA in Launchpad and saw that there is an installation candidate for Ubuntu 14.04. Therefore, I suggest you either ask the devs at Geonode's GitHub repo (https://github.com/GeoNode/geonode) to release packages for Ubuntu 16.04 or use Ubuntu 14.04.

If you don't want to see the 404 error messages (they don't harm your system, but they may be annoying), you can remove the offending PPA using one of the many ways given at How can I fix a 404 Error when using a PPA or updating my package lists?.


How to rename multiple files in a way that each name would be img_NNNNNN format?

I was looking for a solution as bash script.

However, I have just written a python code for that, and it worked:

# importing modules
import os, sys, glob

# args
main_folder = sys.argv[1]
start_num = int(sys.argv[2])
extension = sys.argv[3]

len_removal = 6 + len(extension)

# importing names
src_path = main_folder + '*.' + extension
src_files=sorted(glob.glob(src_path))

for i in range(0,len(src_files)):
    newname = src_files[i][:-len_removal] + str(start_num).zfill(6) +"." + extension
    os.rename(src_files[i],newname)
    start_num+=1


What does this 'apt-get remove' instruction do?

Let's break the code one by one (for my system):

$ dpkg -l 'linux-image-*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                          Version             Architecture        Description
+++-=============================-===================-===================-================================================================
un  linux-image-3.0               <none>              <none>              (no description available)
ii  linux-image-3.13.0-32-generic 3.13.0-32.57        amd64               Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-extra-3.13.0-32-g 3.13.0-32.57        amd64               Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-generic           3.13.0.32.38        amd64               Generic Linux kernel image

$ dpkg -l 'linux-image-*' | sed '/^ii/!d'
ii  linux-image-3.13.0-32-generic                         3.13.0-32.57                                        amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-extra-3.13.0-32-generic                   3.13.0-32.57                                        amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-generic                                   3.13.0.32.38                                        amd64        Generic Linux kernel image

$ uname -r | sed 's/\(.*\)-\([^0-9]\+\)/\1/'
3.13.0-32

$ dpkg -l 'linux-image-*' | sed '/^ii/!d' | sed "/$(uname -r | sed 's/\(.*\)-\([^0-9]\+\)/\1/')/d"
ii  linux-image-generic                                   3.13.0.32.38                                        amd64        Generic Linux kernel image

$ dpkg -l 'linux-image-*' | sed '/^ii/!d' | sed "/$(uname -r | sed 's/\(.*\)-\([^0-9]\+\)/\1/')/d" | sed 's/^[^ ]* [^ ]* \([^ ]*\).*/\1/'
linux-image-generic

$ dpkg -l 'linux-image-*' | sed '/^ii/!d' | sed "/$(uname -r | sed 's/\(.*\)-\([^0-9]\+\)/\1/')/d" | sed 's/^[^ ]* [^ ]* \([^ ]*\).*/\1/' | sed '/[0-9]/!d'
## No output

So this would do nothing:

$ sudo apt-get remove --purge $(dpkg -l 'linux-image-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d')

As you can see it was very close to removing my current kernel meta package linux-image-generic 3.13.0.32.38  amd64 Generic Linux kernel image (thanks to this last sed '/[0-9]/!d' line) , which is wrong.

In a nutshell, this piece of sed has several issues. You should avoid it to remove your older kernels.

EDIT:

I have already said that the sed command has issues. For the sake of extension i am going to remove the last two lines with the form that actually should be working in my current scenario.

The last two lines in a modified form:

sed -r 's/^[^ ]* *(([a-z]|-)*)(-[a-z]*) *(([0-9]|-)*)\..*/\1-\4\3/'

So:

$ dpkg -l 'linux-image-*' | sed '/^ii/!d;/'"$(uname -r |
sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d' |
sed -r 's/^[^ ]* *(([a-z]|-)*(-[a-z]*) *(([0-9]|\.|-)*)\..*/\1\-\4\3/'

Outpus:

linux-image-3.13.0.32-generic

Thats very dengerous!!

Now showing what this would do to my system, --dry-run ning the full apt-get remove command:

$ sudo apt-get remove --dry-run $(dpkg -l 'linux-image-*' |
sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d' |
sed -r 's/^[^ ]* *(([a-z]|-)*)(-[a-z]*) *(([0-9]|\.|-)*)\..*/\1\-\4\3/')

Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'linux-image-3.13.0-32-generic' for regex 'linux-image-3.13.0.32-generic'
The following package was automatically installed and is no longer required:
  linux-headers-generic
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
  linux-generic linux-image-3.13.0-32-generic
  linux-image-extra-3.13.0-32-generic linux-image-generic
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
Remv linux-generic [3.13.0.32.38]
Remv linux-image-generic [3.13.0.32.38]
Remv linux-image-extra-3.13.0-32-generic [3.13.0-32.57]
Remv linux-image-3.13.0-32-generic [3.13.0-32.57]

As you see it will remove all my current kernels, also note that this is just a simulation to match my current scenario and the original sed can be improved.

** Note that the actual code will work if do a reboot after kernel upgrade as Oli already mentioned.

EDIT2:

Here is a simple yet robust script that will consider all situations and remove the actual older kernels:

#!/bin/bash
kernels=( $(grep -Po "^linux-image-[^-]+-[^-]+-generic\b" < <(dpkg --get-selections)) )
cur_rel=$(grep -Po ".*(?=-[a-z]*$)" < <(uname -r))

for kernel in "${kernels[@]}"; do
    ker_rel=$(grep -Po "[0-9].*(?=-[a-z]*)" <<< "$kernel")
    dpkg --compare-versions "$ker_rel" gt "$cur_rel" && { echo "Please Restart your computer first"; break; }
    dpkg --compare-versions "$ker_rel" lt "$cur_rel" && sudo apt-get remove "$kernel"
done

If you have any version that is newer than the current one this will give you a warning to restart you computer first. Also note that the older kernels are preserved due to a good reason which is if you somehow mess up your current kernel making your system unstable then you should be able to boot into any older kernel.


Remapping Boybu Keybinds for a Chromebook

Apparently I needed to make my edits in keybindings.tmux.

$ cat ~/.byobu/keybindings.tmux
set -g prefix F12
unbind-key -n C-a

bind-key -n F1 previous-window
bind-key -n F2 next-window
bind-key -n F3 copy-mode
bind-key -n F4 new-window \; rename-window ""
bind-key -n C-F4 display-panes \; split-window -h
bind-key -n S-F4 display-panes \; split-window -v
bind-key -n F5 command-prompt -p "(rename-window)" "rename-window %%"
unbind-key -n F6

Works great and maps the keys to vaguely match the icons on a chromebook pixels F keys.


Providing you can login as root, just type sudo rm -rf ~/.Private at the console. Have you tried looking into its contents? It's important to make sure it's not holding anything you might want to keep.


Wireless Internet not working - cannot activate broadcom proprietary driver

Please do:

sudo apt-get purge bcmwl-kernel-source
sudo apt-get install b43-fwcutter firmware-b43-lpphy-installer
sudo modprobe -r wl
sudo modprobe b43

now your wireless should be working.


How to use Eclipse with the JDKs provided by 12.04?

Like maxym said, it's a good idea to install the sun jdk for use with eclipse. You can find a detailed answer to that here.


When I want to reload synaptic package manager, I get an error

Possibly you have a slow or a mirror that is not fully up-to-date.

Suggest use Software Sources and change your mirror - i.e. Choose Other from Download from and change to another mirror source.

Finally re-run update-manager and check for new updates.


I'm used to that feature too, that's why I use Ubuntu. All you need to do is open the terminal and type ssh myserver.gov.

For mega-fast copy-and-paste:

Select text to Copy
Middle-click to Paste

Middle-click is the mouse wheel click (or both mouse buttons)

It works with any selectable text in the OS: in the terminal, browser, ...


Bash -- reversing MD5 output in a text file & sorting

If your aim is to sort a text file based on specific columns you don't need to change the column order if you use the -k option of GNU sort. To only sort based on the 2nd and subsequent (white-space delimited) columns use:

sort -k 2

Additionally I advise you to use the C or POSIX collation locale to compare and sort path names or you may receive unexpected results due to case-insensitivity or special characters:

LC_COLLATE=POSIX sort ...


Unable to download Ubuntu latest version

On update manager it is showing that new release 11.04 is available.

You can no longer upgrade via the network from 10.10 because it stopped being supported as of last month (April 2012). Your only option is an alternate upgrade.
Upgrading Using the Alternate CD/DVD

Download the alternate installation CD from http://releases.ubuntu.com/natty/

Mount the ISO as a drive with a command like:
 `sudo mount -o loop ~/Desktop/ubuntu-11.04-alternate-i386.iso /media/cdrom0`

A dialog will be displayed offering you the opportunity to upgrade using that CD.    Follow the on-screen instructions.

If the upgrade dialog is not displayed for any reason, you may also run the following command pressing Alt+F2: gksu "sh /cdrom/cdromupgrade"


How to get hdmi sound to TV on Asus M3A78-EM computer

OP posted:

  Apparently gnome-control-center needs to be installed. If you go to Start - Settings - All - Preferences - Sound - Sound - Output and click on hdmi, sound goes to the TV, if you click on your onboard sound, sound goes to your computer speakers. I have hdmi sound to the TV now.


Use an Alternate CD to install the system, or switch to console by pressing CtrlF2 to  F6 to see a terminal with eventual error messages.


How to detect touchscreen devices from a script?

udev already classifies the input devices (See https://wiki.kubuntu.org/X/InputConfiguration), the supported flags are:

ID_INPUT

All input devices have this flag.
ID_INPUT_MOUSE

Touchscreens and tables have this flag as well, since by the type of events they can produce they act as a mouse.
ID_INPUT_TABLET
ID_INPUT_TOUCHSCREEN
ID_INPUT_JOYSTICK
ID_INPUT_KEY

Keyboards have this, but also things like lid switches which have just a few buttons
ID_INPUT_KEYBOARD

So an easy way to check in the system under test has a touchscreen device is to parse the output of udevadm info --export-db for the following section:

P: /devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/input/input14
E: ABS=273800000000003
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/input/input14
E: EV=10000b
E: ID_BUS=usb
E: ID_INPUT=1
E: ID_INPUT_TOUCHSCREEN=1
E: ID_MODEL=Touchscreen
E: ID_MODEL_ENC=Touchscreen
E: ID_MODEL_ID=0100
E: ID_PATH=pci-0000:00:14.0-usb-0:7:1.0
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_7_1_0
E: ID_REVISION=1110
E: ID_SERIAL=ELAN_Touchscreen
E: ID_TYPE=hid
E: ID_USB_DRIVER=usbhid
E: ID_USB_INTERFACES=:030000:
E: ID_USB_INTERFACE_NUM=00
E: ID_VENDOR=ELAN
E: ID_VENDOR_ENC=ELAN
E: ID_VENDOR_ID=04f3
E: KEY=400 0 0 0 0 0
E: MODALIAS=input:b0003v04F3p0100e0110-e0,1,3,14,k14A,ra0,1,2F,30,31,34,35,36,39,mlsfw
E: NAME=&quot;ELAN Touchscreen&quot;
E: PHYS=&quot;usb-0000:00:14.0-7/input0&quot;
E: PRODUCT=3/4f3/100/110
E: PROP=2
E: SUBSYSTEM=input
E: UDEV_LOG=3
E: UNIQ=&quot;&quot;
E: USEC_INITIALIZED=815199186

The command to use is finally:

udevadm info --export-db | grep ID_INPUT_TOUCHSCREEN=1


Is there a app or software that will allow me to access a Zip file that was down loaded from the Hightail web site?

ZIP files are archives, not text files. They contain other files that are compressed so as to save space. A ZIP file can be thought of as a compressed folder. I'm going to bet that what's inside the ZIP is what you want to open with LibreOffice.

To open the ZIP, simply browse to it in a file manager and double-click it. In the window that pops up, click the Extract... button to extract whatever's inside. Click Show Files when prompted and a folder will open with the files that were inside the ZIP.

You should find a file there you can open.


This is sort of possible with sftp. Use 'get -a -r'.
According to the man page of sftp for ubuntu: http://manpages.ubuntu.com/manpages/artful/man1/sftp.1.html the -a option attempts to continue interrupted transfers and only overwrites a file if there are differences in the file.


What could possibly be changing the access time of old backedup files?

File manager searching through that folder tree? Counting all files & adding up their sizes? Any indexing service?

If you disabled access times when mounting that backup (with noatime), then the access time shouldn't be changed (unless you modify the file I think)


Ubuntu 14.04 Nvidia Drivers Crash System!

As a temporary fix, you can just press alt+ctrl+f1 and type "sudo killall Xorg" and login again, but other wise, I'd advise using another driver from linux-drivers-nonfree (easily accessible from software center>edit>software sources>additional drivers) and try to find something that works. If it fails to apply, make sure you have them installed, though. Look them up in the software center by searching for "additional drivers". Alternately you can try to have ubuntu diagnose and attempt to install optional/recommended drivers that are not included by default by typing in "sudo ubuntu-drivers autoinstall".


How can I allow access to both SSH and SFTP?

You don't need to make any changes to the default installation of ssh to be able to use both sftp and ssh. All sftp is, is a means of doing file transfer over ssh.


Change font color of inactive apps on KDE taskbar

KDE Plasma Themes

The KDE TechBase : http://techbase.kde.org/Welcome_to_KDE_TechBase

The KDE taskbar (panel) is a plasma object so its configuration is through the KDE plasma theme configuration - the Development/Tutorials/Plasma/Theme is tellling:

http://techbase.kde.org/Development/Tutorials/Plasma/Theme -> http://techbase.kde.org/Development/Tutorials/Plasma/Theme#Theme_Colors

  Theme Colors

  You can provide a plasma color scheme that will allow
  text, selected backgrounds and other items to blend well with your
  theme by supplying a colors file in your theme folder. See the colors
  file in the default theme for an example.

  If the colors file is
  omitted, plasma will take on the current KDE system colors. Note:
  Theme SVGs will not be colorized unless they contain the
  'hint-apply-color-scheme' element.)

More can be found from the Development/Tutorials/Plasma/ThemeDetails

http://techbase.kde.org/Development/Tutorials/Plasma/ThemeDetails -> http://techbase.kde.org/Development/Tutorials/Plasma/ThemeDetails#Colors

From the KDE mailing list - [kde] settings for font colors

http://linux.derkeiler.com/Mailing-Lists/KDE/2010-03/msg00011.html

  The desktop, aka plasma, has its own themes. However, in a couple
  places,   they seem to interact with the normal kde colors as well.
  Well either   that or the themes I run don't have a couple things set
  too well. This   can be bad if like me you have a strong "reverse
  color scheme" (that is,   light text on a dark background) preference,
  as that's uncommon and the   assumption would be dark text on a light
  background.

  Unfortunately, unlike kde, where most of the colors are set
  specifically,   with plasma one has to choose a theme -- altho
  individual components (,   general color scheme, panel background,
  desktop widget background, analog   clock, etc) can be set to
  different themes if desired. Editing individual   elements within a
  component, however, requires editing the text-based   config files
  themselves, unfortunately...

KDE Brainstorm

http://forum.kde.org/viewforum.php?f=83

A wish: http://forum.kde.org/viewtopic.php?f=113&t=101989

I would

I would use the non-transparent panel.

Opaque panel

Background

http://techbase.kde.org/Development/Tutorials/Plasma/ThemeDetails#.22Opaque.22_folder

  "Opaque" folder

  In the folder share/apps/desktoptheme/opaque the same hierarchy can be
  found: when compositing is disabled files in this folder are preferred
  over the corresponding ones listed above...

But you could use the opaque plasma object with the compositing.

Another theme

The KDE System Settings > Workspace Appearance > Desktop Theme has the "Get New Themes". There are themes with the opaque panels - the Aya seems to be one of them.

Mixing theme components

KDE System Settings > Workspace Appearance > Desktop Theme -> Details tab. Pick the opaque panel from another plasma theme. Note the panel background is not working at here. Maybe this is working there.

How it should work - tested with the KDE 4.10.2 - Air (default) desktop theme with the opaque Air theme panel

KDE System Settings > Workspace Appearance > Desktop Theme -> Details tab; Panel Background: File=/usr/share/kde4/apps/desktoptheme/default/opaque/widgets/panel-background.svgz -> Apply

Now the selected theme with the customize opaque panel background should be copied to the ~/.kde/share/apps/desktoptheme/.customized/.

BUT this doesn't seem to work with the panel background. I tried this with the "Translucent Background" (for the other plasmoids) - it was working.

How to get the customized panel background to work
(working at here)

1) Set the plasma desktop theme off from the "Customized"

2) Copy panel-background.svgz from the ~/.kde/share/apps/desktoptheme/.customized/opaque/widgets/ to the ~/.kde/share/apps/desktoptheme/.customized/translucent/widgets/

3) Remove/clean the plasma theme cache from the /var/tmp/kdecache-[username] (same as ~/.kde/cache-[hostname]). The KDE is caching things like a mad - and using the information from the cache.

4) Log out - log in (or kill the plasma desktop and restart the plasma-desktop)

The panel background should be opaque - at here it is.

A PNG image as the panel background: http://forum.kde.org/viewtopic.php?f=113&t=101989 -> http://www.kubuntuforums.net/showthread.php?56120-Customize-plasma-desktop-theme


Touchscreen with KVM switch gives clicks

It was caused by the KVM switch you used.  The KVM switch does not support touch screen sharing which requires keep connecting the touch screen no matter it was switched off to other PC/systems.

You can find a "DDM class" KVM switch which will keep the connection of sharing devices (specially for the HID devices - keyboard, mouse and touch screen monitor...etc) even when you switch between/ among connected systems.

The DDM class KVM switches will not cause any delay after you switching between/among connected systems.


You are entirely able to kill the process, but it seems to be starting itself again. If you notice, the PID is changing each time that you kill it. Something on your system is automatically starting it on your behalf. You have a couple of options:

Seek and destroy whatever is starting it (usually some sort of web control panel like XAMPP, probably in this case your service manager)
Boot into a shell and kill it from there (using recovery mode)

I prefer the latter, since I don't know how you installed mysql to begin with, but if you did use something similar to XAMPP, it's worth opening the control panel and trying to stop MySQL from within (even if that means re-installing the control panel software).

If you want to go with the former, you can try sudo service mysql-server stop and see if after this you can uninstall it.


Key short cut `Super+L` (i.e. `Win+L`) not working for `LockScreen` in 12.04 LTS

Yes, it's very annoying, and hard to remember the exact fix. So hopefully this will help you, and also be an easy way for me to look this up next time I do a fresh Ubuntu install.

There is duplication & conflict between the Gnome Keyboard Shortcut settings (as depicted in your screen shot) and the same settings in the new Unity desktop. Ubuntu (well, Gnome) provides a UI for editing the Gnome Keyboard Shortcut settings but as you've learned, they don't work if they conflict with Unity. And there is no UI installed by default for managing Unity.

Note that to get 'Super-X' style shortcuts to work, you will have to change the 'key to show the launcher' setting, which means that the Super/Windows key will no longer open the launcher. If that's OK with you, continue...

Here is what I do:

Install compizconfig-settings-manager (some will warn you not to, because it gives you enough power to really mess things up). There may be a way to change these without using CCSM but if so, I don't know it. Install it via the Ubuntu Software Center, or:

$ sudo apt-get install compizconfig-settings-manager
Run CompizConfig Settings Manager; acknowledge the warning message.
Locate and click the Ubuntu Unity Plugin icon in the Desktop section
Change the Key to show the launcher (on the Behaviour tab).
To do this:

Click the button which says <Super>
Click Grab key combination
Press a new key or key combination (this will, from now on, open the Unity launcher); I use <Alt>-<Super>

The <Super>-L 'Lock Screen' combination that you already set up should now just work!

Bonus

Note that CCSM also provides its own facility for setting keyboard shortcuts. For things not included in the gnome-control-center, you may have more luck defining custom shortcuts in CCSM. If you select Commands from the General section in CCSM, you can define custom commands, like I've done here:

...and then, you can associate those commands with specific key combinations, like this:

As you can see, I've configured Super-E to launch the Gnome text editor, and Super-C to launch the calculator. I find both of these very handy.


System boot problem on upgrading from 14.04 to 15.04

To make the systemd boot be the default, check to see if you have installed the systemd-sysv package (apt-cache policy systemd-sysv). If not, then go ahead and install it; it will likely ask if you want to remove upstart-sysv, and this is fine. If it is already installed, then reinstall it (sudo apt-get reinstall systemd-sysv).


mv Command Deleted Files In Source Directory and Target Directory

-Impossible-. That is NOT how mv works.
- "mv" does a "cp -a" if it actually moves files (as in across filesystems) and only if it gets a confirmation the "cp -a" was successful it does a remove. See $ info mv for a detailed explanation on this.

Moving files within the same file system uses the rename call and that is just a metadata change. The file itself is not touched.

  mv file_name* /u/projects/lib

"file_name*" was likely 1 file and "lib" did not exist. As a result you renamed "file_name*" to "lib" by omitting the "/" at the end of "/u/projects/lib".
If you had added the "/" the command would have shown an error that the directory "lib" did not exist. A file rename that does not cross file system boundaries is just a metadata change.

Had "file_name*" been 2 or more files you would get an error about moving files onto the same file. And had "lib" existed as a directory you'd find the files in "lib/"


How can I automate ddrescue from a failing usb hard drive?

You could try usbctl or uhubctl.
Both tools are able to switch off/on usb ports if your usb chipset supports that.

After you switch off and on the port with the external disk, it should be recognized again.

To automate this, one could either monitor process activity with lsof or similar or just simple watch the growing size of the output image file and if size does not change after some time, pkill ddrescue once, wait until it terminated itself, then power off/on the disk and restart the ddrescue process.


How to launch Ubuntu in Windows Subsystem for Linux in Windows 10 S?

Ubuntu 18.04 on Windows allows one to use Ubuntu Terminal and run Ubuntu command line utilities including bash, ssh, git, apt and many more. Ubuntu 18.04 WSL is published by Canonical. The Windows 10 April 2019 Update gives Windows Subsystem for Linux the new ability to let you access Linux files safely from Windows. WSL2 which features a true Linux kernel can be installed in Windows 10 version 2004 and later.

Please note that Windows 10 S does not support running this app. Windows 10 in S Mode can’t use command-line shells like PowerShell, Command Prompt, or Bash which are commonly used in WSL. Various other developer tools are also off limits.*

The options for running Ubuntu in Windows 10 S are either in a virtual machine like VirtualBox or as a dual boot alongside Windows 10 S.


Opera demanding that I upgrade to use VPN, but Opera already in the newest version

Looks like it is relatively easy to get to the latest stable release of Opera under Ubuntu 14.04 and version 50.0.2762.45 certainly has a working VPN on my system. Add the following PPA and install opera-stable:

sudo sh -c 'echo "deb http://deb.opera.com/opera-stable/ stable non-free" >> /etc/apt/sources.list.d/opera.list'
wget -O - http://deb.opera.com/archive.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install opera-stable

This worked fine on my Ubuntu 14.04 system as the following screenshot demonstrates:

And another screenshot showing the VPN at work:

References:

How to update Opera browser? Installation instructions drawn from here...


If there is nothing important I would suggest reinstalling.. however if it is some sort of problem with your hardware it may be the same after the reinstall.

Good luck!


Make a Wine installed Video Player Default Player

It is possible, though it is potentially a bit more complicated.

If DivX shows up as an option in the "Open With" list for your files, then you can easily set it as default.

If it does not, then I would suggest not bothering to go through the trouble.


drm:vmw_hostlog Failed to send host log message

Host: Linux Mint 19.1
Guest: KDE Neon 5.19
Solution: booting another (a previous) kernel. Whereas it still outputs the "failed to send log" error but does not break booting.
The VboxVGA solution didn't work in my case.


How can I see my password on the terminal?

type it into gedit and copy/paste it into the password field.
How do I reset a lost administrative password?


Your printer is listed as supported by HP. Ensure you have hplip  installed.

After you install it you should then see an HP Printer tool in your menu that you can use to configure your printer. Please edit your question with what happens when you try that.


Linux command that builds a shell script automatically after you run a command

PROBLEM SOLVED!!! Ok i found it. I had to download it but the command is autoexpect. It automatically generates an EXPECT script by watching the entire process. Example: autoexpect -f autologin.sh telnet 192.168.1.1 This will automatically build a script for me called autologin.sh and automate everything that i previously just did in the telnet session. Thank you for your help anyways.


It doesn't necessarily mean that something is missing. There might be a number of causes for this. There might be a newly installed font which got higher priority for some reason, a setting might have been changed etc.

To fix this, try installing Ubuntu Tweak. Then run it, go to Tweaks > Fonts. Here's how my settings look like, and I do believe they're default:

By the way, 'ugly' is pretty subjective. I actually like the font on your screenshot :)


Can't boot into Ubuntu in Windows 10 / Ubuntu dual boot

Disable the hibernation mode and Fast Boot in Windows.
Open command prompt as administrator and execute :

powercfg /h off

Open the legacy version of the Windows Control Panel (not the modern version).
Select Energy Settings, enable show hidden settings and uncheck Fast Boot.
After having done this - shutdown the computer completely - do NOT reboot.
Boot into the BIOS and select Ubuntu as the default operating system to boot.

Update :

In case there is no Ubuntu entry to be found in the BIOS / UEFI settings,
re-install the GRUB boot loader to your Ubuntu installation  in EFI mode.
Boot from the Ubuntu installation media - open a terminal and execute:

sudo mount /dev/sdXXX /mnt
sudo mount /dev/sdXX /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
grub-install /dev/sdX
update-grub

Note:

sdX = disk | sdXX = efi partition | sdXXX = system partition

To identify the partition numbers use GParted - it is included in the Ubuntu installation media.
Boot into BIOS and select Ubuntu in UEFI settings to be the default operating system to boot.


I had the same problem with my 1015E after upgrading from 12.04 to 12.10 to 13.04 to 13.10. The forums said it was a bad idea, that I should do a clean install, but I bullishly pressed ahead anyway.

I had that problem and several others, so I wound up doing a clean install from a USB stick and now suspend works well.

The first go-round I did an encrypted home folder, this time I didn't. I am not sure if that has anything to do with it.


Error Message while installing php5-intl

There is something wrong in your APT sources.

You can see that because of the version of your php5-common packages which is 5.5.9+dfsg-1ubuntu4.4 whereas you php5-intl package version is only 5.5.9+dfsg-1ubuntu4.

Also, your current php5-common package version comes from /var/lib/dpkg/status indicating it can not be associated to any currently known APT source.

Therefore, it could mean that you used an APT source to install php5-common and removed it after then, or that your package lists are not up to date.

I recommend:

checking your /etc/apt/sources.list
running apt-get update (it should be done before installing any package)


I will bet that you are using a laptop.  I have had the same thing happen to me.  Your machine may have a setting to disable touchpad while typing that you can cycle on and off.  There is a solution in the Lubuntu wiki.
https://help.ubuntu.com/community/Lubuntu/Mouse#Disable_touchpad_while_typing
See also
http://ubuntuforums.org/showthread.php?t=2212769


Enabling single click to open items in Nautilus

Since the release of Ubuntu 12.10, gconf-editor has been officially replaced by dconf-editor. So the answer by Scaine will not work.

To Enable Single-Click in Ubuntu 12 onwards:

Open a Terminal (Ctrl+Alt+T)
Copy and Paste the following line (if you don't already have it installed):

sudo apt-get install -y dconf-tools

Press Enter and install the package.
Once installed, run dconf-editor in the terminal.
Navigate to org/gnome/nautilus/preferences
Find click_policy in the list and change it's value from double to single
Single Click in Nautilus has now been enabled


How to add shell script to launcher in Ubuntu 17.04?

First, you should address the issues raised by @dessert. Once you have done that, open the Dash and search for "wake". It should appear and you can click-and-drag it to the launcher.


How to install pyside2-uic in Ubuntu 16.04?

The pyside2-uic file is provided by the pyside2-tools package from the PPA you gave. Therefore, you install pyside2-tools using:

sudo apt-get install pyside2-tools


Ubuntu 19.10 unable to find libnm-glib, libnm-glib-vpn and libnm-util packages

You can try to rebuild NetworkManager with --with-libnm-glib


When running a firewall like ufw, please consider enabling ip forwarding, otherwise the clients will only be able to connect to the server, but not to other LAN servers. [0]


alt+tab application switcher like in windows 7

I don't remember what Windows 7 looks like, but we have different switchers by default in Ubuntu, like Super+W


try typing this on your terminal - -

    sudo dhclient0 wlan0

This might solve the problem ..

If not then while your internet is working..
type

    lspci

in terminal and save it in a file
after you get disconnected try this again and write in a different file

vimdiff to see the device-driver change.. download a set set of drivers accordingly to solve..


Why must there be a technical separation of shells into login and non-login kinds?

First, have a look at this answer to understand the differences between login and non-login shells. Basically, they read different initialization files. Now, many distributions—including Debian and, by extension, Ubuntu—are actually moving towards what you describe. On these distributions, the default ~/.profile or ~/.bash_profile files contain something like the following:

[[ -f ~/.bashrc ]] && . ~/.bashrc

That means that login shells—which read ~/.profile—will also read ~/.bashrc, making them behave like non-login interactive shells. Or, rather, making them have the same setup as non-login interactive shells in addition to whatever is set up for login shells.

There are, however, perfectly good reasons to have the two behave differently. For example, it is very common to have a machine that you access either by sitting down in front of it and running a graphical session or remotely, through ssh. In the later case, you would be running a login shell and in the former, you would be opening terminals running non-login shells.

In such cases, you may want the non-GUI shells to behave differently. For example, for many years, I had this command in my ~/.bashrc file to disable the audible bell:

xset b off

Since my .bashrc was only read by interactive, non-login shells, and those were never run graphically, it was an easy way to disable the bell. However, since my distro switched to having ~/.profile source ~/.bashrc, the command was also being executed when I was logging in through ssh, in a non-GUI environment and, since xset requires a running X session, it produced an error.

More generally, it is often useful to have login shells behave differently since they are usually used for a different purpose. There may be variables you only want set in one type and not the other, or files you only want read. It is, admittedly, less useful to separate the two on a single user home computer, but consider that Linux was for many years primarily aimed at the server market and having multi user systems is very normal. In such cases, the added complexity is worth it since it enables you to have fine grained control over how different types of shells behave.


In landscape, why do package downgrades sometimes not work?

The ubuntu repositories do not keep package versions for very long.  let's look at an example:

rsync:
  Installed: 3.1.1-3ubuntu0.15.10.1
  Candidate: 3.1.1-3ubuntu0.15.10.1
  Version table:
 *** 3.1.1-3ubuntu0.15.10.1 0
        500 http://us.archive.ubuntu.com/ubuntu/ wily-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ wily-security/main amd64 Packages
        100 /var/lib/dpkg/status
     3.1.1-3 0
        500 http://us.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages

This shows there are two packages available.  One in the 'wily-updates',
and the main one in the 'main' wily archive.  Any intermediate update is
now missing.  Landscape would not be able to roll back to it.

Each archive just stores the latest package.  Since you targeted that
intermediate package for a downdate by clicking 'undo', the package is no longer there to
install, so Landscape correctly fails.  You should be able to downdate
to '3.1.1-3' just fine if you want (looking at my example).

If you were using a custom repository that kept all old packages
around, they could downdate to intermediate versions, for instance.


That depends on what you call 'midway'. I suppose that the installation begins by formatting the disk, so it would at least be difficult to restore Windows' data or restart it.

After formatting data will be copied to the disk so the previous contents will be overwritten at least partially.


Try it. Seriously though, nobody here (or anywhere) can know how you do your programming or what your games are or what you consider to be a good basic video editing workflow. We're all different. We all expect different things.

The only way you'll know if it works for you is if you try it out.

A dual-boot or Wubi install isn't hard and shouldn't hurt Windows. Give it a few days (it might not even take that long to work out that there are show-stopping issues) and if you like it and can do all the things you want to do, stick with it.

On the issue of web development (my $DAYJOB), the programming side of things is simple enough. Everything I use is cross-platform in some way or another (SublimeText and a lot of Fabric and Git scripting).

But Adobe formats are an issue. Designers still use them so when they're foisted off to me to be turned into websites, I still need the right tools. GIMP isn't there yet. I keep a unnetworked Windows XP virtual machine alive for the sole purpose of Adobe software. Performance is fine on my desktop but I do have 24GB of RAM.

You might struggle on a laptop but I guess the same is true under Windows.


I have had some bad experiences with some HP laptops in this regard. There may be a BIOS or similar bug that doesn't properly un-kill the radio chips. The only workaround I have found is to try to enable WiFi in BIOS or POST and avoid disabling it in hardware once booted. If you need to disable WiFi, try to do it in software.

To verify that I'm not completely wrong in my assumptions, could you please show the output of rfkill list? If WiFi is hard blocked as well as soft blocked, then it could be the bug I mentioned.


How select between multiple programs with same name for linux shell?

Add /usr/local/mysql/bin/ to your $PATH environment variable by adding the following line at the bottom of your Bash configuration file (~/.bashrc):

PATH=/usr/local/mysql/bin:$PATH

I assume here that you only want this for your own user account, if you want to change this system-wide, let me know in the comments. I also assume you're using Bash as your shell. Other shells have similar solutions.

EDIT: In order to enable this change for all users (who have Bash as their login shell), add the PATH= line to the file /etc/bash.bashrc.


This is called application virtualization.

Most teleconference tools allow sharing of only one app and allow the users to interact with that app.

I often use Google Hangouts to share a single application window:

Hover over the left side of the video call window, and a bar with
various app icons will appear.
Click  Screenshare on the left
side of your screen.
In the window that appears, choose your desktop or choose the window
you want to share.
Click Start Screenshare.

Source


Unity doesn't hide in VirtualBox Fullscreen Mode

I had the same issue with Vbox 4.3.16 on Ubuntu 14.04 with W7 guest. Unckecking Mini ToolBar fixed it (machine settings -> General -> Advanced).

Regards,
Greg


How can I enable the "Share Desktop" feature in Empathy?

This works in 11.04, 11.10 and 12.04 - however, the fix for 12.04 isn't in the main repositories yet, it should be there by the end of May however.

The "Share Desktop" feature of Empathy uses vino as a VNC server and vinagre as a VNC client by default. The feature also seems to be supported only with Jabber/XMPP protocol. I tested this on Ubuntu 12.04.1 (updated on October 2012) both 32 and 64 bit. "Share Desktop" works after installing the vinagre package (vino was there by default) and using a Jabber account.

You typically do not need to set up the share desktop feature before you use it. All you need is to make sure that the person on the other end is using Empathy an has "vinagre-preferences" running. Simply right click on the person's name and select "Share My Desktop..."

You'll get this message while the other person gets a prompt.

The other person will see something like this:

When you're done there will be a final message to make sure the person is disconnected:

If the menu entry is grayed out it means that either the other person doesn't have support for it or you might be using a protocol that doesn't support the feature.


flash player working in firefox and not in chrome

Try:

echo application/x-shockwave-flash
swf swfl > ~/.mime.types

You may need to log out and back in.


The actual package name is libknewstuff2-4. It is actually a library for KDE that enables data sharing capabilities to various KDE applications.

From apt-cache show libknewstuff2-4:

  The KNewStuff2 ("Get Hot New Stuff" v2)  library adds data sharing
  capabilities to KDE Applications. Technically, it implements the GHNS
  and DXS  specifications. The library consists of three parts: the data
  management core  and GHNS protocol implementation, the DXS web service
  handler, and the user  interface classes like dialogs and buttons.

Also there is a version 3, packaged as libknewstuff3-4.


Disable laptop headphone port to default to built-in speaker

open a terminal window and type alsamixer

you can chose the sound card pressing F6 if not already chosen by default
you can mute/unmute pressing m
you should have sliders for speakers headphones
see help h or F1 for more details


Can I use a Portable Hard Drive instead of a USB stick to install Ubuntu?

Yes you can simply load the image onto the hard drive, as you would do it with an USB stick.

Than boot from the HDD and select install Ubuntu. The wizard will guide you through the installation, where you have to select the correct ! drive.


How does Alt+F2 run a command directly as a child process of the init process?

Read man nohup, which explains how to detach a process from the parent. Process 1 is made the parent. One of init's tasks is to harvest (and ignore) the process's exit status, and prevent "zombie" processes.


Removing pending orphan activities in Landscape

I'd recommend you file an support case about this by clicking on the "SUPPORT" link at the top of the landscape GUI.

If you don't get a response, please reply here and I'll make sure it gets taken care of.

Of the top of my head, it looks like something is very wrong with the client, as a re-synchronization event should not happen under normal circumstances.  Those activities should also not be stuck there, and thus there is no normal mechanism to delete them (short of deleting the computer and re-adding it).


Installing a directory with a Debian Package

I assume you want to distribute a folder like this:

  /usr/share/myfolder

First make a new folder for the debian package.
Execute this command in Terminal:

  mkdir MyDeb

Now create the debian package's control file:

  mkdir MyDeb/DEBIAN
  gedit MyDeb/DEBIAN/control

Put necessary information in the control file. For example you can paste something like this:

    Package: my-awesome-package
    Version: 1.0
    Architecture: amd64
    Maintainer: Chuck Norris <gmail@chucknorris.com>
    Description: Copies some stuff to the disk

Once done, save the control file.

Now, copy the folder you want to distribute with the debian package including it's directory structure, to the MyPackage folder, so the package folder should look like this:

  MyPackage
  |
  +----DEBIAN/control
  |
  +----usr/share/myfolder

To make the DEB package, open the Terminal and execute this command:

  dpkg -b MyPackage


Try the following:

Place your script into a system-wide directory such as /usr/local/bin with an appropriate shebang
#!/bin/sh

# Fix caps
/usr/bin/xkbcomp -xkb "$DISPLAY" - | /bin/sed 's#key <CAPS>.*#key <CAPS> {\
    repeat=no,\
    type[group1]="ALPHABETIC",\
    symbols[group1]=[ Caps_Lock, Caps_Lock],\
    actions[group1]=[ LockMods(modifiers=Lock),\
    Private(type=3,data[0]=1,data[1]=3,data[2]=3)]\
};\
#' | xkbcomp -w 0 - "$DISPLAY"
exit 0

Make it executable e.g. sudo chmod +x /usr/local/bin/fix-caps.sh

Create a custom config file in /etc/lightdm/lightdm.conf.d. Use a name such as 99-local-settings.conf. (The 99 prefix means that it will be run after the standard setup scripts provided in /usr/share/lightdm/lightdm.conf.d.)
Add the location of your script as a display-setup-script int the [SeatDefaults] section:
[SeatDefaults]
display-setup-script = /usr/local/bin/fix-caps.sh

The display-setup-script should be run after the X server is started, but before any greeter is run - see LightDM: Adding system hooks.


Quick and dirty: you could look into rsync for the synchronization of files. In the folder you sync you could have a Bash script. Then you could use crontab to syncronize and then run this script at regular intervals.


yes its possible, look at this one:

http://wn.com/6_Monitor_Linux_workstation_using_Ubuntu_and_Compiz

this guy use 6 monitors, so 3 its possible

now, here's a config i found : https://superuser.com/questions/132290/triple-monitor-setup-in-linux

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 1.0  (buildd@crested)  Sun Feb  1 20:25:37 UTC 2009
# edited by me (brendan) 2010-04-18

#   NVIDIA magic (something about glx-new?)
Section "Module"
    Load           "glx"
EndSection

Section "Extensions"
    Option         "Composite" "Enable"
EndSection

#   Keyboards and Mice
Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

#   Physical Monitors:
Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Acer"
    ModelName      "Acer H233H"
    HorizSync       40.0 - 70.0
    VertRefresh     60.0
EndSection

Section "Monitor"
    Identifier      "Monitor1"
    VendorName     "Acer"
    ModelName      "Acer AL2216W"
    HorizSync       40.0 - 70.0
    VertRefresh     60.0
EndSection

Section "Monitor"
    Identifier     "Monitor2"
    VendorName     "BenQ"
    ModelName      "BenQ W500"
    HorizSync       44.955 - 45.0
    VertRefresh     59.94 - 60.0
EndSection

#   Physical Video Cards/Ports:
Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 9800 GTX+"
#    Screen          0
    BusID          "PCI:5:0:0"
EndSection

#Section "Device"
#    Identifier     "Device1"
#    Driver         "nvidia"
#    VendorName     "NVIDIA Corporation"
#    BoardName      "GeForce 9800 GTX+"
#    BusID          "PCI:5:0:0"
#    Screen         1
#EndSection

Section "Device"
    Identifier    "Device2"
    Driver        "nvidia"
    VendorName    "nVidia Corporation"
    BoardName     "GeForce 7900 GT/GTO"
    BusID         "PCI:4:0:0"
    Option        "TVStandard" "HD720p"
EndSection

####    Default 3-monitor Layout 'default'

Section "ServerLayout"
    Identifier     "Default Layout"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen2" LeftOf "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "ServerFlags"
    Option         "Xinerama" "0"
EndSection

#   Virtual Screens
Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "1"
#    Option         "NoTwinViewXineramaInfo"
    Option         "metamodes" "DFP-0: 1920x1080 +1680+0, DFP-1: 1680x1050 +0+30"
#    Option         "metamodes" "DFP-0: 1920x1080 +1680+0, DFP-1: 1680x1050 +0+15; DFP-0: NULL, DFP-1: 1680x1050 +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

#Section "Screen"
#    Identifier     "Screen0"
#    Device         "Device0"
#    Monitor        "Monitor0"
#    DefaultDepth    24
#    Option         "TwinView" "0"
#    Option         "metamodes" "1920x1080"
#    SubSection     "Display"
#        Depth       24
#    EndSubSection
#EndSection

#Section "Screen"
#    Identifier     "Screen1"
#    Device         "Device1"
#    Monitor        "Monitor1"
#    DefaultDepth    24
#    Option         "TwinView" "0"
#    Option         "metamodes" "1680x1050"
#    SubSection     "Display"
#        Depth       24
#    EndSubSection
#EndSection

Section "Screen"
    Identifier     "Screen2"
    Device         "Device2"
    Monitor        "Monitor2"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "1280x720"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Of course you will have to modify it but that will help you to see how ti works

found another tread about it: http://ubuntuforums.org/showthread.php?t=1502753

another one: http://ubuntuforums.org/showthread.php?t=1811366


Deja-dup repeatedly asks encryption password

If you run Deja-Dup from a terminal, you may be able to get more info on the problem:

export DEJA_DUP_DEBUG=1
deja-dup --backup

In my particular case, it turned out that there was a stale lock file preventing GnuPG from working at all. Deleting ~/.gnupg/gnupg_spawn_agent_sentinel.lock solved the issue for me.


Accessing existing Windows C drive from Ubuntu

You have installed Ubuntu as a Wubi installation. To access your windows drives and files, you should be able to see a "Host" drive when you open the file browser, to the left hand side, under the label "Computer".

It would be better if you could install ubuntu as a standard installation rather than as wubi. To see how to install ubuntu as a standard installation by replacing windows, see this:

How to install ubuntu replacing windows

Be warned that this will remove your windows files, so backup all your files and folders.

See the difference between wubi and a standard installation here.


WINDOWS 10 | Ubuntu | Legacy / UEFI install |

Detailed answer to this question is here.

  Create an Ubuntu bootable USB.
  Enter the BIOS setup utility.
  Select UEFI boot mode.
  Plug in the USB flash drive, restart the computer, and press the F12 key or the dedicated boot menu key for your computer.
  Find the USB name and press Enter.
  You should boot into the Ubuntu installer now.
  Start the Ubuntu installation process.
  Once on the partitioning screen of the Ubuntu installer, create a swap partition and a root partition.
  The most important one is to select the efi-boot partition, say about 100MB. To successfully install on the UEFI mode. Refer to the
  below screenshot.

  The solution to my problem was fairly easy. I just had to add another
  partition /boot/efi to successfully install Ubuntu 18.04 on my
  computer, where Windows 10 was installed on the 128GB SSD in Legacy
  mode and Ubuntu 18.04 was installed on the 100GB partition of the 1TB
  HDD in UEFI mode.

  Now whenever I want to run Windows 10, I just enable Legacy boot
  option form my BIOS. Whenever I want to run Ubuntu 18.04, I just
  Enable UEFI boot option from the BIOS.


If you use "Show position of pointer when the Control key is pressed" (mouse and touchpad settings) try to disable it. It did the trick for me...


Switcheroo or ACPI call: Which is the better option and what are the differences?

I have used both on my 4820TG.  Near as I can tell I go from 4.5 to 5 hours on battery with acpi_call to 4 hours with vga_switcheroo.  Wifi on, basic web browsing stuff.

With vga_switcheroo suspend works whether the ATI is on or off.  I do not use the ATI in linux at this time, just windows for gaming.  However if I hibernate with the ATI off, when the machine awakens the ATI is on and cannot now be shut down without a reboot.

acpi_call simply results in a hang when suspending or hibernating.


Directories are looping when I boot from my old SSD Ubuntu via USB connection

The contents of /sys/class/power_supply is best considered API interfaces, not files. These can be different on every computer (even if they're the same model) depending on:

BIOS settings
battery firmware
hardware capabilities
hardware age
GRUB settings
etc. ...

Looking at the options that you have in your BAT0, you will not be able to set thresholds at this time. What I suggest is that you take a look in your BIOS under the "Power" options for something that will allow you to change the power profile.


Windows Partition won't show up during installing

There's probably a small error in the partition table - if that is the case all seems to work but the partition editor refuses to touch it.

I'd suggest you remove the new partition using the original program (hopefully there won't be any more errors), then firing up Ubuntu LiveCD and using GParted to make the new partition.


I finally managed to solve this problem. I borrowed a friend's USB female to PS/2 male adapter to use with my keyboard in GRUB but this didn't work. Then I borrowed his usb keyboard and that didn't work. But his usb keyboard with his usb/ps2 adapter did work. Somehow the adapter only works with some keyboards, go figure! Where is the logic?

Anyway, from there I drew a blank as anything I did in recovery mode failed. I couldn't load a tty that worked and almost gave up. I kept getting terminals that never allowed me to input anything. Perhaps my amateur eyes were missing something.

In the end, just for the hell of it I booted in Ubuntu (Upstart mode), without knowing what it was (it was an option in GRUB). This finally took me to a working tty from which I was able to determine that the reason I can't back-up my home directory from the live cd (I kept getting permission denied) is that I had encrypted it (ecryptfs) when I first installed Ubuntu. To make matters worse, the 32 digit long password to decrypt it, that I had saved, didn't work, but this mattered no longer as I could now logon once more (albeit in CLI mode). For those interested, I followed the instructions here https://help.ubuntu.com/community/EncryptedPrivateDirectory under the "Recovering Your Data Manually" heading, but as I said it didn't work for me.

Afer learning a few commands I backed up my precious files and purged nvidia-* from my system using this method: How can I uninstall a nvidia driver completely ?
After doing this, my system was back to normal. nvidia was to blame all along. I now hate nvidia. I'm sure they care a great deal :p

Lessons learned:
1. Always back-up your files.
2. Encryption is not a great idea if it's not really needed and you haven't bothered to test that your password actually works.
3. GRUB is rubbish at detecting USB keyboards. Make sure it is usable.
4. Knowing tty commands to backup stuck to memory stick is awesome.
5. nvidia are rubbish. Boo them.


Is there a standard or recommended sound lib in Ubuntu?

The fractured Linux audio landscape is basically a myth nowadays. All sound technologies on Ubuntu that have not been deprecated or dead for six years are complementary. To paraphrase Lennart Poettering with slight updates and an Ubuntu app-developer perspective:

  I want to write a media-player-like application!

    Use GStreamer!

  I want to add event sounds to my application!

    Use libcanberra, install your sound files according to the XDG Sound Theming/Naming Specifications!

  I want to add sound to my game!

    Use the audio API of SDL for full-screen games, libcanberra for simple games with standard UIs such as Gtk+.


Unity not working in default user account

I might have been in the same situation. What had happened for me yesterday (after updating) is that for some reason the Unity plugin was disabled due to keyboard shortcut conflicts. I tried unity --reset, but it didn't help.

So here's one thing you could check:

Enter CCSM (CompizConfig Settings Manager)
1a. If you don't have it, run sudo apt-get install compizconfig-settings-manager
Check that Unity plugin is enabled.
If not, try to enable it. If it asks a lot of questions about conflicts, just click on "Turn off ..." on all of them, that means some other plugins use those shortuts, but Unity should have the priority.

Not sure you're in the same boat, but might be worth checking.

-EDIT-
I misread, I could at least enter the desktop with no unity and launch a terminal with CTRL + ALT + T. If you just get a blank screen then this might be something else.


Microphone on combo jack not working Asus A46CM

You should go to System Settings > Sound > "Input" tab, and make sure the correct microphone input is selected and not muted.


how to replace 3rd row in a file using sed?

You can indicate a range of lines to operate on in sed e.g. in your case 3,4 indicating line 3 to(and) 4:

sed -r '3,4 s/.*/blender.net x.x.x.x:33 blender blender/' file.txt

Example:

$ cat file.txt
mode blender
type kitchen
blender.net 5.5.5.5.6:33 blender blender
blender.com 5.5.5.5.5:33 blender blender

$ sed -r '3,4 s/.*/blender.net x.x.x.x:33 blender blender/' file.txt
mode blender
type kitchen
blender.net x.x.x.x:33 blender blender
blender.net x.x.x.x:33 blender blender

Here we are doing the desired substitution operation on line 3 and 4.

From a variable:

$ var=5.5.5.5.6:3

$ sed -r "3,4 s/.*/blender.net $var blender blender/" file.txt
mode blender
type kitchen
blender.net 5.5.5.5.6:3 blender blender
blender.net 5.5.5.5.6:3 blender blender


See https://linuxcontainers.org/lxd/getting-started-cli/

Note that the snap package hasn't been updated in quite a while and needs a significant amount of work to be ported to current snappy, so it may well not work at all right now.


How long should it take to install Ubuntu onto a Nexus 7?

No.

Also check that Nexus 7 is not 'sleeping', by pressing on/off button briefly.

If you are "installing manually", what steps are you using?

This may be the cause of your problems.

Did you download ALL files first? phablet-flash cdimage-touch -d grouper -b -D

What error (and at what stage) do you get when you attempt to use the phablet-flash tool to install?

(I just installed to Nexus 7, with no issues.)


Why does waking up from suspend take a long time?

"Hibernate" is suspend to disk

"Suspend" is suspend to RAM

Power Management hibernates your laptop on low battery even when it was suspended to RAM to prevent data loss.

Unfortunately waking up from a hibernate state may take longer than a regular boot. If this is the case we may consider shutting down rather than hibernating. However, then running applications will not be restored.

uswsusp  may speed up wake up from hibernation.


Configure LXC with additional IP ubuntu 14.04

The concept of creating or configuring multiple IP addresses on a single network interface is called IP aliasing. IP aliasing is very useful for setting up multiple virtual sites on Apache using one single network interface with different IP addresses on a single subnet network.

The main advantage of using this IP aliasing is, you don’t need to have a physical adapter attached to each IP, but instead you can create multiple or many virtual interfaces (aliases) to a single physical card.

Here I have an interface called eth0, the default interface for the Ethernet device. If you’ve attached second Ethernet device, then there would be an eth0:1 device and so on for each device you’ve attached.

Example:

root@h0st:~# cat /etc/network/interfaces

auto eth0 iface eth0 inet static

    address 94.23.237.216
    netmask 255.255.255.0
    network 94.23.237.0
    broadcast 94.23.237.255
    gateway 94.23.237.254

auto eth0:1 iface eth0:1 inet static

    address 91.131.239.228
    netmask 255.255.255.0
    network 91.131.239.0
    broadcast 91.131.239.255
    gateway 91.131.239.254


How do I quit top without leaving the output on the terminal?

When you start it like this ...

top && clear

... the screen clears after exiting top with q.

This acts more like less:

tput smcup ; top ; tput rmcup

(smcup switches to a secondary screen where the top command is executed and when you quit top rmcup switches back to the normal screen)

You could alias the top command to do that ( How do I create a permanent Bash alias? )


How to delete Kali in dual-boot with Ubuntu?

If you are not seeing Ubuntu as an option on boot (even when launching the computer boot menu) you may want to boot with a live linux distribution from an usb drive and then repartition your hard drive with gparted as recommended by JerareYoshi.

The steps would be:

BACK UP ANYTHING YOU DEEM IMPORTANT before doing anything with your partitions.
Boot from an USB live distribution. Here is a tutorial to do so if you don't find one.
From the live distribution, open gparted and follow the instructions on this thread to merge back one partition to the other.
Reinstall GRUB or GRUB2 or the boot loader of your preference. Boot-Repair is yet another tool that repairs your boot sequence. This will allow you to boot your computer into the Ubuntu distribution of now merged hard drive.


How do I change the channels in pavelcontrol?

In pavucontrol, click the lock button next to the "ALSA plug-in [java]: ALSA Playback" section. This will unlock the two channels from each other and let them move independently again, then the issue can be solved by muting one channel as usual.


How can I get a manually created user to show up on the log in screen?

Easiest workaround to me would be to change the UID of that user after you created that user. This is the command for it:

sudo usermod -u {uid_you_want_it_to_be} {your_username}

(side note: if you need to do this with the current user and do not want to create another account you can do this from the live cd too.)

Userid's by design do not show up when under 1000. You can change this though!

sudo gedit /etc/login.defs

find ...

#
# Min/max values for automatic uid selection in useradd
#
UID_MIN          1000
UID_MAX         60000

and change UID_MIN to 500 (or anything under 504 (but I would not go a lot lower))


cannot maintain new mac address via macchanger

I think that the act of bringing up the interface causes it to re-read the mac from hardware.  The recommended method of using 'macchanger' is written in https://help.ubuntu.com/community/AnonymizingNetworkMACAddresses, and recommends adding a script to the intereface initialization routines:

Create the file with the command

sudo nano /etc/network/if-pre-up.d/macchanger

into this file, enter the lines

#!/bin/sh

# Radomize the mac address for the given interface
/usr/bin/macchanger -r "$IFACE"

close the file, by pressing Ctrl+o and then Ctrl+x, and mark the file as executable with the command

chmod +x /etc/network/if-pre-up.d/macchanger

This command will then be executed during the process of bringing the interface up, and assign a random mac at that time.


How to create a Debian source package with Qt Creator?

It's very hard to tell from your question what you already know, so I assume that you:

can program
in C++
with Qt widgets / the QT framework.

As far as I know, the QT Creator is not able to create debian packages to submit to the Ubuntu Software Center.

QT Creator is able to create debian packages for Maemo5 (see here). Looking through the discussions on Maemo, it seemes that this process is not easily changeable, but maybe you can start from there.

If you are not fixated on QT Creator, you can simply use it to create you code and then follow the Ubuntu Packaging Guide to create your debian package.

The actual submission to the Software Center is described here.

For future questions I would suggest you write in more detail what your actual problem is.


For basic documents, saving LibreOffice documents as Microsoft Word 2007-2013 XML is just fine.  If you are collaborating with others on a document and formatting matters, particularly if you have embedded images, track changes, comments, et al, then I recommend agreeing with your collaborators on using either LibreOffice or Microsoft Word. There are too many small things that get lost in translation that can be a huge time suck.  As an Ubuntu user, I pitch LibreOffice for collaboration but have MS Word 2010 installed under Wine as a fall-back.  Wine support for MS Office 2010 is excellent, rock solid.


The error you get from sge_execd points to that the sge_execd process is running already and has allocated port 6445 already and therefore a second instance cannot use the port again.

Since sge_execd and sge_qmaster are services, they shouldn't be started directly on the commandline but rather through the init-scripts that are shipped with the packages. Additionally, the init-scripts will pick up some SGE related environment variables to make the services work correctly.
From Ubuntu 16.04 and onwards, systemd is normally used to manage startup scripts. In case of the gridengine scripts, the systemd way seems not to work. You should enable the SGE parts to start automatically on boot as follows.

$ sudo update-rc.d gridengine-master enable
$ sudo update-rc.d gridengine-exec enable

To start the services correctly for now, you could first stop the instances and the start them through systemd.

$ sudo killall sge_qmaster
$ sudo killall sge_execd

Then check if the processes went away.

$ sudo ps aux | grep sge | grep -v grep

After that try to start the services.

$ sudo systemctl restart gridengine-master.service
$ sudo systemctl restart gridengine-exec.service


Change icon of stand alone application, (AppImage)

This is assuming you installed etcher from their repository or .deb files.

Open up terminal
Navigate to Ubuntu's application global dir.

cd /usr/share/applications

Edit the Etcher's desktop entry.

sudo gedit balena-etcher-electron.desktop

Change Icon= value to your image file location. Mine was in ~/Downloads folder so put it like this.

[Desktop Entry]
Name=balenaEtcher
Comment=Flash OS images to SD cards and USB drives, safely and easily.
Exec="/opt/balenaEtcher/balena-etcher-electron" %U
Terminal=false
Type=Application
Icon=/home/user/Downloads/GitLab_Logo.svg.png
StartupWMClass=balenaEtcher
Categories=Utility;

Save and exit to apply changes.
Run sudo updatedb to update database.
The icon will changes then.

From

To


Run the command in the background.

callNotepad(){
     wine 'C:\Program Files\Notepad++\notepad++.exe' "$1" &
}

If you want to silence the errors, redirect them into silence.

callNotepad(){
     wine 'C:\Program Files\Notepad++\notepad++.exe' "$1" 2>/dev/null &
}

Note that this may also silence useful errors, so use at your own risk.


No, you cannot. Writing a new Ubuntu ISO to the flash drive will replace all content on the drive with the installer ISO data.


Read about Debian, the Linux distribution on which Ubuntu is based. Debian is meant for more advanced users, so the information you'll find will be more in-depth.


Unable to enumerate USB device on Ubuntu server 19.10 arm64 at Raspberry Pi 4B

The Raspberry Pi 4B is not supported under Ubuntu 19.04 (Disco). The first version with 4B support is Ubuntu 19.10 (Eoan), though I'm hoping to get support back-ported to the current LTS (18.04, Bionic) as soon as possible.

If you have a 19.04 installation and wish to upgrade, that upgrade should be performed on a platform supported by 19.04, e.g. a Raspberry Pi 3B. After upgrade, the image should be bootable on a 4B; if it is not, that's a bug - please let me know!

However, be aware there is currently a known issue with the USB ports under the arm64 image on the Raspberry Pi 4B:

USB not working under arm64 on Pi4

A workaround is mentioned in that report, but you may wish to stick to the armhf variant for now (armhf uses LPAE, so you'll still have access to all the RAM on the Pi4).


Why do I get a 'Connection closed' error when trying to branch a Launchpad branch?

The error you're seeing, and it seems like it's not a client-side issue, is probably a problem with the Launchpad servers.

However, I can't reproduce this at the moment. For production issues with Launchpad it's usually best to ask in the #launchpad channel on IRC or in the "Answers" section on Launchpad itself.


I don't know if I understood the question correctly.
Maybe this will help.
from https://wiki.archlinux.org/index.php/GRUB/Tips_and_tricks
GRUB can set the framebuffer for both GRUB itself and the kernel. The old vga= way is deprecated. The preferred method is editing /etc/default/grub as the following sample to set width (pixels) x height (pixels) x color depth:
GRUB_GFXMODE=1024x768x32
GRUB_GFXPAYLOAD_LINUX=keep

Multiple resolutions can be specified, including the default auto, so it is recommended that you edit the line to resemble GRUB_GFXMODE=desired_resolution,fallback_such_as_1024x768,auto. For more information, refer to the GRUB gfxmode documentation. The gfxpayload property will make sure the kernel keeps the resolution.


How do I export customized Libreoffice config files?

Looks like I found the answer to my own question once again. According to this post over at Ask Libreoffice, the config file ~/.config/libreoffice/*/user/registrymodifications.xcu is the one to look at. It's a huge XML file, which could make it a bit tricky to modify via command line, but if you just create your own registrymodifications.xcu right after you install LibreOffice, you can just add your custom options first in an almost empty file as a template, and LibreOffice will append what's missing when you start it.

Remember to start your file with

<?xml version="1.0" encoding="UTF-8"?>
<oor:items xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

And end it with

</oor:items>

Anyway, the XML nodes that I wanted to change are these:

Turn autosave on/off

<item oor:path="/org.openoffice.Office.Common/Save/Document">
  <prop oor:name="AutoSave" oor:op="fuse">
    <value>false</value>
  </prop>
</item>
(...)
<item oor:path="/org.openoffice.Office.Recovery/AutoSave">
  <prop oor:name="Enabled" oor:op="fuse">
    <value>false</value>
  </prop>
</item>

Change the <value>false</value> to <value>true</value> in both places to enable.

Set autosave interval. Default is 15 minutes.

<item oor:path="/org.openoffice.Office.Common/Save/Document">
  <prop oor:name="AutoSaveTimeIntervall" oor:op="fuse">
    <value>15</value>
  </prop>
</item>
(...)
<item oor:path="/org.openoffice.Office.Recovery/AutoSave">
  <prop oor:name="TimeIntervall" oor:op="fuse">
    <value>15</value>
  </prop>
</item>

Change the <value>15</value> to <value>YourInterval</value> both places.

Change default text color to BLACK instead of DARK GREY

<item oor:path="/org.openoffice.Office.UI/ColorScheme/ColorSchemes/org.openoffice.Office.UI:ColorScheme['LibreOffice']/FontColor">
  <prop oor:name="Color" oor:op="fuse">
    <value xsi:nil="true"/>
  </prop>
</item>

Change the <value xsi:nil="true"/> to <value>0</value>.

Turn off auto suggested words (annoying feature, IMO)

<item oor:path="/org.openoffice.Office.Writer/AutoFunction/Completion">
  <prop oor:name="Enable" oor:op="fuse">
    <value>true</value>
  </prop>
</item>

Change the <value>true</value> to <value>false</value> to disable.

Change autosave path to $CONFIGDIR/tmp instead of /tmp

/tmp gets purged at reboot, so if your computer crashes or the power goes out, you're not in luck by using the default settings in LO.

<item oor:path="/org.openoffice.Office.Paths/Paths/org.openoffice.Office.Paths:NamedPath['Temp']">
    <prop oor:name="WritePath" oor:op="fuse">
        <value>$(user)/tmp/</value>
    </prop>
</item>

LibreOffice/OpenOffice creates the directory for you if it doesn't exist. There's already a $(user)/temp folder, but no one seems to know what it's for. To be sure, I created a new one just called tmp.


So I've found sorta workaround:

Open /var/lib/update-manager/meta-release, and find strings:

Dist: precise
Name: Precise Pangolin
Version: 12.04 LTS
Date: Thu, 26 Apr 2012 12:04:00 UTC
Supported: 1
Description: This is the 12.04 LTS release
Release-File: http://archive.ubuntu.com/ubuntu/dists/precise/Release
ReleaseNotes: http://archive.ubuntu.com/ubuntu/dists/precise/main/dist-upgrader-all/current/ReleaseAnnouncement
ReleaseNotesHtml: http://archive.ubuntu.com/ubuntu/dists/precise/main/dist-upgrader-all/current/ReleaseAnnouncement.html
UpgradeTool: http://archive.ubuntu.com/ubuntu/dists/precise/main/dist-upgrader-all/current/precise.tar.gz
UpgradeToolSignature: http://archive.ubuntu.com/ubuntu/dists/precise/main/dist-upgrader-all/current/precise.tar.gz.gpg

Download UpgradeTool and UpgradeToolSignature files
Upload them to any other web-server and modify corresponding strings (I guess that even file:/// will work)
sudo do-release-upgrade

Worked for me, hope'll help you either. Good luck!


M1 is not currently a chip architecture that Debian and Ubuntu build packages for.
Since M1 is a proprietary architecture, there's no way to guess when Apple will make the documentation available that enables volunteers to compile packages for that architecture. Maybe next week...maybe never. It's Apple's decision, not ours.
Some intrepid folks have indeed managed to haywire several Linux distros, including Ubuntu, to run...sort of...on M1 hardware. Clever pioneers always find a way. However, the Ubuntu installers DO NOT work on M1, Ubuntu developers will reject M1-related bug reports, and the Apple Genius Bar may (or may not) complain that you voided your warranty when you tried to install Ubuntu and bricked your MacBook.
Ubuntu will happily run on your M1...in a Virtual Machine.


Why do ext2 and successors not need defragmentation?

One way in which the ext4 file system keeps fragmentation in-check, is with the process of delayed allocation (ext4's default allocation mode).

  Delayed allocation works by deferring the mapping of newly-written file data blocks to disk blocks in the filesystem until writeback time.

This works by allocating most of the blocks for a file at the same time, when the total number of blocks (or at least a ballpark) in each file is known.  This allows the block allocator (the mballoc mentioned in MMK's answer) to do a better job of finding an appropriately-sized area of free space to put the file.


Skylake Integrated Graphics | HP ProOne 400 G2 AIO Install Problems

Could you please elaborate more what you mean by "have been unsuccessful in installing Ubuntu 14 - 16"?
Was the installation successful and you just did not manage to configure graphics correctly or the whole installation failed?
If you are able to install Ubuntu 16.04, try to replace installed kernel with kernel 4.6.3 (how-to below for your 64-bit installation), this should resolve your issues.

$ cd /tmp
$ wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.6.3-yakkety/linux-headers-4.6.3-040603_4.6.3-040603.201606241434_all.deb kernel.ubuntu.com/~kernel-ppa/mainline/v4.6.3-yakkety/linux-headers-4.6.3-040603-generic_4.6.3-040603.201606241434_amd64.deb kernel.ubuntu.com/~kernel-ppa/mainline/v4.6.3-yakkety/linux-image-4.6.3-040603-generic_4.6.3-040603.201606241434_amd64.deb

Install the kernel:

$ sudo dpkg -i linux-headers-4.6.3*.deb linux-image-4.6.3*.deb

Reboot your PC and check if kernel 4.6.3 is currently used by issuing command

$ uname -r


Go to recent directory of file using nautilus

This was recently asked on SuperUser.

In summary - no, its not available in the current version of Nautilus - but the basic underlying capability is available through the GTK+3 libraries, hence you could (in theory) add this by adding the appropriate library call into a rebuild of nautilus.

If you want this - add your request to the outstanding nautilus feature request report.


Install newer version of R from Zesty Zapus (17.04) on 16.04

The exact same issue occurred in my ubuntu 17.10. I solved it by downloading libpng12-0 from https://packages.ubuntu.com/xenial/amd64/libpng12-0/download

Then install it with command:

sudo dpkg -i libpng12-0_1.2.54-1ubuntu1_amd64.deb

Finally, run commend below to install R (assume you have already added R repository):

sudo apt-get install r-base-dev

I hope it will help you.


Cannot enter ubuntu graphical environment after update

EDIT: Reinstall Ubuntu or use LiveDVD, because tty doesn't work

Try Ctrl + Alt + F6 to enter tty6. (Also possible with 1-5)

There you can try to reinstall ubuntu-desktop or choose another window manager


After different trials I was able to find out the problem, it seems that the downloaded ISO file was not complete although Chrome Download Manager has mentioned that the download was complete, I downloaded a fresh copy, checked it with the MD5 Checksum and it seems to be working now, at least I can see now the Ubuntu initial installation menu

I am facing another issue though and I have been searching for a resolution for some time now so probably I will post another question related to this other issue


sudo ufw status
Status: inactive

You can turn it off and on with ...

sudo ufw disable
sudo ufw enable

By default it is disabled.

You can check if there are iptables rules active with:

sudo iptables -L

Your output, with no lines between the target     prot opt source               destination header and the next Chain, indicates that no rules are active.

If you have iptables active this will cancel it

sudo iptables -X
sudo iptables -t nat -F
sudo iptables -t nat -X
sudo iptables -t mangle -F
sudo iptables -t mangle -X
sudo iptables -P INPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P OUTPUT ACCEPT

explanation of all the options

If you want a graphical method:

sudo apt-get install gufw

Website
Image:


Installing apps on a usb drive whereas Ubuntu installation is on hard drive

My solution would be with LVM, create a slash partition with LVM and then add whatever you want on it to add storage, you could even add a SD card in your potential SDCard reader ;-) and then attach it as LVM to your Slash or whatever partition...

Here is an example. The point is:

creating a LVM partition on your new attached device
copy all data you've got on your slash partition (with a boot device can be USB/CD/DVD)
Boot on this system (change fstab according to your new config)
Format your old slash partition with LVM
Add it to your LVM volume group


Ubuntu doesn't boot after 11.10 upgrade from 11.04

Looks like the display manager is not loading. Try these commands,

sudo service lightdm start

If this works, it means lightdm is installed but not configured as default display manager. To set it as default display manager, use this command.

sudo dpkg-reconfigure lightdm

and choose lightdm as default display manager. If the above command does not work, try this

sudo apt-get update
sudo apt-get install lightdm

In case it still doesn't work, try purging lightdm and reinstalling.

sudo apt-get purge lightdm
sudo apt-get install lightdm


Apt-get NO_PUBKEY error after trying to install mongodb

For me the solution was install y-ppa-manager and with the ui menu install missing gpg keys. I share my solution, i hope its helps
$ sudo add-apt-repository ppa:webupd8team/y-ppa-manager
$ sudo apt update
$ sudo apt install y-ppa-manager

then run the app with "y-ppa-manager" and in the menu press "advanced" option, and the press "try to import all missing GPG keys".
reference image of y-ppa-manager and what need to press
if is not the solution you need, well good luck


Connecting to wifi fails, but APs are shown

You want to first remove everything from your /etc/modprobe.d/blacklist.conf that you may have added, as well as that one line you added to /etc/rc.local.

First thing to try:

With your wifi device plugged in, search for "Software Sources" and open the app. Go to the "Additional Drivers" tab. There you will find an option to enable your wireless device.

Second thing to try:

If this does not work, uninstall and then reinstall the bcmwl-kernel-source package, then reboot. You should then perform the step above to make the change survive each kernel upgrade.

You can see a further explanation here. Basically, when you upgraded the kernel, the wireless driver, which is an extra that needs to be built into each kernel, was not carried along.


Short answer is yes. The long answer is likely that someone attempted to configure container access to the host CPU cycles and configured incorrectly.

By default, each container’s access to the host machine’s CPU cycles is unlimited. You can set various constraints to limit a given container’s access to the host machine’s CPU cycles. Most users will use and configure the default CFS scheduler. In Docker 1.13 and higher, you can also configure the realtime scheduler.

You need to

Configure the default CFS scheduler
The CFS is the Linux kernel CPU scheduler for normal Linux processes. Several runtime flags allow you to configure the amount of access to CPU resources your container has. When you use these settings, Docker modifies the settings for the container’s cgroup on the host machine.

You can Specify how much of the available CPU resources a container can use, as well as Limit the specific CPUs or cores a container can use among several other options relating to CPU usage configuration. For more, check the source.
Warning: CPU scheduling and prioritizing are advanced kernel-level features. Most users do not need to change these values from their defaults. Setting these values incorrectly can cause your host system to become unstable or unusable.
I personally would cautiously assign 1/4 of the CPU cores available to each container leaving some wiggle room for other things. So on a quad core running docker v1.13 and higher:
I'd docker run -it --cpus="1" ubuntu /bin/bash
and on v.1.12 and lower:
I'd docker run -it --cpu-period=100000 --cpu-quota=25000 ubuntu /bin/bash
This appears to be a good starting point for a quad core system. I would tune these parameters to obtain the level of performance vs. availability that I desired.
Source:
https://docs.docker.com/engine/admin/resource_constraints/#configure-the-default-cfs-scheduler


Let aptitude solve the problem for you.

sudo apt-get install aptitude

Start aptitude

sudo aptitude

In the bottom line problem solutions are offered.

Use E for Examine and . and/or , to move between proposed solutions

Apply with !

And Go with G


Ubuntu Minimal in the new Intel NUC Haswell

The ethernet configuration for 13.10 never worked for me during the installation. The wireless card does work (if you installed one). If you are able to reach a terminal after installation, you can setup the NIC yourself by editing

sudo nano /etc/network/interfaces

Add to the end,

auto em1
iface em1 inet dhcp

Save, then start the new NIC with

sudo ifup em1

Use ifconfig to confirm.

On Ubuntu 12.04, it should be called eth0 instead of em1. If you are not sure, use

sudo lshw -C network

and you can see what your NICs are called.

Specs:
Intel NUC DC3217IYE

Works on:
Ubuntu Server 12.04.2
Ubuntu Server 13.10
Ubuntu Minimal 13.10


Run these commands:

$ sudo apt purge youtube-dl
$ sudo apt purge youtube-dlg
$ sudo apt autoremove
$ sudo apt install youtube-dl

The first two commands will purge the two packages as well as the interlinking dependencies.  The third command will remove the residue that is no longer being used since both packages are purged.  The last command will perform a clean install of the youtube-dl from the repository.


Apparently the problem was that I was trying to install off of a USB stick. I'm guessing that there was some problem with /dev/sda when the installer booted off of /dev/sdb.

My only guess is that there's some conflict between the serial-ness of the two. I burned a CD (had to use the USB to do that since my other computer has no optical drives!) and it's installing just fine!


I figured it out, inspired by a similar issue for an entirely different program.

Ubuntu 18.04 removed a default package that was present in earlier releases.  The solution is to put that package back:

sudo aptitude install libgnome-keyring0


Ubuntu 12.04 installation error in Windows 7

Seems like partition faulty. You can try live CD or live USB to determine if you're able to rescue your partition or backup your data for new installation.


Microsoft Surface Pro 7 (Core i7) Ubuntu compatibility?

Check out the Linux Surface Project.
Surface Pro 7 looks mostly compatible, minus cameras and maybe pen(!).
Here's a compatibility table for the various generations of Surface tablets:
https://github.com/linux-surface/linux-surface/wiki/Supported-Devices-and-Features#feature-matrix


Uninstall Ubuntu without access to uninstall file

Try to run Windows in an administrative-modus (Administrator) NOT as a user.
Try to repeat the nessecary steps for removing Ubuntu out of Windows: via add/remove software, select in the prompted window 'Ubuntu' and click to remove it.

Normaly Windows will ditch Ubuntu from it's system. (It takes for about 3 minutes or so)

If you have special Security software on your system, please check this software wether it allows you to install or remove software (these are all paid versions, so easy to check).


Installling Ubuntu on older computer that does not seem to recognise cd drive

Did you burn your installation CD using Windows 98?

If Windows 8 computer detects your cd-rom as Ubuntu installation CD then the problem is not the cd-rom media but BIOS settings of your Windows 98 computer.
Try to find a bootable CD-ROM disk (maybe Windows 98 rescue CD?) just to verify that your BIOS settings are correct to boot from CD-ROM.

General issues:
1. Eject CD right after burning it (wait until burning is totally finished) and put CD back just to test if Windows 98 can read this CD correctly
2. Did you create a bootable iso CD? This is a common mistake at least for me when I burned my first installation CD's
3. Did you calculate checksum's for downloaded iso before burning it to CD?
One option is to download iso-file again and save it different name (or rename older version before downloading) and compare that two files are equal. If they are not use newer version.
4. Some older CD-ROM devices don't read for example CD-RW media correctly. Then you have to burn your CD using CD-R media. Check that you have burned your CD using media that is readable in your old computer.


Why does an additional top menu bar show off in Gnome fallback mode?

That's Nautilus' menubar. It is used to display the desktop so you can store files and folders there, etc. It shouldn't be displayed, but it sometimes does anyway.


Ubuntu 12.04.01 does not identify USB Bluetooth

You might want to try

add "blacklist hci_usb" to /etc/modprobe.d/blacklist.conf, and add "hci_usb reset=1" to /etc/modules


Synetech gives a very readable explanation about the Fn keys here

  Technical Details

  When you press a key on a keyboard, the keyboard controller (a small
  IC chip inside the keyboard) detects the electrical circuit and
  processes it to decode which key was pressed and then sends the
  scancode to the motherboard. The operating system receives
  scancode from the BIOS and then performs whatever action it needs to
  in order to process that keypress.

  With most keys, this is simple enough. If you press the A
  key, its keyboard controller sends the scancode to the motherboard
  which then passes it to the OS which in turn usually prints 'A'. (If
  the OS detects that one of the modifier keys is currently held down,
  then it may do something different. In fact, you can configure it to
  do whatever you want when the A key is pressed with or
  without modifiers.)

  Now the Fn key is special. When you press it by itself,
  nothing happens because it is exclusively a modifier key and is not
  (generally) meant to do anything on its own. When you hold it and
  press another key, the keyboard controller detects that and looks in
  its built-in table to see if it is a known combination. If the combo
  is not in the table, then it just ignores it, but if the combo is in
  the table, then it looks up the associated scancode and sends that.

  What does the OS end up seeing? It does not see the scancode for
  the Fn key and the scancode for the other key. Instead, it
  sees a single scancode associated with whatever function the Fn-combo
  has been set to. For example, if the laptop manufacturer has set the
  Fn+Down Arrow combo to reduce the volume, then
  the OS sees the scancode associated with the Volume Down,
  which some keyboards actually have.

Also note that the Fn key works independently from the operating system.

Moreover, this article may help point you in the right direction:

  The kernel has its own scancode to
  keycode mapping table, so it maps a certain scancode to a
  keycode. You can look into /usr/include/linux/input.h to see what your
  kernel uses for scancode to keycode mapping – it is called a
  keymap.

Postscript

I might need to somewhat renege on the earlier claim that the Fn keys work entirely independently of the OS; without going into more technical details here, the upshot seems to be that your OS might not "support" all or some of your keyboard's Fn keys, see, for instance:

https://wiki.archlinux.org/index.php/extra_keyboard_keys
https://unix.stackexchange.com/questions/274715/blue-fn-function-keys-not-working-with-lubuntu-on-my-thinkpad


I finally removed the program & purged the files using the method here

I reinstalled it and it works fine and all my data is still there.


Try this

sudo apt-get -f install

or

sudo apt-get update
sudo apt-get install unity-2d
sudo apt-get install ubuntu-desktop
sudo apt-get install compizconfig-settings-manager
sudo apt-get install compiz-plugins-extra
sudo apt-get update

then

sudo shutdown -r now

Hope this will work for you.


Persistent remapping of keys with setxkbmap or Xorg configuration

Why not simply edit the /etc/default/keyboard file and include the line:

XKBOPTIONS="ctrl:swapcaps"

Edit:

A user specific equivalent would be:

Install gnome-tweaks

sudo apt install gnome-tweaks

Open Tweaks
Navigate to Keyboard & Mouse -> Additional Layout Options -> Ctrl position
Select Swap Ctrl and Caps Lock

Edit II:

A command line way to achieve the latter:

gsettings set org.gnome.desktop.input-sources xkb-options "['ctrl:swapcaps']"


Kubuntu 16.04 : Software centre search bug

This bug had been reported on Kubuntu/KDE.

I have found that updating it to the latest stable release it fixes the bug on my Kubuntu 16.04.

Here is how I did it. (You can also find more information on the official Kubuntu website)

Updating to Plasma 5.6.4

How to get the update:

sudo apt-add-repository ppa:kubuntu-ppa/backports
sudo apt update
sudo apt full-upgrade -y


My computer comes preinstalled with Windows 10. I updated the BIOS to 1.70 and all the ACPI errors disappeared.

I made the following changes in the BIOS:

Boot Mode = UEFI
Disabled Fast Boot
Disabled Secure Boot (It comes disabled by default.)
Disabled Turbo Boost
Legacy USB Support = Auto (With Disabled it just goes directly to BIOS.)
Disabled UEFI hard disk drive for Windows Manager (Since I have two hard drives, I decided to disconnect the SATA cable for the Windows hard drive so that it does not interfere in the installation.)

This solution works for Ubuntu 17.10, not for 16.04 unfortunately.


Swapping Control and Caps Lock on Dell XPS on 20.04 - used to work with gnome-tweaks

This is covered in reported bug https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1899206 . There is a bug fix moving in the release chain. In the mean time, you can resolve it by downgrading the mutter version as given in the bug dialog:

Set up this PPA: https://launchpad.net/~gunnarhj/+archive/ubuntu/mutter: sudo apt-add-repository -u ppa:~gunnarhj/mutter
Install the given version of mutter: sudo apt-get install libmutter-6-0=3.36.6-1ubuntu0.20.04.3~ppa2
Reboot is necessary


There is a great step-by-step guide here that I just used to deploy GeoServer on Ubuntu Server 10.10:

  http://www.nabisoft.com/tutorials/glassfish/installing-glassfish-301-on-ubuntu

It covers enabling the Canonical Partners repository in order to get the Sun JDK installed,  installing GlassFish and creating init.d scripts to boot the server at startup.  It also provides detailed advice on how to secure the server.


While updating software my computer crashed (I think overheated). Now, I can't login, it keeps taking me back to login page

Have you tried sudo apt upgrade from the text console? This would start a second attempt to do the same software upgrade. It should remember which packages weren't installed completely and either re-do them or throw some helpful errors.


Numix GTK theme removes the "Unity Boxes"

This very simply seems to be because some of the files in `/usr/share/themes/Numix Daily/unity' override background of the 'boxes' the launcher. The quick (and fairly messy way) is to run this to move the folder:

sudo mv '/usr/share/themes/Numix Daily/unity' '/usr/share/themes/Numix Daily/unityX'

A slightly better way is to make a backup copy of the unity folder, and remove those file beginning with launcher (I guess those cause the problem):

sudo cp -r '/usr/share/themes/Numix Daily/unity' '/usr/share/themes/Numix Daily/unity-backup'
sudo rm '/usr/share/themes/Numix Daily/unity/launcher*'

A better way to this would be to selectively remove the relevant files (it should use the default ones then - the square ones seem to set the launcher box backgrounds), or to edit the files.

To edit the files, you can use 'Inkscape' - if you want to do it without running inkscape as root (if you do, use gksu), you can change the permissions of the theme directory instead:

sudo chown -R $USER:$USER '/usr/share/themes/Numix Daily/unity'

This is also useful if you don't want to use terminal or Nautilus as root to remove the files.

Note, keeping backup files makes life easy, and you probably need to logout and login again to see changes.

By the way, here is a screenshot of it working having moved the unity directory and logged out and logged in again (with Numix circle icon theme):

Its quite a nice theme :D
(nice idea of having the waste-basket icon as a recycling icon :)


Odds are you're having read errors due to a failing disk. Before anything else, back up your data and get ready to replace the drive.

That said, if you want to get some use out of this drive, you could use badblocks to force the drive to replace the bad sectors with spare ones:

sudo badblocks -wsv /dev/sdc

Or if you want to keep the data on the drive, use a non-destructive test as described in this answer:

sudo badblocks -nsv /dev/sdc

Note: both badblocks and using fsck -vcck will stress a drive and can make a bad drive die faster. Do not rely on this for data recovery. But if you want to get some extra use out of a drive you were going to throw away, give this a shot.