How do I help Ubuntu becoming less crappy?

It's a bit rude to say it like that, but I must admit you're right. The latest releases are really buggy, and most of my bug reports got thrown away until they expired. In the end I just switched to Arch Linux (which I don't recommend if you want something user-friendly, by the way).

On the positive side, Ubuntu an open-source project developed by a community. Which means that anyone with sufficiënt programming experience can participate.

If you're not a programmer, you can help to get the bugs out before it's released. You can do that by downloading the latest build here, installing it on a spare computer (or virtual machine), and report every bug you find (if it hasn't already been reported, if it has, just hit the This affects me link at the top of the page). I've noticed the developers take bug reports about upcoming releases a tad more serious.

Note that Ubuntu 10.10, 11.04 and 11.10 weren't LTS (Long Time Support) releases. An LTS version of Ubuntu is released every 2 years (and since a few days this also counts for Kubuntu, Xubuntu and Edubuntu). The LTS releases are much more stable and better tested than all releases between them. Personally I always call the non-LTS releases Beta releases, as they sometimes are of Beta-quality.
In my opinion this should be better advertised on the Ubuntu website.


Missing many components after a fresh install

Are you sure the image that you installed was not a special "barebones" image? You might want to look at it's contents to ensure it wasn't just a failed install. I would suggest grabbing one of the official images from the Ubuntu website, and then either copying the missing files or just reinstall.


how can you use pam-dbus without using gnome

pam-dbus uses a feature where a notification contains not only text, but can also allows for Yes-No-interaction. Not all providers of notifications support that feature, if yours does not then you cannot use pam-dbus.

You can check that your notification daemon supports action using this script:

#!/usr/bin/python
import pynotify
pynotify.init("pam-dbus-test")
n = pynotify.Notification("Title","Text")
n.add_action("action", "An action", lambda _: False)
n.show()


I have two versions of VLC installed on the same system

It is simple:

VLC 2.2.6-6 is from official 17.10 Ubuntu repository:
check with apt-cache policy vlc

VLC 3.0.0 may be a Snap
check with snap list | grep vlc


How do I install and mount an exFAT partition?

You will need the packages exfat-fuse and exfat-utils to allow you to read and write on exFAT drives:

For 14.04 and higher:

sudo apt-get install exfat-fuse exfat-utils

Afterwards you just need to plug in the HDD and you're good to go.


End of life for
Ubuntu 12.10 is May 16, 2014.
Ubuntu 12.04 is April 2017.

However Ubuntu 14.04 is already out and is most updates one. Hence, please use that to be at the better side.

Now, for the performance issue; go to Software Center and type "LXDE" and install the first option. You may use this command in terminal as well: sudo apt-get install lxde

LXDE is Lubuntu!! Consider it another name for the same thing. This will make you able to choose between "Unity" (which is the default desktop you know about) and LXDE which is awesome and lightweight.

You can also use "XFCE" as same way as "LXDE" from software center or type in the following command in terminal: sudo apt-get install xfce4

XFCE is Xubuntu. It is lighter than regular Ubuntu but heavier than LXDE.
And yes, in both cases, you have to restart your computer.

Hope that helps !!


What might cause my server to lose network routes?

Probably related to the command issued, since it won't apply your routes permanently. I would strongly suggest configuring them via netplan for a peristent configuration.


Vmware - gcc version (null) was not found

This fixed it for me: https://communities.vmware.com/t5/VMware-Workstation-Player/Can-t-find-gcc-version-to-compile-linux-kernel-modules/m-p/2291605/highlight/true#M28807

I had the same issue not so long ago, so, after checking online I understood I needed to compile some libraries, so, I used a repo from github for that purpose:
git clone https://github.com/mkubecek/vmware-host-modules.git

cd vmware-host-modules

git checkout player-16.0.0

After this you have to compile it, install it and either restart or
start vmware:
make

sudo make install

sudo /etc/init.d/vmware start

If it is the first time, you should see:

(tested on Pop!_OS 20.10 with VMware Player version 16)


winbind not working after upgrading to 14.04 (from 12.04LTS)

So, I found the solution on another thread here Problem with Winbind/Samba

Basically I had install (or update?) libnss-winbind

sudo apt-get install libnss-winbind


From Ubuntu Community Help Wiki:

Intel_iMac 27"

Since kernel 2.6.38, the HD audio model imac27 is available.

The following line must be inserted at the end of the file /etc/modprobe.d/alsa-base.conf

options snd-hda-intel model=imac27

Force reload alsa configuration:

sudo alsa force-reload

Then unmute and adjust volume of front speaker and Surround Speaker with the help of :

alsamixer

Then reboot.

Btw, in your post you're using options snd-hda-intel model=imac27_122, change the model to the suggestion in the Wiki, also you can try with options snd-hda-intel model=auto.

Hope it helps, good luck.


When the hard drives are physically identical it can be a little tricky.  You can run commands such as lsblk, parted, and fdisk from the terminal to analyze the content and format of the drives.

Those commands takes parameters.  This is a command I often use:

$ lsblk -o name,mountpoint,label,size,fstype,uuid | egrep -v "^loop"
NAME   MOUNTPOINT              LABEL      SIZE FSTYPE   UUID
sda                                     111.8G
├─sda1                         Recovery   450M ntfs     4E98CBF598CBD99B
├─sda2 /boot/efi                          100M vfat     90CE-9CE3
├─sda3                                     16M
├─sda4                                   24.5G ntfs     3874F30874F2C820
├─sda5 [SWAP]                             7.8G swap     c9334080-5716-4af6-8223-c2f7ab8b42be
└─sda6 /                                   79G ext4     183a59f8-4023-4204-bf16-ef9ab0c61c7e
sdb                                     115.7G
├─sdb1                                   1000M ext4     e6bf0b64-ef88-424e-9e2b-d8f397c009c8
└─sdb2                                  114.7G ext4     bd72b737-16e9-4c39-8b1e-610b8897a892
sdc                                     115.7G
├─sdc1                                   1010M
├─sdc2 /media/ljames/DFF1-8069            8.8G vfat     DFF1-8069
├─sdc3                         OS1       52.2G ext4     a13034ce-00a0-4bd2-8188-f780137413d7
├─sdc4 /media/ljames/verba1    verba1      44G ext4     248301e7-25c1-4fc6-8d98-6c96b5eaa284
└─sdc5                         swap       9.8G swap     a0fdc51f-79fd-4e77-a9f7-967384b56bc2

The columns for identifying how the disks are used are as follows:

NAME - This is the name of the drive.  The sdX without a number is the whole physical drive.  The number after the sdX is the partition of the drive.
MOUNTPOINT - This is where the drive is mounted.  This is the information you can use in your case.  As long as you see which drives have their mounting points, mounted, you can use that to identify which drives you currently have in use.  The one with the mounted point / is mounted as root.
LABEL - The label is a description that you provide.  This is also convenient for you to identify how you are using the partitions of the drive.
SIZE - Obviously the size of the partition.
FSTYPE - The partition type can help you to identify which OS or other components of the way it's formatted.
UUID - This is convenient information for having a unique identification for being sure which drive you have mounted.

The Boot Loader:
In the case of my example, the bootloader is in the /dev/sda2 partition.  A legacy bootloader is normally is located on reserved sectors of the drive.  The bootloader can actually be on a USB drive or any other drive.  The actual OS can be on a separate drive from the bootloader.  It's most often on the same drive as the OS.

The OS:
The is always the root, and identified by /.  FYI, it's possible to have symbolic links or actually separate links to partitions with the name of some of the OS folders, and having them mounted in the /etc/fstab.

So with this information, you can have a good idea of which drives or partitions to should be eliminated when formatting your drives, or any partitions of your drives.

By the way, I filtered out the loop devices to have a cleaner output.  Recently there are many loop devices for Snap programs, which I already know have their data and installation files off the root (/) partition.  The filter removes reduncancy which I wouldn't consder the most important in this case.


My password not accepted by applications

i had the same problem now it's ok

run the command gksu-properties and change the "Authentication mode" to "sudo" and close. Now do gksu bleachbit, or whatever GUI application you want to run as root, and type your password (the one you use for updating and installing)


Why does Ubuntu not allow keyboard shortcuts for snapping windows horizontally?

One possible reason is mentioned in Analyzing GNOME keyboard shortcuts which is one in a series "to analyze keyboard shortcuts in most major DEs". Quoting from there:

  Meta+arrow does not match a full set of tiling like Plasma (in which Meta+Up/Down tiles up and down), that is, it does not match semantically, because GNOME acknowledges that tiling up and down is a waste of vertical space; instead, the more commonly-used maximize+restore is default.

The next paragraph in the article provides further argumentation citing linguistics and "how Up for maximize and Down for restore feel intuitive".

I briefly search for any official GNOME documentation justifying the use of Meta+Up and Meta+Down to maximize and restore windows respectively but couldn't find any. This classifies these shortcuts as "System reserved shortcuts" but doesn't provide any reasoning.


Obviously the language support tools are still incomplete in Ubuntu GNOME.  Desktop Help states the following:

  Select your desired language. If your language is not listed click : at the bottom of the list to select from all available regions or languages.

Only after selecting a language there clicking on Done has no effect.

To have the language selection back in the form it is installed in other releases we have to install language-selector-gnome . After we did so, we will have an additional icon "Language Support" in our System Settings from where we can install any supported language by choosing "Install/Remove Languages":

Drag the interesting language to the top of the list. Select "Apply System Wide" to also have this language at log in, and system wide.


Your data will stay on Ubuntu One forever, even if you dont use it.


Confusion about enabling/disabling secure boot when installing proprietary drives (nvidia)

Much of the confusion is caused by things changing release to release. Ubuntu
has worked with secure boot since 2012, but initially, the signature checking
stopped before any kernel modules were loaded. After the 16.04 (?) release,
modules were added to the signatrue chain, so the unsigned Nvidia modules then
required either turning off secure boot or adding your own signature to them.
At some later release, this adding your own signature was automated and
included in the install.

Wayland still does not work with Nvidia drivers in use. You may get an option
at login (under the gear icon) to select a Wayland login (no need to edit any
gdm config files). Initially, Wayland was not offered when Nvidia drivers were
in use, then (18.04 included) Wayland was offered even when you had selected
to use the Nvidia drivers, but would switch to the intergrated Intel drivers.
At some later release, Wayland was removed from the login options when Nvidia
drivers were in use.


Nothing has been confirmed. I doubt a design concept such as that one would be implemented. At the core, you could easily do something like this if you take the time and modify your system.

You could always stay in touch with the development of the project. A few days ago they announced a GitHub page for the project. Click here
for the project and how it is doing.


Complete 11.04 desktop customization guide

http://www.webupd8.org/2011/04/things-to-tweak-fix-after-installing.html is one of the better ones for Unity. It includes all of the places I've been able to find with different settings, and a lot of cool tips.


The base-passwd package guarantees the presence of certain users and certain groups in a system. The documentation is in /usr/share/doc/base-passwd/users-and-groups.txt.gz (or /usr/share/doc/base-passwd/users-and-groups.html) (source available online in Debian Salsa):

bin

    HELP: No files on my system are owned by user or group bin. What good are
    they? Historically they were probably the owners of binaries in /bin? It is
    not mentioned in the FHS, Debian Policy, or the changelogs of base-passwd
    or base-files.

    LSB 1.3 lists bin as legacy, and says: "The 'bin' UID/GID is included for
    compatibility with legacy applications. New applications should no longer
    use the 'bin' UID/GID."

So, it's part of the LSB specification, and since Debian used to aim for LSB compliance, Ubuntu has a bin user and group.


How to launch startup program on specific time

First step : create the script

First let us create a script the will be run and would enable/disable flux depending on the time (I don't knot flux syntax, so adapt it for your need). You can note that here I suppose that you need to be root to run flux, but of course if you don't just run these steps as a classical user.

sudo mkdir -p /opt/flux/
sudo gedit /opt/flux/toogleFlux.sh

and put in it something like this

#!/usr/bin/env bash

h=$(date +%H)
start=20
stop=3
export DISPLAY=:0
if [ $h -ge $start ] || [ $h -lt $stop ] ; then
    # Start flux, give it any information you want, latitude...
    xflux -l 45
else
    # Stop flux
    killall xflux
fi

Then, make it executable :

sudo chmod +x /opt/flux/toogleFlux.sh

Second step : run it when needed

Now, you need to run it when needed. To to so, you can use a cron that would run it at 8:05 PM and 3:05 AM. But if you do so, if you open your computer at 8:10PM, it would not run it. The first solution is to use fcron, but I don't think it's packaged on distributions, so I'll use a combinaison of cron and a file that runs when you open a session.

To run this script with cron, run the following command. If you need to run it as root, add sudo before :

crontab -e

and then type :

05 20 * * * /opt/flux/toogleFlux.sh
05 3 * * * /opt/flux/toogleFlux.sh

now, you need to be sure that the script will run when you open your session. Depending on your GUI, you can configure it in your system settings, or sometimes putting this line in .profile will be enough (the xhost command is usefull to let the root user connect to the graphical interface) :

xhost +local:
/opt/flux/toogleFlux.sh

Now, run it toogleFlux.sh to enable it for the current session :

xhost +local:
/opt/flux/toogleFlux.sh

and enjoy flux !


Why cant I install brightness-controller

Install Brightness Controller with the following commands:

sudo add-apt-repository ppa:apandada1/brightness-controller
sudo apt-get update
sudo apt-get install brightness-controller

You can control brightness using its slider.

(source: ubuntu.com)


Resize a 2TB partition on a 3TB disk created with fdisk

MBR partition only supports 4 primary partitions per hard drive, and a maximum partition size of 2TB.  That is why you're only seeing 2TB.

GUID (GPT disks) can support a volume up to 18 EB (Exabyte’s) or 1 million terabytes.

So you will have to change the partitioning scheme from MBR to GUID (GPT Disk) to be able to see the full capacity.

NOTE: When dealing with partitions, always make sure that a backup is available in case something goes wrong. You may consider Clonezilla


try this :scp -r /local_path/uptofile remote_user@host:/Path/


How to make a .jar file execute on ubuntu server 14 startup

Edit the /etc/rc.local file by doing:

sudo nano /etc/rc.local

And in there type

java -jar /path/to/your/file.jar

Make sure this goes BEFORE the 'exit 0'


Separate panels for separate workspaces in tint2

Sorry, tint2 does not support this. See: http://code.google.com/p/tint2/issues/detail?id=94 . You can, however, install a modified version of gnome 2 supporting this feature called GNOME-shell.


Try following this guide for setting up SSH keys on Windows: https://jujucharms.com/docs/stable/getting-started-keygen-win

And this guide for adding your Azure credentials
https://jujucharms.com/docs/stable/help-azure

If there are things in there which are missing, unclear, or otherwise could be improved.... please tell us so we can improve it :)


Grub hangs if 4G USB Wifi Dongle is connected

Answering my own question for others struggling with this...

The issue is grub seeing the USB modem as a second hard drive (/dev/sdb as reported by bootinfoscript) for a few seconds before the modem mode-switches to its final state. Looks like grub thinks someone physically pulled out a hard disk while it was running... or something. And therefore, it hangs.

To solve the problem, you've got to make sure grub doesn't see any "mode-switching" USB device - in this case the Airtel 4G Wifi LTE broadband modem dongle. The dongle should "boot up" completely before grub takes over.

All I did was to ensure we spend 30 seconds seeing the BIOS splash screen before letting grub takeover. In that time the USB devices mode-switches to its final state (in the unlikely situation that it doesn't, we're back to square one).

How to do it? Enter BIOS setup and set up Hard Disk Pre-Delay of 30 sec. That's it.

With this change, I can leave the dongle always connected to the USB port. I don't have go get into Windows if I don't want to.

The flip side of this workaround is that boot is 30 seconds longer. I don't mind it.


How is it decided/defined as to which file of an app will reside where?

Specific to Ubuntu, even though FHS is followed, there are specific policies for applications depending on how they are submitted.

If the application is submitted for inclusion in the universe or multiverse repositories you must follow the policy as governed by how you are submitting the application (either through Debian first or directly to Ubuntu).

If the application will be submitted via MyApps for inclusion in the paid software or extras repository they must conform to the Extension policy. Basically, the application must be installed to and run from /opt/<appname>. You can save information to   the users home directory and those locations vary depending on what you are saving (settings should be saved in ~/.config/<appname>), etc. This follows freedesktop.org standards.


Open a Terminal window and type:

aplay /usr/share/sounds/alsa/Front_Center.wav

You should hear a voice saying "Front Center". If it doesn't play the first time you run that command, try running it again as root:

sudo aplay /usr/share/sounds/alsa/Front_Center.wav

If it still doesn't play, that means there is a problem with your configuration. If the sound plays as root, but not as a regular user, then you need to add the user to the "audio" group, like this:

sudo addgroup <username> audio

and replace username with your actual username


Windows 10 update killed grub, basic repair failed

For future readers who have the same problem I can cnofirm that the solution in this thread works also now in 2019 after umpteen updates of Windows 10.

For ease of reading I'm reposting the command from the linked thread that brought back my grub

  run this in Windows as an administrator:

  bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi


Forcefully overwriting the file should solve the problem in most of the cases:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/libefl-bin_201602061431-31496~ubuntu14.04.1_amd64.deb
sudo apt-get install -f


Why there is considerable difference in moving speed between touchpad and usb mouse?

You can adjust your speed settings a couple ways. First, use System > Preferences > Mouse.

Second, install gpointing-device-settings so you can use System > Preferences > Pointing device. The advantage here is that you should be able to set different speeds for your different mice and touchpads.


Where to create Desktop entry for Eclipse?

You need to add

 [Desktop Entry]

as the first line to your file.

And just in case: Make sure that the file name ends with .desktop

And also make sure you have made it executable.


DNS_PROBE_FINISHED_BAD_CONFIG error in Ubuntu 14.04

So I figured out what the problem was. When I ran the following command sudo resolvconf -u I got this error:

/etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf`

I solved this error by deleting /etc/resolv.conf and recreating the symbolic link. You can do that using the following commands:

sudo rm /etc/resolv.conf
sudo ln -s /run/resolvconf/resolv.conf /etc/resolv.conf
sudo resolvconf -u

This resolved the DNS error I was getting.


Black screen after suspending Ubuntu 13.04

Try update your kernel. You can following the steps in here to update your kernel. I had the same issue before and when I updated the 3.90 kernel for raring everything works fine.


Code version control between local files and AU answers

websync script

#!/bin/bash

# NAME: websync

# Must have the yad package.
command -v yad >/dev/null 2>&1 || { echo >&2 \
  "yad package required but it is not installed.  Aborting."; \
  exit 99; }

RenumberListArr () {

IFS='|'

ListArrCnt=${#ListArr[@]}

i=1 # First array element (0) is "false", followed by record number element (1)
j=1 # All Record numbers count starting at 1

while [ $i -lt $ListArrCnt ] ; do
    ListArr[$i]=$j
    j=$(($j + 1))
    i=$(($i + $RecArrCnt))
done

} # RenumberListArr ()

ColSelect=0
ColRecNo=1
ColFileDate=2
ColFileName=3
ColStatus=4Address
ColAnsDate=5
ColA_Votes=5
ColWebAddr=6
ColQ_Votes=7
ColTitle=8

NewFileDate=0
NewFileName=1
NewStatus=2
NewAnsDate=3
NewA_Votes=3
NewWebAddr=4
NewQ_Votes=5
NewTitle=6

LineOut=""
HTMLtoText () {
    LineOut=$1  # Parm 1= Input line
    LineOut="${LineOut//&amp;/&}"
    LineOut="${LineOut//&lt;/<}"
    LineOut="${LineOut//&gt;/>}"
    LineOut="${LineOut//&quot;/'"'}"
    LineOut="${LineOut//&#39;/"'"}"
    LineOut="${LineOut//&ldquo;/'"'}"
    LineOut="${LineOut//&rdquo;/'"'}"
} # HTMLtoText ()

Ampersand=$'\046'
Equals="================================================================================="
Dashes="---------------------------------------------------------------------------------"
AnswerID=""
PercentFile="/tmp/websync-percent" # Temp file used for progress bar percentage

UpdateEntry () {

# PARM: 1=ONE display msgs, else file name for messages.

if [[ $1 == "ONE" ]] ; then
    bDisplayMsgs=true
    MsgFileName=""  # In case a single update follows all update
else
    bDisplayMsgs=false
    MsgFileName="$1"
fi

local BarNo="2"

# $RecArr[@] must be populated

# Searches in order they are found in an answer
SearchTitle=true
FoundTitle=false
SearchQ_Vote=true
FoundQ_Vote=false
SearchA_Vote=true
FoundA_Vote=false
FoundLine1=false
FoundLine2=false
FoundLine3=false
EndOfFile=false
AnswerWritten=false

AnswerID=$(echo ${RecArr[$ColWebAddr]} | rev | cut -d# -f1 | rev)

# Get file modified date in human readable format using STAT
RecArr[$ColFileDate]=$(stat "${RecArr[$ColFileName]}" | \
        grep "Modify:"| cut -f2 -d" ")

HoldIFS="$IFS"
IFS=$'\n'       # make newlines the only separator

AnswerSize=$(stat -c%s "/tmp/$AnswerID")

# If answer size less < 1000 then wget failed.
if [[ $AnswerSize -lt 1000 ]] ; then
    yad --error --center \
    --text="wget failed to download answer from Stack Exchange."
    RecArr[$ColA_Status]="Answer < 1K"
    IFS="$HoldIFS"
    return 1
fi

FirstThreeLines=()

FirstThreeLines=( $(head -n10 ${RecArr[$ColFileName]}) )

AnswerLines=0
AllLinesSize=0
LastPercent=0
fPrintNextLine=false # Use this for tracing HTML and displaying Line

echo $BarNo:0 > "$PercentFile" # Just in case last time temp file wasn't removed

fEOFskip=false

while IFS= read -r Line; do

AnswerLines=$(( ++AnswerLines ))
AllLinesSize=$(( $AllLinesSize+${#Line} ))

if [[ $Line == *"$Ampersand""lt;/code$Ampersand""gt;"* ]] ; then
    # Answer contains  in text section, it's a fake End of Code tag.
    fEOFskip=true
else
    fEOFskip=false
fi

# Convert HTML codes to normal characters

HTMLtoText $Line
Line="$LineOut"

Percent=$(( $AllLinesSize * 100 / $AnswerSize ))
if [[ "$Percent" -ne "$LastPercent" ]] ; then
    LastPercent=$Percent
    # Send percentage via working file to spawned process with yad progress bar
    echo $BarNo:$Percent > "$PercentFile"
fi

if [ $fPrintNextLine = true ] ; then
    echo "Line at start: $Line"
fi

# Parse Line: </script> <dev id="question-header">

if [ $SearchTitle = true ] ; then
    if [[ $Line == *"
"* ]] ; then SearchTitle=false ; fi
    continue
fi

if [ $SearchTitle = false ] && [ $FoundTitle = false ] ; then
    if [[ $Line == *"
" -f 3 <<< "$Line")
        Title=$(cut -d "<" -f 1 <<< "$Title")
        HTMLtoText $Title
        RecArr[$ColTitle]="$LineOut"
    fi
    continue
fi

if [ $SearchQ_Vote = true ] ; then
    if [[ $Line == *"<div class=\"question\""* ]] ; then SearchQ_Vote=false ; fi
    continue
fi

if [ $SearchQ_Vote = false ] && [ $FoundQ_Vote = false ] ; then
    if [[ $Line == *"" -f 2 <<< "$Line")
        QuestionVotes=$(cut -d "<" -f 1 <<< "$QuestionVotes")
        RecArr[$ColQ_Votes]=$QuestionVotes
    fi
    continue
fi

# Parse lines:
#

if [ $SearchA_Vote = true ] ; then
    if [[ $Line == *"
" -f 2 <<< "$Line")
        AnswerVotes=$(cut -d "<" -f 1 <<< "$AnswerVotes")
        RecArr[$ColA_Votes]=$AnswerVotes
    fi
    continue
fi

if [ $FoundLine1 = false ] ; then
    if [[ $Line == *"${FirstThreeLines[0]}"* ]] ; then # May have  prefix
        FoundLine1=true
        # Create file with first line taken from "clean" bash array
        echo "${FirstThreeLines[0]}" > /tmp/websync-webfile
    fi
    continue
fi

if [ $FoundLine1 = true ] && [ $FoundLine2 = false ]; then
    # Empty lines aren't in our array so skip test if in web file
    if [[ $Line == "" ]] ; then
        echo "$Line" >> /tmp/websync-webfile # Append empty line
        continue
    fi
    if [[ $Line == "${FirstThreeLines[1]}" ]] ; then # Line 2 match exactly?
        FoundLine2=true
        echo "$Line" >> /tmp/websync-webfile # Append second line
    else
        # Line 2 doesn't match so force search to restart at line 1
        FoundLine1=false
    fi
    continue
fi

if [ $FoundLine2 = true ] && [ $FoundLine3 = false ]; then
    # Empty lines aren't in our array so skip test if in web file
    if [[ $Line == "" ]] ; then
        echo "$Line" >> /tmp/websync-webfile # Append empty line
        continue
    fi
    if [[ $Line == "${FirstThreeLines[2]}" ]] ; then # Line 3 match exactly?
        FoundLine3=true
        echo "${FirstThreeLines[2]}" >> /tmp/websync-webfile # Append third line
    else
        # Line 3 doesn't match so force search to restart at line 1
        FoundLine1=false
        FoundLine2=false
    fi
    continue
fi

# We are only here when first three code lines have matched up in Stack Exchange.
if [ $EndOfFile = false ] ; then
    if [[ $Line == *""* ]] && [[ $fEOFskip == false ]] ; then
        EndOfFile=true
    else
        echo "$Line" >> /tmp/websync-webfile
    fi
fi

if [ $fPrintNextLine = true ] ; then
    echo "Line at end: $Line"
    fPrintNextLine=false
elif [[ $Line == *"---- ENTER SEARCH STRING HERE ----"* ]] ; then
    fPrintNextLine=true
fi

done < "/tmp/$AnswerID"

echo $BarNo:100 > "$PercentFile" # force spawned yad progress bar to close

if [[ ! -f "${RecArr[$ColFileName]}" ]] ; then   # File exists?
    yad --error --center --text "${RecArr[$ColFileName]} does not exist."
    RecArr[$ColStatus]="Bad File"
elif [[ ! -s "${RecArr[$ColFileName]}" ]] ; then  # File not empty?
    yad --error --center --text "${RecArr[$ColFileName]} is empty."
    RecArr[$ColStatus]="Empty File"
fi

if [ $FoundLine1 = true ] && [ $FoundLine2 = true ] && [ $FoundLine3 = true ]; then
    FileDiff="/tmp/websync-diff-"$(date +%s)
    if [[ "$MsgFileName" != "" ]] ; then
        echo $Equals >> $MsgFileName
    fi
    diff --unified=2 -w -b -B -I --suppress-blank-empty \
        --ignore-tab-expansion --suppress-common-lines --ignore-all-space \
        ${RecArr[$ColFileName]} /tmp/websync-webfile > $FileDiff

    # If file doesn't exist, errors in diff parameters
    # If file size =0 there were no differences
    if [[ -f $FileDiff ]] ; then
        if [[ -s $FileDiff ]] ; then
            if [[ $bDisplayMsgs == true ]] ; then
                # File not empty.
                gedit $FileDiff
            else
                cat $FileDiff >> $MsgFileName
            fi
            RecArr[$ColStatus]="Different"
        else
            if [[ $bDisplayMsgs == true ]] ; then
                yad --info --center --text \
                    "Code in ${RecArr[$ColFileName]} matches on Stack Exchange."
            else
                echo "Code in ${RecArr[$ColFileName]} matches on Stack Exchange." \
                     >> $MsgFileName
                echo $Dashes >> $MsgFileName
            fi
            RecArr[$ColStatus]="Matches"
        fi
    else
        yad --error --center --text "websync - Error in `diff` parameters."
        RecArr[$ColStatus]="Diff Parameter Error"
    fi
else
    if [[ $bDisplayMsgs == true ]] ; then
        yad --error --center --text \
        "First three lines of ${RecArr[$ColFileName]} not found on Stack Exchange."
    else
        echo $Equals >> $MsgFileName
        echo "First three lines of ${RecArr[$ColFileName]} not found on Stack Exchange." \
             >> $MsgFileName
        echo $Dashes >> $MsgFileName
    fi
    RecArr[$ColStatus]="3 lines not found"
fi

IFS="$HoldIFS"

# Remove Work files
rm "/tmp/$AnswerID"
rm /tmp/websync-webfile
rm "$PercentFile"
rm "$FileDiff"

return 0

} # UpdateEntry ()

UpdateOne () {

# $RecArr[@] must be populated

# $1= ONE or $MsgFileName
# $2= Bar 1
# Download stack exchange answer
AnswerID=$(echo ${RecArr[$ColWebAddr]} | rev | cut -d# -f1 | rev) # Answer# for file name

local BarNo="1"
echo "$BarNo:10"    > "$PercentFile" # Zero percent complete
echo "$BarNo:#Downloading with wget." > "$PercentFile"

wget -O- "${RecArr[$ColWebAddr]}" > "/tmp/$AnswerID"
if [[ "$?" -ne 0 ]]               # check return code for errors
  then
    # Sometimes a second attempt is required. Not sure why.
    wget -O- "${RecArr[$ColWebAddr]}" > "/tmp/$AnswerID"
fi
if [[ "$?" == 0 ]]               # check return code for errors
  then
      echo "$BarNo:100" > "$PercentFile"
      echo "$BarNo:#Download completed." > "$PercentFile"
  else
      echo "$BarNo:100" > "$PercentFile"
      echo "$BarNo:#Download error." > "$PercentFile"
      echo "ERROR: $AnswerID" >> ~/websync.log
      return 1
fi

UpdateEntry $1
ret=$?
if [[ $ret != 0 ]] ; then
    # We weren't able to anayze SE answer -- too small
    return 1
fi

((TransCount++))            # Update count of changes

# Update array entry
let i=1
while [[ $i -lt $ListArrCnt ]] ; do
    if [[ ${ListArr[i]} == ${RecArr[1]} ]] ; then
        # We have matching record number
        ListArr[++i]="${RecArr[$ColFileDate]}"
        ListArr[++i]="${RecArr[$ColFileName]}" # File name should never change
        ListArr[++i]="${RecArr[$ColStatus]}"
        ListArr[++i]="${RecArr[$ColA_Votes]}"
        ListArr[++i]="${RecArr[$ColWebAddr]}"
        ListArr[++i]="${RecArr[$ColQ_Votes]}"
        ListArr[++i]="${RecArr[$ColTitle]}"
        let i=$(($ListArrCnt + 1)) # force exit from while loop
    else
        let i=$(($i + $RecArrCnt)) # Check next entry
    fi
done

return 0

} # UpdateOne ()

RecSelected=true # Overrides are below
UpdateAllOrOne () {

TITLE="websync"                             # dialog title
TEXT="Update Entry ${RecArr[$ColFileName]}"     # dialog text
ICON="emblem-downloads"                     # window icon (appears in launcher)
IMAGE="browser-download"                    # window image (appears in dialog)

# Process a single entry
if [[ $RecSelected == true ]] ; then

    echo "2:0" > "$PercentFile" # Just in case last time temp file wasn't removed

    # Repurpose yad progress bar as wget information message.
    CurrentEntry="${RecArr[$ColFileName]}"
    ( spawn-progress-multi $PercentFile \
        '--multi-progress --center --auto-close --skip-taskbar --title "websync" --text "Update Entry $CurrentEntry" --window-icon $ICON --image $IMAGE --fixed --width=600 --height=200 --watch-bar2 --bar=Downloading:NORM --bar=Analyzing:NORM' \
         2 & )

    UpdateOne ONE

    echo "2:100" > "$PercentFile" # Force progress display to shut down

    return $?
fi

MsgFileName="/tmp/websync-diff-"$(date +%s)
echo "--- /Prefix for files on local drive" > $MsgFileName
echo "+++ /Prefix for code in Stack Exchange answers" >> $MsgFileName

echo "3:0" > "$PercentFile" # Just in case last time temp file wasn't removed

# Repurpose yad progress bar as wget information message.
CurrentEntry="${RecArr[$ColFileName]}"
( spawn-progress-multi $PercentFile \
    "--multi-progress --center --auto-close --skip-taskbar --title "websync" --text `"`Update All Entries `"` --window-icon $ICON --image $IMAGE --fixed --width=1000 --height=200 --watch-bar3 --bar=Downloading:NORM --bar=Analyzing:NORM --bar=`"`Entry progress`"`:NORM" \
         3 & )

# Process all Entries
local let k=0
RecArr[0]=false
EndLoop=$(( ListArrCnt - 1 ))
while [ $k -lt $EndLoop ] ; do
    let i=k
    RecArr[$ColRecNo]="${ListArr[++i]}"
    RecArr[$ColFileDate]="${ListArr[++i]}"
    RecArr[$ColFileName]="${ListArr[++i]}"
    RecArr[$ColStatus]="${ListArr[++i]}"
    RecArr[$ColA_Votes]="${ListArr[++i]}"
    RecArr[$ColWebAddr]="${ListArr[++i]}"
    RecArr[$ColQ_Votes]="${ListArr[++i]}"
    RecArr[$ColTitle]="${ListArr[++i]}"

    echo "2:0" > "$PercentFile"
    echo "3:"$(( $k*100/$ListArrCnt )) > "$PercentFile"
    echo "3:#""${RecArr[$ColFileName]}" > "$PercentFile"

    UpdateOne "$MsgFileName"
    [[ "$?" != "0" ]] && return "$?" ; # clicked close on progress dialog or wget error

    let k=$(($k + $RecArrCnt)) # next entry
    if [ $k -ge $EndLoop ] ; then
        echo "3:100" > "$PercentFile"
    fi
done

# If file doesn't exist, errors in diff parameters
# If file size =0 there were no differences
if [[ -f $MsgFileName ]] && [[ -s $MsgFileName ]] ; then
    gedit $MsgFileName
fi

return 0

} # UpdateAllOrOne ()

ExternalSortArray () {

# Called on Save
cp --preserve ~/.websync ~/.websync~ #Make backup copy

IFS="|" read -ra ListArr < ~/.websync
ListArrCnt=${#ListArr[@]}
# echo "ListArrCnt: $ListArrCnt"

# Can't sort empty file or array with 1 entry
[[ $ListArrCnt -lt $(( $RecArrCnt + 1 )) ]] && return 0;

# Create Keys Index
echo " "
echo "1. Create Keys-Index Pairs File"
> ~/.websyncSort    # Empty existing file.

time for (( i=0; i<$ListArrCnt; i=i+$RecArrCnt )) ; do
    # Sort key = Question Title + Local File Name
    CurrKey="${ListArr[$(( $i + $ColTitle))]}${ListArr[$(( $i + $ColFileName))]//[^[:alnum:]\/]/}"
    echo "$CurrKey|$i" >> ~/.websyncSort
done

# Call external sort program
echo " "
echo "2. Sort Keys-Index Pairs File"
time sort -k1 -t"|" ~/.websyncSort -o ~/.websyncSort
# cat ~/.websyncSort

# Strip out keys
echo " "
echo "3. Strip out keys leaving Sorted Indices"
time cut -f2 -d '|' ~/.websyncSort > ~/.websyncNdx
# cat ~/.websyncNdx

echo " "
echo "4. Rewrite List Array by Sorted Index"
> ~/.websync    # Empty existing ListArr[] file.
RecNo=1         # Sequential record number

Second=""
time while read -r line; do
    j=$(( $line + $RecArrCnt ))
    FldNdx=0
    for (( i=$line; i<j; i++ )); do
        LastChar="${ListArr[i]}"
        if [[ $FldNdx == $ColRecNo ]] ; then
            echo -n "$Second""$RecNo"    >> ~/.websync
            RecNo=$(( $RecNo + 1 ))
        else
            echo -n "$Second""$LastChar" >> ~/.websync
        fi
        Second="|"
        FldNdx=$(( $FldNdx + 1 ))

        # Update progress display
    done
done < ~/.websyncNdx

echo " "
printf "* * *  ExternalSortArray -- "
echo " Total elements: $ListArrCnt  * * *"

} ### ExternalSortArray ()

OldIFS="$IFS"
IFS="|"
ListArr=()

IFS="|" read -ra ListArr < ~/.websync

# Define variables for easy reading and fewer code line changes when expanding
RecArrCnt=9
ListArrCnt=${#ListArr[@]}

if [[ $ListArrCnt -lt $RecArrCnt ]] ; then
    # Handle empty file: Create dummy entries.
    ListArr+=("false" "1" "Update" "/boot/grub/grub.cfg" "Different" "Update")
    ListArr+=("http://askubuntu.com/questions/142293/different-grub-files-to-edit/142295#142295")
    ListArr+=("Update" "Dummy question.")
    ListArr+=("false" "2" "Update" "$HOME/.bashrc" "Different" "Update")
    ListArr+=("http://askubuntu.com/questions/820684/how-do-i-fix-the-terminal/820709#820709")
    ListArr+=("Update" "Dummy question.")
    ListArrCnt=${#ListArr[@]}
fi

TransCount=0 # Number of Inserts, Edits and Deletes

ButnView=10
ButnInsert=20
ButnEdit=30
ButnDelete=40
ButnUpdate=50
ButnCancel=60
ButnSave=80

while true ; do

if [[ $TransCount -eq 0 ]] ; then
    VariableCloseText="_Close"
else
    VariableCloseText="_Cancel ALL"
fi

# adjust width & height below for your screen 1600x800 default for 1920x1080 HD
# screen and adjust font="14" below if blue title text is too small or too large.

Record=(`yad --list --separator="|" --skip-taskbar \
    --title="websync - Compare code to answer posted on Stack Exchange." \
    --text="Click column heading to sort.\
    Select an entry before clicking: View / Insert / Edit / Delete / Update" \
    --width=1600 --height=800 --center --radiolist --grid-lines=both --no-markup \
    --button="_View":$ButnView     --button="_Insert before":$ButnInsert \
    --button="_Edit":$ButnEdit     --button="_Delete":$ButnDelete \
    --button="_Update":$ButnUpdate --button="$VariableCloseText":$ButnCancel \
    --button="_Save":$ButnSave \
    --search-column=3        --column "Select"       --column "Record Number":HD \
    --column "File Date":HD  --column "File Name":FL --column "Status" \
    --column "A+"            --column "Stack Exchange":HD \
    --column "Q+"            --column "Question Title" \
    "${ListArr[@]}"`)
Action=$?

RecSelected=false
RecArr=()
i=0

for Field in "${Record[@]}" ; do
    RecSelected=true
    RecArr[i++]=$Field
done

# Error checking
if [[ $Action == $ButnView ]] || [[ $Action == $ButnInsert ]] || [[ $Action == $ButnEdit ]] \
|| [[ $Action == $ButnDelete ]] ; then
    if [[ $RecSelected == false ]] ; then
    yad --error --text 'You must select a record before clicking: View / Insert / Edit / Delete.' --center
    continue
    fi
fi

# Insert before || or Edit ?
if [ $Action == $ButnInsert ] || [ $Action == $ButnEdit ] ; then

    # After changing file name or Stack Exchange Address these must be updated.
    RecArr[$ColFileDate]="Update"
    RecArr[$ColStatus]="Update"
    RecArr[$ColA_Votes]="Update"
    RecArr[$ColQ_Votes]="Update"
    RecArr[$ColTitle]="Update"
    # --text="Set fields and click OK to update"
    # Note a space after \ generates invalid command error from yad
    NewRecArr=(`yad --form --width=900 --height=400 --center --skip-taskbar \
        --title="Select a file name and link it to Stack Exchange" \
        --text="Click OK to save. Click Cancel or press Escape to discard changes." \
        --field="File date":RO  --field="File name":FL  --field="Status":RO \
        --field="Answer +":RO   --field="Stack Exchange Address":TXT \
        --field="Question +":RO --field="Question Title":RO \
        ${RecArr[$ColFileDate]} ${RecArr[$ColFileName]} ${RecArr[$ColStatus]} \
        ${RecArr[$ColA_Votes]}  ${RecArr[$ColWebAddr]} \
        ${RecArr[$ColQ_Votes]}  ${RecArr[$ColTitle]}`)
    ret=$?

    # Cancel =252, OK = 0
    # OK & Insert operation?
    if [[ $ret == 0 ]] && [[ $Action == $ButnInsert ]]; then
        # Create new list entry and renumber
        ((TransCount++)) # Update number of changes
        let i=1      # Base 0 array, record number is second field

        while [ $i -lt $ListArrCnt ] ; do
            if [ ${ListArr[$i]} -eq ${RecArr[$ColRecNo]} ]; then
                # We have matching record number to insert before
                NewArr+=( false )               # Selected
                NewArr+=( "${RecArr[$ColRecNo]}" ) # Will be renumbered
                NewArr+=( "${NewRecArr[$NewFileDate]}" )
                NewArr+=( "${NewRecArr[$NewFileName]}" )
                NewArr+=( "${NewRecArr[$NewStatus]}" )
                NewArr+=( "${NewRecArr[$NewA_Votes]}" )
                NewArr+=( "${NewRecArr[$NewWebAddr]}" )
                NewArr+=( "${NewRecArr[$NewQ_Votes]}" )
                NewArr+=( "${NewRecArr[$NewTitle]}" )
            fi
            let j=$(( $i-1 ))
            let k=$(( $j+$RecArrCnt ))
            while [ $j -lt $k ] ; do
                NewArr+=( "${ListArr[$j]}" )
                j=$(($j + 1))
            done
            let i=$(($i + $RecArrCnt)) # Next list array entry to copy
        done
        ListArr=("${NewArr[@]}")
        unset NewArr
        RenumberListArr

    # OK & Edit operation?
    elif [[ $ret == 0 ]] && [[ $Action == $ButnEdit ]]; then
        # Update array entry
        ((TransCount++))
        let i=1
        while [ $i -lt $ListArrCnt ] ; do
            if [ ${ListArr[$i]} -eq ${RecArr[1]} ]; then
                # We have matching record number
                ListArr[++i]="${NewRecArr[$NewFileDate]}"
                ListArr[++i]="${NewRecArr[$NewFileName]}"
                ListArr[++i]="${NewRecArr[$NewStatus]}"
                ListArr[++i]="${NewRecArr[$NewA_Votes]}"
                ListArr[++i]="${NewRecArr[$NewWebAddr]}"
                ListArr[++i]="${NewRecArr[$NewQ_Votes]}"
                ListArr[++i]="${NewRecArr[$NewTitle]}"
                let i=$(($ListArrCnt + 1)) # force exit from while loop
            else
                let i=$(($i + $RecArrCnt)) # Check next entry
            fi
        done
    else
        : # noop for readibility: Cancel or Escape pressed in Insert / Edit window
    fi

# View or Delete record?
elif [[ $Action == $ButnView ]] || [[ $Action == $ButnDelete ]] ; then

    # Note if there is a space after "\", the next line generates
    # "invalid command" error message from yad.
    if [[ $Action == $ButnDelete ]] ; then
        YadTitle="Do you really want to delete this entry?"
        YadText="Click OK to confirm delete."
    else
        YadTitle="websync - Single entry view mode"
        YadText="Click any button or press Escape after viewing entry."
    fi

    yad --width=900 --height=600 --form --center --skip-taskbar \
        --title="$YadTitle"      --text="$YadText" \
        --field="File date":RO   --field="File name":TXT --field="Status":RO \
        --field="Answer +":RO    --field="Stack Exchange Address":TXT \
        --field="Question +":RO  --field="Question Title":TXT \
        ${RecArr[$ColFileDate]} ${RecArr[$ColFileName]} ${RecArr[$ColStatus]} \
        ${RecArr[$ColA_Votes]}  ${RecArr[$ColWebAddr]}  ${RecArr[$ColQ_Votes]} \
        ${RecArr[$ColTitle]}
    ret=$?

    if [[ $Action == $ButnView ]] ; then
        continue
    fi

    # Cancel =252, OK = 0
    if [[ $ret == 0 ]] && [[ $Action == $ButnDelete ]] ; then
        # Delete record from list array and renumber
        ((TransCount++))
        let i=1
        while [ $i -lt $ListArrCnt ] ; do
            if [ ${ListArr[$i]} -eq ${RecArr[$ColRecNo]} ]; then
                # We have matching record number to delete
                j=$(($i - 1))
                k=$(($j + $RecArrCnt))
                while [ $j -lt $k ] ; do
                    unset 'ListArr[$j]'
                    j=$(($j + 1))
                done
                for i in "${!ListArr[@]}"; do
                    NewArr+=( "${ListArr[$i]}" )
                done
                ListArr=("${NewArr[@]}")
                unset NewArr
                let i=$(($ListArrCnt + 1)) # force exit from while loop
            else
                let i=$(($i + $RecArrCnt)) # Check next entry
            fi
        done
        RenumberListArr
    else
        : # cancel delete operation.
    fi

# Run update process?
elif [[ $Action == $ButnUpdate ]] ; then
    time UpdateAllOrOne
    ret=$?

# Cancel all changes or "252"= X the window or Escape?
elif [[ $Action == $ButnCancel ]] || [[ $Action == 252 ]] ; then
    if [[ $TransCount -gt 0 ]] ; then
        (`yad --image "dialog-question" --title "websync - Exit confirmation." \
        --text="You have made $TransCount change(s). Do you really want to exit?" \
        --button=_Stay:1 --button=_Exit:2 --center`)

        if [[ $? -eq 2 ]] ; then
            exit
        fi
    else
        exit
    fi

# Save changes?
elif [[ $Action == $ButnSave ]] ; then
    # Save
    echo "${ListArr[*]}" > ~/.websync # Using * instead of @ preserves |
    ExternalSortArray
    exit
else
    yad --error --center --text "websync - Unknown button return code: $Action"
    exit
fi

done

IFS="$OldIFS"

exit

spawn-progress-multi script

If you don't put spawn-progress-multi file in your path websync will not be able to run it

#!/bin/bash

# NAME: spawn-progress-multi

Percent=0

MYNAME=$0
/usr/bin/logger $MYNAME "multi-progress FIFO named pipe: $1"
val="$2"
/usr/bin/logger $MYNAME "multi-progress yad parameters: $2"
/usr/bin/logger $MYNAME "multi-progress bar number to watch: $3"

while true ; do # loop until 100 %

    # Percent=$(cat "$1")
    [[ -f "$1" ]] && read -r Percent < "$1"
    echo "$Percent"
    if [[ $Percent == *"$3:100"* ]] ; then break ; fi ;

done | yad $2

exit 0


Let's look at some of the messages.

Note, selecting 'mate-desktop-environment' instead of 'mate'

apt-get is replacing the package name mate with mate-desktop-environment. Instead of assuming the package is called mate, you could have looked at apt-cache search mate.

 The following packages have unmet dependencies:
 mate-desktop-environment : Depends: mate-desktop-environment-core (= 1.20.0+2~16.04.york0) but it is not going to be installed

This says that the package you asked to install (mate-desktop-environment, was mate) depends on a package called mate-desktop-environment-core. "Depends", in this context means "gotta have it, won't work without it".

To fix just this problem, do:

sudo apt-get install mate-desktop-environment mate-desktop-environment-core

However, all the Recommends: lines recommend other packages that make mate more useful. You could simply add the packages you want to the command line. My apt-cache search mate | grep -w mate | wc -l shows 120 packages with mate in their names. Investigate them. Start with apt-cache search mate | grep -w mate.


You do not need to compile this driver from source this way. This driver is already in Ubuntu repositories. It can be installed by running

sudo apt-get install bcmwl-kernel-source


How to boot lubuntu from a live usb on an EeeBook?

Installing an operating system on these older EeeBooks has always been a right pain because nothing is allowed to be "simple" anymore. That said, just because something's difficult doesn't mean it's impossible.
These are the steps you'll need to follow:
1 — Configure Your BIOS

Make sure the netbook is off
Plug in the bootable USB stick with the version of Ubuntu (perhaps Xubuntu, or MATE given the hardware limitations of the device) you wish to use
Start the netbook and hold the F2 button down to get into BIOS
Under the "Advanced" tab:• Select "USB Configuration"• Select "USB Controller Select"• Set this to EHCI ⇠ Otherwise your mouse and keyboard will never work
Under the "Security" tab:• Select "Secure Boot"• Select "Secure Boot Control"• Set to Disabled ⇠ Otherwise you will receive a lovely SECURE BOOT VIOLATION message on boot. This is because the factory security keys do not recognise Ubuntu's EFI bootloader.
Under the "Save & Exit" tab• Select "Save Changes" and hit Enter ⇠ DO NOT CHOOSE "Save Changes and Exit"• Select "Boot Override"• Choose the USB flash drive

2 — Install Ubuntu
Install Ubuntu normally, HOWEVER, if you elect to encrypt the installation, you will be required to enter a password every time you boot. Unfortunately, the keyboard on the EeeBook will not work until after Ubuntu has started to boot. Therefore, encrypting the entire drive is "a bad idea" unless you always have an external keyboard nearby.
3 — Caveats
There are some hardware issues that you will need to be aware of. I have not used an EeeBook in 5+ years so do not know if any of the items below are still problems or not. If they are, be prepared to do some post-installation investigation.

the Bluetooth radio is uses the Broadcom BCM43341B0 chipset. This was not part of the default Ubuntu installation when I last installed it on an EeeBook in 2014
the audio device has a 50/50 chance of working
the Fn keys for brightness may not work consistently, going from full brightness to off with a single tap
the keyboard will not work until the login screen — or unless you are in BIOS mode — so have an external USB keyboard nearby if you ever have to do recovery work on the device
keep your expectations low
⇢ This particular netbook shipped with a quad-core Atom Z3735F processor which was sluggish at the best of times. Do not expect a great deal of performance when working with modern websites, watching videos with resolutions higher than 720p, or doing anything that requires a good degree of I/O work


This sounds like your software sources list got messed up in some way causing the updater to abandon the search.  After trying it, do a

tail -n 200 /var/log/syslog | less

to see if any specific error was reported.  Then, ...

When you have Update Manager running, click on the Settings button in the lower left of the window to look at your sources and be sure to check all the tabs. OR ...
When you have the Software Center running, go to the Edit Menu and click on Software Sources to see the same thing.
If you don't see anything obvious, it is time to get out the big guns.  Do a less /etc/apt/sources.list and carefully examine it all.  Next, less each file in /etc/apt/sources.list.d/ and look for anomalies.

Hope this helps.


You can put your scripts into $HOME/bin or $HOME/.local/bin. These two directories are automatically included in the $PATH if they exist.
You could also put your scripts into other directories but then you will need to add them manually into $PATH.
Please don't put custom scripts into /usr since that directory is designed for the distro's package manager.


You can use any available port, but you'll have to use links like https://host:port/file only. Relative links like just /file are OK.

Also, I assume your router properly process the traffic, I have no idea what 'ATT Uverse' means :)


git showing version 1.9.1 when installing from apt-get and source

If you need the latest version:

sudo apt-get autoremove --purge git

Then recompile git and reinstall using the instructions (not with apt-get).  Git is split into multiple packages, so if you did used remove instead of autoremove, you were probably still using the apt-get version.


Problems with Linux OS in a Lenovo ideapad laptop

After doing a bit of research and refusing to recompile the graphics stack manually I found you need to do 2 things to almost completely resolve this issue:  set a cstate restriction parameter for the kernel in /etc/default/grub and update the AMD graphics driver.
Open Terminal and open the file for editing with root privileges, for example (if you don't have mousepad you could use nano)
sudo mousepad /etc/default/grub

Change the line beginning GRUB_CMDLINE_LINUX_DEFAULT= so that after your edit it includes the parameter intel_idle.max_cstate=1, for example mine says:
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 intel_idle.max_cstate=1"

You can keep other parameters, such as quiet and splash which may be there already.
save and exit the text editor, and run this command to update the GRUB configuration:
sudo update-grub

Now add a PPA for AMD graphics drivers:
sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt update && sudo apt upgrade

Now reboot.
This solution should work for other flavors of Linux (ie mint, mx, manjaro etc...) and other AMD powered machines experiencing this issue.
Do not use screen lock or system suspend and you will most likely never have a freeze again!
When I choose to stop being lazy and resolve system lock freeze issues I will update this response.
AMD has not released any official proprietary drivers for Ubuntu 20.04 as of this posting, when and if they do, I would recommend trying them.


I have the same issue with a usb2 pny 32gb ntfs formatted pendrive. Dropping back to kernel 3.8.0-27 solves the issue. I am running xubuntu 13.04 64 bit.

Seems to be fine with my usb2 kingston ntfs pendrives so maybe brand chipset related bug / issue with this kernel ??

Can someone confirm if this is a new bug ?


How to count occurrences of each character?

You could use this:

sed 's/./&\n/g' 1.txt | sort | uniq -ic
  4
  5 a
  1 c
  1 k
  1 M
  1 n
  5 o
  2 s
  4 t
  2 w
  1 y

The sed part places a newline after every character. Then we sort the ouput alphabetically. And at last uniq counts the number of occurences. The -i flag of uniq can be ommited if you don't want case insensitivity.


To get the largest files in a directory, including hidden dotfiles, try running:

du -h .* | sort -h


Ubuntu read-only filesystem, then initramfs, how run fsck?

...this slightly old tutorial came up in a search.
Besides clearly explaining the entire process of fixing corruption, it recommended booting from a USB drive with Ubuntu Alternative 12 - because it would not mount the root drive.  That earlier OS didn't launch either but the theory proved useful.  Apparently Linux Mint, 20 "Ulyana" - Cinnamon (64-bit), does not mount the root drive.
That old machine (Mac mini late 2009) took a few minutes to launch LM from a USB drive, but once open it allowed me to confirm that dev/sdb2 was the root drive in question with...
$  sudo fdisk -l

...find that the drive did have lots of errors (without correcting) with...
$ sudo fsck -n /dev/sdb2

...then fix the errors with...
$ sudo fsck.ext4 -f /dev/sdb2

After that my machine seems to be running well.
Maybe there's an easier way to have fixed this issue, and maybe I missed something in my research, but wanted to document this in case it might be useful to others.


In some places awk doesn't work in pssh command

You can see what's going wrong if you turn on bash shell debugging

$ set -x
$ parallel-ssh -h hostsfile -i 'echo "$(uname -a | awk '{print $3}')"'
+ parallel-ssh -h hostsfile -i 'echo "$(uname -a | awk {print' '})"'

So the invoking shell is splitting the command into two arguments:

echo "$(uname -a | awk {print

and

$3})"

(with $3 being expanded to an empty value). This is one of the (rare) cases where the usual "if in doubt, add quotes" doesn't help you - the double quotes around the command substitution in the echo aren't really necessary, and if you remove them you can get rid of one level of quote nesting. Then you can just do

$ parallel-ssh -h hostsfile -i 'echo $(date) $(uname -a|awk "{print \$3}")'
[1] 09:13:36 [SUCCESS] vm
Sun Jan 27 09:13:36 EST 2019 4.4.0-141-generic
[2] 09:13:37 [SUCCESS] localhost
Sun Jan 27 09:13:37 EST 2019 4.15.0-43-generic

where

single quotes around the whole pssh argument prevent the invoking shell from expanding and running the command substitutions locally
double quotes around the awk expression DON'T prevent $3 frombeing expanded by the remote shell, so backslash escape it

Alternatively, you can add literal single quotes around the awk expression by opening and closing the single quotes:

'echo $(date) $(uname -a|awk '\''{print $3}'\'')'


Up to and including 10.10 the startup of syncdaemon, the bit of
ubuntuone-client in charge of synchronizing your files, could take
quite some time: tens of minutes on a slow disc with a large number
(tens of thousands) of files kept in sync by Ubuntu One. If you try
using u1sdtool during that time, you can easily trigger the above
DBus error. It's ugly, and we're working to make it go away for 11.04,
but it's also innocuous. You could read it as a “I'm busy, please try
again in a few minutes”.

Now, there's another issue in 10.10 that we've fixed and you should
have actually gotten the fix in your regular updates, and that is that
it sometimes doesn't connect automatically. A state of READY means
that syncdaemon is ready to go as soon as you tell it to connect.

ubuntuone-preferences (System › Preferences › Ubuntu One) should be
offering you a “Connect” button in that state. If it's not, please
file a bug; meanwhile, you can enter u1sdtool -c on the commandline
to manually ask it to connect.


SD card partitions not visible on Ubuntu

You have successfully set up your partition table, but only the first partition has a filesystem set up in it (this is why Ubuntu didn't automount the other two partitions). You can create an ext4 filesystem for your second partition with "sudo mkfs.ext4 /dev/mmcblk0p2". After this, Ubuntu should mount the second partition (you might have to restart, I don't know how smart the automount service is), and you can copy over your files with a "cp -r".


Re-installing the gnome-icon-theme-symbolic package did the trick. Thanks to the hint from this thread: http://forums.gentoo.org/viewtopic-t-946138-start-0.html

From apt-cache show gnome-icon-theme-symbolic:

Description-en: GNOME desktop icon theme (symbolic icons)
 This package contains a set of icons used by the GNOME desktop.
 The icons are used in the panel menu, and in nautilus and other
 applications, to represent the different applications, files,
 directories, and devices.


Depending on application you can disable hardware graphics acceleration dependency.

The recipe in Petr's answer to How to disable or bypass Hardware Graphics Acceleration(Prism) in JavaFX worked to launch AWS EC2 hosted (Xvnc) Java application on local Windows X-terminal.

In your example you could try:

java -Dprism.order=sw -jar CovCop.jar


Setting the filter options manually and force it to stick after a restart
To set the "filter" option of Dash:

Open Dash

At the right, click on to "Filter results"

Uncheck "Files & Folders" (Categories)

From now on, when you type a name, No Files or Folders will show up by default :

How to force it to stick, even after a restart (workaround)
This setting should stick, also after a restart.
If it doesn't stick for some reason, you can force it, by adding a command (to run a tiny script) to your startup applications. The command in the script itself cannot be added directly to your startup applications because of the combination of single/double quotes that does not "fit" in a .desktop file.
The script:
#!/bin/bash
sleep 15&&gsettings set com.canonical.Unity.Lenses disabled-scopes "['files.scope']"

Copy the script into an empty file, save it as set_search.sh

Add the (command to run the) script to your Startup Applications: Dash > Startup Applications > Add. Add the command:
  sh /path/to/set_search.sh

Note
In the script, there is a "sleep" of 15 seconds built in, to give the desktop the time to load. It also means that it might take 10-15 seconds after login for the search filter to be set.


Just an update on my question

I ended up ditching Windows server and going with a full Linux job - Ubuntu server and Edubuntu clients. Ultimately I feel this was the best decision but far from perfect.

I have DHCP and DNS being provided by the server.

A great feature of this setup is the ability to cache apt requests on the server so when an update occurs then only one PC updates over the WAN via the local server. These updates are then cached on the local server and every other PC uses this cache of updates.

This took some time to setup and I ran down a few dead ends before finding Apt Cacher NG. Here is a good tutorial for setting it up - http://www.tecmint.com/apt-cache-server-in-ubuntu/

Now, for the really fun bit! - Trying to create a client-server login similar to Windows Active Directory. This took a very long time to resolve but now works pretty well, I still have a lot of work to do on it. What I'm using is OpenLDAP server. Here's a good tutorial for the server - https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-a-basic-ldap-server-on-an-ubuntu-12-04-vps, but don't use the companion one for Ubuntu 14.04 client, use this - http://www.server-world.info/en/note?os=Ubuntu_14.04&p=ldap&f=2

This was not an easy task but by using the log files I was able to iron out any issues and get it working.

Windows software is using Wine. There have been a few compromises here. Scratch won't install on Ubuntu 64. But Pivot, Photoshop and NWEA Test Taker all work now.

This is very much a work in progress.


Why do I not have permission to extract any archives?

It might be that your NTFS partitions are mounted read-only.  This sometimes happens if the filesystem was not unmounted cleanly.

To check this, open a terminal and type:

mount

Look for the NTFS partitions and see if they are mounted "ro" or "rw".  "ro" indicates that they are read-only.

You can try remounting them rw:

sudo mount -o remount,rw [filesystem]

where "[filesystem]" is the NTFS filesystem in question.

It's likely that they will still not remount as read/write if they were improperly unmounted and are unchecked.  In that case, you should reboot your system into Windows and run the disk checker from there.  After that your partitions will be marked as clean and able to be mounted read/write again.


Ubuntu 12.04 install goes to blanks screen with cursor

The choice of installer selected by you is fine since AMD Sempron is a 64 bit processor.

But, the the installation is not going beyond the initial black screen may be because your system is not having the basic requirements for 12.04 satisfied I hope.


How can I install a tar.gz package in the terminal?

If the application is a compiled application this is typically how you do it

tar xzvf TARFILE.tar.gz
cd (New Folder Name)
./configure
make
make install


Why can't my udev rules rename kernel device nodes after upgrading from 12.04 to 14.04

As answered elsewhere: https://unix.stackexchange.com/questions/119593/is-there-a-way-to-change-device-names-in-dev-directory

The udev manpage says:

  NAME

  The name to use for a network interface. See systemd.link(5) for a higher-level mechanism for setting the interface name. The name of a device node cannot be changed by udev, only additional symlinks can be created.


You can change the cursor shape in XFCE terminal by editing ${XDG_CONFIG_HOME:-$HOME/.config}/xfce4/terminal/terminalrc (expressed partly as shell parameter expansion), just find the MiscCursorShapevariable and change it from TERMINAL_CURSOR_SHAPE_BLOCK to TERMINAL_CURSOR_SHAPE_UNDERLINE. In order to have a blinking cursor (any shape you defined) you must have MiscCursorBlinks=TRUE too.

System-wide defaults can be found under some of the colon separated directories ${XDG_CONFIG_DIRS:-/etc/xgd}, respectively.

See XDG Base Directory Specification for more information about which directories are used and in which order.

For details and additional options on available in the graphical configuration tool, see http://docs.xfce.org/apps/terminal/advanced


You have to be carefull and don't absolutely use the disk after the wrong format.
Download Testdisk.
With this software you can save deleted files to a differtent partition or disk.
Good luck


What software can I use test the performance of my system?

I would recommend that you check out the phoronix test suite. You can install it by entering the following in a terminal:

sudo apt-get install phoronix-test-suite

Here is a quick run down on beginning steps in running the quake4 test.

Some of the tests require a large amount of hard drive space, and could take a considerable amount of time to download the quake 4 test took over 10 minutes on a usually decent High-Speed connection, so make sure you're aware of this.

phoronix-test-suite --list-available-tests

You will see a ton of choices. I chose to install the quake 4 test in this example.

phoronix-test-suite install pts/quake4

This will pull down all the test and it's dependency files as seen in the image below:

Once it's finished downloading, you will then just enter the following in order to run the test:

phoronix-test-suite run pts/quake4

There might be more specific results you're looking for, so just look through the available tests and suites and I'm sure you'll find something that suits you.

Please check out this link here for further documentation on how to use the suite.


Do the features in new Ubuntu releases get backported to the LTS?

The LTS releases are expected to be very stable, suitable for offices, and "mission critical systems" like power plants. LTS gets all the "Important Security Updates" and any updates that fixes security issues.

LTS can be also updated with newer kernels, but it won't happen on it's own.

Typically, 12.04 LTS won't get the newest Unity features from 12.10, 13.04 etc. nor will it get newer versions of applications, like OpenOffice, unless such a feature or a newer application fixes a security hole.

Having said that, there are ways to get some of these into the LTS using the backport repositories and PPAs. In my opinion it is not worth the trouble unless you have some special circumstances preventing you to use the latest.

Normal releases on the other hand get the newest features and more recent applications like OpenOffice.

See What's the difference between a Long Term Support Release and a Normal Release? for more details.

To help answer your question about which version you should choose, my advice is the following:

If you are going to use Ubuntu as a home desktop and either
dual-boot Windows or have another computer in case of emergencies,
choose the latest, say 13.04 in a few days when it is released.
I usually wait 3-4 weeks to avoid the mad rush and the initial kinks
(if any) to get sorted out with the first round of updates.
If this Ubuntu installation is going to be mission critical, such as
you will lose your livelihood (or lots of money) if this computer
does not work well for a few hours/days, then choose the LTS.

Hope this helps


If everything is working fine, right-click the item on the Launcher and from the context menu select Unlock from Launcher.

Otherwise:

Close Firefox if it is open to free CPU resources, and try to unlock the item from the Launcher again.

Close all open applications and try to unlock the item from the Launcher again.

If this doesn't work, the next thing to try would be to log out and login again followed by rebooting if logout/login doesn't work either.


First make sure you have the latest version of alsa.Second in terminal type:alsamixer.
set low values to something more.


Why was mysql-cluster removed from 12.04 and how can I install it?

Did it get yanked for a licensing reason? compatibility?

It was deleted because it was not being actively maintained. See Launchpad Bug #921152.

  Is there any way to run a cluster on Precise short of building from sources? Does that even work?

Building from source should work because the package wasn't removed for FTBFS ("failure to build from source") -- it was removed for quality reasons.

There is an easier option: the pages saying "deleted" for the client and server also contain links to deb files for the packages, which are still available and can be installed via dpkg.

Before installing, use dpkg -I package.deb | grep Depends to find out the dependencies and then install them first using apt-get.


Dell Chromebook 11 - unable to set backlight and /sys/class/backlight/ folder is empty

If /sys/class/backlight/ is empty, that means that the kernel thinks you have a big bad old CRT attached to the system and that you have to turn the big fat knobs named "Brightness" and "Contrast" on the from to change...  well, brightness and contrast...

That being said, if the current kernel doesn't support your hardware, you would be better off looking at the exact hardware your ChromeBook contains and file a bug against the kernel...

It's a labour-intensive job as they first ask you to try with the latest kernel and then you'll have to run a bunch of experimental hardware-detection programs, file the reports, ...  But then your name will show up in the Linux kernel as one of the contributors!!!   ;-)

So you've got two choices:

wait...
work hard...


Try installing the dependencies:

sudo apt-get build-dep python-pygame
sudo apt-get install python-dev

How do I install Pygame in virtualenv?


Flashback doesn't work after latest 12.04 Ubuntu update

Had the same problem yesterday. Maybe Ubuntu is having network troubles (also got some 403 errors on apt-get update for some time yesterday).

Today I just uninstalled the flashplayer-installer and installed it again. This time the network connection to archive.canonical.com worked fine. Just try it again some time later, this might solve the problem.

If you really need the flashplayer now, you could download it from http://get.adobe.com/de/flashplayer/ and install it by hand.


How can I view man pages for apps installed via snaps?

A 'band-aid' solution is to run the following from the command line:

export MANPATH=":/snap/tmux/current/share/man"

and then the command man tmux will work as well as all of your pre-exisiting man pages. Bear in mind that Ubuntu does not normally use $MANPATH and the standard man pages PATH can be seen as follows:

andrew@athens:~$ man -w
/usr/local/man:/usr/local/share/man:/usr/share/man

After running the 'band-aid' solution suggested above you should see:

andrew@athens:~$ man -w
/usr/local/man:/usr/local/share/man:/usr/share/man:/snap/tmux/current/share/man

This setting can also be placed in ~/.bashrc for permanency, remembering that after placing it there either log out and then back in or simply run: source ~/.bashrc

Not very satisfactory I must say, especially if each package has a man page in a different location. Let us hope that as standards solidify this will be less of a problem...

References:

AskUbuntu: How to find out where $MANPATH is set? An excellent AskUbuntu question and answer that describes what the MANPATH is and how to manipulate it.
Snappy installed manpages aren't accessible through man Launchpad bug where the issue of viewing snap man pages is discussed.
Support for man pages Further discussion this time from the snapcraft forums.


Synaptics Touchpad pointer speed change with additional screen

The cursor speed scales with the display size, I think. I have dual monitors, but I don't really notice it. The computer monitor's aspect ratio is most likely different than the external display's aspect ratio. If so, there's your problem, and the only way to solve it is to get a display that matches the laptop display's aspect ratio, or make the resolution of both displays the same.

EDIT: Both of my monitors have a 16:9 aspect ratio, so that explains why I don't notice the cursor speed changing.


It seems like you are creating a traffic ACL on the virtual hub at:

Manage Virtual Hub -> Manage Access Lists

This kind of rule does not restrict connections to the virtual hub.

If you want to restrict connections to the virtual hub from a particular subnet, then you need to set a rule at:

Manage Virtual Hub -> Virtual Hub Properties -> IP Address Control
List

The default rule permits access. To get the desired result, create two new rules like this:

Permit, Multiple IP Addresses, Address = 2.144.0.0, Net Mask =
255.252.0.0, Priority = 100
Deny, Multiple IP Addresses, Address = 0.0.0.0, Net Mask = 0.0.0.0, Priority = 200


Allright, after a few tries I have finally achieved the goal.
The key to the success were two rules below:

-A PREROUTING ! -s 10.42.0.1/32 ! -d 10.42.0.1/32 -p tcp -m tcp --dport 53 -j DNAT --to-destination 10.42.0.1:53
-A PREROUTING ! -s 10.42.0.1/32 ! -d 10.42.0.1/32 -p udp -m udp --dport 53 -j DNAT --to-destination 10.42.0.1:53

I hope that this will help someone


Read man htop, especially the INTERACTIVE COMMANDS part:

  F    "Follow" process: if the sort order causes the currently selected process to move in the list, make the selection bar follow it. This is useful for monitoring a process: this
        way, you can keep a process always visible on screen. When a movement key is used, "follow" loses effect.

After you /, F


This question has already been answered here How to get a colored bash?

This has nothing to do with terminator

the easy way to have your colour "back" your shell is to uncomment one line in your .bashrc

Open~/.bashrc in text editor and uncomment line:

\#force_color_prompt=yes

to be:

force_color_prompt=yes

save then execute source~/.bashrc

hope this help


Check out GNOME Do. http://do.davebsd.com/

I use it all the time and I love it!


THE ISSUE
Ubuntu's minimal installation (20.04 and previous versions) doesn't come with one or some codecs required for streaming Netflix. It's not an issue with the web browser (Firefox, Chromium, etc), nor with DRM, since it comes activated by default these days.
The error message informed by Netflix doesn't help to understand nor to solve the issue (image below copied from https://help.netflix.com/en/node/105186).

THE SOLUTION

Close Firefox.
Open the terminal and install FFMPEG:

   sudo apt install ffmpeg

Close the terminal.
Re-open Firefox.
Done!

NOTES

FFMPEG is a complete, cross-platform solution to record, convert and stream audio and video. It's known as the "Swiss-army-knife in the field"!

I am just not sure exactly witch of it's dependency libraries solves the problem.
At Ask Ubuntu Question 1237114 the solution is attributed to libavcodec-extra.
Actually, I think libavcodec-ffmpeg-extra56, witch is a dependency of both ffmpeg and libavcodec-extra, is where relies the solution. Didn't try it alone though.


Here's what worked.

In fixhostsfile.sh:

#!/bin/sh
hostnm=$(hostname)
sed -i 's/ubuntu-template/'"$hostnm"'/g' /etc/hosts

And in /etc/systemd/system/fixhostsfile.service:

[Unit]
Description=Fix etc/hosts

[Service]
Type=oneshot
ExecStart=/home/user/fixhostsfile.sh

[Install]
WantedBy=multi-user.target

Don't forget to run:

systemctl enable fixhostsfile


Unable to change execute permissions of .sh file

The check boxes would be dis-appearing because you don't have appropriate permission as well as ownership to the file.. Try to make executable with the help of sudo command.

Try to change it by command line

Open terminal by Ctrl+Alt+T
Then reach to the jdk7.sh file.

cd /home/gurung/Downloads

if your file is locates in /home/gurung/Downloads or change accordingly.
Then execute following commands to make it executable:

sudo chmod +x jdk7.sh

if your file name is jdk7.sh or replace the file name with the original one.

That's it.. :)


Did I install Python 3.3 in the right folder?

If you're on 12.10, you can (and should, unless you have any special requirements) simply install Python 3.3 from the repositories. This way it will be updated as part of the rest of your installation, and it will be easier to install supporting libraries.

sudo apt-get install python3.3

If you do want to compile and install it yourself, you would usually put the resulting binary in either /usr/bin or /usr/local/bin. For things I compile myself, I normally choose the latter.

Now, source like python comes with its own directory structure: bin, include, lib, src, etc. You can see this under the Python-3.3.0 directory.

If you poke around your /usr filesystem, you'll see a similar structure - /usr/bin, /usr/src, /usr/include, /usr/lib, etc. Software which is installed from the repositories is slotted into this /usr file structure, with the relevant files being placed in the appropriate places.

If you're compiling Python from source, you'll have a Python directory with all these different kinds of files contained within it. If you try to divide it up yourself into the structure under /usr, you're going to end up in a real mess, and it'll be devilishly hard to remove it all afterwards.

So the way this is usually done is to place the whole directory under /opt. You can compile it there, and then you can either copy the resultant binaries into /usr/bin or /usr/local/bin, or you can make symlinks to them.

The instructions you're following show you how to compile python under /opt and create a symlink to the primary python binary in /usr/bin. This is a perfectly acceptable convention to follow.

I should also add: I'm talking about conventions here. Conventions don't always need to be followed rigidly. But for first steps, these conventions are a good way to start. You can (and will, no doubt) develop your own "style" as you progress.

To learn more about the filesystem structure (this really does come in handy), have a quick look at Ubuntu's nice and succinct Filesystem Tree Overview.


Fix for the problem is in file permitions and apparmor

Apparmor fix

full file copy-paste exclude first line

root@c1:/etc/bind# cat /etc/apparmor.d/usr.sbin.named
# vim:syntax=apparmor
# Last Modified: Fri Jun  1 16:43:22 2007
#include <tunables/global>

/usr/sbin/named flags=(complain) {
  #include <abstractions/base>
  #include <abstractions/nameservice>

  capability net_bind_service,
  capability setgid,
  capability setuid,
  capability sys_chroot,
  capability sys_resource,

  # /etc/bind should be read-only for bind
  # /var/lib/bind is for dynamically updated zone (and journal) files.
  # /var/cache/bind is for slave/stub data, since we're not the origin of it.
  # See /usr/share/doc/bind9/README.Debian.gz
  /etc/bind/** r,
  /var/lib/bind/** rw,
  /var/lib/bind/ rw,
  /var/cache/bind/** lrw,
  /var/cache/bind/ rw,

  # gssapi
  /etc/krb5.keytab kr,
  /etc/bind/krb5.keytab kr,

  # ssl
  /etc/ssl/openssl.cnf r,

  # GeoIP data files for GeoIP ACLs
  /usr/share/GeoIP/** r,

  # dnscvsutil package
  /var/lib/dnscvsutil/compiled/** rw,

  /proc/net/if_inet6 r,
  /proc/*/net/if_inet6 r,
  /usr/sbin/named mr,
  /{,var/}run/named/named.pid w,
  /{,var/}run/named/session.key w,
  # support for resolvconf
  /{,var/}run/named/named.options r,

  # some people like to put logs in /var/log/named/ instead of having
  # syslog do the heavy lifting.
  /var/log/named/** rw,
  #added line here
  /var/log/named/* rw,
  /var/log/named/ rw,

  # Site-specific additions and overrides. See local/README for details.
  #include <local/usr.sbin.named>
}

Bind9 fix

next i have been changeing pemitions until it worked

/var/log/named changes

chown -R bind:root /var/log/named
chmod -R 775 /var/log/named

result of above commands

root@c1:/etc/bind# ls -lha /var/log/named/
total 196K
drwxrwxr-x  2 bind root   4,0K мај 20 20:38 .
drwxrwxr-x 18 root syslog 4,0K мај 21 00:46 ..
-rwxrwxr-x  1 bind root   6,8K мај 21 01:20 bind.log
-rwxrwxr-x  1 bind root      0 мај 20 19:30 bind.log~
-rwxrwxr-x  1 bind root   167K мај 21 01:21 query.log
-rwxrwxr-x  1 bind root      1 мај 20 23:14 security_info.log
-rwxrwxr-x  1 bind root      0 мај 20 19:30 security_info.log~
-rwxrwxr-x  1 bind root      1 мај 20 23:13 update_debug.log
-rwxrwxr-x  1 bind root      0 мај 20 19:23 update_debug.log~

/etc/bind changes

chown -R bind:root /etc/bind
chmod -R 774 /etc/bind

result of above commands

root@c1:/etc/bind# ls -lha /etc/bind
total 120K
drwxrwsr--   3 bind root 4,0K мај 21 00:33 .
drwxr-xr-x 150 root root  12K мај 21 00:34 ..
-rwxrwxr--   1 bind root 2,4K мар 24 18:06 bind.keys
-rwxrwxr--   1 bind root  237 мар 24 18:06 db.0
-rwxrwxr--   1 bind root  271 мар 24 18:06 db.127
-rwxrwxr--   1 bind root  237 мар 24 18:06 db.255
-rwxrwxr--   1 bind root  353 мар 24 18:06 db.empty
-rwxrwxr--   1 bind root  270 мар 24 18:06 db.local
-rwxrwxr--   1 bind root 3,0K мар 24 18:06 db.root
-rwxrwxr--   1 bind root  860 мај 20 18:54 named.conf
-rwxrwxr--   1 bind root 1,1K мај 20 18:49 named.conf~
-rwxrwxr--   1 bind root  490 мар 24 18:06 named.conf.default-zones
-rwxrwxr--   1 bind root  475 мај 20 22:24 named.conf.local
-rwxrwxr--   1 bind root  477 мај 20 22:22 named.conf.local~
-rwxrwxr--   1 bind root 1002 мај 20 23:12 named.conf.log
-rwxrwxr--   1 bind root 1002 мај 20 23:11 named.conf.log~
-rwxrwxr--   1 bind root 1,1K мај 21 00:33 named.conf.log.save
-rwxrwxr--   1 bind root 1,4K мај 20 18:50 named.conf.options
-rwxrwxr--   1 bind root 1,4K мај 18 23:23 named.conf.options~
-rwxrwxr--   1 bind root   77 мај 20 04:25 rndc.key
drwxrwxr--   2 bind root 4,0K мај 18 23:23 zones
-rwxrwxr--   1 bind root 1,3K мар 24 18:06 zones.rfc1918

Notice:

  This bind9 installation is not chrooted

now Bind9 is working

 root@c1:/etc/bind# service bind9 start
     * Starting domain name service... bind9             [ OK ]


How to search in Linux from the terminal, on an external HDD, for photos, by name

The brute force to perform this is to use the find standard command.
https://en.wikipedia.org/wiki/Find_(Unix)
find <base directory> -name '202010*.jpg'

The quotes around the file pattern ensure that it is not matched against the file in your current directory, and transmitted as a pattern to find.
The pattern is your way to express if you want

exactly 202010.jpg: -name '202010.jpg'
anything starting with 202010: -name '202010*.jpg'
anything containing 202010: -name '*202010*.jpg'

This will get you going, but using find massively, especially find / <whatever query> is a bad practice and is slow, you can do better.
In most of the cases, Linux comes installed with a system called locate, or mlocate (Ubuntu, see https://www.howtoforge.com/linux-locate-command/ ).
By using another process that scans the disk regularly (once a day), locate builds a database that makes the search for something like
locate '202010*.jpg'
very efficient (seconds instead of minutes).


You can use grep to simplify the output of just about any command.

Well, if you want to only show the ones with 50% or even 5*% like 55% you can use grep like so:

df -h | grep "50%"

or to show all 50 some percent like 51 or 55 as well, you can run this:

df -h | grep "5.%"

To show anything greater than or equal to 50%, run this instead:

df -h | egrep "10.%|9.%|8.%|7.%|6.%|5.%"


If you mean the boot messages, that question is answered here

How can I show or hide boot messages when Ubuntu starts?


Can you Dual boot Ubuntu 12.04 and 12.10?

Yes you can! You only have to install them on separate partitions and set your grub accordingly.

If your goal is testing purposes, you can install one Ubuntu a virtual machine


Only root sees all icons in gnome-control-center after upgrade to Lubuntu 13.04

If you are running other environments than Gnome, the icons are invisible due to a directive in Gnome's desktop files.

See /usr/share/applications/gnome*panel.desktop

and search in the files for the line

OnlyShowIn=GNOME;

You could remove this line or append your environment to the list.
The possible values are listed here:

  http://standards.freedesktop.org/menu-spec/latest/apb.html

For Unity you can simply install unity-control-center which resolves that situation for you automatically:

sudo apt-get install unity-control-center


Alternative panel for a custom compiz session for Ubuntu 12.10?

I suggest you:

Docky: The most simple, but really good
Cairo-dock: a complete dock that provide a session himself
Avant Window Navigator: in the middle between the previous

I suggest you try all three


You can try this:

Press Ctrl+Alt+F1, then login into the system. If your password is correct, you will succeed. Then run

rm .Xauthority .ICEauthority

Press Ctrl+Alt+F7 and try to login again.


Kazam does not stop recording and open window to save video

I had same issue. I switched to vokoscreen.

You can try other tools too in the below blog.

https://linuxconfig.org/how-to-record-screen-on-ubuntu-18-04-bionic-beaver-linux


Unity launcher shown over Dota 2 in Fullscreen

I managed to go to the settings in the game and changed the window setting from boarder less to full-screen. Dota 2 now works full screen.


How to automount a gvfs file system on logon

Shell
You could use the mount command in a start up script and put that in the Startup Application Preferences. mount is perfectly capable of mounting remote file systems (if you provided it with the right options and all necessary packages installed).
An alternative to mount in your startup script is gvfs-mount . You can mount nautilus-type URIs with that - just like nautilus does. It is installed by default on most Ubuntu systems.
Example usage:
gvfs-mount 'ftp://user@www.your-server.com/folder'

Adding the -u option unmounts the argument, -l lists all mounted file systems, --help gives you more options.
Finally the file /etc/fstab is usually used to mount file systems statically. If your remote server is reliable you might want to take a look at fstab. It will slow down your boot time drastically if the server is slow or offline, but it has the advantage of making the file system available quite soon (before gnome or X are even loaded, e.g. for use in scripts). For more information you can type man fstab.
GUI way
Check out Gigolo . It has the capability of auto-mounting a bookmark, whenever the bookmarked filesystem is present.
sudo apt-get install gigolo   # or use the install link above

Run gigolo. There is an option in the preferences that puts it into autostart and another to activate the tray icon. Check both. Then add your bookmark.


In Ubuntu 16.04, how can I set keyboard shortcuts for maximizing a window horizontally or vertically?

For a selected window, try Ctrl+Alt+any number key below NumLock or right of it.
(Keyboard shortcuts are shown by holding one of the Super = "Windows" keys; the left of them is between the left Ctrl and Alt.)
 Vertically, a window can be maximized by mouse dragging its corner to the top.
Horizontally it does not work: it is reasonable for using more displays to horizontally expand the display area; that enables making a window effectively far wider then any of the single  displays. To another display you can move the window by mouse dragging, maybe after clicking at maximizing-restore-minimizing icons at the left upper corner.
I cannot imagine a system of controlling windows sizes and positions which would be more universal or more friendly or quicker or which would more effectively use the displaying area.


How to boot windows after installing ubuntu? (ubuntu does detect windows, just doesn't allow me to boot it)

You have to fix your package system first.

Looks like your sources file is corrupted so let's start with this.

Delete sources.list by running this command.

sudo rm /etc/apt/sources.list

Regenerate your sources.list by opening up a terminal and typing

sudo software-properties-gtk

Tick all the software sources like so :

Change the main server to your country and click close.

Then click Reload.

Wait for that to finish ...

Now we come to getting dual boot to work.

Open a terminal and run this command :

sudo update-grub
sudo reboot


What full partition/disk imaging solutions produce mountable images?

To make the image you will probably want to use Partimage

So that the image is consistent, you will want to make sure the disk is offline when you make the image.

I have transformed Partimage images into virtual drives for VirtualBox.  It appears that you can also Mount a partimage file as a loopback device, but I haven't tried that myself.


Thanks very much for your tips! I finally realized too that I indeed had an incorrect driver installed.

My printer is Canon MX328 and when "Printing" tried to install the driver for me it could only find drivers for MX300 and MX330 series, so it "recommended" me to use the MX300 one, which apparently turns out to be the cause of the incorrect print-out.

I finally found the MX320's Linux driver from Canon web site but in DEB format, while Ubuntu's Printing requires only PPD format when installing driver manually. Double-clicking the DEB file does not automatically install the file (it only opens in text editor) so I had to work still more around it to open it in Software Center in order to successfully install the driver and get the correct print-out. Not sure why Ubuntu did not make this more convenient for user, but finally for me the problem's solved now.


Detecting whether netplan is managing network config (shell)

You may be able to check for the ifstate file from ifupdown, which will tell you whether that's what was used to configure the network:

/run/network/ifstate

If that's there and it contains text, you can expect that ifupdown is in use. If it's not present, the system is likely managed via netplan (but that won't tell you whether it's NetworkManager or systemd)

Then, if you want to know what backend is used for a particular interface, you can ask netplan, and parse the output to get the information you need:

netplan generate --mapping enp3s0

It outputs text like this:

id=enp3s0, backend=NetworkManager, set_name=(null), match_name=enp3s0, match_mac=(null), match_driver=(null)

That way you can also know using what matching rules the interface was configured (you use the "final" name of an interface to check the mapping, it tells you what matching rule is in the netplan YAML that matches for it).


Well, could really be a problem with your ISP DNSs and maybe they intercept DNS traffic and route it throurgh their servers...

Try a dig @8.8.8.8 www.ubuntu.com and see what happens.

Output should be like:

; <<>> DiG 9.7.3 <<>> @8.8.8.8 www.ubuntu.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54464
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.ubuntu.com.      IN  A

;; ANSWER SECTION:
www.ubuntu.com.   497 IN  A 91.189.89.88

;; Query time: 2307 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Thu Jul  7 14:23:41 2011
;; MSG SIZE  rcvd: 48


How do I print the Processes data from gnome-system-monitor?

ps aux > ~/Desktop/process.txt

The above command will saves the information about active processes in a file process.txt under ~/Desktop folder.


Get directory-specific Nautilus preferences on 14.04 LTS

Summary: it is not possible with the standard file manager, I cannot find out if by design or because of a bug.

The KDE file manager "dolphin" do what you need, but does not blend so well with standard Unity/Gnome appearance. You can install it via sudo apt-get install dolphin, but be warned, it will install a lot of KDE things. (And it has its drawbacks, too, like the fact that the thumbnails are in my opinion managed much better in nautilus).

TL,DR version:

Once upon a time, nautilus (the file manager used in Gnome and Unity) used to remember the view mode for each directory. Then the "simplification frenzy" started, and willing or not, a lot of nice features were deemed "too complex" and ditched. Emblems, tree view, double pane, and this thing you are asking for. Although maybe this one was just a bug, I am not sure --- see https://bugzilla.gnome.org/show_bug.cgi?id=683802.

Linux used to have the best graphical file managers around; now probably (apart from KDE dolphin and maybe nemo) I sometime wish to have the windows file manager available.


Ubuntu (dual boot) sometimes does not boot

have you tried updating your motherboard bios to the latest version? I ask this because the first pic has "acpi bios error(bug)" here is a link to ASUS site where you can dl it https://www.asus.com/Laptops/ASUS-ZenBook-13-UX333FA/HelpDesk_Download/


Several lines appear to have gone missing, and a ":" has appeared where it shouldn't be.

In a terminal, enter sudo nano /etc/apt/sources.list and enter your password.
Remove the ":" and replace it by:

deb http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse

Press Ctrl + O to save the file, and Ctrl + X to exit from nano.
Do sudo apt update.

It should work from here on.


what does apt-cache depends packagename?

apt-cache depends is not recursive. There's a separate tool called apt-rdepends for that. I have no idea what you mean by "level 1" dependencies, I have not seen that term in any official packaging documentation.


Solve the problem by re-installing XFCE4, deleting the .config directory from my home and rebooting the computer.

It is now back into normal mode! Still don't know what happened, but for some reason XFCE instalation went bad after latest SW update.


How do I put back Gimp scripts, brushes, fonts etc after installing 11.10?

I've written an article on wikihow on how to do this, so check it out here.

About the error, you would have to copy the files in with a sudo command, but I wouldn't recommend it. Using the configuration folders in you home directory doesn't require root permissions, and if you mess things up the worst that can happen is that you would need to create a new user account. Messing with the global settings is dangerous; only use them if absolutely necessary.

Programs (at least the scripts that start the programs) are located in /usr/bin, I think, but some are in /opt, too.

I'm not sure how familiar you are to Linux, but there really isn't really a "program files" folder in the same sense that Windows has. All settings are mostly done in separate configuration folders. You will have to know where to put each one.

Have fun with Ubuntu! It's a great OS, but definitely different from Windows.


Locally Integrated Menus - ALWAYS visible?

For 14.10 there will never be the ability to have locally integrated menus always visible - at least, not without you hacking Unity code yourself.

15.04 included this ability to always switch on.  14.04 (since this being the LTS version), had this ability backported.

Thus you have three choices:

stick to 14.10 for the period of its support.
Move on up to 15.04 where menus are now permanently visible by default, or
Move back to 14.04 where this has been backported (see related questions below).

Related Questions

How do I always show menu items in Unity?
Can auto-hide for the application menu be turned off in Unity?


I got the same error and resolve this by reloading driver for network device.
First need to find appropriate pci device:

find /sys/devices -name enp3s0

I got /sys/devices/pci0000:00/0000:00:1c.2/0000:03:00.0/net/enp3s0. Then remove pci device and rescan bus:

echo 1 >/sys/devices/pci0000:00/0000:00:1c.2/0000:03:00.0/remove
echo 1 >/sys/devices/pci0000:00/0000:00:1c.2/rescan

Done, network interface reinitialized.

I got the next kernel log:

Apr 17 12:43:55 host kernel: r8169 0000:03:00.0 enp3s0: rtl_counters_cond == 1 (loop: 1000, delay: 10).
Apr 17 12:43:55 host kernel: r8169 0000:03:00.0 enp3s0: rtl_counters_cond == 1 (loop: 1000, delay: 10).
Apr 17 12:43:55 host kernel: r8169 0000:03:00.0 (unregistered net_device): rtl_counters_cond == 1 (loop: 1000, delay: 10).

Apr 17 12:44:28 host kernel: pci 0000:03:00.0: [10ec:8168] type 00 class 0x020000
Apr 17 12:44:28 host kernel: pci 0000:03:00.0: reg 0x10: [io  0x0000-0x00ff]
Apr 17 12:44:28 host kernel: pci 0000:03:00.0: reg 0x18: [mem 0x00000000-0x00000fff 64bit]
Apr 17 12:44:28 host kernel: pci 0000:03:00.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref]
Apr 17 12:44:28 host kernel: pci 0000:03:00.0: supports D1 D2
Apr 17 12:44:28 host kernel: pci 0000:03:00.0: PME# supported from D0 D1 D2 D3hot D3cold
Apr 17 12:44:28 host kernel: pci 0000:03:00.0: System wakeup disabled by ACPI
Apr 17 12:44:28 host kernel: i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
Apr 17 12:44:28 host kernel: pci 0000:03:00.0: BAR 4: assigned [mem 0xf0100000-0xf0103fff 64bit pref]
Apr 17 12:44:28 host kernel: pci 0000:03:00.0: BAR 2: assigned [mem 0xf7d00000-0xf7d00fff 64bit]
Apr 17 12:44:28 host kernel: pci 0000:03:00.0: BAR 0: assigned [io  0xe000-0xe0ff]
Apr 17 12:44:28 host kernel: r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
Apr 17 12:44:28 host kernel: r8169 0000:03:00.0: irq 29 for MSI/MSI-X
Apr 17 12:44:28 host kernel: r8169 0000:03:00.0 eth0: RTL8168g/8111g at 0xffffc90007ce2000, 80:ee:73:xx:xx:xx, XID 0c000800 IRQ 29
Apr 17 12:44:28 host kernel: r8169 0000:03:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
Apr 17 12:44:28 host kernel: IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready
Apr 17 12:44:28 host kernel: r8169 0000:03:00.0 enp3s0: link down
Apr 17 12:44:28 host kernel: r8169 0000:03:00.0 enp3s0: link down
Apr 17 12:44:28 host kernel: IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready
Apr 17 12:44:31 host kernel: r8169 0000:03:00.0 enp3s0: link up
Apr 17 12:44:31 host kernel: IPv6: ADDRCONF(NETDEV_CHANGE): enp3s0: link becomes ready

In other way you can try to reload driver itself, like this: rmmod r8169; modprobe r8169. I didn't try this because I have the second similar network device used me to ssh.


Installation procedure of MAAS and JUJU to deploy Openstack

First of all install MAAS and configure juju on it correctly. If you are testing the installation, I would recommend you to use Ubuntu Server 14.04 LTS installation with MAAS and install juju afterwards.

Use a Virtual Machine Manager such as Oracle VirtualBox and register the nodes in the MaaS cluster. Then you can use juju in it.

Then install openstack.
Following link is a great tutorial for that. There are number of threads and tutorials if you want to get help in the installation steps. Hope it helps.

http://marcoceppi.com/2012/05/juju-maas-virtualbox/


How to remote into windows 7 through virtualbox on ubuntu 12.04 from outside the network

First enable remote display in virtual box settings then try again using a remote client such as Remmina


How to install ubuntu 14.04 on my Mac Pro 1,1 with a raw hard drive by a bootable USB stick

Look for the ISO's with "amd64+mac" in the name. There are both Desktop and Server versions.

Go to this page: http://cdimage.ubuntu.com/releases/14.04/release/ to see the full list of available ISO's for download. Again, look for the "amd64+mac." It's faster to download them as torrents if you can.

My aim is to convert three of these Mac Pros into Ubuntu servers along with an XServe 1,1 as their master for a private cloud at work. All of them have 32GB RAM installed, and these machines are still in great condition. I'd hate to have to discard them just because Apple will no longer update Mac OS X Lion when Yosemite is released.