How to get a different number of spaces with the tab in Kate when writing in different programming languages

Via menu:

Settings > Configure Kate > Open/Save > Modes/Filetypes

you can set it like in this examle:

Name: C, C++ and Java settings
Section: Sources
Variables: kate: space-indent on; indent-width 4; mixed-indent off; indent-mode cstyle;
File Extensions: *.h;*.c;*.hh;*.H;*.hp;*.hxx;*.hpp;*.HPP;*.h++;*.tcc;*.cc;*.cp;*.cxx;*.cpp;*.CPP;*.c++;*.C;*.java
Mimetypes: text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java
Priority: 10


ubuntu 20.04 boot: black screen & AE_NOT_FOUND error + freezing

The AE_NOT_FOUND error is relatively easy to fix and may be the cause of most of your problems so tackle that first. At the grub menu, select Edit, and where the text says quiet splash, change it to quiet splash pci=noaer
That should allow you to boot. If that fixes the error, you will need to sudo nano /etc/default/grub and add the same option to the default command line.
Let me know if you need better step-by-step instructions.


Crontab doesnt work, system doesnt reboot

You've confused minute and hour values in your crontab jobs.
The first three jobs might not work propperly due to this issue.

For example:

3 33 * * * = 3 minute 33 hour -> Won't work!

33 3 * * * = 33 minute 3 hour  -> Change it like this.


How to route IP net to interface using netplan

Heres the example.

I tryed to just comment but it wont let me.

network:
  version: 2
  renderer: networkd
  ethernets:
    ens3:
      addresses:
       - 192.168.3.30/24
      dhcp4: no
      routes:
       - to: 192.168.3.0/24
         via: 192.168.3.1
         table: 101
      routing-policy:
       - from: 192.168.3.0/24
         table: 101
    ens5:
      addresses:
       - 192.168.5.24/24
      dhcp4: no
      gateway4: 192.168.5.1
      routes:
       - to: 192.168.5.0/24
         via: 192.168.5.1
         table: 102
      routing-policy:
        - from: 192.168.5.0/24
          table: 102

Read more here : https://netplan.io/examples#source-routing


Is there a lightweight APT repository browser GUI?

Synaptic asks for root because the Synaptic .desktop file launches synaptic-pkexec:

$ grep Exec /usr/share/applications/synaptic.desktop
Exec=synaptic-pkexec

Running just synaptic will avoid the root requirement, preventing Synaptic from locking the databases, or making any changes.
You can create your own .desktop file which will invoke just synaptic, running it as a normal user:

cp /usr/share/applications/synaptic.desktop ~/.local/share/applications
chmod +x ~/.local/share/applications/synaptic.desktop
sed -i 's/-pkexec//;/^Name/s/$/ (non root)/' ~/.local/share/applications/synaptic.desktop

I don't know of any browser for an unconnected repository.


I can´t use negative arguments in openvz

First run

shopt -s extglob

and now

cp -R plugins/!(*og*) /backup

works.

Disable the behavior with

shopt -u extglob

From man bash

If  the extglob shell option is enabled using the shopt builtin, several
extended pattern matching operators are recognized.  In the following
description, a pattern-list is a list of one or more patterns separated
by a |. Composite patterns may be formed using one or more of the
following sub-patterns:

     ?(pattern-list)
            Matches zero or one occurrence of the given patterns
     *(pattern-list)
            Matches zero or more occurrences of the given patterns
     +(pattern-list)
            Matches one or more occurrences of the given patterns
     @(pattern-list)
            Matches one of the given patterns
     !(pattern-list)
            Matches anything except one of the given patterns


Try to remove or rename the local configuration in your home directory. See the bug report. The workaround works for me.

rm -r ~/.gstreamer-0.10


Wubi Device /dev/loop0 full. How to get more space?

I think you are running Ubuntu with wubi. Is that true?

If so, please refer to How can I check how much space there is left on WUBI versus how much space it takes on my HDD? for information about what you can do when you are short on space.

There's a link on that question to the wubi guide here.

For resizing the space available you should refer to this.


It looks like killing by PID is the way to go.

First obtain the PID:

pidof x0vncserver

Then kill it with the resulting PID from the above command.

kill -15 PID or kill -SIGTERM PID

You can also use killall processname where process name is the process you wish to kill provided you have the psmisc package installed. You can confirm that with the command dpkg -l psmisc which will provide output like this:

$ dpkg -l psmisc
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                        Version            Architecture       Description
+++-===========================-==================-==================-===========================================================
ii  psmisc                      22.21-2.1build1    amd64              utilities that use the proc file system

Sources:
https://groups.google.com/forum/#!topic/tigervnc-users/lxRS20r2XFc

https://www.cyberciti.biz/faq/kill-process-in-linux-or-terminate-a-process-in-unix-or-linux-systems/

man killall


Internet speed greatly fluctuating, from 100kbps to 4mbps in under a second

It's probably NOT your router dying. It's probably either

using DNS from the router to look up each IP to host and the router is choking
(don't use cheap routers for DNS or turn off the lookup feature in your torrent client... or both)
ISP throttling based on packet inspection
(oh, he's torrenting, start dropping traffic)
adaptive shaping knocking it down over and over again
(high traffic, let's start dropping every Xth packet).

That sine-wave speed ticker reads EXACTLY like poorly implemented traffic shaping/TCP-synchronization.


Install your cmake in ~/bin/, and add ~/bin/ to the beginning of your PATH. You may have to mkdir -m 0755 ~/bin/ first.


If you have a GUI installation then one of the easiest way to format drives is using Gparted.

sudo apt-get install gparted

It's possible that you've installed Ubuntu alongside Windows 8.1, in which case the other 804GB may still be in use by Windows.

If this is the case, but you want to use the entire drive, then you have two options:

You can re-install Ubuntu entirely and erase the entire drive during the setup. This will allow you to have one big partition, which is easiest to manage.
You can format the extra space with GParted and mount it as an additional storage location by going to File Explorer -> Other Locations and accessing the partition there.


How to install version 4.11 of the package texinfo?

You can't install software like that unless it's "packaged" for your system. You might want to see if someone has already created a package for Ubuntu. Otherwise, you'll have to compile and install manually. It isn't difficult, but also not as convenient as using an installer.

For basic installation instructions, look in texinfo-4.11.tar.bz/texinfo-4.11/INSTALL.


Will LibreOffice be more "Visually user friendly"?

A couple of week are released LibreOffice 3.4, today I was looking on their website the release notes and new features, I found a couple of surprises, the first is that it has finally integrated the rendering engine of the sources, and the second is that it achieved a better integration with GTK +, which results in two features that will undoubtedly greatly enhance visual suite.

  Improve gtk+ theme integration, making
  LibreOffice look more native. Fix menu
  separators, Alt key issues, Toggle
  buttons, and many widget rendering
  details.


Reinstall package that was not from repo from ubuntu repository

You will need to add the PPA again, and to disable it AND revert any package it installed to the default version in Ubuntu repository you will nedd ppa-purge and use the command:

sudo apt-get install ppa-purge

sudo ppa-purge PPA-name

For more information, see http://www.webupd8.org/2009/12/remove-ppa-repositories-via-command.html


You can do that with << example:

 libvtk6-dev (>= 6.0.0),  libvtk6-dev (<< 6.2.0)

This way you have locked the range between 6.0.0 and 6.1.0. The same way you have to specify for each package individually, there is no if this dependency is this then ask for that.


No internet on Virtualbox (Windows 7 as guest, Ubuntu 14.04.4 LTS as host)

Answer: Click the refresh button next to the MAC address field in network settings' advance options to create a new MAC address. You have to refresh it SEVERAL TIMES! WTF


Not sure what is the purpose of the script but this solution should work:
for file in *.aac; do
    ffmpeg -i "$file" -an -vcodec copy "${file%aac}jpg"
    ffmpeg -loop 1 -i  "${file%aac}jpg" -i "$file" -c:v libx264 -preset veryslow -tune stillimage -crf 18 -pix_fmt yuv420p -c:a aac -shortest -b:a 192k -shortest "${file%aac}mp4"
done

I replaced:

%%a by the $file shell variable;
%%~na which is removing the file extension by ${file%aac};
ffmpeg.exe by the ffmpeg command.


How to restore wine configuration to default?

You should be able to rename ~/.wine to ~/.wine.backup and then run the wine configuration program from the menu or from the command-line (winecfg) and then a new ~/.wine will be regenerated and you will still have the old wine folder and so all your files will remain. You can then decide how to proceed.

Additionally, sometimes the old WINEPREFIX can be fixed by resetting the dll overrides, with winetricks alldlls=default, as those overrides can often cause problems, as I discuss in this answer.

Problems with wine can often occur, and that is why I always recommend installing new games or applications in their own WINEPREFIX, as I discuss here:

How to reset setting of Wine, avoiding uninstalling all applications in it?


I don't know about Source games, but this does work on virtual consoles for many of us.  See:  How do you remap a key to the Caps Lock key in Xubuntu?


Please try latest updated package (20130510) provided on :https://code.launchpad.net/~ubuntu-audio-dev/+archive/alsa-daily/+packages

I installed it and works


If you have an ATI card, you can try to deinstall the fglrx package and install the fglrx-update package.


I repeatedly get an error about unmet dependencies for adobe-flashplugin while trying to install anything

I've already faced similar problems and I figured that in most cases the only thing you have to do is

sudo dpkg --configure -a

and then

sudo apt-get install -f

If that doesn't help, you should edit file /var/lib/dpkg/status and delete whole blocks of broken packages. Then repeat first two commands and that should fix it.


As Javier pointed out in his comment: checkinstall is only useful for the installation part of the build chain. For some more clarification:

if you ware used to compile and install a program the usual way: ./configure && make && make install you would replace this by:

./configure && make && checkinstall install=no

so you can still pass the KLIB-Argument to make as this argument is only important for make, not for make install.


Apparently, Dropbox does only upload files that are owned by you, even if the file is readable by all users. To make sure the file makes it to Dropbox, ensure it is owned by yourself.
It suffices to issue your copy command without sudo, i.e.
cp /etc/fstab ~/Dropbox/fstab.bak -p

A copy of a file to which you have read access, is owned by the one making the copy.
You could change the ownership of your existing file with the command
sudo chown $USER:$USER ~/Dropbox/fstab.bak

Immediately after executing the command, Dropbox will refresh and this time transfer it to the cloud.


I'm not sure what this question has to do with packaging. Users shouldn't have to be editing the python files directly, and of course would need to be root to do so to installed one. What you really want is a proper conf file installed to the users home directory. Something like:

import os
import ConfigParser

try:
    import xdg.BaseDirectory
except ImportError:
    home = os.environ.get('HOME')
    xdg_config_home = os.path.join(home, '.config/')
else:
    xdg_config_home = xdg.BaseDirectory.xdg_config_home

confDir =  os.path.join(xdg_config_home, 'myApp')
confFile =  os.path.join(confDir, 'conf.ini')

config = ConfigParser.ConfigParser()

if os.path.isfile(confFile):
    config.read(confFile)
    print "The URL is " + config.get('Section', 'url')
else:
    print "URL not set. Please edit " + confFile
    if not os.path.exists(confDir):
        os.makedirs(confDir)
    config.add_section('Section')
    config.set('Section', 'url', ' ')
    with open(confFile, 'wb') as confFile:
        config.write(confFile)

Of course, if this is a GUI app this is still a bit much for the user. You might want to implement a preferences window.


PHP version on Ubuntu Server 14.04.4 LTS

At http://cdimage.ubuntu.com/releases/14.04.4/release/ there are ".list" files with the list of included packages in "Ubuntu 14.04.4 LTS (Trusty Tahr)". As is explained in the "Ask Ubuntu" answer, by the user g_p, to the What is the point of the ".list" files on the releases.ubuntu.com pages? question, those .list files "(...) lists all the files and packages present in the iso file."

The relevant ".list" file for the files and packages contained in the Ubuntu Server 14.04.4 LTS (I assume that you're talking about the 64-bit version) ISO is http://cdimage.ubuntu.com/releases/14.04.4/release/ubuntu-14.04.4-server-amd64+mac.list

By opening that ".list" file, we see that the PHP (PHP5) ".deb" packages listed are in version 5.5.9 (the version in the "php5" package itself is probably the best indicator). So, "5.5.9" would be the version included in that release.

Below, for reference, I include some of the packages included in that ".list" file:

  (...)
  /pool/main/p/php5/libapache2-mod-php5_5.5.9+dfsg-1ubuntu4.14_amd64.deb
  (...)
  /pool/main/p/php5/php-pear_5.5.9+dfsg-1ubuntu4.14_all.deb
  /pool/main/p/php5/php5-cgi_5.5.9+dfsg-1ubuntu4.14_amd64.deb
  /pool/main/p/php5/php5-cli_5.5.9+dfsg-1ubuntu4.14_amd64.deb
  /pool/main/p/php5/php5-common_5.5.9+dfsg-1ubuntu4.14_amd64.deb
  (...)
  /pool/main/p/php5/php5_5.5.9+dfsg-1ubuntu4.14_all.deb


Stuck at initramfs after system update(ubuntu 20.04)

Okay, the same happened to me installing Ubuntu for the first time (dual booting with windowz) ...
I have not resolved it. I reinstalled openSUSE which worked as normal with the correct grub list appearing, but because I really want Ubuntu.
I tried again and again only a ">grub" appears and the the initramfs. This solution on askubuntu worked for me to repair the file system: Busybox initramfs again and again
But still at startup only grub> prompt.
I then typed 'exit' and windows boot manager appears with options, I chose the 2nd and the ubuntu grub menu appeared and I could start. It's not handy but a workaround till I find the solution.


Dual Booting windows after installing ubuntu

Yes, and don't fear nothing is going to happen to your ubuntu. I myself dual-booted windows10 with ubuntu last month.
First, there are plenty of video on youtube.
Things to notice:

use GParted or something-else create some space below your boot/EFI and install windows there.

Windows create MSP partition(why I don't know) of about 16-100MB, which if you touched then your windows will not boot. (it happened with me)

when you install windows MSP will be above your C drive (like in my case it's sda2 - MSP and sda3 - C). Now I will suggest you to install windows in an empty partition above your ubuntu partition otherwise that MSP will give you the following troubles which can be sorted using paid software
-- you can't move or resize MSP which implies that if it is in between ubuntu and windows partition then you can't resize them.
(eg. ubuntu --100gb/MSP-16mb/windows--100gb, now if you want to shrink ubuntu and extend windows you can't do that)

If you have to make bootable USB of windows I will suggest woeUSB terminal because I think its GUI have some bugs so go with the terminal.

if any question feel free to ask in comments.


How can I add the current GPU usage to my menu bar as a percentage?

Such a question is very (OS version / GPU hardware / graphics driver) specific as solution varies

If you install   https://extensions.gnome.org/extension/120/system-monitor/

there is a GPU setting in Preferences -> DisplayStyle -> both

________________ Only Nvidia GPUs supported so far ________________

Currently on 19.04 here is an error with above install here is work around ... download https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet/archive/master.zip

which will give you ~/downloaddir/gnome-shell-system-monitor-applet-master/system-monitor@paradoxxx.zero.gmail.com/

cp -rp ~/downloaddir/gnome-shell-system-monitor-applet-master/system-monitor@paradoxxx.zero.gmail.com  ~/.local/share/gnome-shell/extensions

so it results in

ls -la ~/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com/

install upstream packages

sudo apt-get install chrome-gnome-shell
sudo apt-get install gir1.2-gtop-2.0 gir1.2-networkmanager-1.0  gir1.2-clutter-1.0

to engage issue   alt-F2  then type r in popup


How to disable 'Tap to click' on the login screen

Have a look at this post also in askubuntu:

How do I disable the touchscreen drivers?

Basically, you got 2 shots:

Edit the /usr/share/X11/xorg.conf.d/10-evdev.conf file and adding "Ignore" "on" to the end of the section with the touchscreen identifier
Disable the xinput device (xinput disable <number of device>)

Regards


Using synergy between mac os x and ubuntu 12.04

as it turn out, somehow when I tried to ping my ubuntu from my mac it gave me destination host unreached. so after a little bit tinkering ,change the ip address of both computer and make sure that both can ping each other and viola, it worked. synergy that i used is the latest version using mac lion and ubuntu 12.04

so summary:

make sure that your mac and ubuntu understand each other that is can ping each other
using the latest version of synergy
synergy version for both ubuntu and mac MUST BE the SAME


Prevent a specific USB device from auto-mounting

Using the terminal and gedit

First find the ID for your device from a terminal using lsusb when your device is connected (eg 0951:1692). Also you should to find what is the name of your device with lsblk. Let say the name is /dev/sdb1.

Create a new script, let say unmount.sh in /lib/udev with sudo -H gedit /lib/udev/unmount.sh and put next lines inside:

#!/bin/bash

udisks --unmount /dev/sdb1
udisks --detach /dev/sdb

Save the file, close it and make it executable with:

chmod +x /lib/udev/unmount.sh

Now, you must to make a new rule file in /etc/udev/rules.d/ with sudo -H gedit /etc/udev/rules.d/100-unmount-iphone.rulesand put a new rule in there like this:

ACTION=="add", ATTRS{idVendor}=="0951", ATTRS{idProduct}=="1692", RUN+="/lib/udev/unmount.sh"

To reload udev rules without restart, use next command:

sudo udevadm control --reload-rules

Using Cuttlefish

Or, another way is to install and use Cuttlefish  - a simple tool that realises reflexes on your computer.


How to access Ubuntu One server side logs for my account?

The syncdaemon.log (in ~/.cache/ubuntuone/log) provides that info too. If you want to have access to server side logs, you should contact U1 team at https://one.ubuntu.com/support/contact/


You can also try apt-mirror method. For example a line in your /etc/apt/sources.list could be:

deb mirror://mirrors.ubuntu.com/mirrors.txt zesty main restricted


How can I use a wacom intuos graphics tablet and mouse simultaneously?

It seems like this question on unix stackexchange might provide some insight.
I'm just gonna copypaste the content from there, since I don't see how to improve upon the answer given, and since I cannot mark as duplicate as the question exists on a different exchange. Based on Krita's documentation, the configuration seems rather limited when it comes to choosing input devices, so you might have to go for the latter option of multiple pointers.
So here's derobert's answer:
Personally, I found it easier to leave it the way you currently have it, especially with switching GIMP to single-window mode. But I only randomly play with my Wacom tablet, not use it seriously. That said:
Don't affect the pointer
You just need to use xinput to float the inputs that you don't want to move the core pointer (mouse pointer).
Here is what xinput looks like with my Bamboo tablet:
anthony@Watt:~$ xinput list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech USB-PS/2 Optical Mouse           id=9    [slave  pointer  (2)]
⎜   ↳ Wacom Bamboo 16FG 6x8 Pen stylus          id=11   [slave  pointer  (2)]
⎜   ↳ Wacom Bamboo 16FG 6x8 Finger touch        id=12   [slave  pointer  (2)]
⎜   ↳ Wacom Bamboo 16FG 6x8 Pen eraser          id=14   [slave  pointer  (2)]
⎜   ↳ Wacom Bamboo 16FG 6x8 Finger pad          id=15   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ USB-TMU-V3                                id=10   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=13   [slave  keyboard (3)]

As you can see, the Wacom tablet shows up as a bunch of different pointer devices. The 'pen stylus' and 'pen eraser' are the two from the pen; 'finger touch' is using it as a touchpad; 'finger pad' is the mouse-like buttons on the tablet itself (not the pen).
To float one, just use xinput float «id». E.g., xinput float 11; xinput float 14 would make the pen (both stylus and eraser) no longer move the mouse pointer.
Next, you'll have to go to GIMP's Preferences, Input Devices, Configure Extended Input Devices and configure GIMP to handle the stylus and eraser. Similarly, you'll have to configure Inkscape, etc.
Multiple Pointers
An alternative thing you can do with xinput is to create a second (third, etc.) "master", and attach the input devices there. Then you'll have multiple mouse pointers. Not all apps know what to do with this.
anthony@Watt:~$ xinput float 12
anthony@Watt:~$ xinput create-master 2nd
anthony@Watt:~$ xinput list
⋮
⎡ 2nd pointer                                   id=16   [master pointer  (17)]
⎜   ↳ 2nd XTEST pointer                         id=18   [slave  pointer  (16)]
⎣ 2nd keyboard                                  id=17   [master keyboard (16)]
    ↳ 2nd XTEST keyboard                        id=19   [slave  keyboard (17)]
⋮
xinput reattach 12 16


Microsoft office incorrectly claims non office files

Correct me if I'm mistaken, but I think this will only affect files you open from nautilus (or other file managers), since the system opens files with given programs, like you would do from a terminal.


You can try sudo dpkg --configure -a.

Another solution would be:

sudo apt purge libsystemd0 libudev1
sudo apt install libsystemd0=237-3ubuntu10.33
sudo apt install libudev1=237-3ubuntu10.33


Using Apple Thunderbolt 2 Ethernet adapter on Ubuntu 20.04

If sudo lshw -C network is correctly showing that the Thunderbolt 2 to ethernet adapter as ens9, then your /etc/netplan/*.yaml should look like this...
network:
  version: 2
  renderer: networkd
  ethernets:
    ens9:
      dhcp4: true
      optional: true

sudo netplan generate
sudo netplan apply
reboot


I want to change the resolution to 1600x900

Go to system settings then software and updates.
In software and updates, you will get to see additional driver
option.
You can search it from here. Select appropriate driver and apply
changes.

If this is not work you can install it from command line.

You can install NVIDIA driver with command line:

Install/Upgrade to NVIDIA 340.65 in Ubuntu 15.04 / 14.10 / 14.04

sudo add-apt-repository -y ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-340

If this is not work then try this

sudo service lightdm stop

(open a terminal with F1)

sudo apt-get purge nvidia*
sudo add-apt-repository -y ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-340
sudo service lightdm start

For more information check this link


How to calculate total file sizes from a new-line delimited list stored in variable?

You can use du:

du -c $(echo "$VAR")

This will not work when the file names contain spaces.

Use this:

while IFS= read -r f; do
    du "$f";
done < <(echo "$VAR") \
| grep -o "^[0-9]*" \
| paste -sd+ | bc


Is ZFS on Ubuntu 20.04 using a ton of memory?

ZFS will cache data and metadata so given a lot of free memory this will be used by ZFS.  When memory pressure starts to occur (for example, loading programs that require lots of pages) the cached data will be evicted.  If you have lots of free memory it will be used as cache until it is required.

You can use the arc_summary tool to see the resources used by the ZFS ARC (adaptive replacement cache)


Yes its called dual-booting see here how to dual boot http://lifehacker.com/5403100/dual-boot-windows-7-and-ubuntu-in-perfect-harmony


Screen turns black after booting, backlight only works in recovery mode on an Acer Aspire 5736z

Backlight sometimes gives problem due to grub misconfiguration. You need to edit the grub and edit it. Here is what you have to do.

As root edit /etc/default/grub
Change the line GRUB_CMDLINE_LINUX="" to GRUB_CMDLINE_LINUX="acpi_osi=Linux"
save the file
and then sudo update-grub and reboot.

That will solve your problem.


The question changed considerably

New Answer

The TITLE Question

  As a new Ubuntu desktop 18.04 LTS user, do I need to use ufw for a
  firewall or is iptables sufficient?

Most home Ubuntu users don't need to or use ufw. Both ufw and iptables are installed by default and are configured to do nothing. Why there is no need, is explained in more detail below.

The Other Question 1:

  So say I take the above statement literally, then is the following
  statement true?:

  iptables is the built in firewall for Ubuntu Desktop and is fully
  configured and up and running out of the box with default rules that
  are sufficiently secure for the average desktop user namely deny
  (incoming), allow (outgoing).

The statement is false

The statement is actually two statements joined by and. So if just one part of the whole statement is false, then the whole statement is false. Let's break it down:

  iptables is the built in firewall for Ubuntu Desktop

The above part is true.

Now let's look at the other part:

  iptables is fully
  configured and up and running out of the box with default rules that
  are sufficiently secure for the average desktop user namely deny
  (incoming), allow (outgoing).

The above part is false.

Default Ubuntu desktop installation has no ports open, and no servers running. Therefore, even though iptables come installed by default in desktop Ubuntu it is not configured to do anything. That is, the default firewall has not rules set.

Thus, iptable is configured to do nothing when you install Ubuntu.

The Other Question 2:

Explanations for nmap and gufw image (I think this is what you want)

Your nmap shows the only two open ports are open to 127.0.0.1. This is a special IP address that refers to the computer itself. That is, the computer itself can talk to itself using these two open ports.

The gufw screenshot shows that there is no firewall rules setup. However, since you installed gufw and clicked on it, ufw is also installed (gufw uses ufw) and ufw is active. The default ufw configuration you mentioned above, deny (incoming) and allow (outgoing) is working. However, these rules don't apply to the computer itself, that is 127.0.0.1. This is (not necessary but) sufficient for a home user.

Original Answer ==>

Average home users don't need a firewall

Default Ubuntu desktop installation has no ports open, and no servers running. Therefore if you don't run any server daemon, such as ssh server, you don't need any firewall. Thus, iptable is configured to do nothing when you install Ubuntu. See Do I need to activate the firewall? I only use Ubuntu for a home desktop use? for details.

If you run servers you need a firewall

If you are not an average home user, and want to do some advanced things, such as remotely access your desktop by ssh or run some other services, then you need a firewall. Your configuration of the firewall will depend on which server daemons you plan to run.

Even if you don't plan to run a server you may want a firewall with the default configuration of deny all incoming connections from all ports. This is to be doubly safe, in case, one day you want to install and run a server without realizing what you are doing. Without changing the default firewall configuration the server won't work as expected. You will scratch your head for hours before remembering that you activated the firewall. Then you may want to uninstall the server software, as it may not be worth the risk. Or you may want to configure the firewall to let the server work.

gufw is the easiest

gufw is a GUI interface for ufw, which in turn configures the iptables. Since you have been using Linux since 1990s, you may be comfortable with the command line or you may prefer the visual cues of a GUI. If you like a GUI, then use gufw. It is easy to understand and configure even for a novice.

ufw is easy

If you like the command line, ufw is easy enough.

iptables is not so easy

The reason we don't want anyone to fiddle directly with the iptables, and use ufw or gufw is because, it is very easy to mess up iptables and once you do, the system can break so badly that it may be unusable. The iptables-apply command has some built-in safeguards to protect the users from their mistakes.

Hope this helps


First time using Ubuntu, a few questions

I've never seen a BIOS that can boot from an SD card, but if it's present in your boot options menu (varies per system), then go for it! Just burn the ISO using tools like Universal USB Installer.

If, however, your BIOS doesn't, then you'd have to find a USB reader for your microSD to burn the ISO and boot from it.


Unable to install 32bit libraries for Android studio

You can try adding the 32bit architecture in dpkg - sudo dpkg --add-architecture i386, or you could try editing your /etc/apt/sources.list file, adding the Ubuntu 12.04 repository, and running sudo apt-get update.


On Unity: What can replace Gnome 2 system monitoring in the top Panel?

Exactly like old gnome indicator: http://www.webupd8.org/2011/05/network-memory-and-cpu-usage-indicator.html#more

Note from the link: Once installed, launch System Load Indicator from Dash. Unlike the old gnome applets, this is how to add those indicators to the panel.


Try:

gsettings set org.gnome.desktop.media-handling automount-open 'false'

But this will also break automatically opening Nautilus when you insert removable media.


Can I dual-boot Windows 10 and Ubuntu 14.04 on 2 hard drives?

Install Windows first and Ubuntu second. Ubuntu will install a bootloader automatically. If you have two hard drives, you can choose on which to install the bootloader during installation of Ubuntu. Make sure to boot from this one. You can choose which hard drive to boot from in the bios settings.


The system network services are not compatible with this version. Ubuntu 14.04

The reason was in absent config file. It was renamed to "network-manager.conf.orig". After removing ".orig" from the name - network manager starts normally.


What is the command line statement for changing the System clock?

To set the time in Ubuntu from the terminal, you can use the following command:

sudo date new_date_time_string

where new_date_time_string has to follow the format MMDDhhmmyyyy.ss which is described below:

MM is a two digit month, between 01 to 12
DD is a two digit day, between 01 and 31, with the regular rules for days according to month and year applying
hh is two digit hour, using the 24-hour period so it is between 00 and 23
mm is two digit minute, between 00 and 59
yyyy is the year; it can be two digit or four digit
ss is two digit seconds. Notice the period . before the ss.

Source: Manage Time in Ubuntu Through Command Line.

So, in your particular case, you can use:

sudo date 010224311971.59

Or, you can use:

sudo date --set="1971-01-02 23:31:59.990"  && date --rfc-3339=ns

which is exactly what you asked.

Source: https://serverfault.com/a/338395/181186.


Ubuntu 16.04 Kernel 4.4.0-64-generic freezes after login screen

I worked around this issue by using an older kernel, which isn't crashing. I'm sure it is a bug and will eventually be fixed in the future.

Edit:
Looks like it was reported already and worked on:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1666421

I also experience the problems since the 4.4.0-63 release and with rtl8192cu
This has nothing to do with nvidia, since i can confirm a case where no nvidia card is present and no nvidia driver was installed.


Why newer Ubuntu versions are slower in performance?

There is a lot of missing details here.

To be able to be more specific and maybe give you solutions you need to give us the brand and model of the Laptop.

Quick Answer : Search for your computer brand and model with ubuntu/xubuntu.

Some generic answers can be made to your questions:

  Why my WiFi is slower in Ubuntu 13.04 than windows 7?

This is weird, you should not have that kind of trouble with Ubuntu. Have you tried with the latest Ubuntu ? If not search for your trouble and specify the brand/model of your wifi adapter (you can have it usually by typing lspci on a terminal)

  Why performance speed is slower than windows 7?

If you are talking about the boot time: there is some hardware functions that are not yet well supported by Linux and others that are exclusive to Windows (Like some cache accelerator technology). However the lack of those technology impacts mainly only the boot time and not the performance.
If you are talking about using it and it seems slower: Ubuntu has made a technological choice by preferring User Experience to Performance. Unity is a development made by Ubuntu to fulfill that purpose. If you are more focused on having performance, install XUbuntu instead of Ubuntu. It uses XFCE that is more optimized than Unity or Gnome 3.

  Why Ubuntu > version 10.x is slow?

Maybe you'll find your answer in what I've already written.

You must also know that, by looking your CPU kind, you must have the latest version "13.04". Intel has changed a lot of things since that CPU model got out. If your computer is recent then you have the latest chipset of Intel witch changes a lot of things. One of them is the possibility to have two graphic cards : the Intel one and the amd or nvidia one. The Intel one is normally for common use and the other is for 3d. This choice is made by the drivers.

While the Intel graphic card is well supported, the amd or nvidia is still badly supported by open source drivers. You must look about how to install the proprietary drivers of your graphic card.

The 10.X part of your question can be explained with that before there weren't nvidia drivers with the ubuntu and then you used only the Intel GPU. Now you are using the Nvidia one but with slow drivers.

  Why Ubuntu newer version consume more laptop battery energy? Is these problems are due to unity? I notice Gnome is faster than unity.

Your power consumption is surely due to the use of your amd/nvidia graphic card with Intel GPU behind. I don't remember the name for amd but take a look if you have optimus (nvidia) technology. If yes you must configure bumblebee

Unity and Gnome 3 have the goal to give good user experience by using your GPU most of the time. Try Xubuntu if you want something that is faster and with the same old interface. Unity and Gnome 3 will tend to use lot more power consumption (due to it's heavy graphic use)


No DisplayPort/HDMI Audio options in sound settings.

According to this Intel Forums thread, your Q45/43 chipset does support audio through DisplayPort, so that isn't the problem.

The marked solution says something rather important I think:

  The problem stems from the fact that I have a Passive DisplayPort-to-HDMI adapter with an older onboard DisplayPort. What I needed to include audio and video was an Active DisplayPort-to-HDMI adapter.

Since you haven't specified (and I don't blame you for not thinking about this), I have to assume that you have a passive adapter. You should get ahold of an active version.

Something like this: https://www.amazon.com/Cable-Matters-DisplayPort-Supporting-Technology/dp/B00EDT0072


Booting straight into the terminal means running in the text console. Technically, this console (/dev/console, /dev/tty1, /dev/tty2 and the likes) is just provided by another terminal emulator.

Real terminals like the famous VT100 used to be connected to computer through serial lines but are now essentially history.

About the kernel editing restriction, I guess you misunderstood what was told by the Linux engineer. Obviously, nothing prevents you to edit a file whatever the terminal emulator used. However, if you want to see console messages while experimenting with a custom kernel, that makes more sense.


Cannot access Ubuntu server using SFTP. No writing perms?

Found the answer, and it's here.

In a nutshell, you have to set the directory permissions:

Create a new www group and assign your ubuntu user to it:

sudo groupadd www
sudo usermod -a -G www ubuntu

Change the group ownership and directory permissions:

sudo chown -R root:www /var/www
sudo chmod 2775 /var/www
find /var/www -type d -exec sudo chmod 2775 {} \;
find /var/www -type f -exec sudo chmod 0664 {} \;

For it to work you have to log out and log in again after that.


Yes, it will take a while to partition - up to 5+ hours (see the forum linked). Just wait. The CD isn't needed in this section, it has already loaded. The hard drive should be whiring though.


http://www.ubuntu-guia.com/2012/10/instalar-controlador-nvidia-en-ubuntu.html

The blog is in Spanish, translate it with goole please.
It is very good blog about ubuntu


What data does the Software Centre use to give you recommendations?

APT, or Advanced Packaging Tool, basically resolves dependency problems and retrieves the requested packages. It works with dpkg, another tool, which handles the actual installation and removal of packages (applications). APT is very powerful, and is primarily used on the command line (console/terminal). There are, however, many GUI/Graphical tools to let you use APT without having to touch the command line.

Synaptic is one of the GUI/Graphical tools to use APT. This is what Synaptic Package Manager's website has to say about the same -

  Synaptic is a graphical package management program for apt. It
  provides the same features as the apt-get command line utility with a
  GUI front-end based on Gtk+.

So basically both Synaptic and the Terminal do the same thing, ie use APT, with a different interface (GUI and CLI respectively).

This is what the Ubuntu Wiki page on Software Center recommendations states -

  Data we can use

  The current data we have about people we have is:

  what all other people have installed (new recommender service / popcorn)
  what all other people are using (zeitgeist/new recommender service/popcon)
  what specific apps other people like or dislike (rnr)

  The data we have about the users system is:

  what apps the user has installed
  what apps the user is using (popcon/zeitgeist)
  what mimetypes the user is working with (zeitgeist)
  maybe the SSO ID of the user
  maybe what apps the user likes (based on his/her reviews)
  the user's contacts

Now what is funny about this is the use of the word maybe which makes things a bit sketchy.

Basically what the recommendation server does is that it stores a list of packages installed on the system. Whether it was installed by the software center, synaptic or the terminal is immaterial here since it most probably uses dpkg or APT for the same. I can say this because I haven't used the software center but still get recommendations based on the packages I have installed via the terminal.

  Storage

  The server stores the list of each participant's installed packages, and a cache of the recommendations generated for them.

  Serving

  When sent a request containing the UUID, the server returns a Json list of packages representing the recommendations for that UUID.

  There will be a REST API call that involves the UUID and that will return the recommendations in some format that s-c can understand.

Ultimately, the Software Center is also a GUI/Graphical tool for APT.

However, a few of the points you have raised come under the category of Unresolved Issues and no information is given as to how the recommendations exactly work, ie the algorithm.

  Unresolved issues

  How do we cater for people whose computer is used by multiple people? Should we add local username to the UUID to ensure it's unique (when
  some or all of the users don't have an SSO account?

  It's an interesting question what people would expect here. If I have a dedicated game machine and productivity machine then we should have two different recommendations. If OTOH I have a laptop and a desktop that I use for the same things the recommendations should be the same. Hopefully the system can work it out from the context.

  Does the algorithm take software ratings into account as well as whether it is installed? Is it less effective if someone has never rated software
  themselves (i.e. Users without an SSO account)?
  What if someone reinstalls Ubuntu?

  So we should probably do periodic "ping" (even if the system does not install/remove software a ping to tell the server that its still in use) with the UUID to be able to remove no longer valid UUIDs over time.

  One interesting point though is bootstrapping the dataset, that is, what recommendations to serve until we have a reasonable amount of data on the server. In the case of recommendations based on reviews we already have a decent amount of reviews up there to start review—based recommendations. For recommendations based on installed packages otoh, we'd need to start receiving data for a while before we can start
  making useful recommendations.

It is best to contact the developer(s) or the team at Canonical who have designed the software center recommendations for the most accurate answer.

That said, I feel that the recommendation system is not that intelligent as it recommends popular packages, which many other users have installed, rather than lesser known but similar packages, which may actually be of more relevance to the user.


The error you are seeing

  /usr/bin/install: cannot create regular file ‘/usr/local/bin/geeqie’: Permission denied

means that the installer does not have enough permissions to write to the folder in question - i.e. /usr/local/bin

This is expected.  Ordinary users should never have the right to directly write to this folder.

You need to give the installer elevated privileges - this is done by using sudo

sudo is available to accounts that have administrator rights.

Thus, if you do run the installer thus:

sudo make install

this will install the application into /usr/local

You should then be able to run the application.


Upgraded to Ubuntu 14.04.1, can't access some websites (403 forbidden)

After checking the logs, looking at directory permissions, making sure various DMS db configs hadn't changed, etc, I looked at /etc/apache2/apache2.conf, which apparently I had allowed to be overwritten during the upgrade. The <Directory> sections are more restrictive than what I had, since I have different CMSs in non-standard locations, NOT /var/www/. Those were the sites that wouldn't let me in. Adding in directives for them (and using the new "Require all granted" syntax) & restarting Apache solved it.


Ubuntu server: ssh is showing in process but does not work

PID/Program name is blank because you are not running as root, try,

sudo netstat -tupln

You can ssh localhost to check if the sshd is working. Check the firewall afterward.

EDIT:

After looking into the syslog I realised that the server was blocking inputs from eth1. So what I did was use

sudo ufw allow 22

and accept inputs from this port.

I don't know why it worked before and stopped. And this is the first time I enabled this port to get ssh working. But this did the trick.

Many thanks to neo and gertvdijk for the inputs.


Undervolting Ivy bridge core i7 laptop with Ubuntu 16.04 - TLP & PHC not suitable

So if PHC (and therefore TLP?) can't be used to undervolt

… then no one is working to support it and it can't be done – yet, probably never. To my knowledge PHC and TLP are independent projects they just complement each other in some setups.

Here is a description from the Arch wiki about PHC:

  PHC is an acpi-cpufreq patch built with the purpose of enabling undervolting on your processor.

Also note there has never been a guaranteed result, according to the PHC website:

  This is possible because we utilize the production tolerance of a CPU.
  CPUs have different production qualities so the vendor defines voltages every CPU -even those with low quality- will work with.
  If your CPU is of higher quality you can easily run it with lower voltages without getting unstable.

Wikipedia explains what P-states are: a range of states that define clock frequency and power consumption, which includes voltage scaling, e.g. under or overvolting (boost).

  These states are implementation-dependent.

Read this like: when Intel introduced "P-states" they implemented a design to take more control over dynamic frequency and voltage scaling, handing over control from the OS or user back to the CPU. Early implementations of this technology – if you remember – only allowed the OS to tell a "dumb" processor to not run at full clock speed all the time. Intel went further with Skylake introducing Speed Shift and with that taking away even more control over the processor from the OS/user in order minimize delays and squeeze as much performance and energy consumption out of their current designs with the state of the art.

Edit: This sounds like a praise of Intel and you might argue that a user should still have control over these parameters. Consider this from Intel's perspective: absolute control over the product. They also removed the option to choose a CPU clock multiplier on their mainstream models and only enable it on the expensive models.


How to install and configure awesome wm on ubuntu server 16.04

It'll pull everything in automatically, but there is an unfulfilled dependency on libcairo-gobject2 which will show up in ~/.xession-errors if it's needed.

Also if you do not add a login manager you might have to do a little more. I use Slim which just needs /etc/slim.conf to use:

login_cmd           exec /bin/sh - ~/.xinitrc %session
#login_cmd           exec /bin/bash -login /etc/X11/Xsession %session
#login_cmd           exec /bin/bash -login ~/.xinitrc %session

And ~/.xinitrc (but maybe this should use the session passed by Slim)

#!/bin/bash
exec awesome


Do I need to install Security updates for Ubuntu base?

It is important to install the latest security updates to help protect your system.

Ubuntu base is the collective name for the tools and services and core parts of the Operating System and the following applies equally to any software installed, including what is categorised as Ubuntu based as mentioned in the question.

There are situations where NOT installing security updates may be favourable, but these cases must be evaluated on an individual basis and beyond scope of this question, therefore we should fall back to the official advice from https://wiki.ubuntu.com/Security/Upgrades

  Keeping your computer's software up to date is the single most
  important task for protecting your system. Ubuntu can alert you to
  pending updates, and also be configured to apply updates
  automatically. Security updates for Ubuntu are announced via Ubuntu
  Security Notices (USNs).

The Security Teams Update Procedure page has a little info on what the secruity updates are (to help understand why they are considered important):

  We only fix bugs in our stable releases which truly affect overall
  system security, i. e. which enable an attacker to circumvent the
  permissions configured on the system, or are a threat to the user's
  data in any way. Most common examples:

  Buffer overflow in a server process which allows to crash it (denial of service) and/or to execute attacker provided code
  (privilege escalation).
  Insecure temporary file handling which allows race condition and symlink attacks to delete unrelated files with the invoker's
  privileges.
  Non-working security-relevant configuration options (e. g. iptables would allow packets which should be blocked, or a server's ACL option
  does not do the right thing).
  Less critical bugs (like Denial of Service vulnerabilities in instant messengers or email applications) are also fixed usually, but
  with lower priority.


Disk usage for the same drive shows 20K in the host and 16G in the container

The reason is, the host has access to the mounted drive, the container does not. This is because there is nothing mounted at /mnt/SSD in the container. So the host accesses and stores data on the SSD (/dev/nvme0n1) when it goes beyond /mnt/SSD while the container does access a directory on its root disk (/dev/mapper/sifr--vg-root).

To have this in the container you need a bind mount and you may let create a directory in the file system of the container. To do so you need to add the create=dir option in the fstab of the container:

/mnt/SSD      /moint/point/in/the/container    none   bind,create=dir

>

  create=dir (will do a mkdir_p on the path)
  create=file (will do a mkdir_p on the dirname + a fopen on the path)


You can also do this without the terminal (You've probably already done steps 1-3):

Open the Ubuntu Software center.
Edit - Software sources - Other Software - Add
In the field "APT Line" type deb http://repo.acestream.org/ubuntu/ trusty main
If you're a developer and want the source, uncheck the binaries.  If you're a user (most probably) uncheck the "Source Code" one.
Then download the http://repo.acestream.org/keys/acestream.public.key in a location you'll remember for the next step.
Go to the authentication tab and import the key file from the previous step.

Done!


uGet Chromium integration not working after upgrading to Ubuntu 14.04

We are aware of the issue with the extension. This an issue created by Google when they chose to break the functionality of NPAPI.

We are working on a replacement extension to compensate for the changes. In the meantime, the clipboard monitor should suffice as a temporary replacement.


The following is adapted from the OP's comment. It is a very similar technique, but not in the OP's own words.

Install dconf-tools :

sudo apt-get update && sudo apt-get install dconf-tools

Open dconf Editor by pressing Alt+F2 and running dconf-editor (Or run it in a terminal.) or search for it in the Unity Dash.
Go to:

  setting → org → gnome-settings-daemon → peripherals → touchpad

Set the key touchpad-enabled to true.


How can I lock AND blank the screen from the keyboard in 14.04?

Open System Settings and navigate to Keyboard -> Shortcuts. Open the "System" section, click on "Lock screen" and press Backspace. This will disable the system lock screen shortcut.

Now click the + button. A dialog will pop up asking for your input. Add a custom name and put:

gnome-screensaver-command -la

in the "command" field.

Click "Apply". Now click "disabled" next to the shortcut you just created and press the key combination you want to use to lock and blank the screen.

You're done!


Firebird port is closed by default

You need to modify  RemoteBindAddress in /etc/firebird/2.5/firebird.conf

from

  RemoteBindAddress = localhost

to

  RemoteBindAddress =

also telnet neets to be for port 3050

  telnet localhost 3050

more about securing firebird on ubuntu

http://mapopa.blogspot.ro/2011/04/securing-firebird-25-superclassic-in.html


I get a error "IndentationError: unindent does not match any outer indentation level"

I think you should have your code like

<TAB> self.refreshbutton = self.builder.get_object("refreshbutton")
<TAB> def on_refreshbutton_clicked(self, widget):
<TAB> print "refresh"

in your editor give a TAB everytime while entering in a new line.

Ok @Shaun

I think your code should look like

frank@FRANK-NATHE:~$ cat h.py
self.refreshbutton = self.builder.get_object("refreshbutton")
def on_refreshbutton_clicked(self, widget):
    print "refresh"

so don't use a tab for the 1st and 2nd lines and then use a tab for the 3rd line

If you still get confused then


How can I add a link to a folder / hard drive to the Ubuntu dock?

Not without terminal, but by using a modified* version of pomksy's answer to this question, I got what I wanted:

creating and opening a desktop file:

gedit ~/.local/share/applications/hd1.desktop

adding nautilus file explorer with the location:

[Desktop Entry]
Name=hd1
Exec=nautilus /media/username/hd1
Icon=drive-harddisk
Terminal=false
Type=Application
Categories=GNOME;GTK;Utility;Core;FileManager;

search for "hd1" in dash, find it, rightclick and "add to favorites".

* modified, because it's leftclick - and a different Icon.


cannot open snap apps - "cannot perform operation: mount --rbind /dev /tmp/snap.rootfs_9Cf5Oo//dev: no such file or directory"

I struggled with this same problem for a long time, and finally managed to solve it. The problem was because of my own setup, so it might not be applicable in you case, but maybe it'll point you in the right direction.

The problem seems to be that snap doesn't like having different things symlinked to different devices.

In my case, the problem was that my /var partition really was a symlink to /mnt/var. I had the correct mount point /var set in /etc/fstab, but of course fstab followed the symlink as well, and mounted the device to /mnt.

For me, the solution was to just rename the symlink with sudo mv /var /var.BAK, create an empty mount point with sudo mkdir /var and reboot. /etc/fstab now mounts the device directly to /var, and snap works like a charm.

So, try and do ls -l / and check that var is a directory and not a symlink (which would read for instance var -> /mnt/var). Also  check that other directories snap might use (/tmp, /var/tmp, /var/snap, for instance) are real directories and not symlinks.


#!/bin/bash

testNet(){
        nc -zw 1 $1 $2
        if [ "$?" -eq "0" ]; then
                echo "$1 was listening on $2"
                echo "$2 was open on $1" >> scan_report.txt
        else
                echo "$1 was not listening on $2"
        fi

}

for host in $(cat hostfile); do
        for port in $(cat portfile); do
                testNet $host $port &
        done
done
sleep 2
cp scan_report.txt sorter
cat sorter | sort > scan_report.txt
rm sorter

Explanation:

The bulk of the "lifting" is inside of a function so that it can but run in parallel with &. This will spawn a subprocess for each host and port in your test, and not make you wait the sum of every one second timeout from the nc command. While the nc command is happening, the primary script will continue. This shouldn't pose a problem in terms of resources, because each process is going to last a maximum of one second due to the timeout.

As for what's going on, first it's reading one host from the hostfile, then it's reading each port from the portfile. It combines each host with each port and passes it to the testNet function, which executes the nc command and determines whether the connection was successful by checking the status output variable $?, which returns "0" for success. Anything else is interpreted as a failure.
the >> redirector ensures that each result is appended to the file, and doesn't completely overwrite it.

Finally, at the end of the script, the result is sorted alphabetically and sent back to the file.

This assumes that hosts are either raw IP addresses or FQDN's, and that ports are just numbers like "22". if you wanted to test every port over a range and not have to list them out line by line, you could replace for port in $(cat portsfile); do with for((i=1;i!=20;i++)); do which would test every port from 1 to 19 (replace 20 with the desired max and 1 with the desired minimum).


Wifi on Lenovo P1 with Ubuntu 18.04 no longer works

Try to install the HWE kernel which may include newer stable drivers for your hardware and reboot.

Open a terminal window, then run the following command.

sudo apt install --install-suggests linux-image-generic-hwe-18.04

Hit ENTER if asked about installing new packages, wait until the installation is done, then reboot.

sudo reboot

I hope it helps :)


Install VirtualBox image as operating system

I'm a little surprised with the question - tenuous link to Ubuntu.

Anyway,

the easiest virtual-to-physical (v2p) and physical-to-virtual (p2v) tool that I use on a day-to-day basis is Symantec's Backup Exec System Recovery tool.

To P2V you would backup the machine using the tool onto an external hard-drive.  Then when restoring, you would boot the virtual guest with the restore tool and reimage into the virtual guest.  Most of the time, the virtual guest will boot without any changes.  You can also use the "hardware changes" part of the toolset to force Windows XP to find drivers during the first reboot.  Once install, install the VirtualBox Guest Additions to complete the virtual hardware device driver install.

To V2P you would do something similar - its often easier since the virtual guest has less "exotic" hardware to deal with.  Once done, go through the device manager and install all the missing device drivers.

More hit-and-miss V2P solution if you dont want to buy the tool, is to go through the virtual windows XP device manager and deinstall every device you can find.  Shutdown the guest and reboot it with an ISO of Clonezilla.  Image off the virtual windows XP onto an external drive.

On the physical machine, boot with a CD of clonezilla and restore the image of windows XP.  If you are lucky, Windows will boot with low graphics available.  Sometimes you need to boot into safe mode and install a few drivers such as VGA and networking.  Sometimes you need to boot the restore physical computer with the Windows XP installation disc and do a repair install.

Similarly to P2V, remove as many device drivers as possible using device manager and do a similar Clonezilla backup before restoring into a virtual guest.


having trouble instaling ubuntu using a usb boot on pc

Format the USB disk and create a boot disk using unetbootin or any other software.. It might help..


I can't install any linux-based OS, as I'm getting the "Kernel panic - not syncing" error. Photo

For anyone having this problem, while botting you can press  which will get you into a menu. You gotta press  and then select . The Ubuntu installation will then boot.


GParted can't move extended partition to the right?

Extended partitions are like containers for logical volumes. But unfortunately, you can't just move the whole container.

Maybe it helps if you imagine partitions as cardboard boxes. A primary partition is a standard box and logical volumes are like little boxes that have to stay inside an extended partition. Now the interesting thing is how the extended partition would look like as box: It would be a box without a bottom!

It covers the small logical volumes, so to the outside (e.g. to the MBR partition table which only allows 4 partitions per disk) just looks like one big box, but if you would try to move it and lift it off the floor, all those little boxes inside (logical volumes) would still sit on the same place on the ground. You understand what I want to illustrate to you? By moving an extended partition (which does not work for that reason), you don't move the contained logical volumes.

So the solution to move an extended partition is to first enlarge the extended partition by moving one boundary to cover all the new space it should be moved to, then move all contained volumes to their respective new position, then shrink it again by moving the other boundary so that there's no unassigned space left inside the extended partition.


replace text with part of text using regex with bash perl

perl -pe 's/^(\S+\s+)(\S{10})\S*/$1$2/'

^ matches at the start of the string
\S means non-whitespace
+ means repeated at least once
\s means whitespace
{10} means repeated 10 times

I.e. Keep the first word and the first 10 characters of the following word while forgetting the remaining characters of the second word.
Your pseudoregex has one substantial problem: the {10} is placed in the replacement part, but the replacement is just a string. The regex happens in the pattern part only.


How to get the lost busy cursor when opening file/app back?

Two possible workarounds to this bug:

Install the "gdm" package. The installer will ask what is your preferred login manager, choose "gdm" instead of "lightdm".
Stick to lightdm, but configure your account so as you don't have to type a password to log in. If your home folder is encrypted, no luck, that is not possible. If not, activate the "automatic login" option under the "user accounts" section of the system settings panel.

Note that this solution is not perfect. Only GTK applications will have a busy cursor when launched. Qt and other ones, like VLC and Libreoffice, still won't.


The servers and pools in /etc/ntp.conf were being ignored because the default Ubuntu configuration gives precedence to NTP servers found via DHCP.
There is a script, /etc/dhcp/dhclient-exit-hooks.d/ntp which creates a copy of /etc/ntp.conf at /var/lib/ntp/ntp.conf.dhcp, removes any specific servers and pools requested in the original and substitutes servers found via DHCP.
When /etc/init.d/ntp is run, if it finds a newer configuration at /run/ntp.conf.dhcp it will launch NTP with that. This can be disabled in many ways, but I chose to comment out that behaviour in /etc/init.d/ntp like so:
# if [ /run/ntp.conf.dhcp -nt /etc/ntp.conf ]; then
#       NTPD_OPTS="$NTPD_OPTS -c /run/ntp.conf.dhcp"
# fi

Then delete the DHCP script, reload daemon scripts and restart NTP:
sudo rm /run/ntp.conf.dhcp
sudo systemctl daemon-reload
sudo systemctl restart ntp

Now when NTP is started, the DHCP-discovered NTP servers are ignored and the pools are used to find working NTP servers.
Edit: Updated file paths for Ubuntu 20.04


I've had similar screen flickering issues in Chrome while running Ubuntu 16.04 and with an Intel-based integrated video chipset (i915).

Here's the solution thread that worked for me: https://bugs.chromium.org/p/chromium/issues/detail?id=606152#c72

Note comments #72 and #73. I followed ONLY Step 1 of comment #72 and it appears to have worked. Here's that solution:

  sudo nano /usr/share/X11/xorg.conf.d/20-intel.conf

  Section "Device"
    Identifier  "Intel Graphics"
    Driver "intel"
    Option "AccelMethod"  "sna"
    Option "TearFree" "true"
    Option "DRI" "3"
  EndSection

  restart


Error You might want to run 'apt-get -f install'

Try adding the --fix-missing parameter. As in:

sudo apt-get install -f --fix-missing


Wrote a script that merges answers from @endiras and @muru. Here it is:

import sys
import os
b = int(open('/sys/class/backlight/intel_backlight/brightness').read()[:-1])
print(b)
b += int(sys.argv[1])
print(b)
os.system('echo "' + str(b) + '" > /sys/class/backlight/intel_backlight/brightness')


Adding unallocated parition to an extened parition

Follow the below steps to add 101 GB unallocated space to your Ubuntu /dev/sda5 partition,

Right-click on the /dev/sda4 extended partition and then select Resize/Move option.Move the left arrow to the extreme left so that the unallocated space will comes into the extended partition.
Now the 101 GB unallocated space was combined with the 1.96 GB unallocated space.(101+1.96 GB)
Atlast right-click on the /dev/sda5 to add the (101+1.96 GB) unallocated space to your Ubuntu partition.


Is there a way to turn gvim into fullscreen mode?

The system settings do not work for me on Ubuntu 12.04 (as happens to miloshadzic) because gvim catches the F11 key and does not pass it on to the system.

There is a solution though, that I found in this blog

make sure you have wmctrl installed. If you have that, then add the following to your vimrc:

map <silent> <F11>
\    :call system("wmctrl -ir " . v:windowid . " -b toggle,fullscreen")<CR>

And on save of the .vimrc and restart of gvim F11 now has the desired effect.


How to install canon mf4720w printer in 14.04 LTS?

If you are using linux right now, and open this link, you will find yourself at a canon page where your OS is detected and it will provide drivers for your printer.

Having said that, I feel I need to add that in the past year I've installed several printers of several brands under Ubuntu including but not limited to Canon, Epson and HP, and of these though Epson was the most difficult to install, by far, Canon was the LEAST FUNCTIONAL when installed.  It was a Canon WiFi Printer in which the wifi, though detected, refused to obey commands regardless of whether the orders came from Ubuntu, iMac or Windows.

So if you run into problems, please return it and get an Epson or HP.  I'm happy to make specific recommendations if you are interested.


How to fix Broken label sd card mmcblk0?

You can use the wipe menu of mkusb to create a new partition table and file system. The standard is an MSDOS partition table and one partition with the FAT32 file system. See the following links,

help.ubuntu.com/community/mkusb

mkusb/wipe

Edit:

According to your output from

mkdosfs -F 32 -v /dev/mmcblk0

the device is recognized as a mass storage device. Such a device works best, when there is at least one partition. But you tried to create a file system directly on the device (without a partition structure) like it used to be on floppy disks, and like is is in CD/DVD disks.

You can create a partition table with manual tools, for example gparted, but it is 'automatic' with mkusb. When gparted does not work, I suspect that there are some data, that confuses gparted, and mkusb overwrites those data with zeros (overwrites the first megabyte).


Where can I obtain nightly-builds of LibreOffice?

You can try the PPA available here: https://launchpad.net/~libreoffice/+archive/ppa

The description of the PPA reads as thus:

  LibreOffice test builds and backports

  Most of the packages in this ppa have only experienced minor testing
  -- in fact it is the place to enable a wider audience to test packages before they are published into the distro proper. In general this ppa
  is not for the average user to install without a closer look (if it
  would be, its packages would be in the main repositories).

Refer to What are PPAs and how do I use them? for instructions on how to add the PPA to your computer.


libnl1.1-6 /netlink/genl/genl.h no such directory

The /usr/include/netlink/genl/genl.h header file is contained in the libnl-dev package.
The latest version in the repositories is 1.1-7.

sudo apt-get install libnl-dev will also install the libnl1 library as a dependency.


Install i386 printer driver on an amd64 system?

Okay, this question is a bit old, but since I just bumped into the same thing, I'll post what solved it for me anyway:

I found the solution here:

https://bugs.launchpad.net/ubuntu/+source/cups/+bug/701856/comments/20

Create a directory.
move the .deb files into the directory
open a shell
change dir into the directory

For each package do the following:

1. dpkg -x [package].deb common
2. dpkg --control [package].deb
3. vim DEBIAN/control
4. remove troublesome dependencies from the "Dependency: libc (..." line (or delete it -- move to line than press 'dd' than ESC:x)
5. cp -a DEBIAN/ common/
6. dpkg -b common [package].deb
7. dpkg -i [package].deb
8. rm -rf common DEBIAN

The procedure might seem complicated at first, but actually it is not. The step-by-step instructions are very easy and clear. I got my Brother HL-2250DN working this way.


Cannot copy screenshot to clipboard in Ubuntu 17.10

Ok, problem solved. The problem was with the default wayland used in Ubuntu 17.10 which somehow affected other commands like gksudo and gksu too. When I logged into Ubuntu with xorg, everything worked perfectly!


I think this will work.

Download the .iso of your operating system and make a bootable USB using something like rufus. Boot from USB and when the GRUB menu appears select Try Ubuntu without installing.

After it boots up, the LiveUSB environment open a terminal. If you enabled LUKS in your hard drive, open the file manager enter the password. Now in the terminal run :

sudo pvscan
sudo lvscan
sudo vgchange -a y

This will activate the LUKS volume for mounting. Read the volume name from the output.

sudo mount /dev/sdaX/root  /mnt

where sdaX is the volume name.

If you have a separate /boot drive: go to the /mnt of LiveUSB where the filesystem is mounted. Open /etc/fstab and check for a /boot [UUID] entry and remember the drive name. Do :

sudo mount /dev/sdaX /mnt/boot
sudo mount --bind /sys /mnt/sys
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc

where sdaX is the above drive name.

Now sudo nano /etc/hosts. You should have two or more entries like :

127.0.0 localhost
127.0.0 username

Copy the host address to the next line and add the host name the one you find in your terminal prompt. Should be something like ubuntu. Save and exit. Now :

sudo chroot /mnt

Reinstall libc6 using apt-get.

sudo apt-autoremove
sudo apt-get update && sudo apt-get upgrade
sudo apt install -f
sudo update-grub
exit

Unmount everything using sudo umount /mnt/... and reboot from OS.

PS. If apt does not work,maybe it depends on libc6, I would recommend making a backup of important files once the partition is mounted or do a reinstall without removing or repair the os.


Download and install the deb file again

cd
wget http://kdl.cc.ksosoft.com/wps-community/download/a19/wps-office_9.1.0.4975~a19p1_i386.deb
sudo dpkg -i ~/Downloads/wps-office_9.1.0.4975\~a19p1_i386.deb

Now remove via

sudo apt-get remove wps-office


Have you taken a look at the official documentation for network connections?

There is a section dedicated to your problem. You can edit your wireless connection to add the SSID and password:

click on the Dash Home
type Network/hit Enter
ensure Airplane Mode is OFF
select Wireless and ensure it is ON
select Options
enter the Network Name in SSID
click the Wireless Security tab
select your router security type from the drop-down menu (probably WPA &WPA2 Personal)
enter the Password
click Save...

If you have issues with the Network Manager after that, this post may be of some assistance: Ubuntu 12.10 - network manager not listing wireless networks.

From your comment it sounds like there may be a driver or system issue.  Try an update:

sudo apt-get update

Add the information from this command to your question by editing it:

sudo gedit /etc/NetworkManager/NetworkManager.conf

This will open up that file in a text editor.  Change the line that has managed= to:

managed=true

Next save and close the file. Reboot for good measure.


Ubuntu 18.04.* Buggy HDMI handling, screen compositor output bizarre

When you plug in a digital TV via an HDMI cable, Ubuntu treats this second monitor as an extension of the first monitor -- an enlargement of the desktop. That is why it initially shows just the wallpaper on the TV.

To duplicate the first monitor on the second (your TV), you have to tell Ubuntu to mirror the first display:

Plug your HDMI cable into the computer and the TV set, and turn both
devices on.
Click the top RH corner of monitor one. The system menu drops down.
Click the settings button (crossed screwdriver-and-wrench icon).
Choose Devices > Screen Display.
At the top of the Screen Display page, click the Mirror
button.* You should now see the display on monitor one duplicated on
the TV, enlarged to fit the larger screen.

* If you can't see the Mirror button, make sure the TV is switched on and the HDMI cable is plugged into the TV and computer.


Login screen flicker after recent 16.04 update NVIDIA GTX 1070

After connecting on-board graphics I used nomodeset and then ctrl + alt + f1 to drop to command line followed by service gdm3 stop (until I stop GDM3 console is pretty much useless, GDM keeps retrying and resetting console, maybe next time I'll try ssh)

I couldn't install NVIDIA drivers since card was not plugged in, however I guess that fixed issue. Plugged in my card to try and install drivers instead it just worked.

I don't understand exactly what or how it got fixed but I would very much like to know the reasons and solution if possible.

Keeping question open for proper answer.


How to fix or remove a broken kernel (Ubuntu 20.04)

This is how I would do it, assuming that you downloaded and manually installed 5.7.5:
Boot from the oldest kernel, 5.4.0-26-generic, and then remove the 5.7.5 stuff, relink faulty links, reinstall the latest official kernel, update grub and reboot. In your case (but first, for safety, backup your data):
cd /boot
# remove the 5.7.5 stuff
sudo rm config-5.7.5
sudo rm initrd.img-5.7.5
sudo rm System.map-5.7.5

# remove faulty links
sudo rm vmlinuz
sudo rm vmlinuz.old

# Remove faulty kernel
sudo rm vmlinuz-5.7.5

# Relink correctly
sudo ln -s vmlinuz-5.4.0-37-generic vmlinuz
sudo ln -s vmlinuz-5.4.0-26-generic vmlinuz.old

# reinstall the latest official kernel
sudo apt install --reinstall linux-generic

# Make sure grub is OK -- maybe not necessary after reinstall
sudo update-grub

# Make sure nothing else is missing
sudo apt update
sudo upgrade

# Reboot
sudo reboot now

Should you want to try a 5.7.5 kernel I suggest that you download these packages:
amd64/linux-image-unsigned-5.7.5-050705-generic_5.7.5-050705.202006220832_amd64.deb
amd64/linux-modules-5.7.5-050705-generic_5.7.5-050705.202006220832_amd64.deb

from https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.7.5/
and install them with dpkg, assuming that you have a terminal open in the
download directory:
sudo dpkg -i linux-image-unsigned-5.7.5-050705-generic_5.7.5-050705.202006220832_amd64.deb linux-modules-5.7.5-050705-generic_5.7.5-050705.202006220832_amd64.deb

Grub will automatically update and this worked for me, I'm up and running on kernel 5.7.5-generic. If you encounter errors then remove that kernel by booting into an old kernel and then run
sudo apt purge linux-image-unsigned-5.7.5-050705-generic linux-modules-5.7.5-050705-generic

and reboot (grub will be automatically updated).


How to change desktop environment in Ubuntu 15.10

That's because you haven't installed it yet :)

Open a terminal with Ctrl+Alt+T and enter:

sudo apt-get install ubuntu-gnome-desktop


How can I get my Windows drive to show in Ubuntu 12.04 LTS?

For removable drives, go to settings manager and select Removable Drives and Media. There you can select to mount these devices when hot-plugged. With regards to your other OS partitions, they can be listed in /etc/fstab, so that they will be automounted at boot time.


How to enable the accelorometer in Dell Inspiron Duo

This is the only patch I found to help you out.

Make sure you have the module i2c_i801 loaded to create the sysfs entry /sys/bus/i2c/devices/i2c-2 (note: since I upgraded my install it now appears as /sys/bus/i2c/devices/i2c-14 - you may need to work out which i2c bus has the i801 attached)

Building and loading this module, you can then instantiate the device with: echo lsm303dlh_a 25 > /sys/bus/i2c/devices/i2c-2/new_device and enable it with echo 1 > /sys/bus/i2c/devices/i2c-2/2-0019/mode.

Read it all here


Actually I figured out what was wrong, as my system was GCC 5.2.1,

the file /usr/local/MATLAB/R2014a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6   was designed for GCC 4.4.X so Matlab was actually picking the wrong file. I just made a symbolic link to my system's libstdc++.so.6 using this on terminal -

ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6  /usr/local/MATLAB/R2014a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6


One possibility is to patch the code to make it show a password dialogue. Or to write a wrapper and place it in, say, /usr/local/bin/dconf-editor. But all that is security theatre only unless you manage ~/.config/dconf/ differently. By default, it is owned by the user who can thus modify it as she likes.

If you want to prevent certain changes in the configuration to be made, you might want to have a look at Pessulus (https://wiki.gnome.org/Pessulus). But you would have to put in a lot of work as it has been deprecated long time ago.


When should spaces be provided and when not in bash scripting?

For the if command specifically, remember that [ is not just syntax, it is a command. And all commands need to be separated from their arguments with whitespace.

Another common place of confusion is around grouping constructs: https://www.gnu.org/software/bash/manual/bash.html#Command-Grouping -- braces require spaces, parentheses don't.

In general, use more whitespace and you'll be OK.


How can I programmatically determine which files are currently open in evince?

TLDR:

for ip in $(pgrep -x evince); do lsof -F +p $ip|grep -i '^n.*\.pdf$'|sed s/^n//g; done

Explanation:

Document Viewer is the friendly name for the program /usr/bin/evince. So first we need to find the process ID (PID) of evince:

$ pgrep -x evince
22291

To list all files opened by this PID we will use the lsof command (note that we'll need to repeat this for every PID in case we have more than one instance of evince running)

$ lsof -F +p 22291
some other files opened
.
.
.
n/home/c0rp/File.pdf

Next we'll grep only for pdfs and discard the irrelevant n at start of line:

$ lsof -Fn +p 22291 | grep -i '^n.*\.pdf$' | sed s/^n//g
/home/c0rp/File.pdf

Finally to combine everything in one bash line:

for ip in $(pgrep -x evince); do lsof -F +p $ip|grep -i '^n.*\.pdf$'|sed s/^n//g; done

This one-liner was inspired from the answer of terdon which is also very interesting in the way it solves the same problem.

If you are interested in what n in lsof -Fn is for, here is quote from man lsof about the -F option:

OUTPUT FOR OTHER PROGRAMS
       When the -F option is specified, lsof produces output that is  suitable
       for  processing by another program - e.g, an awk or Perl script, or a C
       program.
...
...
       These  are  the  fields  that  lsof will produce.  The single character
       listed first is the field identifier.
...
...
            n    file name, comment, Internet address
...
...

so -Fn, is saying show me file name, comment, Internet address


Always show Close/Minimize/Maximize buttons (Unity)

Short answer is no, you can't do this in a trivial manner by just changing settings.

Long answer is that you need to edit the theme to draw the button anyway (probably you want to draw the unfocused version on focused windows), for the specified title bar hints in the theme.


Auto hiding top panel in 17.10 GNOME 3.26.1

You are looking for the 'Hide top bar' Gnome Shell Extension.

https://extensions.gnome.org/extension/545/hide-top-bar/


PKCS Signature error/warnings running dmesg on Ubuntu Mate 18.04

I likewise have an  Nvidia card using the proprietary Nvidia driver.

On first boot after upgrading from 17.10 to 18.04 by the message:

PKCS#7 signature not signed with a trusted key

was reported 3 times before reaching the login screen and the boot-sequence
stalled. I could only boot in Recovery Mode. Disabling Secure Boot in the BIOS
made no difference.

Having booted in Recovery Mode, however, I could select Resume normal boot from
the action menu and a normal boot sequence then proceeded successfully.

I launched Software & Updates and opened the Additional Drivers tab.
Under 17.10, my Nvidia graphics card driver had been been the proprietary one
provided by the Ubuntu nvidia-driver-390 meta-package. Now, the card was not reported
as using that proprietary driver, or the open-source xorg-xserver-video-noveau driver.
It was shown as using a manually installed driver, and the usual proprietary and
open-source driver options were unselectable.

I then established by:

dpkg -l nvidia-driver-390

that nvidia-driver-390 was no longer installed. So I installed it:

sudo apt install nvidia-driver-390

Then rebooted, and the boot sequence ran successfully and normally. After
logging in I revisited Software & Updates -> Additional Drivers and now saw that my graphics card was reported as using the proprietary nvidia-driver-390
driver.


How to get Unity back after switching to Gnome in Ubuntu 12.04?

Try using the following command in a terminal (Ctrl Alt & T will open a terminal).

unity --reset


Ubuntu 20.04.1 LTS: "ubuntu-security-status" states "0 receive package updates with LTS". do I have to worry?

The logic of that program tests package sources to see if they are from archive.canonical.com. If not, they are assumed to be third party.
Test for yourself by changing your apt source from it's current URL to archive.canonical.com. Then run ubuntu-security-status again. It should work properly.
This is arguably a bug, since folks using some legitimate mirrors and apt-proxies will get spurious results. It's a Python 3 script (/usr/bin/ubuntu-security-status), so anybody is welcome to follow the logic and code up a solution to contribute.


Will two Internet connections be utilized by default?

The short answer is no.  A PC has only one given default gateway and that's used for all traffic.  You might still see some packets in/out of the secondary interface, but it'll be layer 2 stuff, not IP based.

Do a netstat -r to see what direction your traffic is taking.

The longer answer is "no, but you can bond your interfaces together, creating a "virutal interface" which is capable of using both cards".  Basically, follow one of the links mentioned in your comments.  You'll need the ifenslave package and a guide on how to configure, such as the ones I mention in this answer.


If it is just for making a backup you can use the split command to split the file into 2 or more parts. Burn the parts to several 4.7 Gb discs. You can use cat to restore the parts to 1 file.

Another method would be to unpack the ISO and burn the files to several disc.


Serious Wi-Fi network issue on Ubuntu 17.04

As written here, create the file /etc/systemd/resolved.conf.d/no-dnssec.conf with the following content:

[Resolve]
DNSSEC=no

And restart. I tried the scan-rand-mac-address thing and adding 8.8.8.8 as DNS, but that was the only thing that worked for me.


Comprehensive guide to install Ubuntu 12.10 x64 after Windows 7 on UEFI and GPT disk

Installing on a UEFI system is not easy, but as a start you can look at ChrUbuntu (for Google Chromebook, which also uses EFI). Basically you'll need to get a boot disk of some kind to get up and running -- perhaps ChromeOS would help?


So I reduced the swap priority (called swappiness) to 0 with the following:

I added vm.swappiness=0 to the end of /etc/sysctl.conf

Has not helped.

Any other ideas?


umask's full path and runing it as different user

umask is not a binary file, actually it's a shell built-in, so you need a shell owned by a user be able to run it.

$ type umask
umask is a shell builtin


How could one disable bind9's recursion and do forwarding only for DNS queries?

There's an excellent discussion of this at https://www.digitalocean.com/community/tutorials/how-to-configure-bind-as-a-caching-or-forwarding-dns-server-on-ubuntu-14-04.

What you're doing is basically correct, except that you need set "recursion yes" even if your DNS setup requires your server to be a forwarding-only server. This may seem counter-intuitive, but it's the way the prescription goes. Here's a sample config:

acl goodclients {
        192.0.2.0/24;
        localhost;
        localnets;
};

options {
        directory "/var/cache/bind";

        recursion yes;
        allow-query { goodclients; };

        forwarders {
                8.8.8.8;
                8.8.4.4;
        };
        forward only;

        dnssec-validation auto;

        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
};


Does normal HDD enclosure work with Ubuntu?

No special kind of enclosure should be required and Ubuntu should be able to read the NTFS partitions without issue.

I've used a dock like this one before without issue.


Can not type a folder path in the 'folder hierarchy bar'

I found out that there are two answers to this problem:

First answer (easy one): Thanks to @Jos
It just needs to press Ctrl + L while nautilus is open, then it will be possible to type/enter the path of the folder.

Second answer (the hard one):
If you are really fed up with nautilus, the solution is to install another File Manager like Nemo or Dolphin.


What is the real benefit of using UUIDs?

What is the real benefit of using a UUID?
Generally, the UUID is constant for the same drive/partition no matter what system it is attatched to.
The /dev/sdN naming scheme  increments the final letter (N) for each device plugged in (a, b, c, d, etc.). This means that the /dev/sd identifier assigned to the device changes if it is attached in a different order.
And, isn't it possible to change a UUID?
Yes, see here.
Is there a way to identify a drive (especially in GRUB) that can never change?
That's what UUIDs are for. They're probably the most stable solution you can get.

Using UUIDs in scripts and the like
If you are instructed to perform a command like this:
dd if=/dev/sda of=/dev/null

... you can replace /dev/sda with a file in /dev/disk/by-uuid/ to reference the disk by UUID instead of sdN.
Run these commands to get the UUIDs (and sdN notation) of drives on your system:
for disk in /dev/disk/by-uuid/*; do
    readlink -e "$disk"
    echo "${disk#/dev/disk/by-uuid/}"
    echo
done


Ubuntu 12.04 LTS, SSL, IRC: Unable to build with OpenSSL

Is there a reason you're building these packages yourself? Ubuntu already has these packages premade for you.

apt-get install ircd-hybrid

Or if you'd rather see what other choices are available:

apt-cache search ircd


Found it. Apparently Traccar server was still installed on this dev system and uses the same port ADB uses. Removing Traccar fixed the issue.

Description of the issue is found in detail, here: ADB hangs when trying to start or stop server


You can start the icon in the bar manually in a terminal by:

nm-applet

Security Onion is a separate distro based on xubuntu, so i think they use their own tools to manage the wireless interface. Here are a few things you can try:

Check if your wireless interface is recognized as a wireless interface by:

iwconfig

it should output something like this:

lo        no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=14 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

eth0      no wireless extensions.

Check if your wireless interface is soft or hard blocked:

rfkill list wlan

Possible output:

0: sony-wifi: Wireless LAN
        Soft blocked: yes
        Hard blocked: no
3: phy0: Wireless LAN
        Soft blocked: yes
        Hard blocked: yes

Hard blocked means it is blocked by a hardware switch on your device.
Soft Blocked means an application (like Network Manager) is blocking it, as in my case.

Unblock blocked wireless device:

rfkill unblock wlan

It's obvious you can't unblock a hardware switch, besides with magic =)

Check if your wireless interface is managed by Network Manager:

nm-tool

In case of yes output looks like this:

- Device: wlan0 ---------------------------------------------------------------
  Type:              802.11 WiFi
  Driver:            iwlwifi
  State:             disconnected
  Default:           no
  HW Address:        8C:A9:82:52:CA:2A

  Capabilities:

  Wireless Properties
    WEP Encryption:  yes
    WPA Encryption:  yes
    WPA2 Encryption: yes

If no, you see State: unavailable:

- Device: wlan0 ---------------------------------------------------------------
  Type:              802.11 WiFi
  Driver:            iwlwifi
  State:             unavailable
  Default:           no
  HW Address:        8C:A9:82:52:CA:2A

  Capabilities:

  Wireless Properties
    WEP Encryption:  yes
    WPA Encryption:  yes
    WPA2 Encryption: yes

Check if your wireless interfaces is not in the /etc/network/interfaces file:

Network Manager is not managing an interface that is listed in this file.

Check if your wireless interface in not down:

To up the interface invoke in terminal (assumed that wlan0 is your wireless interface):

ifconfig wlan0 up

If something give errors please add them to your question.


What do you do before sending your self-installed linux machine to the manufacturer for service?

Reinstalling Windows may be overkill in your situation since this is not going to be a warranty repair and the repair depot folks will be able to repair your laptop regardless of whether it has Windows, Ubuntu or even no operating system installed.

But since you asked, I don't know that vendor repair would be the fastest and least expensive option for you.  You might check around for local repair shops that have good reputations and good reviews to see what sort of price and repair turn around you can get from them.

Regarding ASUS specifically, I have a number of ASUS powered computers and have been a long time customer of theirs.  They do support Linux... sort of.  There is nothing on the mobo or elsewhere that "logs" what operating systems have been installed so no worries there.  The problem with ASUS is that if something doesn't work, they will automatically decline to do anything to fix the problem if it is running a non-Microsoft OS.  Again, this does not apply to clearly broken hardware.  But if you had a complaint regarding something about the way graphics are displayed and you sent the laptop in with Ubuntu installed, you will likely get a "sorry, Ubuntu isn't supported" response from ASUS.


Best Setup for a Java EE Developer Machine

I have something similar too, only thing is Java typically installs itself to the bin folder.  I really don't think there's any workaround for this if you install via aptitude.  You may have to manually execute the install executable and point to the folder then set the $PATH variable.

So I keep my IDEs (netbeans, eclipse, springsource) libraries and frameworks(grails, apache commons, joda, ect) and version control repositories (git, svn, hg) in their own folder in the $HOME folder.

Note that the IDE will only work if you install via download rather than apt-get.


Gnome 3 classic on Ubuntu 12.04: how to get application shortcuts

Just discovered that it's really easy. Open the applications menu and lookup the app you need. Click and drag it to the top panel and there it is!

NB: Moving and deleting shortcuts is possible by pressing the Windows + left Alt key and rightclicking the icon.


Log into tty and do not launch gnome-shell

To configure Ubuntu desktop to boot into the text mode, like the server:

sudo systemctl set-default multi-user.target

Then, if you are working in text mode and want to launch the graphical environment:

sudo systemctl isolate graphical.target


How to install ubuntu via usb in portable drive

This may help.

Installation/FromUSBStick

Please have a glance at the section titled, "Installing Ubuntu directly on a USB flash drive".

A quick suggestions from my side would be to try creating a Live USB from Ubuntu CD (UNetbootin, may help); boot from the Live USB and cross check if things look good i.e. do you still see the black/purple screen?


GRUB fails to install on upgrade 12.04->12.10 (fakeraid)

Maybe you should reinstall and update grub2? Or try boot-repair tool to fix issues. I dont know if it will work with 12.10 it worked with 12.04 just fine


Uninstalled the Snap version and installed the one from Flathub. The issue is gone now.


Apt-get update errors (can't read the package lists)

It appears that /var/lib/dpkg/status got corrupted. The solution was to restore from /var/lib/dpkg/status-old.  Before you do that though, read the full answer.

Thanks to Lucio and Soroosh129 for pointing me to the solution.


Scaled down Openstack Grizzly installation with Juju and Maas

With the latest MAAS and Juju releases (available for 12.04 from the Cloud Tools archive), its possible to mix LXC containers with physical servers to support your OpenStack deployment on a smaller number of servers.  Its possible to run the following charms in LXC containers:

cinder (so long as you are using a Ceph backend)
glance
mysql
rabbitmq-server
nova-cloud-controller
swift-proxy
keystone

Once you have deployed the charms that need physical servers (nova-compute, quantum-gateway, ceph and swift-storage), you can add LXC containers to specific machines:

juju add-machine lxc:1

The example above will create a LXC container on physical machine 1.

You can then target a charm to a specific LXC container - for example:

juju deploy --to 1/lxc/0 nova-cloud-controller

Deploys nova-cloud-controller to the first LXC container on physical machine 1.

We have some work currently pending final testing that will allow you to deploy ceph/swift-storage and nova-compute on the same physical machines - allowing you to have shared storage/compute servers within your deployment.


Can't understand which one is unallocated space in ubuntu installation?

Partitions are numbered from 1; sda1, sda2, etc. sda1 is probably your windows partition, and sda refers to the whole disk (physical).  So sda would be the first physical Disk, sdb the second, and so on.

sda1 would be the first partition, the second partition would be sda2, and so on.

Since you set aside a 20GB partition, look for the sadx that has 20GB unallocated space.


If you upgrade from 13.10 to 14.04, the update manager should show you the new release within the next days automatically.

You can force the update manager to show the new release by using the command

update-manager -d

Keep in mind to create a backup of all your files before upgrading.


I had the same problem, until two days ago! :)

I went to http://packages.ubuntu.com/hardy/i386/libbow/download and then I downloaded a .deb package. Then you just double click on it or if you prefer you can install it through the terminal and that's it. With this, you don't have to compile anything.

I hope it can work on you.

Regards.


Firefox: middle mouse button stopped working

This isn't an answer, but I've noticed the same thing, and it isn't Ubuntu-specific.  I saw it on Win7.  It started about the time I updated to Firefox 17.  I also have "true" for that flag in about:config.


Partitioning of hard disk using GParted in Ubuntu 16.04

GParted only recognizes the file systems outlined on the GParted Features page.

You might try the following command in a terminal window to learn what type of file system might be installed in the unknown partitions:

sudo blkid

Search the output for the partitions you are curious about.  For example in your case:

sudo blkid | egrep "sda8|sda9"


How to decompress and access a 10 year old ACE file?


Can establish connection, but still get "connect: Network is unreachable"

Based on your ifconfig output, it looks like the connection is established at the OSI link layer, but that the interface is not assigned an IP address.

There are several possible explanations for that - for example:

your network does not use DHCP (implying that any other devices are configured with static IP addresses)
your network is configured to use DHCP, but the DHCP server is not providing an address to this device (perhaps due to a MAC based whitelist or blacklist)
a firewall is preventing DHCP from working (either disallowing DHCP discovery packets to exit the client, or disallowing DHCP responses from reaching it)

The verbose output from sudo dhclient -v confirms that your client is at least initiating a DHCP discovery phase - however it terminates abruptly with the mysterious error

Unable to set up timer: out of range

Googling this specific error leads us to the following bug report isc-dhcp-client: Error 'Unable to set up timer: out of range' when system time too far in future, which suggests the problem is that the DHCP client gets confused when the system's hardware clock is out of whack with the DHCP server's.

Correcting the clock offset should fix the issue.


How can I get rid of the first two lines of multiple text files?

sed takes multiple file names as arguments. Just pass them along:

sed -i '1,2d' file1.txt file2.txt file3.txt

If you file names follow a certain pattern, you can take help from shell globbing e.g. for the above:

sed -i '1,2d' file{1..3}.txt

For all .dat files in the current directory:

sed -i '1,2d' *.dat


Which arguments are passed to init scripts during shutdown

According to Ubuntu upstart cookbook:

  Ubuntu currently employs a hybrid system where core services are
  handled by Upstart, but additional services can be run in the legacy
  SystemV mode. This may seem odd, but consider that there are thousands
  of packages available in Ubuntu via the Universe and Multiverse
  repositories and hundreds of services. To avoid having to change every
  package to work with Upstart, Upstart allows packages to utilize their
  existing SystemV (and thus Debian-compatible) scripts.

SystemV use run level to manage system startup, shutdown and reboot.

In /etc/init.d are present scripts that handles service stop/start, this scripts follow /etc/init.d/skeleton and are executed by the system every time runlevel change.

Run level are numbered from 0 to 6 and in /etc we found rcX.d folder, one for each level.

In these folders are present symbolic link to scripts in /etc/init.d, as you saw the name of this link are particular: they starts with S or K (S means start and K means Kill) followed by a number and the name of service.

When a system command change the value of runlevel, the scripts in the rcX.d directory are called following the alphabetical order: K scripts with stop parameter, S script with start. This rule does not apply to two runlevels 0 (halt) and 6 (reboot). According to Debian Policy Manual Chapter 9 - The Operating System

  In these runlevels, the links with an S prefix are still called after
  those with a K prefix, but they too are called with the single
  argument stop.

So that's why the system halt.

This topic is very broad, I hope this little explanation is sufficiently clear.