lsblk lists loop devices with a backing file. In your case, loop devices 0-13 have backing files, and show up.

losetup --find, used to find the next available loop device, automatically creates a new loop device if all existing loop devices are in use (if run as root). So some process might have run losetup --find as root to look for an available loop device, and probably didn't use it.

Example:

I have seven loop devices, all backed:

$ sudo losetup --list --all
NAME       SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE
/dev/loop1         0      0         1  1 /var/lib/snapd/snaps/core_5897.snap
/dev/loop6         0      0         0  0 /tmp/foo
/dev/loop4         0      0         0  0 /tmp/foo
/dev/loop2         0      0         1  1 /var/lib/snapd/snaps/core_6130.snap
/dev/loop0         0      0         1  1 /var/lib/snapd/snaps/vuze-vs_3.snap
/dev/loop7         0      0         0  0 /tmp/foo
/dev/loop5         0      0         0  0 /tmp/foo
/dev/loop3         0      0         1  1 /var/lib/snapd/snaps/core_6034.snap
$ ls /dev/loop*
/dev/loop0  /dev/loop2  /dev/loop4  /dev/loop6  /dev/loop-control
/dev/loop1  /dev/loop3  /dev/loop5  /dev/loop7

I ask losetup for the next available loop device as root:

$ sudo losetup --find
/dev/loop8

And losetup has created this for me:

$ ls /dev/loop*
/dev/loop0  /dev/loop2  /dev/loop4  /dev/loop6  /dev/loop8
/dev/loop1  /dev/loop3  /dev/loop5  /dev/loop7  /dev/loop-control

But it's not in lsblk:

$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop1    7:1    0  88.2M  1 loop /snap/core/5897
loop6    7:6    0     1M  0 loop
loop4    7:4    0     1M  0 loop
sr0     11:0    1  1024M  0 rom
loop2    7:2    0  89.5M  1 loop /snap/core/6130
loop0    7:0    0 280.2M  1 loop /snap/vuze-vs/3
loop7    7:7    0     1M  0 loop
sda      8:0    0    41G  0 disk
└─sda1   8:1    0    41G  0 part /
loop5    7:5    0     1M  0 loop
loop3    7:3    0  89.5M  1 loop /snap/core/6034

Because it's not backed by anything usable as a block device.


Can I install Ubuntu on a separate HDD to my Windows installation?

If you want to install Ubuntu on a separate disk you will need to format that disk. But you can partition the disk before, so you can install it on one partition of your D drive.


wmctrl -c <win>

   wmctrl - interact with a EWMH/NetWM compatible X Window Manager.

   -c <WIN>
          Close the window <WIN> gracefully.

(from man wmctrl.  But note: I use XFCE so haven't tested this on Unity as found in default Ubuntu 16.04, and I wouldn't expect it to work if using Wayland on 17.10 upwards)


Suppose the range of addresses is 192.168.1.*

To block is 192.168.1.* addresses:

sudo iptables -A INPUT -s is 192.168.1.0/24 -j DROP

To block is 192.168.. addresses:

sudo iptables -A INPUT -s 192.168.0.0/16 -j DROP

To block 192...* addresses:

sudo iptables -A INPUT -s 192.0.0.0/8 -j DROP

But you have to notice this will also block legitimate traffic from the same range


Can I make changes or fix bugs in my app after the App Showdown is over?

You can modify your app after the deadline.

However, the judges will ignore those changes and use the packaged version you submitted before the deadline, so please hold off making any changes to the package unless you get an e-mail from the Ubuntu App Review Board asking you to do changes.


How to install java 8.0.232 Ubuntu 18.0.4

Get the binary OpenJDK8U-jdk_x64_linux_8u232b09.tar.gz from Release OpenJDK 8u232 GA Release · AdoptOpenJDK/openjdk8-upstream-binaries · GitHub. Or simply run

wget https://github.com/AdoptOpenJDK/openjdk8-upstream-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_x64_linux_8u232b09.tar.gz

Extract the tarball and save the contents in /usr/lib/jvm. This the location where Ubuntu by default save JVMs. You can use other locations as well.

sudo tar -xvf OpenJDK8U-jdk_x64_linux_8u232b09.tar.gz -C /usr/lib/jvm

Install the alternatives for java and javac.

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/openjdk-8u232-b09/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/openjdk-8u232-b09/bin/javac 1

Configure the alternatives.

sudo update-alternatives --config java
sudo update-alternatives --config javac

Choose the option number corresponding to /usr/lib/jvm/openjdk-8u232-b09/bin/java*.
Verify the installation.

$ java -version
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (build 25.232-b09, mixed mode)


How do I configure Ruby on Rails to Always use mySQL as the default database?

you can use -d command line option when creating your app to use mysql instead of sqlite i.e

  rails -d mysql myapp


ubuntu 12.04.1 lts installation problem on hp dreamscreen

I would not recommend attempting to use 64-bit Ubuntu Linux on an Intel (Pineview) Atom D525. Most manufacturers did not enable 64-bit anyway, and performance is nothing special.

You should not be using 12.04.1 LTS, but instead the later 12.04.2 LTS.

Download ubuntu-12.04.2-desktop-i386.iso, and try that instead.

Also, look for others who have tried this on this unusual HP product (targeted initially at Indian market). See what they have achieved, and what (if any) issues they had with drivers.


Oneiric is past feature-freeze - there is no chance that the one of the fundamentals such as the file-system will change at this stage.

Given past experience of LTS's - these tend to be very conservative - i.e. incremental change - thus very unlikely to again change file-system - again many people are speculating about 12.10 which could involve major changes such as Wayland.

There was at one time much talk of btrfs being the replacement for ext4.  Btrfs is maturing with time - with support gradually being added - for example - update-manager in oneiric now has btrfs support.

As to how we would migrate from ext4 to btrfs - there is already support to convert from ext4 to btrfs by installing the package btrfs-tools.  This will install btrfs-convert which can convert ext4 to btrfs.

Assuming Canonical makes the decision in (for example) 12.10 - expect to see a blue-print which will outline using these packages to provide a smooth migration path.


Need Bootable CD To Kickstart Hard Drive Boot

i am sorry for putting this as answer but i couldn't comment - low rep.
you mean it does not even load grub? i installed ubuntu before some days and i had similar problems. Grub wasn't installed.
So i had to boot from grub-rescue.
Since you can boot from DVD you can try these from a terminal
sudo update-grub
then do
sudo grub-install /dev/sd*
where * is the drive you want grub to be installed


How can I configure a shortcut for the 'Screenshot' default program in Ubuntu 20.04?

I won't be able to help you with an image by image instructions, because I'm not using gnome desktop. But based on what you said, I believe you can still go through with it, since you seem to know your way around cheeking and editing the shortcuts. If someone wants to add a new reply, or edit mine, feel free.
A shortcut is doing nothing more than invoking a program, exactly how you can do with your terminal. When calling a program, you often have a lot of options, that the developers have included, that usually make our life easier.
Taking a look at the gnome-screenshot man page, we can see a few of these options, some of them that have likely been included in the default shortcut.
I believe the option you are looking for is the -i one:
-i, --interactive
    Interactively set options in a dialog.

You could first try it out by opening the terminal and typing gnome-screenshot -i and checking if that is the behavior you are looking for. If that is the case, you can either add a new shortcut that will execute the command like that, or edit one of the existing shortcuts to add the -i option.
Alternatives are also trying out the screenshot program used by xfce, xfce4-screenshooter, or by KDE spectacle, which seem to open the dialog options by default. Remember that if you go with either, you will still need to edit the shortcuts to add/edit them so they run the new program of your choice. They might also pull a few dependencies when installing.


Touchpad Lenovo P14s 20.04 LTS stopped working

Same here.
After some time the touchpad stop working. However, the buttons and the nob were still working. I found this issue when I've changed the configuration of the BIOS to have sticky Fn key. I've also swapped the Fn for the Ctrl. I was not very used to the new configuration, so I accidentally pressed Ctrl (Fn function) and +V. After that ( I was writing some code with vim) the v letter started to be printed all the way and the touchpad stopped working.
Restarting fixed the issue but I've tried to kill the process with kill -9 command. Even though the command was processed, Ubuntu was not killing it.
After the restart, as I said, everything was working fine. However I found this log in dmesg
Apr 11 13:39:28 mgs-p14 kernel: [    1.979870] psmouse serio1: synaptics: Your touchpad (PNP: LEN2064 PNP0f13) says it can support a different bus. If i2c-hid and hid-rmi are not used, you might want to try setting psmouse.synaptics_intertouch to 1 and report this to linux-input@vger.kernel.org.
    Apr 11 13:39:28 mgs-p14 kernel: [    2.055943] psmouse serio1: synaptics: Touchpad model: 1, fw: 10.32, id: 0x1e2a1, caps: 0xf014a3/0x940300/0x12e800/0x500000, board id: 3471, fw id: 2909640
    Apr 11 13:39:28 mgs-p14 kernel: [    2.055958] psmouse serio1: synaptics: serio: Synaptics pass-through port at isa0060/serio1/input0
    Apr 11 13:39:28 mgs-p14 kernel: [    2.106618] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input6
    Apr 11 13:39:28 mgs-p14 kernel: [    2.141437] EXT4-fs (nvme0n1p2): re-mounted. Opts: errors=remount-ro
    Apr 11 13:39:28 mgs-p14 kernel: [    2.147929] lp: driver loaded but no devices found
    Apr 11 13:39:28 mgs-p14 kernel: [    2.151433] ppdev: user-space parallel port driver

This is the the device recognized by ubuntu
─$ cat /proc/bus/input/devices | grep -A 20 Synaptic
N: Name="SynPS/2 Synaptics TouchPad"
P: Phys=isa0060/serio1/input0
S: Sysfs=/devices/platform/i8042/serio1/input/input6
U: Uniq=
H: Handlers=mouse0 event5
B: PROP=5
B: EV=b
B: KEY=e520 10000 0 0 0 0
B: ABS=660800011000003

Here I found some troubleshooting tutorial that might also help. I will follow it when I experience again the issue and let you know
https://wiki.ubuntu.com/DebuggingTouchpadDetection


Suspend not working in Ubuntu 18.04 and 19.04

In my case, I solved using the procedure explained here: Ubuntu 18.04.2 immediately wakes up from suspend.

Practically there is a device that has the ability to wake up the computer.
In my case it was the Bluetooth and WiFi card.

Using these two commands (when the computer is not connected to the dock) you can see if there is a device with that ability and which device it is:

$ cat /sys/bus/usb/devices/*/power/wakeup

$ ll /sys/bus/usb/devices/*/power/wakeup

The first command gives you a list of enabled and disabled that corresponds to the devices listed by the second command.

Then you can investigate which device is using

$ cat /sys/bus/usb/devices/1-4/idVendor
$ cat /sys/bus/usb/devices/1-4/idProduct

(You need to replace 1-4 with the concerned device).

In this way you will get two codes idVendor (in my case 8087) and idProduct (in my case 0025) that you can google to see what it is.

At the end you can disable it with:

# echo "disabled" >  /sys/bus/usb/devices/1-4/power/wakeup

I hope that can help you too.


"Unable to open logs" error when I try to restart Apache

There is possibly more broken, because you also get

Unable to open logs

First of all, enable more logging

LogLevel debug

in your /etc/apache2/apache2.conf.

Check your file permissions in /var/log/apache2.

I use often following command to debug:

strace -f apache2ctl start 2>&1|grep -v " ENOENT " | grep -Ee " E[A-Z]+"

It shows you excactly which calls are failed.

[Edit]

Another reason could produce overlapping listen adresses like:

Listen *:80
Listen 1.2.3.4:80

So you listen to all interfaces and the 2nd listen line tried to open an already opened port. Like described here.


How do I upgrade my Ubuntu Touch Preview to Ubuntu Touch?

Easiest way: Reinstall android and follow ubuntu on phones guide:
Ubuntu phone

It shouldnt take too long to install it.


Wifi connected but cannot access internet, ubuntu

For a more permanent solution use the google public DNS (thanks to @Eliah) instead of your ISP DNS:

First lets replace the resolv.conf symlink with a static file:

sudo rm /etc/resolv.conf
sudo touch /etc/resolv.conf

Then edit the new file:

sudo nano /etc/resolv.conf

and paste at the top of the file

nameserver 8.8.8.8
nameserver 8.8.4.4

save the file with ctrl+o and exit the editor with ctrl+x

at this point pinging www.google.com should work

We should then prevent any editing of the resolv file:

sudo chattr +i /etc/resolv.conf

In the future if you want to make the resolv.conf file writable again do:

sudo chattr -i /etc/resolv.conf


LDFLAGS should include -m32 as well. Following should work:

export LDFLAGS='-m32 -L/usr/lib32'

In fact, you can drop -L/usr/lib32 part, since this is a default directory for 32bit libs, and your system is aware about that.

Basically, the simplest way to build 32bit application on 64bit machine is:

export CFLAGS='-m32'
export CXXFLAGS='-m32'
export LDFLAGS='-m32'
make

..or feed those variables to configure script if you're using autotools.

UPDATE:

Seems like you are not really familiar about the differences in linking with static and dynamic libraries. I'll try to be as minimal as possible:

Both static and dynamic development libraries have the same file extension .a
If you have installed both static and dynamic versions of the same library, one of them might have additional postfix, like libname.a for dynamic and libname_s.a for static version.
Sure, static and dynamic library versions differs in size. Static version is heavier.
If you link with static library - your application has no dependencies. If you link with dynamic library, it will rely on .so runtime library that should be present in your system.

Please note, we are not talking about advanced tricks here, like explicit loading of DSO's using the dlopen()/dlsym() API.


must to do modprob -v rtl8188ee every time i start linux

Add rtl8188ee to /etc/modules, and it'll load the driver for you at boot time. Cheers, Al


I lost my taskbars (?) on my Chromebook running Ubuntu 14.04

Press Ctrl+Alt+T to open a terminal:

Type:

xfce4-panel

OR

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install --reinstall xubuntu-desktop
sudo shutdown -r now

IF you can't access to a terminal use the shell:

Press Ctrl+Alt+F1

Type your username and password

sudo service lightdm stop
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install --reinstall xubuntu-desktop
sudo shutdown -r now


Permission denied error for running command on ubuntu

Since I was running in root I was using ~ in my syntax and when in root that is not requires so I did it without any ~, and also removed a space after '<' and that did the job.


How do I remove old kernel files from /boot and fix a potential error listed in ?

To get rid of old kernel packages I first check that I am not running the kernel I am about to delete :)

uname -a

Then I grep for the packages, for example:

dpkg -l | fgrep linux-image-
dpkg -l | fgrep 3.13.0-24

Then I purge specific kernel packages from that list (the following is just an example, you can copy/paste the actual kernel package names):

apt-get purge linux-image-3.13.0-24-amd64 linux-headers-3.13.0-24-generic linux-headers-3.13.0-24-amd64

If the files in /boot are not being removed correctly for some reason, you could manually remove them, of course, being careful NOT to remove files associated with installed linux-image- versions and NOT to remove files associated with the kernel you are running right now.

After removing files from /boot you can run update-grub to remove the associated menu entries.

The status of 'un' doesn't look quite right to me. You could try:

apt-get -f install

or

apt-get install linux-image


R software installation sudo apt-get install R

R is in the universal repository, so you will need to enable that in your "Software and Updates" package. To enable that, type "software and updates" in your dash and open the application that comes up. Go to "Ubuntu software" and let there a check mark on "Community-maintained free and open-source software (universe)". Type your password, if prompted to and then close this window.

Open a terminal and type:

sudo apt-get update
sudo apt-get install r-base r-base-dev

Source: The Ubuntu R Blog


How can I store the output of an awk command as a bash script variable?

Read man bash or https://manpages.ubuntu.com/manpages/bionic/en/man1/bash.1.html an do something like

myvar="$(awk 'FNR==1 {print$5}' SNextractedstats.txt)"


Set PAC (Proxy Auto-Config) file via bash?

A PAC file needs to be interpreted with javascript. The majority (if not all) programs that make use of the http_proxy environment variable will not be able to interpret this file in order to make user of it.

The only approach that seems suitable is if you find or make a program that will interpret the javascript found in a PAC file and use the returned values for setting http_proxy. However, the idea is more that this is done dynamically for each URL, so this approach will not work nicely.

If all you want is to set the value that is used within gnome from the command line, then you can do this:

gsettings set org.gnome.system.proxy mode auto
gsettings set org.gnome.system.proxy autoconfig-url 'http://my.prox.org/foo.pac'

To unset:

gsettings set org.gnome.system.proxy autoconfig-url ''
gsettings set org.gnome.system.proxy mode none

You can find further information here: https://wiki.gnome.org/Projects/NetworkManager/Proxies


Still need discard, noatime, and data=ordered for SSDs?

I see no evidence that 12.10 auto-detects and installs accordingly with a SSD. I just did a fresh install and went ahead and added discard and noatime as well as moving tmpfs to the ram.

The articles I've used are a bit old, but they provide decent info/referencing on tweaking for SSDs:
http://ubuntuforums.org/showthread.php?t=1974320
http://cptl.org/wp/index.php/2010/03/30/tuning-solid-state-drives-in-linux/


How do I remove a site from squidGuard blacklist?

Create a file /var/lib/squidguard/blacklist/porn/urls.diff
Make the following entry in the file: -youtube.com
Run the command:squidGuard-u /var/lib/db/squidguard/blacklist/porn/urls.diff


Ubuntu DHCP server is not giving out IP addresses

addresses: [192.168.2.1/24]
  gateway4: 192.168.2.1

This is incorrect, you should not be configuring your host address as your own gateway.  You should drop the gateway4 setting.

Also, you have configured dhcpd to hand out IPs on a subnet which is not the subnet configured on your interface (192.168.1.0/24 vs. 192.168.2.0/24).  You will want to configure your dhcp server to hand out IPs that are actually on the network you have configured.


"The harddrive for /dev/mapper/cryptswap1 is not yet ready or non existent."

To resolve the cryptswap1 issue, open a terminal window and then do

  sudo nano /etc/fstab

and comment out the inappropriate line with cryptswap1 with an octothorpe ( # ) in the first column. Then make sure you have a line for the standard swap partition, like

  /dev/hda5 swap    swap    defaults    0   0

Save the file and exit with

  Ctrl-O
  Ctrl-X

and reboot the system.


Switching User From A sudoer to Bash to Root

Bash is Unix shell.

But without giving more information we can only guess what is there behind this behaviour. Relevant would be the line from /etc/passwd about this user (if it is real user) and content of /etc/sudoers.

My theory is that this bash user has UID=0 as root and when you run sudo it is run under this user context (instead of root). But this QA site is not about playing such a games.


It looks like the current settings UI just lists the ringtones found in /usr/share/sounds/ubuntu/ringtones, which is read only (provided you haven't switched it to writable image mode).

The choice of ringtone is controlled through GSettings, so you could change the ringtone to a file in a different directory using the gsettings tool from the command line.  As the phablet user, run a command like the following:

gsettings set com.ubuntu.touch.sound incoming-call-sound /path/to/ringtone.ogg

Presumably a way to set custom ringtones will be added to the UI at some point in the future though.


Something similar to GNOME's AlternateTab on Unity?

I looked at your link and honestly don't see how it is superior to Alt+Tab in Unity:

After the initial Alt+Tab if you keep holding down the Alt key and tap the the Tab key it cycles through Windows and those with two or more sub-windows lets you pick between them. I think this is superior to Windows 7 but perhaps I'm biased.
Make sure you are running Unity
For Ubuntu 16.04 LTS:
$ grep "^Exec" /usr/share/xsessions/*
/usr/share/xsessions/gnome.desktop:Exec=gnome-session --session=gnome
/usr/share/xsessions/ubuntu.desktop:Exec=gnome-session --session=ubuntu

For Ubuntu 18.04 LTS:
$ grep "^Exec" /usr/share/xsessions/*
/usr/share/xsessions/gnome.desktop:Exec=gnome-session
/usr/share/xsessions/gnome-xorg.desktop:Exec=gnome-session
/usr/share/xsessions/ubuntu-communitheme-snap.desktop:Exec=env GNOME_SHELL_SESSION_MODE=ubuntu-communitheme /snap/communitheme/current/session
/usr/share/xsessions/ubuntu.desktop:Exec=env GNOME_SHELL_SESSION_MODE=ubuntu gnome-session --session=ubuntu
/usr/share/xsessions/unity.desktop:Exec=/usr/lib/gnome-session/run-systemd-session unity-session.target

Notice the last line (far right side) shows: unity-session.target


I have the same issue with hdmi port. When I plug a screen on it, there is nothing. were you able to get a screen to work on the hdmi port?
EDIT: Ok i've found the solution, you have to update the kernel, ubuntu 20.04 comes with old kernel, so update it to 5.8 :
https://linuxhint.com/update_ubuntu_kernel_20_04/


let the strings consist of lowercase alphabets for simplicity, so [a-z] is one character

The accepted lengths are a sequence 2, 4, 5, 8, 10, 11, 14, 16, 17, 20, 22, ...
We can group these as {2}, {4,5,8}, {10,11,14}, {16,17,20}, ...

Notice that 4 on the addition of 6 gives 10, 5 on the addition of 6 gives 11, and so on.

To build the regex, consider the special cases first:
      length of 2, regex would be [a-z]{2}
      similarly for lengths 4, 5 and 8  regex would be [a-z]{4}, [a-z]{5}, [a-z]{8}

For lengths greater than 8, zero or more, six-character string is appended
so the final regex would be

[a-z]{2} + ( [a-z]{4} )( [a-z]{6} )* + ( [a-z]{5} )( [a-z]{6} )* + ( [a-z]{8} )( [a-z]{6} )*


Ubuntu Installation Not Working in Battery Mode

I had a similar problem on my Dell G7. With much less side effects, but still. After a very painful troubleshooting, I found out hidden inside the BIOS, some setting corresponding to the power management. It turned out that every time I was on plain battery mode, the BIOS was set up to go into a "best battery life" state. Those setting were opposing to those Ubuntu uses, so that was why I had the issues. Everything was corrected by altering the Grub loader, and adding some parameters for the pci manipulation. So maybe you can work towards that road now.


How I can hide scrollbar at terminal Xubuntu 14.04?

You can disable the scrollbar completely (still able to scroll with mousewheel) from the Terminal Preferences.

Open Preferences (Edit Menu-> Preferences, or Right Click -> Preferences)
Select the "General" tab.
Change "Scrollbar is:" to "Disabled".

Let me know if this helps.


Failed to load package list -- have changed mirror server already

It's not a mirror issue.

Read the error message carefully: You have corrupted files.

I recommend against using PPAs to users who do not understand apt error messages. PPAs are not supported software, and some can break your system.

Delete each file that cannot be parsed:

sudo rm -i /path/to/file

Next, refresh your package database:

sudo apt update

Then install updates:

sudo apt upgrade


Unable to locate package nvidia-settings-319

nvidia-319 is in the Ubuntu Restricted repository and available for all currently supported Ubuntu versions (12.04, 14.04, 15.04 and also 15.10), therefore

sudo apt-add-repository restricted
sudo apt-get update
sudo apt-get install nvidia-319

nvidia-settings will be installed automatically.

At the end you have version 340.93 installed, because

nvidia-319 depends on nvidia-331 depends on nvidia-340


Why doesn't Ubuntu know the word 'Ubuntu'?

That's a good idea, previously raised in this Brainstorm idea.  I don't know of any reason why it's not there; it just needs someone to make the change.

Bug 63499 asks for this to be done.  Ubuntu ships multiple dictionaries (even for English) so it may need updates to multiple packages.


How to setup Gnome & KDE to use the same soundsystem?

If you use Kubuntu 10.10 (or Ubuntu 10.10 with kubuntu-desktop installed, as you seem to be), you are using the same backend.  I.e., you're using ALSA as your sound drivers and low userspace, and you're using PulseAudio for your backend on top of the ALSA userspace.  Xine-lib and GStreamer are both configured by default to use PulseAudio if available, so in your case, without doing anything you're using pulse already.  (Note: currently work is being done for QtGStreamer, so at some point KDE will pick up that backend natively; thus Kubuntu will gain it, too.)


Failed to read or create install properties file in android studio

I ran the Android studio as administrator and then it worked.
Go in the Android studio folder and type:
sudo sh studio.sh


Files in /etc/network/interfaces.d ignored, but not /etc/network/interfaces itself

I think I found it. From the manual, the problem seems to be with the source-directory keyword. It looks that, since 16.04, it is not supported anymore.

So replacing

source-directory /etc/network/interfaces.d

with

source /etc/network/interfaces.d/*

seems to fix the problem.


Parts of this answer comes from: Is there any recovery software available for ext4?

If you formatted the hard disk drive you may wish to use Testdisk in order to recall the previous partition table and recover some data. Testdisk also allow you to recover individual files. Check it out at http://testdisk.org. Please inform if you have tried Testdisk. And take a look at previous testdisk references like those mentioned in the next links:

Best tool to recover removed files

Formatted and lost 6 years worth of photo memories.. any way to get this back?

How to recover Ubuntu partition after computer failure?

Where the answers of some other people under those questions may also be helpful for you.

Good luck!

P.S. Forensic procedures like foremost is the last step. Try first Testdisk.


Starting/removing/upgrading transmission-daemon wont work

open /etc/default/transmission-daemon with a editor with root permissions like this:

sudo nano /etc/default/transmission-daemon

then change the

ENABLE_DAEMON=0

to

ENABLE_DAEMON=1

for nano do the ctrl+o to save and ctrl+x to exit.
then that package should be upgradeable.

if that helps mark yourself affected to this bug: https://bugs.launchpad.net/ubuntu/+source/transmission/+bug/1058518


Have you edited /etc/motd yet?

This should show in any terminal.

source: https://www.linuxquestions.org/questions/linux-newbie-8/welcome-message-on-terminal-582616/


Why am I unable to access OpenPGP keys on Seahorse and access encrypted files?

The problem is that you ran GnuPG as root at some time, and it created your keyring files with root being the owner:

 -rw------- 1 root root 334311 Sep 13 22:17 pubring.gpg
 -rw------- 1 root root 334311 Sep 13 22:17 pubring.gpg~
 -rw------- 1 root root 7645 Sep 13 22:17 secring.gpg

Run sudo chown -r bill:bill /home/bill/.gnupg (user folder guessed from user name) to repair the file ownership.


Change font programmatically for GTK3 TextView (quickly-widgets TextEditor)

You can set the font in a textview using GTK+'s built-in button and dialog for this, Gtk.FontButton():

#!/usr/bin/python

from gi.repository import Gtk

class TextViewWindow:
    def __init__(self):
        self.window = Gtk.Window()
        self.window.set_default_size(400, 400)

        main_vbox = Gtk.VBox(homogeneous=False, spacing=0)
        self.window.add(main_vbox)

        self.tview = Gtk.ScrolledWindow()
        main_vbox.add(self.tview)

        self.textview = Gtk.TextView()
        self.textbuffer = self.textview.get_buffer()
        self.textbuffer.set_text("Here is a text view.")
        self.textview.set_wrap_mode(Gtk.WrapMode.WORD)

        self.tview.add(self.textview)

        self.font_button = Gtk.FontButton()
        self.font_button.connect('font-set', self.on_font_set)
        main_vbox.pack_start(self.font_button, False, False, 0)

        self.window.show_all()
        self.window.connect('destroy', lambda w: Gtk.main_quit())

    def on_font_set(self, widget):
        font_description = widget.get_font_desc()
        print "You chose: " + widget.get_font()
        self.textview.modify_font(font_description)

def main():
    app = TextViewWindow()
    Gtk.main()

if __name__ == "__main__":
    main()

My demo:

Built-in dialog:


Xubuntu: LibreOffice dispays no menu icons

Thit is a bug. The last time we were able to show icons in menu was in version 6.3.4.x.
The following is a workaround for LibreOffice 7.0.3+ launched in a GT3 GUI (for example in Cinnamon, MATE or XFCE).
Step 1: In in LibreOffice menu Tools: Options: Advanced, click "Open Expert Configuration"
Step 2: Search "IconsInMenu". Then, set ShowIconsInMenues to true, IsSystemIconsInMenus to false.
Step 3: Restart LibreOffice.


Monitor multiple desktop remotely continuously

Use the desktop sharing software that comes pre-installed with Ubuntu:


missing indicator-datetime in Ubuntu 14.04.2

The message:
Indicator-Datetime-Message: indicator-datetime exiting; failed/lost bus ownershipapparently means indicator-datetime is already running.

In this AU post @Sneetsher gives another possible fix (resetting the configuration of the datetime indicator and explains where it comes from:

$ dconf reset -f /com/canonical/indicator/datetime/

That does it!  No clue however as to why and how.

There remains very minor issues such as the fact that not all times in "other locations" can be correctly displayed. For instance I can simultaneaously display UTC time, Berlin and New York times but not Beijing times along with them. Before this time consuming shenanigan, I could.

EDIT 1:

It turns out that the display of additional clocks in indicator-datetime depends on the correct installatio of language packs possibly, but I really am not certain of that) related to the geographical places that corresponds to the additional clock-times. I had to reinstall packages for Chinese for Beijing's time to display correctly.

EDIT 2:

Because another indicator, indicator-stickynotes, disappeared a few minutes after indicator-datetime, and accents were not displayed correctly anymore in my skype chat-window, I suspected that it might also be related to the locale I set shortly before all my troubles began. I commented out.

# export LC_ALL=C

in my .bashrc file.

After reboot indicator-stickynotes had come back, as well as accents in my Skype chat-windows.

I am curious to know where and why the conflict arose, but I am even more pleased I could get rid of the problems.


echo "Hello World "

or

printf "Hello World "

or (not for newbies):

str="Hello World" && "$str" |& grep -o "$str"


HP 2540 AIO printer in Ubuntu 17.04 - how to install?

Try this:

Download HPLIP 3.17.4

https://sourceforge.net/projects/hplip/files/hplip/3.17.4/hplip-3.17.4.run/download?use_mirror=ufpr

Run the Automatic Installer

Open a terminal,Press Ctrl+Alt+T

Run it:

cd Desktop ---- (assume that the hplip-3.17.4.run file was downloaded to your Desktop directory)
sh hplip-3.17.4.run

Select the install mode: Automatic (enter an 'a')

Verify your Linux Distribution

Enter Your Sudo User Password

Read the Installation Notes. Please follow any directions given.

'./configure' and 'make' will run

'make install' is run

Use 'hp-setup' to configure your printer

Select How Your Printer will be Connected to Your Computer

Select the Printer to be Configured

Select the PPD file (or driver) to be Used for Your Printer, usually you will want to select the recommended PPD file.

Confirm the Printer Settings and Finish the Configuration Process, click "AddPrinter"


I can't register to Ubuntu one. The captcha images are not authorizing my input although I'm sure I have it right

This is a known issue. A user filed a bug report about it (Launchpad Bug #1033598) in August 2012. Unfortunately, the bug has a low "heat score" and therefore does not attract much attention. The heat score would increase if more users confirmed that they were affected by the bug. There is a Catch-22, however, because you have to log in to Launchpad in order to confirm a bug, and Launchpad uses the Ubuntu One login, and setting up an Ubuntu One login is the very problem at issue....

You can work around this issue by registering on the main Ubuntu One login page, which does not require a Captcha. The procedure is:

Go to the main Ubuntu One login page (https://login.ubuntu.com/).
Click “I am a new Ubuntu One user.”
Enter your email address.
Enter your name.
Enter your password (twice).
Click the checkbox to accept the Ubuntu One terms of service.
Click “Create Account.”

I would recommend that, as soon as you have registered with Ubuntu One, you visit Launchpad Bug #1033598 (link above) and confirm the bug to raise its heat level. Doing so would help attract attention to the bug and, one would hope, get it resolved for future users. You could then go back to the "Ubuntu Single Sign On" window that the Ubuntu Software Center raised when you clicked "Turn On Recommendations" button, then click the link to "Log-in with my existing account."


Setting Static IP and NAT trafic to LXC container

It is a common and expected issue to lose the client IP address when the connection goes through a set of proxies. Because an IP packet only keeps the very last source IP address.

It is difficult to say what's going on in your specific case. The important thing is that it can be done. Here is a tutorial using LXD proxy devices, and using nginx as the reverse proxy, https://www.linode.com/docs/applications/containers/beginners-guide-to-lxd-reverse-proxy/ If you try such a tutorial verbatim, it will help you figure out any missteps.

On a hunch, what could be wrong in your case, is that Apache2 is brain-dead and the default LogFormat does not log the proper client IP address in the access.log. You need to change a %h to an %a. See the tutorial above for more details.


Don't fully understand what you need, but,
Ubuntu on USB flash drives can be used in two kinds:

As a live-bootable media.
Full Installation media.

#1 is the one, which you create using startup-disk-creator or UnetBootIn, and changes you make in a session are only confined to the size of persistent file you specify at the time of creation of the bootable usb drive. To know how to create partition on the installation media follow this link #2 is, what you get when you install ubuntu using a live-cd or live-usb to another usb drive. Here you can partition your usb drive just like you would do on another on-board hard drives.


Copy: How to recover files which have disappeared

Check out the undelete section in the desktop app, which is located under Preferences > Manage My Files. In here, locate the data that you want to recover, select it and click save. The data will then start resyncing to your Copy folder.

Source

Source


How to create location map in nagios server?

The status map in nagos is generated automatically. You have to set a parent host for each host in the define host statement of the host. See an example:

define host{
        use             generic-host
        host_name       host
        address         1.2.3.4
        parents         other-host
}

It also accepts multiple parents. But notice: there must be also a define host statement for the parent host.


Restart memcached and a java server using script

If you installed memcached from the software center or the standard repositories (which is highly recommended!), you can restart it using:

service memcached restart

If your java server provides an upstart script, then you should be able to use a similar command for that.   If not, you could potentially write an upstart script for it to automate your commands.


Upon further investigation, it appears that you cannot modify the order from the widget tree panel. However, you can still modify order in the visual editor.

In the toolbar, there are a couple of buttons for selecting cursor modes. Click the button right after the cursor. It should have four arrows. Then click on the widget that you want to move, and drag it where you want to move it to.


Wireless Hardware Not Found On HP ProBook 4510s

Here is one option

Otherwise you can download the packages manually here, copy them to your computer via a flash drive or writable cd, and install them with the instructions here. Remember to pick up the dependencies as well if you do it this way.


I can su root, but can not log in as root?

As bodhi.zazen mentions, root log in from ssh might be disabled.

Honestly, this is not a bad thing. You might want to consider getting used to having to "su -" to root if you have to (or sudo -i if you use it).

Try the following to check,

grep PermitRootLogin /etc/ssh/sshd_config

If you see the following come by, root login is disabled.

PermitRootLogin no

Or if the output is the following, root login cannot be done with passwords:

PermitRootLogin without-password

To change this setting, use your favorite text editor (vi/nano) and change no to "yes"

Again, consider getting used to working with "su -/sudo" when needed before changing this.

EDIT/Sidenote:
Also, this will only work if you actually set a password for the root user.


I can not boot windows XP Pro after installing Trusty Tahr 14.04

Try running "sudo update-grub", that will find every OS it can on your hard drive and add them to GRUB. If that does not work, then there might be a problem with XP's bootloader.


Ubuntu Server 12.04 and 14.04 LTS compatibilty and reason for upgrade

why should I install version 14? I do not need it but maybe I am overseeing something.

If there is no feature or software in the newer version that you need, then the only reason in favour of upgrading will be that it will be supported for longer, so instead of losing support in April 2017, you'll lose support in April 2019.

  I am mostly using Apache, Bind9, Cron, MySQL, PHP, Rsync and SSH. Is it going to be all compatible and working together? Anybody had any conflicts or issues, something working very different?

All of these will continue to be supported in 14.04, and between those two versions any required configuration changes should be minimal.  Obviously you still need to properly research and test that, though, so there is a definite cost to upgrading that needs to be balanced with the benefit.

  When I run ubuntu-support-status, I get some unsupported packages, is it worth looking into this stuff from security point of view?

It's worth looking into these.  It sounds like you have a mix of packages from previous versions of Ubuntu, including non-LTS versions, that weren't upgraded properly or were removed in the newer versions.

In particular, you have 47+9 packages from other non-LTS versions of Ubuntu, which should be upgraded or removed.  You have 5 packages that are not included in Ubuntu (or no longer included in Ubuntu) some of which may need to be removed, unless you get them from a third party eg PPA and you trust that PPA to support them, and you have 246 that are unsupported - I presume this means they're from the universe respository in which case that's better than nothing.


For quickly executing commands, use ALT+F2 and type your command there.

Be careful as some functionalities like redirecting output into files might not be working as expected.


Terminal doesn't start after editing locale file

Problem was that I created a custom locale file here /usr/share/i18n/locales/en_US_custom and then in /etc/default/locale file I had added "LC_TIME="en_US_custom" to it, this was making a problem.

Do CTRL+ALT+F1 and you can type in your commands on TTY that just opened, to switch back to your screen do CTRL+ALT+F7.

You will be prompted to enter your username now, type it in and hit Enter then type in your password and hit Enter, now you can run commands.

So I ran the following command:

echo 'LC_TIME="en_US.UTF8' | sudo tee -a /etc/default/locale

And I re-logged and everything was back to normal.


What is the correct way to create VLANs and bridges on Ubuntu?

If bridge_ports option from the bridge-utils package is specified then, VLAN configuration will NOT be performed on Ubuntu as specified here:  http://manpages.ubuntu.com/manpages/saucy/man5/interfaces.5.html


How to automate setting up of "keyboard-configuration" package?

From a similar StackOverflow question:

If the ENV variable DEBIAN_FRONTEND=noninteractive is set while you run apt-get install keyboard-configuration, it won't prompt for any interaction. So you can simply run:

DEBIAN_FRONTEND=noninteractive apt-get install keyboard-configuration


How to set battery charging thresholds on T420s

please take the following steps and remember backup your configuration before you do anything:

sudo modprobe tp_smapi
lsmod | grep smapi
sudo echo "tp_smapi" >> /etc/modules
sudo echo "devices/platform/smapi/BAT0/start_charge_thresh = 40" >> /etc/sysfs.conf
sudo echo "devices/platform/smapi/BAT0/stop_charge_thresh = 80" >> /etc/sysfs.conf
sudo service sysfsutils start

reboot your device and check it out!


no dash or menu after upgrading from ubuntu 14.10 to 15.04

This is a long shot but I ran into the same issue as you and it took me an hour of trial and error to fix it. I haven't figured out why, but the unity settings are probably messed up.

You need to start the compiz config settings tool. I couldn't figure out how to start it from command line so I started up a cinnamon session where I could start the settings tool. In the settings tool I, quite frankly, messed around a bit. Checked and unchecked the OpenGL plugin and the unity plugin. I think the latter is probably what made it work, since it yelled back at me with warnings and conflicts.

After this. I logged out and logged back in again and unity was back.


Making and deleting deb files in sources.list.d dir. Permissions issue

You need to use sudo - use the command sudo before the command you want to execute to run it with administrator privileges.

To remove the malformed line in precise-R.list enter the following command into the terminal:

sudo -H gedit /etc/apt/source.list.d/precise-R.list

To remove the file:

sudo rm /etc/apt/source.list.d/precise-R.list


Touchpad makes mouse go in a "grid-like" pattern, External mouse doesn't

I have experienced similar issue with my Lenovo X240, and judging by the system name 'Yoga', a very similar solution might apply.
I seemed to be able to minimize the effects to an acceptable level, although they seem not to be completely gone.

As it occurred both on Wayland and Xorg and the Elder Geek's fix did not help, I digged deeper.

Based on: https://unix.stackexchange.com/questions/199044/diagonal-touchpad-movement-results-in-wobbly-line and in turn:https://bugzilla.redhat.com/show_bug.cgi?id=1264453 - comments 10 and 13.

Open /lib/udev/hwdb.d/90-libinput-model-quirks.hwdb in your favorite text editor, and check the LENOVO segment, as it will contain hints for a possible solution too.

This is what I did:

1) Identify hardware DMI and input location using evemu-describe [part of packageevemu-tools; [sudo apt install evemu-tools]

~$ sudo evemu-describe
Available devices:
/dev/input/event0:      Lid Switch
...
/dev/input/event4:      Video Bus
/dev/input/event5:      SynPS/2 Synaptics TouchPad
/dev/input/event6:      TPPS/2 IBM TrackPoint
...
/dev/input/event20:     HDA Intel HDMI HDMI/DP,pcm=10
Select the device event number [0-20]:

So in my case, the touchpad is registered on /dev/input/event5 [5]. Find the DMI line, right at the start of the output and save it for later:

# DMI: dmi:bvnLENOVO:bvrGIET90WW(2.40):bd09/14/2017:svnLENOVO:pn20AMS2QD0C:pvrThinkPadX240:rvnLENOVO:rn20AMS2QD0C:rvr0B98401PRO:cvnLENOVO:ct10:cvrNotAvailable:
# Input device name: "SynPS/2 Synaptics TouchPad"

2) Going on a leap, guesstimating that your touchpad behaves similarly to a t450, we will now add a new file for our hwdb in /etc/hwdb/ using sudo nano /etc/hwdb/90-lenovo-touchpad-quirk.hwdb

In the file put something similar like this. Modify the DMI matching, I pasted it in there for future reference:

#Lenovo touchpad smoothing fix/workaround.
#evemu-describe DMI output for the touchpad:
# DMI: dmi:bvnLENOVO:bvrGIET90WW(2.40):bd09/14/2017:svnLENOVO:pn20AMS2QD0C:pvrThinkPadX240:rvnLENOVO:rn20AMS2QD0C:rvr0B98401PRO:cvnLENOVO:ct10:cvrNotAvailable:

#Modify the following line, namely the pvrThinkPadX240 bit, to match your DMI output.
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX240*
 LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD=1

Save the file (in Nano ctrl-X to exit, confirm with Y to save, VI has !wq)

3) Now rebuild the hardwaredatabase:

sudo udevadm hwdb --update

And 4) test if your new parameters are actually loaded (remember the input number from the first step):

~$ sudo udevadm test /sys/class/input/event5
calling: test
version 234
...
ID_INPUT_TOUCHPAD_INTEGRATION=internal
ID_INPUT_WIDTH_MM=109
LIBINPUT_DEVICE_GROUP=11/2/7/1b1:isa0060/serio1
LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD=1
LIBINPUT_MODEL_SYNAPTICS_SERIAL_TOUCHPAD=1
...

It's there all right!
5) Reboot the system and fingers crossed...

I hope this results in you joining the dark Linux side!

In my case LIBINPUT_MODEL_LENOVO_X230=1 actually worked better, so you can play around -to some extent- with available fixes for Synaptics touchpads.


How to check the apt list of repository?

Not exactly sure what you mean by "running my fetch script" and "both versions are getting downloaded". But:

apt list --installed | grep packagename

Will list you your installed version of the package. Though if you want to use the output of apt you might need some sed to only see the package name.


A proposed iptables rule set solution to your viscous DDOS attack is the following script:

#!/bin/sh
FWVER=0.01
#
# Vlark.Lopin rule set. Smythies 2016.09.18 Ver:0.01
#     Attempt to manage severe DDOS attack.
#     Port 20000 should only ever have 2 open
#     connections at a time. If more, ban them.
#
#     If too many SSH attempts, ban them.
#     DROP all other unsolicited input.
#     If ssh port has been moved, adjust rules
#     accordingly.
#
#     Requires a larger (1000) than default (100)
#     xt_recent table size.
#
#     See also:
#     http://askubuntu.com/questions/818524/correctly-limit-ip-connections
#     http://askubuntu.com/questions/808297/i-have-massive-attack-on-port-in-my-server
#     http://askubuntu.com/questions/817478/ip-tables-limit-connetion-per-ip-address-can-be-bypassed
#
#     run as sudo
#

echo "Loading Vlark.Lopin rule set version $FWVER..\n"

# The location of the iptables program
#
IPTABLES=/sbin/iptables

#Setting the EXTERNAL and INTERNAL interfaces and addresses for the network
#
# Vlark.Lopin
EXTIF="eth0"
# Doug
#EXTIF="enp9s0"
UNIVERSE="0.0.0.0/0"

#Clearing any previous configuration
#
echo "  Clearing any existing rules and setting default policies.."
$IPTABLES -P INPUT DROP
$IPTABLES -F INPUT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -F OUTPUT
$IPTABLES -P FORWARD ACCEPT
$IPTABLES -F FORWARD
# Otherwise, I can not seem to delete it later on
$IPTABLES -F add-to-connlimit-list
# Delete user defined chains
$IPTABLES -X
# Reset all IPTABLES counters
$IPTABLES -Z

# We want to force load the xt_recent module, so that we override the
# default maximum table size. We want 1000 whereas the default is 100.
# Note: It is unlikely that is needs to be 1000 forever. Once the
# bad guys give up, the attempts will become much less frequent, and
# the table size can probably be reduced to default.
# i.e. this force load segment can be commented out, and then it will
# autoload as required.
#
modprobe xt_recent ip_list_tot=1000

#######################################################################
# USER DEFINED CHAIN SUBROUTINES:
#
# add-to-connlimit-list
# To many connections from an IP address has been detected.
# Add the IP address to the bad guy list, and DROP the packet.
# If desired, comment out the log rule.
$IPTABLES -N add-to-connlimit-list
#$IPTABLES -A add-to-connlimit-list -m recent --update --hitcount 1 --seconds 90000 --name BADGUY_CONN
$IPTABLES -A add-to-connlimit-list -m recent --set --name BADGUY_CONN
$IPTABLES -A add-to-connlimit-list -j LOG --log-prefix "CONNLIMIT_ADD:" --log-level info
$IPTABLES -A add-to-connlimit-list -j DROP

#######################################################################
# INPUT: Incoming traffic from various interfaces.  All rulesets are
#        already flushed and set to a default policy of DROP.
#

# loopback interfaces are valid.
#
$IPTABLES -A INPUT -i lo -s $UNIVERSE -d $UNIVERSE -j ACCEPT

# A NEW TCP connection requires SYN bit set and FIN,RST,ACK reset.
# More importantly, this check might prevent lingering packets from
# a forgotten legitimite connection from getting a valid user on the
# bad guy list
#
$IPTABLES -A INPUT -p tcp ! --syn -m state --state NEW -j LOG --log-prefix "NEW TCP no SYN:" --log-level info
$IPTABLES -A INPUT -p tcp ! --syn -m state --state NEW -j REJECT

# Not sure if this one is needed or not
#
$IPTABLES -A INPUT -i $EXTIF -p tcp -m state --state INVALID -j LOG --log-prefix "IINVALID:" --log-level info
$IPTABLES -A INPUT -i $EXTIF -p tcp -m state --state INVALID -j DROP

# Allow any related traffic coming back to the server in.
#
$IPTABLES -A INPUT -i $EXTIF -s $UNIVERSE -m state --state ESTABLISHED,RELATED -j ACCEPT

# external interface, from any source, for any remaining ICMP traffic is valid
# Note: consider to not allow, as this is often how bad guys find you
#
$IPTABLES -A INPUT -i $EXTIF -p ICMP -s $UNIVERSE -j ACCEPT

# Secure Shell on port 22 (Change to whatever port you moved SSH to).
#
# Sometimes I uncomment the next line to simply disable external SSH access.
# Particulalry useful when I am rebooting often, thereby losing my current BADGUY table.
#$IPTABLES -A INPUT -i $EXTIF -m state --state NEW -p tcp -s $UNIVERSE --dport 22 -j DROP

# Dynamic Badguy List. Detect and DROP Bad IPs that do password attacks on SSH.
# Once they are on the BADGUY list then DROP all packets from them.
# Sometimes make the lock time very long. Typically to try to get rid of coordinated attacks from China.
$IPTABLES -A INPUT -i $EXTIF -m recent --update --hitcount 5 --seconds 90000 --name BADGUY_SSH -j LOG --log-prefix "SSH BAD:" --log-level info
$IPTABLES -A INPUT -i $EXTIF -m recent --update --hitcount 5 --seconds 90000 --name BADGUY_SSH -j DROP
$IPTABLES -A INPUT -i $EXTIF -p tcp -m tcp --dport 22 -m recent --set --name BADGUY_SSH -j ACCEPT

# Port 20000. Limit to 2 connections per IP address.
# Otherwise ban them.
# Note: The logging is useful for debugging, but might overwhelm the log files. Comment out the logging rule as required.
#
$IPTABLES -A INPUT -i $EXTIF -m recent --update --hitcount 1 --seconds 90000 --name BADGUY_CONN -j LOG --log-prefix "CONNLIMIT:" --log-level info
$IPTABLES -A INPUT -i $EXTIF -m recent --update --hitcount 1 --seconds 90000 --name BADGUY_CONN -j DROP
$IPTABLES -A INPUT -p tcp --dport 20000 -m connlimit --connlimit-above 2 -j add-to-connlimit-list
$IPTABLES -A INPUT -m state --state NEW -p tcp --dport 20000 -j ACCEPT

# port 4 is needed. (Consider doing it the same as the SSH port).
# If UDP is needed, then add it.
#
$IPTABLES -A INPUT -m state --state NEW -p tcp --dport 4 -j ACCEPT

# O.K. at this point, we will DROP the packet, however some will be dropped without logging just to make the log file
# less cluttered.
#
$IPTABLES -A INPUT -i $EXTIF -p udp --dport 33434 -j DROP
$IPTABLES -A INPUT -i $EXTIF -p tcp --dport 23 -j DROP

# If your log file is too cluttered, consdier to comment out this log rule.
# It is useful for debugging, but might overwhlem your log files.
#
$IPTABLES -A INPUT -s $UNIVERSE -d $UNIVERSE -j LOG --log-prefix "ICATCH:" --log-level info
# With a default policy of DROP, the following rule isn't actually neeeded.
$IPTABLES -A INPUT -s $UNIVERSE -d $UNIVERSE -j DROP

echo Vlark.Lopin rule set version $FWVER done.

After debugging this script, and if you want to make loading it automatic when booting, add a pre-up directive to your /etc/network/intefaces file. Here is my file as an example:

# interfaces file for smythies.com 2016.01.30
#       attempt to set local DNS herein, as the method
#       used with the old 12.04 server no longer works.
#
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback
pre-up /home/doug/init/doug_firewall
dns-nameservers 127.0.0.1

# The primary interface (d-link PCI card)
auto enp4s0
iface enp4s0 inet dhcp

# Local network interface (uses built in ethernet port)
auto enp2s0
iface enp2s0 inet static
  address 192.168.111.1
  network 192.168.111.0
  netmask 255.255.255.0
  broadcast 192.168.111.255

The permissions on my script file are:

$ ls -l /home/doug/init/doug_firewall
-rwxr-xr-x 1 doug doug 61703 Aug 27 15:55 /home/doug/init/doug_firewall

or 755.


How to change default browser AND the command line parameters used to open a link from gnome-terminal

Programs use a variety of other programs to determine the default browser - sensible-browser & xdg-open being two of them.

For xdg-open, you can use it simply by by running xdg-open http://URL, so xdg-open https://www.google.co.uk will open Google for instance.This should be the same as running echo https://www.google.co.uk in terminal and clicking on the link should open the default browser (in my case, Firefox).
You can see what is the default browser using xdg-settings get default-web-browser:

$ xdg-settings get default-web-browser
firefox.desktop

To set values, you do xdg-settings set default-web-browser LAUNCHER-FILE.desktop:

$ xdg-settings set default-web-browser chromium-browser.desktop

So now running echo https://www.google.co.uk and clicking on the link or running xdg-open https://www.google.co.uk should open Google in the new default browser (in my case now Chromium).

Notice that it links to the program's .desktop file not it's command - this needs to be a valid file in /usr/share/applications (or ~/.local/share/applications). You can easily create your own with a custom command easily by copying a existing one and changing the 'Name' and 'Exec' lines:

$ cp /usr/share/applications/firefox.desktop ~/.local/share/applications/firefox-new-window.desktop
$ gedit ~/.local/share/applications/firefox-new-window.desktop & disown

##Then change Name and Exec lines to `Name=Firefox (New Window)` & `Exec=firefox --new-window %u` respectively
$ update-desktop-database ~/.local/share/applications/
$ xdg-settings set default-web-browser firefox-new-window.desktop

In the above I created a new launcher, edited it so it would launch a new window  of Firefox, and updated the database of launcher files and set it to default. Now running xdg-open https://www.google.co.uk opens a new window of Firefox.

More info:

Desktop Entry Specifaction (how-to edit launchers)
How to set which application is launched by xdg-open? - Ask Ubuntu
How to properly and easy configure xdg-open without any enviroment? - Unix & Linux


You can use snmpd  and
 cacti

Check out this guide


How do you call NetBeans installed by a .sh file from the Command Line?

I found the answer to my own question by looking at the command to launch the desktop icon, which was the code given below.

Copy and paste the following into terminal: (ctrl+alt+T)

/bin/sh "/home/username/netbeans-7.2.1/bin/netbeans"


As the MD5SUM on Windows section of the HowToMD5SUM help wiki article says, it used to be that no md5sum-checking utility was included in Windows. If you're using a very old version of Windows, or just prefer to use a GUI tool, then you can download a utility online to verify the md5 hash of your downloaded Ubuntu ISO image. WinMD5Sum (by Nullriver Software) is one such utility.

  Download and install winMD5Sum, a free and open source hash verification program.
  Right-click the ISO file.
  Click Send To, then winMD5Sum.
  Wait for winMD5Sum to load and finish the checksum (this may take a significant amount of time depending on your computer's performance).
  Copy the corresponding hash from UbuntuHashes into the bottom text box.
  Click "Compare"
  A message box will say "MD5 Check Sums are the same" if the hashes are equal.

Excerpted from HowToMD5SUM by "Contributors to the Ubuntu documentation wiki," reproduced here in compliance with the license.

The screenshot looks like Windows XP but the  WinMD5Sum utility works on current versions of Windows as well. I have used it successfully on Windows 7, 8, and 8.1.

Note that all recent versions of Windows do include a utility, certutil, that can be used for this purpose. See sBeDs's excellent answer for details.


If you need to show battery status on your panel , All you need do is to click on your battery icon. You will see a drop down list.  Now click on Show percentage in menu bar. More over you can check you battery backup in Minutes.
Click on show Time in Menu Bar.

Lokendra Singh


Should I upgrade to 64 bit Ubuntu with an old laptop model?

Yes. 64-bit is greater than 32-bit on your computer. It is new enough.


The quickly save command will only save (commit) your work locally.

Remember you can use quickly help <commandname> to learn more about commands. In th current case:

$ quickly help save
Usage: quickly save [comments]

This command commits all changes since the last save to bzr. Note that
it does not push changes to any backup location. If you need revert
or otherwise use the revision control, use bzr directly:
$ bzr help

In order to push it to the remote project in Launchpad, you can use bzr directly:

bzr push lp:projectname the first time (you might have to use the --remember option)
And on subsequent pushes you can use bzr push or bzr push :parent


From my own experience, you should first configure it to your liking using your own account and testing it manually from the command line.

When you have everything set up, you should copy your ~/.mediatomb/config.xml file to the global localtion (which is read by the mediatomb service during startup) /etc/mediatomb/config.xml.

I'm not sure, but you might have to fix permissions so mediatomb can read (write?) from your home folder or wherever your media files are.


Try to use the Linux version of Steam.

http://media.steampowered.com/client/installer/steam.deb
you can download from the url
http://store.steampowered.com/about/

One tip... pay attention to new games that steam are porting to linux, you can fallow on this url

http://store.steampowered.com/browse/linux/


How to edit a text file to a maximum line length with kate

There is a tool for that: fmt "simple optimal text formatter". See man fmt.


Why not

  bzcat file | tee no_modifications | sed blah blah

?

This would decompress, tee (or split the data) into a file call no_modifications and stdout which you pipe into sed for "immediate use".

If you really want to delete the original then I'm afraid you're down to

  bzcat file | tee no_modifications | sed blah blah && rm file


passphrase/keyring management: 14.04 whole disk encryption

LUKS:

Basically as far as I know LUKS lets you modify 8 passphrase slots and you can do that with:

sudo cryptsetup luksAddKey <device>
sudo cryptsetup luksRemoveKey <device>
sudo cryptsetup luksChangeKey <device>
sudo cryptsetup luksKillSlot <device> <key slot number>

LUKS stores slots as 0,1,2 etc. But I recommend you to be very careful with LUKS as you may lock yourself out. Please refer to manual of cryptsetup.

You may need to reboot the machine and try your new passsphrase as well before you remove the key.

CryptSetup

Gnome-disk-utility also lets you change the passphrases.

Source


How to fix a log in issue after resizing your hard drive?

Try Ctrl+Alt+F2 to open a console and then remove the Xauthority file. If that doesn't fix it, try reinstalling xorg.

rm ~/.Xauthority
sudo apt-get install --reinstall xorg
sudo reboot


How to avoid warning message while using gedit?

assuming you start gedit in the shell you could pipe all output to null, as in

gedit textfile.txt > /dev/null 2>&1 &

and maybe create a shell script with $@ instead of textfile.txt to allow general filenames, i.e. create a file, say geditt with the following contents:

gedit &@ > /dev/null 2>&1 &

save it in your path -- maybe ~/bin -- and make it executable via chmod +x ~/bin/geditt


After upgrade to Lubuntu 20.04 sound ONLY wotking with aplay in root. And when Pulseaudio is removed it works as User

got it to work.  Key is to select in the "Configuration" tab from pavucontrol the right output  and then on the Output device the analog line out outputs.  Disregard all the 'unavailable' messages...
BUT, I am totally flabbergasted that this selection is NOT sticky after reboots - given the pretty long list of possibilities I see in the Configuration tab.  PulseAudio needs some SIGNIFICANT improvement to add a button to save the current configuration - and not try to guess on boot each and every time the wrong stuff.  Sorry too much geeks here and no clue about user interface and user friendliness.


How to modify a file if file contain numbers that begin with '+1'

Be very careful when using sed to edit XML files. (It's risky).

But you can easily use an XSLT-1.0 processor like xsltproc or Saxon to remove the leading +1 string from the <address> element. So use the following XSLT file

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output omit-xml-declaration="yes" />
  <xsl:output method="xml" indent="yes" />

    <xsl:template match="node()|@*">
        <xsl:copy>
            <xsl:apply-templates select="node()|@*" />
        </xsl:copy>
    </xsl:template>

    <xsl:template match="sms/address[starts-with(.,'+1')]">
        <xsl:copy>
            <xsl:value-of select="substring(.,3)"/>
        </xsl:copy>
    </xsl:template>

</xsl:stylesheet>

with your XML and the result (with the XML from your question) is:

<root>
    <sms>
        <address>5629876543</address>
        <date>1554966601000</date>
        <type>1</type>
         Yea, should be true.
        <mmsReaded>1</mmsReaded>
        <attachments/>
    </sms>
    <sms>
        <isMms>1</isMms>
        <date>1554968044000</date>
        <type>2</type>
        <mmsMsgBox>2</mmsMsgBox>
        <mmsReaded>1</mmsReaded>
        <attachments>
            <attachment>
                <type>image/jpeg</type>

                <name>Screenshot_20190411-002704_Flud.jpg</name>
            </attachment>
        </attachments>
    </sms>
    <sms>
        <isMms>0</isMms>
        <address>5621234567</address>
        <date>1554968778000</date>
        <type>1</type>
        <isMms>0</isMms>
        <address>7141234534</address>
        <date>1558919932000</date>
        <type>1</type>
        :)
        <mmsReaded>1</mmsReaded>
        <attachments/>
    </sms>
    <sms>
        <isMms>0</isMms>
        <address>7141234567</address>
        <date>1558927846000</date>
        <type>1</type>
        It's so
        <mmsReaded>1</mmsReaded>
        <attachments/>
        <isMms>0</isMms>
        <address>7145757575</address>
        <date>1543704644000</date>
        <type>1</type>
        Hey
        <mmsReaded>1</mmsReaded>
        <attachments/>
    </sms>
    <sms>
        <isMms>0</isMms>
        <date>1543704676000</date>
        <type>2</type>
        More text
        <mmsReaded>1</mmsReaded>
        <attachments/>
    </sms>
    <sms>
        <isMms>0</isMms>
        <address>7142323232</address>
        <date>1543704736000</date>
        <type>1</type>
        Lol not even
        <mmsReaded>1</mmsReaded>
        <attachments/>
    </sms>
    <sms>
        <isMms>0</isMms>
        <address>7141010101</address>
        <date>1543704748000</date>
        <type>1</type>
        You do
        <mmsReaded>1</mmsReaded>
        <attachments/>
    </sms>
</root>

This should be as desired.


How to open xz file into movie player program

xz is a compression file format. To uncompress it

If your file format is tar.xz use

tar xf archive.tar.xz

and if your file format is xz use

unxz archive.xz

If you are having problem with tar xf command then you may need to install xz-utils .
FYI xz-utils comes pre-installed in Ubuntu.

To install xz-utils use

sudo apt-get install xz-utils

You can also use Nautilus to extract the files.
After that use a video player to play your video.


Java application freezes very frequently

You could try Oracle JDK if you're using OpenJDK. I recall there was a performance difference in the Oracle JDK and the OpenJDK. I was running into performance issues in using IntelliJ, mostly being slower. That was over a year ago, not sure if the issue has been fixed today.


Wired networking problem on an Acer am350 netbook

Do you have the correct pass phrase and SSID for the school connection? Otherwise your connection might be rejected.

On the Upper Right Panel, Left clicking on the connection icon, shows you available wireless connection the system has found. Click on the correct SSID and when prompted type the CORRECT password.

When using a cat5 cable make sure Auto eth0 is active, click on it to turn it off, click again to turn on.

Right clicking on the connection icon, Gives you to the option to enable wireless, and enable networking. Enable Networking is for the cat5 cable. If I'm using cat5, I usually right click on the connection icon and disable wireless.

Right clicking the connection icon, you can see connection information. This will tell you what ip address you machine has been given by the server. The MAC address of your eth0 card, the connection speed, etc.

If you want your machine to automatically connect to the hotspot (making sure you have all the required and correct information from the school) Right click on the connection icon, click Edit Connections, Add Wireless and put all the info into the correct sections.

I usually connect to hidden wireless connections. I just left click the connection icon, and choose Connect to Hidden Wireless Connection, on the connection input box there is a drop down, click on the drop down (inverted triangle) to see networks you normally connect to. I just choose one of the many pre-configured connections, and click the connect button.

Also check that the wireless is physically turned on the laptop/netbook, usually a keyboard combination key FN plus a function key, or a slider button on the side or front of the laptop/netbook.

Let me know if you need more help. When asking for help give more details on your machine, manufacture and model of notebook etc.


Can't find wifi on newly installed Ubuntu 14.04

Your Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] works with the Broadcom proprietary driver. Please connect with ethernet and open a terminal and do:

sudo apt-get update
sudo apt-get install bcmwl-kernel-source

After it finishes, detach the ethernet and your wireless should be working.


Can xdotool position the mouse relative to current location?

You'll find the answer in the xdotool man page:

   mousemove_relative [options] x y
       Move the mouse x,y pixels relative to the current position of the
       mouse cursor.

       --polar
           Use polar coordinates. This makes 'x' an angle (in degrees,
           0-360, etc) and 'y' the distance.

           Rotation starts at 'up' (0 degrees) and rotates clockwise: 90 =
           right, 180 = down, 270 = left.

       --sync
           After sending the mouse move request, wait until the mouse is
           actually moved. If no movement is necessary, we will not wait.
           This is useful for scripts that depend on actions being
           completed before moving on.

           Note that we wait until the mouse moves at all, not necessarily
           that it actually reaches your intended destination. Some
           applications lock the mouse cursor to certain regions of the
           screen, so waiting for any movement is better in the general
           case than waiting for a specific target.

In your case it will be:

xdotool mousemove_relative --sync 5 0


Monitor won't go into sleep mode automatically after upgrading to 13.04

Turn off / remove xscreensaver:

sudo aptitude remove xscreensaver

Thanks to maestrobwh1 on Ubuntu Forums for the answer.


NVIDIA GTX1650, GPU Has fallen off the bus

I had exactly the same suspending/wake-up problem as you for the same laptop with Ubuntu 19.10. And it was very frustrating to realize that none of the suggestions around (persistence etc) fix it.

My driver was version 435.21, so initially I tried switching to 440.36 like you but the problem insisted.

@K7AAY, I guess you mean GTX-1650? As this is the OP card and the link says that 440 has added support for it.

Anyway, somehow I got it working by downgrading the driver from 435.21 to 430.09 and then back again to 435.21, so something must be broken along the line. Hope that helps.


Error executing javascrit file through nashorn jjs

Nashorn requires certain syntax, change your script for (check the shebang!):

#!/usr/bin/jjs -fv

print("Arguments: " + $ARG);
print($ARG);     // arg1, arg2
print($ARG[0]);  // arg1

And when executing, you can use:

jjs -scripting asdf.js -- arg1 arg2

Will print:

Arguments: arg1,arg2
arg1,arg2
arg1


can't download from ubuntu software center

go to terminal

type in sudo apt-get install synaptic
put in your password
tell it yes, you want to download and install
after complete
type exit
find synaptic package manager
use the command from the menu, fix broken packages
this should fix any broken packages causing the error


"Buffer I/O error on device fd0, logical block 0" error

This is indeed most likely an issue with Ubuntu thinking you have a floppy drive when you do not, and it thinks that because your BIOS is telling it to think that.

My BIOS is an Award Software BIOS; I believe Phoenix is the same company.

At boot of computer, press DEL to enter BIOS setup (this might be a different key, but your post screen probably will tell you what to hit if it's not DEL.)
In the BIOS, find the section that lists different drives (hard drives, floppies, etc). Mine was in Standard CMOS Features.
Select Drive A, and change to None.
Reboot, and your imaginary floppy won't be reported by the BIOS to Ubuntu!

Thank to Rrinzwind, who set me on finding out about disabling the floppy drive, and this forum thread which explained what was happening.


Ubuntu Touch – Flight mode still allowing connection

Don't worry this is not an issue.. It is always been like this.. With google's android too..
Sometime on a plane you may want to connect to the internal wifi service..

Bugs are many but more serious..


After following to the letter the How to install and configure Wine? guide including the part about making sure the WINEARCH is wine32 and using Windows XP as the default OS you need to install the following components using winetricks to have it exactly like my case:

d3dx10
d3dx9_26
d3dx9_28
d3dx9_31
d3dx9_35
d3dx9_36
d3dx9_39
d3dx9_42
d3dx9_43
d3dx9
directx9
dotnet20sp1
dotnet20
dotnet30sp1
dotnet35
dotnet40
gfw
mfc40
mfc42
msxml3
msxml4
msxml6
physx
quartz
vb6run
vcrun2003
vcrun2005
vcrun2008
vcrun2010
vcrun6sp6
vcrun6
wmp10
wsh56vb
wsh57
xact_jun2010
xact
xinput
xna40

After making sure all of this components are installed (Not all are needed for this game, but this are the ones I had installed already when I tested the game), you can install the game. In my case I used cdemu to install the 2 DVDs. After installing both run the Patch 1.0.7.0 then follow the instructions mentioned below in the comments in the WineHQ Comment Section to patch the Xlive DLL in order to avoid the Games for Windows - Live.

Note that the patch 1.0.7.0 actually disables the need for this by uninstalling the social part but you still have to put the DLL mentioned below in order for the game to actually start.

Here are some screenshots of the game in action:

And here is a video: https://www.youtube.com/watch?v=q0Juf4LC--g&feature=youtu.be

UPDATE: As mentioned by the youtube comments of Jean-Michel Beriault, the game works great on 64-bit, you still need to install dotnet30 and vcrun2005 but after that it should work. Thank Jean for the testing.


Sudo has lower privileges then normal user

That's a feature of NFS. Since NFS packets are not authenticated (they just say UID=x,GID=y, trust me), any NFS packets claiming to be from root (UID=0, GID=0) are remapped to nobody, a userid/groupid with NO privileges:

$ grep nobody /etc/passwd
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin

The other choice (A Very Bad Idea) is to believe the UID=0 in the NFS packet from Some Other System, and grant it root access to the NFS server/NAS. DO NOT DO THIS.


How to resolve errors from makefile for wireless dongle driver?

See my question and answer at dkms drivers for rtl8812au & rtl8814au network dongles fail to build on 17.10 (kernel 4.13)

Get the newest rtl8812au driver that's compatible with 18.04 at:

sudo git clone https://github.com/zebulon2/rtl8812au-driver-5.2.20.git


What if I upgrade Ubuntu 16.04 with AMDGPU-PRO to Ubuntu 18.04

It will almost certainly not work. From my experience the AMDGPU-PRO drivers have very specific kernel dependencies that are only satisfied by 16.04. If you upgrade the 18.04 your kernel jumps way ahead of that expected by the AMDGPU-PRO driver.


Warning: /root/.curlrc:1: warning: 'ip4' is unknown

It seems that this happens due to a IPv6 misconfiguration.

Issue the command echo ip4 >> ~/.curlrc this will remember the --ip4 flag for all future curl commands, and should fix the problem.

Source:

https://github.com/rvm/rvm/issues/2989


I'll try to provide a starting answer, and hopefully someone can edit and improve my answer if they have more relevant information.

Configuration options can be found at JUJU Keystone Charm.

From your machine with juju tools installed.

export JUJU_HOME=~/.cloud-install/juju
juju ssh landscape-server/0 sudo 'JUJU_HOME=/var/lib/landscape/juju-homes/`sudo ls -rt /var/lib/landscape/juju-homes/ | tail -1` sudo -u landscape -E bash'

Once connected you can juju set keystone "key=value" using the values found in the juju keystone charm page.  I don't know what specific settings you'll need add for active directory, but most likely you will find some of the information you need from Sample Active Directory Information.


What is the difference between the -e and -x options for gnome-terminal?

Consider:

gnome-terminal -x sleep 10m --version
gnome-terminal -e 'sleep 10m' --version

In the first example, everything after -x is used for the command to be executed. So GNOME Terminal will run sleep 10m --version as the command. --version in this case becomes part of the command to be run by GNOME Terminal.

In the second, only the single string argument to -e is used as the command, nothing else. So --version here is actually an option to GNOME Terminal.

The first can be more useful if you want to run a chain of commands:

gnome-terminal -x bash -c 'command 1; command 2; ...'

This is difficult to do with -e, because the entire command needs to be a single string, so you'll have to quote the whole thing. This in turn means that you need to be more careful of quotes and variable expansion and such:

gnome-terminal -e "bash -c 'command 1 $foo; command 2; ...'"

Here, $foo will be expanded by the current shell.

gnome-terminal -e 'bash -c "command 1 | awk '\''{print $NF}'\''"'

Using ' inside the command string involves annoying quote handling.


I have the same problem on Arch Linux but not on Ubuntu. On Arch I solved it by using this script to launch Steam.

LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /usr/$LIB/libgpg-error.so' steam

You can adapt and integrate that into /usr/share/applications/steam.desktop or make a new launch script, like /usr/bin/steam-start

You can also solve it by removing certain libraries from the steam-runtime folder. I used that before but the steam-runtime tends to get regenerated so I don't recommend this. I don't remember the exact files but here's a useful discussion.

On Arch this is caused by the system libraries being at the latest version, and thus incompatible with Steam. On Ubuntu this shouldn't be an issue since they are at a supported version, and Ubuntu is a supported distro by Valve.


How to make a file extension non-executable?

No file has executable permissions when created unless you changed the default umask settings yourself. You always need to set executable permissions yourself.

  What I want to do is, making all the files with a certain extension non-executable, So that Nautilus will prompt.

Nautilus has some options though (in preferences, behaviour, middle set of options):

What this does is check the file you click and check what the file is (by checking the shebang line or the 1st byte of the file) to see if it is an executable and offer to either execute, view or ask what to do with the file you clicked. Text files that have contain text (and not a shebang and/or code) will always open instead of getting executed.

Mind you: this is NOT based on extensions. Extensions are (/should be!) visual aids for us humans; not a way for programs to identify files (an MP3 named music.txt is still an MP3 and not a text file).


how can I have two scripted operations each have their own gnome-terminal?

That is somewhat easy, follow the example:

#!/bin/bash
echo "

    ##############################################
    #
    # to do somethings in two different terminals
    #
    ##############################################
"

gnome-terminal -e "bash -c \"\
gedit; \
libreoffice; \
\ # You can put your script there, before the slash.
\
exec bash\""

gnome-terminal -e "bash -c \"firefox; cheese; exec bash\"" # Or just make it all in one line

exit 0


Why is docker not in official Ubuntu repos?

Docker is in the official Ubuntu repos. The docker.io package provides it. See also the Launchpad page.

The version of the docker.io package in recent Ubuntu releases provides recent versions of Docker. There's a common misconception that docker.io provides a very old version of Docker. This is mostly false today, though it was once the case. Although the docker.io package is in the official repositories--actually, because it's in the official repositories--you won't always get updates for the very latest versions of Docker with the newest features. This is not specific to Docker. In general, official packages within the same Ubuntu release are updated only for security and serious stability bugs, not new feature versions. (Actually, Docker is updated somewhat more often than most other packages, though you can see that Ubuntu 18.04 LTS does not have the very latest version.)

The docker.io package is in the universe repository, which means it is maintained by the community rather than by Canonical employees. But that is still an official Ubuntu repository. Although many of the most important packages are in the main or restricted repositories and maintained by Canonical, the vast majority of software in Ubuntu's official repositories is community-maintained rather than maintained by Canonical. If you wish to install Docker through the docker.io package but cannot do so, you might not have the universe repository enabled. In that case, you can enable it.

I don't know what your misgivings are about Docker or what you're hearing about it, so I can't really address that directly. However, as touched on in Why is some software not in the official Ubuntu repositories?, Ubuntu is a derivative of Debian and most software in Ubuntu comes from Debian. There are some exceptions, but for the most part, when potentially useful software is absent in Ubuntu's official APT repositories, it is because no one has packaged and maintained it in Debian, and when it is present in those repositories, it's because someone has done that. (Snap packages are another story, as they're not imported from Debian.)

When Canonical maintains a package in Ubuntu--that is, when it is in the main or restricted repository--this sometimes does reflect a choice on their part. (Other times, it just reflects that you can't really reasonably run the system without that package. Ubuntu is supposed to work even if you don't install any software from the universe or multiverse repositories.) But being community-maintained rather than Canonical-maintained is the most common status for official Ubuntu packages, and does not usually reflect any misgivings on the part of Canonical or anyone else. docker.io is one of the many packages that is in Ubuntu because it is in Debian.

Note that the docker.io package in Debian and Ubuntu packages Docker in a way that differs considerably from the way it is packaged in the upstream Docker package docker-ce (which you would install by enabling the upstream Docker repositories, which seems to be how most people choose to install Docker). Basically, the docker.io package depends extensively on other packages, while the upstream docker-ce package contains most of its own dependencies. As Lutz Prechelt explains in What is docker.io in relation to docker-ce and docker-ee?:

  docker-ce is provided by docker.com, docker.io is provided by
  Debian.

  On the surface, this means you can install docker.io rightaway,
  while for docker-ce you have to attach an external repository from
  docker.com beforehands.

  More importantly, however, although both packages provide properly
  released versions of Docker, they have a very different internal
  structure:

  docker.io does it the Debian (or Ubuntu) way: Each external dependency is a separate package that can and will be updated
  independently.
  docker-ce does it the Golang way: All dependencies are pulled into the source tree before the build and the whole thing forms
  one single package afterwards. So you always update docker with all
  its dependencies at once.

That answer goes on to argue in favor of the approach taken in docker.io. It's worth a read.

See How do I install Docker on Ubuntu 16.04 LTS? and Docker-CE or docker.io package for more information, including information on installing the upstream docker-ce package.


update-manager -d

Accept all updates, it'll reload, and it'll tell you there is a new release.


Sounds like it might be an issue with compiz. Try pressing Alt+F2 and then type compiz --replace.


How to reproduce "systemctl EDIT" behavior in Ubuntu LTS

Copy the file /lib/systemd/dnscrypt-proxy.socket to /etc/systemd/system.
Edit the parameters you wish to change.
Done.

This works because the system will preferentially use definitions found in /etc/systemd/system over /lib/systemd/.

We copy the default service definition from /lib/systemd/ rather than creating a stub edits.conf , /etc/systemd/system/dnscrypt-proxy.d/edits.conf because systemd versions 217 and earlier do not support stubs.


Application to turn screenshot (Ctrl+Shift+PrtScn) into file

Simply pressing shift+print should save it in a file in your ~/Picture folder.

Keys are here (System Setting -> Keyboard):

Notice that there is a little problem I have found a couple of time. The saved file is named something like Screenshot 2013-11-04 10:00:03.png. If you copy that file to a Dropbox folder (for example) or other shared folder with a Windows machine, it will not appear on the Windows side, because the colon : is a forbidden char in Windows filenames. So you have to rename it... for more deatils see: How can i change the default name for the screenshots made by gnome-screenshot?


Are wine-based and mono-based programs started differently?

Wine: In terminal: wine /path/to/executable.exe

Mono: create a shortcut or a launcher, and have it as mono /path/to/program.exe   (another method is to hit Alt+F2 and type in mono /path/to/program.exe)

That should answer your two questions.


chmod changing permissions of Read-only file system

chmod 777 is never the correct permissions change unless you also use the sticky bit. Use 770 or even 750. Others (3rd digit) have nothing (=0) to do on your systems.
NTFS is not a POSIX compliant system so linux tools will never ever work. You set user, group and permissions when mounting NTFS
Regarding NTFS: our NTFS driver will always refuse to mount NTFS as writable if the file system is dirty. That happens when you use hibernation or suspend (ie. fast boot) on Windows and then boot into Linux.

What are the "defaults" set for your system? I would have expected to see at least uid=1000,gid=1000 with the mount options for NTFS so the partition is mounted with your user and group. ,dmask=027,fmask=137 are also options I tend to see there.


multi boot win xp pro 32 bit, win 7 pro 64 bit, ubuntu 14.04 64 bit

Starts with the live-cd of Ubuntu.
Loading is complete and opens a terminal running on it:

sudo su
gparted

Loaded gparted, you choose the disk dev/sda.
Creates a new table of msdos partition.
Applies the changes.
Then creates in the unpartitioned space:
A primary partition, fat 32 file system of 500 megs.
A primary partition ntfs file system of 80 gigs.
A primary partition ntfs file system of 120 gigs.
An extended partition the rest free.
A logical partition within the extended file system ext4 of 120 gigs.
A logical partition within the extended file system exchange (swap) of 12 gigas.
A logical partition within the extended file system ext4 of 120 gigs.
A logical partition within the extended ntfs file system, free from the rest.
Applies the changes.
Starts the installation of Windows XP, choose the first NTFS partition 80 gigas, format it, completed the installation:
Starts the installation of Windows 7, choose the second ntfs partition of 120 gigs, format it,completed the installation verifies that Windows 7 allows you to start with both operational, any doubt consultation to a Microsoft forum.
Starts the installation of Ubuntu.
When you get to choose manual custom partitioning.
Selects the first logical partition ext4 40 gigs for /.
Selects the third partition logic ext4 of 120 gigs for /home.
The GRUB on the MBR of /dev/sda.


First of all, you should try using nomodeset (as you did).
Second, as Ubuntu (and Mint) are not really up-to-date compared to the new hardware, I suggest trying something in Arch Linux direction. The kernel used by Ubuntu is more than half a year old (with some fixes, but no major changes).
Third, you should NOT use AMD software from their homepage. The best you can do is adding a ppa (like Kisak's Mesa) for newer open source VGA drivers.
Fourth "Yes, AMD doesn't work. Nowhere on linux."
That's totally wrong. They are contributing a lot and the experience is really smooth in the past few years, but only with somewhat older hardware. What they really lack is to be able to have first day support, but after some waiting they won't disappoint you.


How do you create a "new document" keyboard shortcut?

First, open gconf-editor and set /desktop/gnome/interface/can_change_accels to true.  This lets you edit menu shortcuts.

Second, open a terminal and type:
killall nautilus && UBUNTU_MENUPROXY= nautilus
This will relaunch Nautilus with the standard (non-Unity) menu bar, because the Unity menu bar doesn't support this feature. (It will respect your changed shortcuts, but it won't let you change them.)

Now, open the file menu, hover the mouse over Create Document > Empty File and press your desired shortcut. Ctrl-Alt-N seems like a decent choice, or you can reassign Ctrl-N. You should see the accelerator hint change in the menu.

Finally, relaunch Nautilus without the UBUNTU_MENUPROXY variable to get your Unity menus back with the new shortcut.

Edit: The solution for newer versions is nearly the same , except you need to use dconf-editor instead of gconf-editor. You can install the dconf-tools package to get dconf-editor.

Also, the killall nautilus ... command did not appear to be necessary.

Run dconf-editor.
Go to org/gnome/desktop/interface.
Check the box for can-change-accels.
Open Nautilus and highlight the menu item whose key binding you want to change, either with your mouse or via the keyboard, and press the key(s) you want to use as the shortcut.
Don't forget to uncheck can-change-accels in dconf-editor after you're done.


Proprietary nvidia drivers for TitanX screen refresh problems (Ubuntu 14.04)

Generally you should use the NVIDIA drivers from the Ubuntu repositories.
But when there are problems with the drivers - and you are having problems ...
then you can install the latest official NVIDIA drivers from the GPU Drivers PPA.
This often leads to properly working graphics, especially on "NVIDIA power cards".

Remove the currently installed drivers - open a terminal and execute :

sudo apt-get purge nvidia*
sudo reboot

Install the latest official stable drivers - open a terminal and execute :

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-358
sudo reboot


Best Graphics card (Setup) for three, high-res monitors attached to desktop

For triple-monitor support you need to be aware that most non-DisplayPort graphics cards only support two simultaneous outputs, because they only have two PLLs, and hence can generate two pixel clocks. Since you are planning to use 3 DisplayPort monitors (Dell U2713HM) this should not be a problem, but if you change your mind and use non-DP monitors, it is an important constraint. If you have absolutely identical monitors (same internals, same frequency pixel clock) then some drivers will allow you to share a single pixel clock between two displays (the Intel driver will for sure, and I think AMD's open source driver will). For more details see Wikipedia Intel graphics and three active displays.

Your options are:

Intel HD integrated graphics. Intel GPU comes with your CPU, and is well supported with open source drivers. The Intel drivers can share PLLs for triple-head on non-DP monitors. You will need a motherboard with three video outputs, or laptop with DisplayPort/Thunderbolt ports.
(for DVI/HDMI monitors) AMD Radeon with a Sapphire FleX card. Sapphire's FleX is a brand name for cards that have a third PLL, and so can support three simultaneous outputs.
(for DP monitors) AMD Radeon Eyefinity supports upto 6 monitors with the open source radeon driver. You can also use this card with non-DP monitors, but you will need active DP adaptors. For more details see Using six monitors with AMD's open-source driver.
Nvidia Surround with the closed source driver. According to the answers to the question Linux + “nVidia surround” + 3 monitors? this should work correctly with upto 4 monitors.
You do not necessarily need multiple video outputs if you have DisplayPort 1.2 monitors or a DisplayPort MST Hub. In this case, you can use a graphics card or laptop with a single DisplayPort output and connect it to multiple DP 1.2 monitors with "daisy-chaining", or connect it with a single cable to the DisplayPort MST Hub, and then connect the MST Hub to your monitors. This option is working but not quite ready yet - the patches are expected to appear in the Linux 3.16 kernel.

It should be a lot more common to see this option in the future, as it enables a laptop with single mini-DP connector to drive multiple monitors. (For space and cost reasons, laptops do not usually feature multiple DP ports).


Virtual box doesnt have files machine and help tab

The original post was closed because from the screenshot it appeared you were opening Ubuntu from Windows.  Basically it is not an Ubuntu problem.  It is a vbox in windows problem and they would be better able to help you at:  https://superuser.com/

That being said, maybe this would help:  https://forums.virtualbox.org/viewtopic.php?f=8&t=47217

Or probably this: Right Ctrl + C


Boot XP from secondary HDD using GRUB2 on primary HDD

The error message you're seeing implies that your current setup is in EFI mode. Windows XP, though, does not support booting in EFI mode -- it's a BIOS-only OS. Furthermore, Windows XP has reached end-of-life (EOL) status. The simplest answer to your question is therefore "forget it." You should be able to extract user data from the disk from either a more modern Windows or from Linux. If you really have a compelling need to run Windows XP, I have several suggestions:

Virtualize it -- You can run XP in a virtual machine, such as under VirtualBox. See here for information on how to provide VirtualBox with direct ("raw") disk access to boot your existing Windows XP installation.
Convert it all to BIOS mode -- You can convert all your current OSes to boot in BIOS mode. This will require doing a GPT-to-MBR disk conversion, re-installing GRUB, and either re-installing your existing Windows boot loader or re-installing Windows. This is probably the most difficult transition of the options described here, but it should work smoothly once you're done with it.
Manually switch boot modes -- Many EFIs provide a built-in boot manager that can switch between EFI-mode and BIOS-mode boots. If you have such a firmware, you should be able to manually switch boot modes by accessing this boot manager. Unfortunately, details vary greatly from one EFI to another, so I can't provide detailed instructions on how to do this.
Use rEFInd -- My rEFInd boot manager can switch boot modes, but you'll need to edit the refind.conf configuration file: Uncomment the scanfor option and ensure that hdbios is among the options. This feature is very primitive, though; at the moment, it usually works to boot only from the first hard disk, so you may need to swap disk cables or install a BIOS-mode boot loader on the first disk to redirect the boot process to the second disk. Some computers lack the necessary firmware features for rEFInd to work at all in this way.
Use a second computer -- This is the simplest option. Stick the disk in a second computer and use it.

Note also that Windows (even as old as XP) tends to be fussy about its hardware, so it may require several reboots to update its drivers for its new environment. In fact, it probably doesn't even have drivers for modern computers; you may need to get them from your computer's manufacturer -- assuming they even exist! (VirtualBox is likely to be easier this way, because it emulates fairly old hardware.)


How can I install yEd graph editor on Ubuntu?

There are two ways to install yEd on Ubuntu.

Using the provided graphical installer

yEd comes with an easy-to-use graphical installer that takes care of all the system dependencies (Java, most importantly):

Follow these steps:

Find the yEd Graph Editor section on the yworks download page
Download the appropriate Linux yEd installer for your system (32- or 64-bit)
Make the installer executable with chmod +x yEd<...>.sh or by going into the properties menu of your file manager (Properties → Permissions → Allow executing file as program)
Run the installer and follow the outlined steps
When you're done you should be able to find yEd in your Unity Dash

Manual installation

Make sure you have the latest Java release installed
Download the zipped yEd release on its download page
Extract the contents of the zipfile
Navigate to the extracted folder and open yed.jar in java:

java -jar "yed.jar"

To integrate yEd into your system you can create a .desktop launcher under ~/.local/share/applications. E.g.:

$ cat ~/.local/share/applications/yed.desktop
[Desktop Entry]
Encoding=UTF-8
Name=yEd Graph Editor
Comment=Edit graphml files in yed
Exec=java -jar /home/user/applications/yEd/yed.jar %u
Terminal=false
Type=Application
Icon=/home/user/applications/yEd/icons/yicon32.png
Categories=Application;Office
StartupNotify=false
MimeType=application/xml;
NoDisplay=false

Make sure to change the Exec= and Icon= lines according to your system.


How do I get a Belkin F5D8053 wireless adapter working?

If you have a 050d:815f version that uses Realtek chip rtl8192su then follow the steps below to install the drivers. I've tried it on version 10.04, but it should work on 11.04 as well.

Make sure you have 050d:815f.

lsusb | grep Belkin
Create a directory to store the driver.

sudo mkdir /lib/firmware/RTL8192SU
Download the driver. Make sure you have internet connection enabled or use other pc and copy it over to the created directory.

sudo wget http://launchpadlibrarian.net/37387612/rtl8192sfw.bin.gz
Unzip the driver.

sudo gunzip rtl8192sfw.bin.gz
Restart the adapter. Just plug it off and back on. The light on the adapter should start blinking after few seconds, and the list of connections will appear.

If it doesn't work try following the steps outlined in this to troubleshoot and get the exact error message page.

If you're desperate on making it work I'd suggest getting an adapter from this list.

Unfortunately an integrated Wi-Fi card on my laptop is performing by a factor of 30 better then the Belking USB adapter. My Broadband connection is 10Mbit, and the download speed is @ 0.3 Mbit, which is ridiculous. Wondering if that is a problem with Linux or with an adapter. This is my second Belking USB, and I'd never buy another...

After more testing I found that on Windows 7 the same USB adapter performs at 0.8 Mbit in Windows, which is just 15 times slower then the built-in (much older in fact) adapter in my laptop, and uses only 8% of available throughput. Claims that it is "Best for Speed & Coverage" seem to be ridiculous. And the conclusion seems to be that this USB adapter is a piece of crap.


Suddenly the wifi option from the main tray and settings is gone

Run the following command
sudo apt-get install --reinstall bcmwl-kernel-source
It might help you.