Is it a bad idea to upgrade to 18.04 right now?

In my opinion, it's not worth it.

I had been using Ubuntu 16.04.1 for 2 years. Apart from a few minor bugs, I had no problem with it. As soon as the new Ubuntu 18.04 was released (26 April), I did a clean installation.

But then came the major bugs.

Eclipse would refuse to start and give a missing runtime error, even though I installed it the exact same way I did it 2 years ago. After fixing that problem, Eclipse works, but it hangs alot.
Visual Studio Code refused to start, even though I installed it using command line (sudo apt-get), the exact same way I did few months ago. I had to manually make changes in the installation folders to fix it.
sudo apt-get upgrade gives Error 404 too often.
Ubuntu 18.04 lagged a lot, even though Ubuntu 16.04.1 ran smoothly.
Ubuntu 18.04 hangs an average thrice a day and doesn't recover from it, so I have to do a force shutdown. Unlike Ubuntu 16.04.1 which would usually recover on its own.
Sometimes Ubuntu 18.04 hangs at the login screen itself. Again, force shutdown is the only solution.
Most problems reported on Ask Ubuntu, Stack Overflow and YouTube are for older versions. And their solutions don't work for Ubuntu 18.04.
SciDAVis, a plotting software for scientific data, is not available in Ubuntu 18.04 anymore due to dependency issues.

It took me an entire Sunday to get all my software running again. And I haven't solved all the problems yet.

So, if you really want to upgrade, wait for Ubuntu 18.04.1 which will come out soon. The current version has been released in a hurry to meet the deadline. If you don't need anything from the new upgrade, then it's a risk you're taking.

Good luck ;) if you're willing to risk it.


I believe what you need is to connect to the server this way:

ssh user@server -X

With the -X argument the session renders the graphical interface of the program in your client.


How do I tune WordPress to make my site more responsive?

If you have full root access to the box, you might want to look at some of the tweaks on Elliott C. Back's Post: Why My Site Is So Much Faster Than Yours. Some can be done on Non Root enabled boxes (like W3 Super Cache, which i use for my own sites), but others may need root access for (like tweaking MySQL, PHP OpCode, Apache and Kernel tweaks).


please disregard the post above, issue got solved after updating the kernel to 5.12.*
Apparently Ubuntu 20.1 ships with 5.8 which has problems and there are bugs opened for that. I am not sure if I can post links here so I won't If anybody is interested i can provide them.


Ubuntu 20.04: apt update gives error for wireguard (2)

You need to remove wireguard source list manually.
sudo rm -f /etc/apt/sources.list.d/wireguard*


dpkg error (1) while Installing anything

The directory/var/cache/apt/archives/ is where the .deb files that apt downloads are stored. Once you have installed the respective programs, you can delete the .deb's, but that should be done with the command sudo apt-get clean.


How to build an USB driver and data extractor (Magnetic Card Reader)? [Python, Ruby]

Start by looking at the Wikipedia article on magstripe cards, which describes the common data layouts.

Your reader is designed for track 2, which means it reads a series of digits and special characters.  From the product page, the device shows up on your system as a keyboard and enters the characters it sees.  Thus, the information you see when you swipe the card is exactly the information stored on track 2 of the card.  In this case, it looks like your customer ID number and nothing else.

To get more interesting bits such as names, you could try placing a physical shim inside the reader so that the head reads across track 1.  However, this might not work if the hardware only knows how to decode track 2.

To read the device programmatically, you can use stdin just like you would for a full keyboard.  The open-source StripeSnoop project is long dead, but you can probably glean some good tips from it nonetheless.  Magstripe technology hasn't changed in a long time.  Hack a Day also has some good links on credit cards.


My laptop display is just a black screen

There's a kernel bug that affects Acer laptops. Basically, the backlight isn't being turned on. You can read the bug report here.

The bug hasn't been fixed, but there's a workaround:

In short, the answer that worked for me was two-fold: first, place the following in /etc/rc.local:

setpci -s 00:02.0 F4.B=0

That should make the backlight turn on. You can run the command from the command line to test it, but from the command line, be sure to put sudo in front.

Then, if the backlight doesn't come on after the computer goes into power-saving mode, put the command into root's crontab. Run sudo crontab -eu root and insert the following line:

*/1 * * * /usr/bin/setpci -s 00:02.0 F4.B=0

This will cause the backlight to turn on no more than one minute after the computer resumes.


As for the install taking long, many USB sticks are simply one thing: slow. As for 8GB swap on USB, if that's ever used for anything it'll be even slower. It's better to have no swap at all if it's a slow USB media. Also ext4 (journaling in general) may be the wrong choice for USB, it requires extra write cycles (again, slow) and may considerably reduce the lifetime of the USB stick. I'd go with ext2 even if it means a wait time in case of fsck.

Installing on and booting from USB should work fine otherwise. Maybe Grub detected a wrong drive order; the device that's used for booting will usually be the first, i.e. what Grub sees as (hd0). In such a case you might have to install Grub manually (chroot after install, adapt the device.map, grub-install /dev/yourstick). But even so, Grub should at least show up and print an error message or something when you try to boot from the stick.

If the box has a CD drive, booting from CD might help avoid confusion regarding drive order for two USB sticks. Or any other way to get rid of the installation media stick before install (BootToRam or similar - sorry I'm not up to date if current install media offer such a feature).


This happened because the names of quite a few UTF-8 locales in /usr/share/i18n/SUPPORTED don't include the codeset part ".UTF-8", and fa_IR is one of those.

$ grep -E '[a-z]+_[A-Z]+ UTF-8' /usr/share/i18n/SUPPORTED | grep fa
fa_IR UTF-8

In Ubuntu 16.04 the locale-gen script has been changed, so the user doesn't need to be aware of the exact naming in SUPPORTED. Hence in 16.04 this will work:

sudo locale-gen fa_IR.UTF-8

For previous Ubuntu versions, the simplest way to create one of these locales is to use the exact name according to SUPPORTED, for example:

sudo locale-gen fa_IR

So, AbdolHosein, your question helped us improve Ubuntu. Thank you for that. :)


How do I rip CDs with Sound Juicer over X11 forwarding?

According to the sound juicer source it requires both access to gconf and gvfs. It looks like it uses gvfs to see what cdrom drives you have available. Failure to access them or having gvfs policies which stop you seeing them will be a real problem.

I'd report this problem to the sound juicer bugs:

https://bugzilla.gnome.org/describecomponents.cgi?product=sound-juicer


It appears that there is a problem with the unixODBC that comes with the ODBC Driver on 19.10 (specifically one of the dependencies of the unixODBC that's provided with the driver depends on multiarch-support for some reason, which is present on all the other Ubuntus, but not on 19.10)

To get around that you can either download the package from http://www.unixodbc.com/ (Download page) and follow the instructions to install it manually. Or install the default unixODBC that is in the Ubuntu repo by doing the following:

#delete the package info, so that apt doesn't try to use that version of unixODBC
sudo rm /etc/apt/sources.list.d/mssql-release.list

#install the default one
sudo apt install unixodbc

#re-add the package and install the driver
sudo su
curl https://packages.microsoft.com/config/ubuntu/19.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
exit
sudo apt install msodbcsql17


You need to enter bios and change it so that the USB is the first bootable drive. Since all computers are different it's hard to say how to access bios. The usual keys are Delete Esc F2 F8 F10 or F12

Depending on how old it is .. it may not even have the capability to boot from a USB. If it has a CD in it.. I may try using that instead.


This depends on whether whoever made the package honoured Ubuntu/Debian's versioning of their packages. For example, consider the Vim package:

$ apt-cache policy vim
vim:
  Installed: 2:7.4.811-1~ppa1~t
  Candidate: 2:7.4.811-1~ppa1~t
  Version table:
 *** 2:7.4.811-1~ppa1~t 0
        500 http://ppa.launchpad.net/pi-rho/dev/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
     2:7.4.052-1ubuntu3 0
        500 http://mirror.cse.iitk.ac.in/ubuntu/ trusty/main amd64 Packages

If, say, tomorrow Vim 7.5 releases, and somebody makes a package of that with version 7.5 instead of 2:7.5, it will be "upgraded" to 2:7.4.811-1~... the next time I upgrade packages in my system.

To explain, a Debian package version has three major fields (see man 5 deb-version for more information):

the epoch
the upstream version
the debian revision

Thus:

2:7.4.811-1~ppa1~t
¯ ¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯
|    |       |
|    |       --- *debian revision*
|    --- *upstream version*
--- *epoch*

The epoch and the debian revision are added by the packagers, and the upstream version usually comes from, well, the upstream. If the new package follows any epoch that the packages in the repository had, then things should work as expected. The debian revision isn't important in this case, since an increase in upstream version always trumps it.


I ran 11.04 on a Mac and I loved it. Why does it look different on a PC?

It sounds like your PC did not have the proper hardware (or hardware drivers) to run the full 3D Unity experience.  There are two things you could try to fix this:

Upgrade to 11.10.  In 11.10 there is a 2D fallback version of Unity that looks and behaves like the 3D version, but does not require hardware acceleration.
Try seeing if there is a proprietary driver available for your system by running the "Additional drivers" tool while connected to the internet.

Of course, both upgrading to 11.10 and checking for a proprietary driver will give you the best results.

According the to Nvidia Linux Display Drivers page, you need the 304-experimental driver for a GeForce 460. This driver should be listed when you check for a proprietary driver.


You can have only one version of PHP loaded as Apache module.
However, you can install another version of PHP and use it in CGI mode for selected directories. The Apache configuration for this will be a bit complicated, but it seems doable.


chmod u+x ./nameOfMyProgram Set eXecute permissions to the file for the User.


The first line of the error message in the second screenshot of the question is significant:
[FAILED] Failed to start Load Kernel Modules.

If the kernel modules don't load in the beginning then nothing else is going to work after that.
It is possible to make an Ubuntu Minimal USB for installing Ubuntu on devices that are hard to install with the full-sized Ubuntu iso. The extreme difference in size of 64 MB for the Ubuntu Minimal CD vs. 1.5 GB for the full-sized Ubuntu .iso file might be sufficient to induce the asker's recalcitrant hardware to at least start loading the kernel modules and get on with the text-only Ubuntu installer.
Make a bootable Ubuntu Minimal USB on either Ubuntu or Windows Subsystem for Linux in Windows 10 using dd
How to make an Ubuntu Minimal USB
While the minimal iso image is handy, it isn't useful for installing on UEFI-based systems that you want to run in UEFI mode. The mini iso lacks the proper files for booting the computer in UEFI mode. Thus, the computer will boot in BIOS compatibility mode, and the installation will be in BIOS mode.

Download the Ubuntu Mini CD iso file from the link on the Ubuntu Documentation Installation Minimal CD webpage. Links for the Ubuntu 18.04 and Ubuntu 19.04 mini.iso files are listed below. Download the Ubuntu Mini CD iso file for Ubuntu 20.04 from http://archive.ubuntu.com/ubuntu/dists/focal/main/installer-amd64/current/legacy-images/netboot/mini.iso.
Download the file called mini.iso to your Downloads folder. You can download the mini.iso file to wherever on your computer that you want, but download it to your Downloads folder so that you can easily run the commands in the following steps without changing anything.

Verify the md5 checksum of the Ubuntu mini CD iso file that you downloaded by running these commands:
cd ~/Downloads/
md5sum 'mini.iso'

If you are using Windows Subsystem for Linux download the Microsoft File Checksum Integrity Verifier tool from the official Microsoft Download Center. The Microsoft File Checksum Integrity Verifier tool is a command line utility that computes MD5 or SHA1 cryptographic hashes for files.

Check that the results of the command match the MD5 checksum of the mini.iso file on the Ubuntu Documentation Installation Minimal CD webpage.

Get a USB flash drive, 1GB or larger. Delete all the files from the USB flash drive. Mount the flash drive using the Disks disk utility.

Check in the Disks disk utility to find out the device name of your USB flash drive. This is very important because if you use the wrong device name in step 6, you will overwrite your whole operating system instead of writing to the USB flash drive. So check the USB flash drive device name twice.  It should be something like /dev/sd* where instead of the * character there is a lower case letter like a, b, c, etc. In the following step I am assuming that the device name is /dev/sdc, but the device name of your USB drive could be something else like /dev/sda or /dev/sdb so check the device name of your USB drive twice and make sure that you get it right in step 6!

Open the terminal or Windows Subsystem for Linux version 2 and run the following commands:
cd ~/Downloads/
sudo -i
dd if='mini.iso' of=/dev/sdc bs=4096  ## make sure that the device name of your USB drive is correct!

The dd if='mini.iso' of=/dev/sdc bs=4096 command should take only a few seconds to complete on most computers because the mini.iso is a small file, less than 60MB. The result of running this command will be a bootable Ubuntu mini USB.

Boot the computer from the Ubuntu mini live USB. The Ubuntu mini live USB should boot successfully and show a menu screen.

If you select the Install option (the complete install, not the cli install) from the menu screen in Step 7, then you can select other options during the Ubuntu installation process to download all the packages that you need to perform a complete Ubuntu installation. Select the Ubuntu desktop package collection from the list of predefined collections of software in the Software selection screen in the Ubuntu mini CD installer. When you restart the system at the end of the installation, you will have a working Ubuntu desktop with the default desktop environment.

Gaining access to the keyboard after installing Ubuntu
The asker of this question has successfully installed Ubuntu by following the instructions in the first section of this answer, but the problem with the keyboard still remains. Starting from the observation that the keyboard works when booting from the Ubuntu Minimal CD, suggests that the keyboard would also work if Ubuntu was booted from Recovery mode into a failsafe GUI Xorg environment. The instructions for booting into a failsafe GUI environment are as follows.
Immediately after the BIOS/UEFI splash screen during boot, with BIOS, quickly press and hold the Shift key, which will bring up a GNU GRUB menu screen. With UEFI press (perhaps several times) the Esc key to get to the GNU GRUB menu screen. Sometimes the manufacturer's splash screen is a part of the Windows bootloader, so when you power up the machine it goes straight to the GNU GRUB menu screen, and then pressing Shift is unnecessary.
You will see a GNU GRUB menu screen that looks like this:

The timing when to press the left Shift key can be tricky, so sometimes if you miss it you need to try it again.
Press the down arrow key until you select the 2nd entry from the top (the one with the recovery mode in the description) and then press Enter twice.
Repair Ubuntu from recovery mode
Now you should see this recovery menu:

Using the arrow keys scroll down to network and then press Enter.
Using the arrow keys scroll down to root and then press Enter.
You should now see a root prompt, something like this:
root@ubuntu:~#

At this stage you should have a read-only filesystem. You have to remount it with write permissions:
mount -rw -o remount /

Using the arrow keys scroll down to an option in the Recovery Menu and then press Enter to run it. Try booting into a failsafe GUI environment by selecting the failsafeX option or resume normal boot by selecting the resume option. If that doesn't work, the clean, dpkg, fsck and grub options may also be able to repair your operating system so that it boots normally.


Cleaning the command line (like `ESC` in Windows)

You could use

ctrl+l

to clear your screen. Or

ctrl+u

to clear the line before your cursor. Or

ctrl+c

to abort your command.


I'm about to put Ubuntu 12.04 on my Dell XPS 17 (l702x) 1080p 3D model. From what I've read, you need to start with the "alternate CD", which is less user friendly, from an installation point-of-view (text mode), but is supposed to work. I've linked to the 64-bit version.

All Ubuntu 12.04 iso images can be found at http://gb.releases.ubuntu.com/12.04/.

Just to pre-empt any issues you might have once installed, I'm also including the following links (no particular order):

Ubuntu 11.04 on XPS 17 (useful info)
Fixing Intel HDA audio on Ubuntu (The older/outdated info on this page was deemed better than the new linked method, by an XPS user.
More on fixing Intel HDA audio on Ubuntu
Fixing Intel n-1000 wireless WIFI card driver on Ubuntu
Fixing Intel n-1000 wireless WIFI card sleep behaviour on Ubuntu
Fixing screen brightness control on Dell XPS 17 under Ubuntu

I hope this of use to you and the community.

Cheers

Rich


As easiest and fastest solution is reinstall your Eclipse.


Update: I wasn't able to figure out exactly what was going wrong, but (as a guess) I tried installing on a partition on a new SSD (instead of sda that held the old 16.04 partition), and that worked. I guess there's something about the old volume that made the 20.04 installer fatally confused. Also, this means the RAID array wasn't a problem. I never did figure out if there's a good way to extract the installer logs, but now I don't need to anymore.


Install problems on a Compaq Presario CQ50

You can use UNETBOOTIN software to create a bootable USB, or you can use UNIVERSAL USB INSTALLER both are very good.


Crashplan and samba printing problems after upgrade to 12.04

I think you need to install Sun's Java SDK for CrashPlan (This was removed from the distro in 12.04) - Walkthrough Here: http://www.gaggl.com/2012/04/installing-java6-jdk-on-ubuntu-12-04/.

I've also been struggling to get CrashPlan to run.  Post back here if you have any updates/successes.


How to load a apllication to the memory using shell scripting?

Due to the way modern operating systems re-map all the memory addresses via a Virtual Memory scheme, there is no way of knowing what the true address will be at any given time. Also, due to the protective measures imposed by modern OSs, you do not have direct access to hardware resources from a user-mode application.

Sources:

http://ubuntuforums.org/announce.html?t=1293392
http://en.wikipedia.org/wiki/Virtual_memory


Nautilus crash "aborted ('core' dumped)"

Try reinstalling nautilus:

sudo apt-get install --reinstall nautilus


MAAS 2.0. Importing custom images does not work?

OK, shame on me. I have forgot to run

maas local boot-resources import

after executing

maas local boot-resources create -d name=custom/foo architecture=amd64/generic filetype=tgz content@=/tmp/ubuntu1604-tgz

Took me a while to figure that out.

Since MAAS documentation is rather poor when it comes to importing custom images, I think I'll write short guidelines how to do it.

First you should know that naming is important. So if you want to import custom image, you should give an appropriate name parameter:

maas local boot-resources create name=custom/foo title="Title is not important" architecture=amd64/generic content@=/path/to/your/image
maas local boot-resources import

Take a close look at name=custom/foo. MAAS is expecting that custom image name starts with custom. There is no difference what you write after the slash, so name=custom/foo is as good as name=custom/bar123.

If you want to import CentOS image, naming is also important according to src/provisioningserver/drivers/osystem/centos.py. To import a custom image for CentOS 7.2, you should execute:

maas local boot-resources create -d name=centos/centos72 architecture=amd64/generic content@=/path/to/your/image
maas local boot-resources import

Yes, exactly. Name parameter should be name=centos/centos72 for CentOS 7.2, name=centos/centos67 for CentOS 6.7 and so on. That's how distro match regexp is implemented.

Haven't tried importing custom SuSE and Windows images, but there should be naming restrictions too. Just take a look to MAAS sources in src/provisioningserver/drivers/osystem/.


How do I find the path to pg_hba.conf from the shell?

pg_config is for compliation information, to help extensions and client programs compile and link against PostgreSQL. It knows nothing about the active PostgreSQL instance(s) on the machine, only the binaries.

pg_hba.conf can appear in many other places depending on how Pg was installed. The standard location is pg_hba.conf within the data_directory of the database (which could be in /home, /var/lib/pgsql, /var/lib/postgresql/[version]/, /opt/postgres/, etc etc etc) but users and packagers can put it wherever they like. Unfortunately.

The only valid ways find pg_hba.conf is to ask a running PostgreSQL instance where it's pg_hba.conf is, or ask the sysadmin where it is. You can't even rely on asking where the datadir is and parsing postgresql.conf because an init script might passed a param like -c hba_file=/some/other/path when starting Pg.

What you want to do is ask PostgreSQL:

SHOW hba_file;

This command must be run on a superuser session, so for shell scripting you might write something like:

psql -t -P format=unaligned -c 'show hba_file';

and set the environment variables PGUSER, PGDATABASE, etc to ensure that the connection is right.

Yes, this is somewhat of a chicken-and-egg problem, in that if the user can't connect (say, after screwing up editing pg_hba.conf) you can't find pg_hba.conf in order to fix it.

Another option is to look at the ps command's output and see if the postmaster data directory argument -D is visible there, e.g.

ps aux  | grep 'postgres *-D'

since pg_hba.conf will be inside the data directory (unless you're on Debian/Ubuntu or some derivative and using their packages).

If you're targeting specifically Ubuntu systems with PostgreSQL installed from Debian/Ubuntu packages it gets a little easier. You don't have to deal with hand-compiled-from-source Pg that someone's initdb'd a datadir for in their home dir, or an EnterpriseDB Pg install in /opt, etc. You can ask pg_wrapper, the Debian/Ubuntu multi-version Pg manager, where PostgreSQL is using the pg_lsclusters command from pg_wrapper.

If you can't connect (Pg isn't running, or you need to edit pg_hba.conf to connect) you'll have to search the system for pg_hba.conf files. On Mac and Linux something like sudo find / -type f -name pg_hba.conf will do. Then check the PG_VERSION file in the same directory to make sure it's the right PostgreSQL version if you have more than one. (If pg_hba.conf is in /etc/, ignore this, it's the parent directory name instead). If you have more than one data directory for the same PostgreSQL version you'll have to look at database size, check the command line of the running postgres from ps to see if it's data directory -D argument matches where you're editing, etc.


How can I regain access to my Windows 7 after installing Ubuntu 13.04 alongside Windows 7

Try sudo update-grub2, and restart to see if win7 appears.

If not, post the result of sudo fdisk -l

================================================

I notice that the origin ntfs partitions still exist.

By the way, have you try the vista entry or the others when booting?

================================================

open terminal sudo gedit /etc/default/grub

In the popup window, find the line GRUB_HIDDEN_TIMEOUT=0, add # before it or simply delete this line. Save and quit.

return to the terminal, sudo update-grub

reboot


Ok, this worked for me on vivid at least:

sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update
sudo apt-get install ruby2.2 ruby2.2-dev

On wily, I get an error because the URL http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu/dists/wily/main/binary-amd64/ is missing, there's only http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu/dists/devel/main/binary-amd64/.


How to get MGSE under Gnome 3.4? (Or how to go from Gnome 3.4 to Gnome 3.2?)

The MGSE (Mint Gnome Shell Extensions) are a part of Liunx Mint, and the Cinnamon desktop  to be the default in Mint 13. Development of MGSE perhaps has stopped, bat Cinnamon provide s the same interface. Cinnamon is a fork of Gnome Shell, and is optional desktop for Ubuntu (and any distro for that matter). If you like install it in Ubuntu.

How do I install the Cinnamon Desktop?


How to make bootable USB for Ubuntu in Windows 7?

To run Ubuntu from a USB stick, the first thing you need to do is insert a USB stick with at least 2GB of free space into your PC.

The easiest way to put Ubuntu onto your stick is to use the USB installer provided at pendrivelinux.com. You’ll need to download and install and follow the instructions.

Download Pen Drive Linux's USB Installer

Follow these instructions


How do I compile and install the latest PiTiVi 0.15.2?

The PPA does not include any packages for Precise (12.04), and contains no packages for the version you want either (0.15.2), so it's useless. You can remove it from Software Center or using apt-add-repository.

0.15.2 compiled just fine for me on Precise 64-bit, with the following. Open a terminal, and run the following to install PiTiVi 0.15.2 on your system

sudo apt-get build-dep pitivi -y
sudo wget -O- http://ftp.gnome.org/pub/GNOME/sources/pitivi/0.15/pitivi-0.15.2.tar.xz | tar -xJ
cd pitivi-0.15.2
./configure && make
sudo make install


If I'm building from source, why does it require more space than installing via apt-get?

mono mono-xbuild automake autoconf libmono-cairo2.0-cil gtk-sharp2

Those are the packages required for building Pinta, they are not Pinta itself. So, for building from sources, you need the libraries, the headers, toolchain, etc., so, the package already compiled is:

[binary sources + hard linked libraries + configuration files generated + activated options] / the amount of packages that could be extracted from the sources (ie, some package have the debug symbols in other package)
while the "real" size of your compiled binary sources + hard linked libraries + configuration files generated + activated options + headers files + tool chain + libraries - whatever you deactivate/uninstall later.

Also, you may notice that the packages generated by Ubuntu repositories are built in slightly older kernels, so even if you use the same set of tools/options, the results might not be the same due the differences of kernel and libc-dev version.


Broken libperl5 package when trying to install updates

Comment #3 from https://bugs.launchpad.net/ubuntu/+source/perl/+bug/1574351 had this workaround which worked perfectly for me:

sudo rm /usr/share/doc/libperl5.22/changelog.Debian.gz
sudo apt-get install -f

Thanks, Reuben Firmin, whoever you are!


No login possible after reboot possible hang up

Perhaps perform the distrubution upgrade would do the trick?  It did for one of my clients.

 sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade

this is the combo that does everything at once.


How do I access a specific file on a Windows share?


Asus ROG Zephyrus S GX502GW headphone jack not working

Right now the RealTek ACL294 sound device is not fully supported in ALSA on the Asus GX502GW. This is because it's a new configuration so it hasn't been patched into ALSA yet.
This is impacting Arch and Debian distros, and the newest kernel that I have tested (5.4.0-37) is the same.
Output of `dmesg | grep snd
[    4.075183] snd_hda_intel 0000:01:00.1: enabling device (0000 -> 0002)
[    4.075257] snd_hda_intel 0000:01:00.1: Disabling MSI
[    4.075262] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client
[    4.094050] snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC294: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[    4.094053] snd_hda_codec_realtek hdaudioC1D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    4.094054] snd_hda_codec_realtek hdaudioC1D0:    hp_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    4.094055] snd_hda_codec_realtek hdaudioC1D0:    mono: mono_out=0x0
[    4.094056] snd_hda_codec_realtek hdaudioC1D0:    inputs:
[    4.094057] snd_hda_codec_realtek hdaudioC1D0:      Mic=0x12
[   19.896933] snd_hda_codec_hdmi hdaudioC2D0: HDMI: invalid ELD data byte 38
[   20.920927] snd_hda_codec_hdmi hdaudioC2D0: HDMI: invalid ELD data byte 8

It seems that a correctly configured system will show hp_outs=1.
Other instances with the same model laptop:

https://forums.linuxmint.com/viewtopic.php?t=306891
https://bbs.archlinux.org/viewtopic.php?id=249456
Headphone jack doesn't work in Asus GX502GW
Ubuntu not detecting Headphones

It may be worth making a ticket on ALSA to support this OOTB.


COMRESET failed errno=-16 While Starting Ubuntu 15.04

I had the same issue. Just type

exit

in the box and it might start up.

I have to do this everytime I start up my computer. If anyone else has a fix it would be greatly appreciated.


You'll need to unmount the drive to check the file system for errors. You can't do it while the filesystem is live.

Ensure FSCKFIX=yes is present in /etc/default/rcS (it's no by default).
Run touch /forcefsck, and reboot the system.
Revert your changes to rcS once fsck is complete.


Is there any software on Ubuntu to use a computer like a smart display?

Well, I don't know if such software exists, but I think that this can be the most handy solution: magicmirror.builders

It's originally intended for Raspberry Pi, but installing It on Ubuntu seems to be relatively easy (see https://github.com/MichMich/MagicMirror#manual-installation).


OpenVPN & Network-Manager-OpenVPN & Connecting to Internet ipv4

If you don't mind disabling IPv6 entirely then you could try this answer here.

Do ifconfig first and check if you still have an IPv6 address, if you do then it's still active, if not then something else is going on...

There is always 1 IPv6 address, ignore the fe80 one, if you have a second then it is still active.

You could also trying pinging an ipv6 address to see if you still get a reply

ping6 2607:f8b0:4003:c00::6a


How to install H.265 / HEVC codec on Ubuntu Linux v17 +

gstreamer1.0-libav supports video/x-h265 (HEVC) in Ubuntu 17.10 and later in Totem media player.

H.265 is the successor to H.264 which gstreamer1.0-libav also supports in Ubuntu 17.10 and later. To install it open the terminal and type:

sudo apt install gstreamer1.0-libav


Ubuntu install deleted Windows 8 partition; how to recover it on ubuntu

Note: This answer came from the OP's original post, which was edited in. I (@KazWolfe) have moved it to Community Wiki status to actually have it in the right section. Without further ado...

Using some information found in the comments, I went to the Data Recovery wiki page, which helped solve my problem.

Anyway, what I did is the following:

sudo swapoff -a
sudo parted /dev/sda
    rescue 1 273

(The 1 came from the 1MB of free space before hitting Delete, and 273 is the current amount of free space in MB)

Parted suggested that my drive was FAT32, and I accepted this information. Upon running "check disk errors" from the Ubuntu ISO, my system worked again.


Using 12.04 installation as a persistent pen drive

As far as I know, what you want can't be done with a persistent Live USB.

A full install in an 16GB USB drive (8GB may work, but I have not tested it.) will solve most of the four issues you mention.

I have a 16GB USB with full install and am yet to face any memory management issues. Most computers these days have 4GB or more RAM. So, swap file/partition is not as important. You can do a full install and set swappiness to 0, and limit updates to "Important Security Updates only" to avoid unnecessary writing to the USB.

No "Try Ubuntu" in a full install. Bonus, password protection.
Unplugging the pen drive when Ubuntu is running from it, either in
persistent, or in full mode will be a bad idea. I have no solution
for this.
A full install will not have the "Install Ubuntu" on the desktop.
If you use a 16GB pen drive, you can create a 1 or 2 GB FAT32
partition in the beginning for "normal" use. The rest can be ext4
partition with / mount point. The first partition will be
accessible both when booted from the pen drive as well as when just
plugged in.

It may even be possible to put some folders like "Music" in the
FAT32 partition and sym link it to your home folder. I have not
tested it. If it works, you have a bigger FAT32 partition and a
smaller ext4 / partition.

Minimal install

One option for full install may be to use the server iso or the minimal iso and add the desktop and whatever else you need on top of it. I don't know if it will reduce the size of install to less than 1GB, but it is worth a try. See how to install Unity on top of a server install.

Warning:

There are some WiFi chips that only work with proprietary drivers. A full install USB stick with only opensource drivers will not have WiFi connections when plugged into and booted from such a computer. There may be similar issues with some graphics cards as well. Installing various proprietary drivers into a full USB installation for all possible combinations of hardware may have unexpected results. A full USB install will not be as portable as a Live USB stick.

Hope this helps


How to interact with zenity window and type some text inside it?

Change your zenity.sh file with:
#!/usr/bin/python

zenity --forms --title="Question" \
   --add-entry="Question" \

To:
#!/usr/bin/bash

zenity --forms --title="Question" \
   --add-entry="Question" \

zenity is not a python command, it is a bash/shell command so your shebang (first line) must be #!/usr/bin/bash not #!/usr/bin/python.


Fullscreen and Repeat Video with Totem Player

use VideoLan (vlc)

in terminal type

vlc -L -f video.mp4


Errors when opening documents on an external disk with WPS Office

If you installed the wps office using snap, you need to connect the wps with removable-media connector, to verify it, run:

snap connections wps-office-multilang

output:

Interface        Plug                                  Slot         Notes
alsa             wps-office-multilang:alsa             -            -
cups-control     wps-office-multilang:cups-control     -            -
desktop          wps-office-multilang:desktop          :desktop     -
gsettings        wps-office-multilang:gsettings        :gsettings   -
home             wps-office-multilang:home             :home        -
opengl           wps-office-multilang:opengl           :opengl      -
pulseaudio       wps-office-multilang:pulseaudio       :pulseaudio  -
removable-media  wps-office-multilang:removable-media  -            -
unity7           wps-office-multilang:unity7           :unity7      -
wayland          wps-office-multilang:wayland          :wayland     -
x11              wps-office-multilang:x11              :x11         -

Check the Slot column of removable-media:

removable-media  wps-office-multilang:removable-media  -            -

To connect removable-media with wps, run:

sudo snap list

Output:

Name                  Version                Rev   Tracking  Publisher           Notes
core                  16-2.40                7396  stable    canonical✓          core
heroku                                       3752  stable    heroku✓             broken
slack                 4.0.2                  17    stable    slack✓              classic
wps-office-multilang  10.1.0.6757-multilang  1     stable    schmolli-christian  -

Copy the exact name of wps (wps-office-multilang), and run:

sudo snap connect wps-office-multilang:removable-media

Output

The output needs to be blank. To check if it works, run:

snap connections wps-office-multilang

Output:

Interface        Plug                                  Slot              Notes
alsa             wps-office-multilang:alsa             -                 -
cups-control     wps-office-multilang:cups-control     -                 -
desktop          wps-office-multilang:desktop          :desktop          -
gsettings        wps-office-multilang:gsettings        :gsettings        -
home             wps-office-multilang:home             :home             -
opengl           wps-office-multilang:opengl           :opengl           -
pulseaudio       wps-office-multilang:pulseaudio       :pulseaudio       -
removable-media  wps-office-multilang:removable-media  :removable-media  manual
unity7           wps-office-multilang:unity7           :unity7           -
wayland          wps-office-multilang:wayland          :wayland          -
x11              wps-office-multilang:x11              :x11              -

Now, the colum Slot of the line removable-media was changed.

Done.

If this does't work, check if your patition is NFTS, if so:
Try run on your partition:

ls -la /mnt/your-partition`

If all the files and folders is root:root, you need to inform your partition your user and group, but...
NTFS does't know what is a linux user or a linux group, so you need to mount your partition as permissions,users,auto,uid=<YOURID>,gid=<YOUR GROUP>,x-gvfs-show.
More details about it, check this link.

Warm regards, and good luck!


Unable to install rvm using curl (https protocol issue)

You have Ubuntu's curl installed, and another curl installed in /usr/local. Either specify the full path to get Ubuntu's curl (/usr/bin/curl), or change the PATH for your script to skip /usr/local/bin.


Is the OpenGL greeter (facebrowser) still on the table?

That does look very similar to LightDM, in terms of both appearance and capabilities. LightDM will be the new default in Ubuntu 11.10 instead of GDM.


hello cannot locate the core snap: No such file or directory

I have the hello snap, notes and core installed on my computer and all of them work fine.

$ snap list
Name              Version           Rev  Developer         Notes
core              16.04.1           714  canonical         -
hello             2.10              20   canonical         -
notes             0.9.0~gitb6e3b34  4    notes-developers  -

When the hello snap is installed, the core snap is installed along with it if core is not already installed. Try updating the core snap:

sudo snap refresh core

If core is already installed the following message will be shown:

snap "core" has no updates available

Your results of running sudo snap refresh core were as follows:

sudo snap refresh core error: cannot refresh "core": cannot find snap "core"

So uninstall the core snap and then reinstall it.

sudo snap remove core hello
sudo snap install hello # core will also be installed automatically

Hello is a terminal app that runs like this.

$ hello
Hello, world!


Password field of login screen is disabled

I'm having the exact same issue.
Edit: Looks like this is a confirmed bug: https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1311316


Too many connections and iptables is not working to limit connections per ip

Try this:

/sbin/iptables -I INPUT -p tcp --dport 80 -i eth? -m state --state NEW -m recent --set
/sbin/iptables -I INPUT -p tcp --dport 80 -i eth? -m state --state NEW -m recent --update --seconds 60 --hitcount 10 -j DROP

The first line will Watch the IP connecting to your eth interface.

The second line will check if the connection is new within the last 60 seconds and if the packet flow is higher than ten and if so it will drop the connection.

To block IP address you must type:

/sbin/iptables -A INPUT -s xxx.xxx.xxx.xxx -j DROP

If you just want to block access to one port from an ip you must type:

/sbin/iptables -A INPUT -s xxx.xxx.xxx.xxx -p tcp --destination-port 25 -j DROP

The above rule will drop all packets coming from IP xxx.xxx.xxx.xxx to port 25.


efibootmgr creates an entry in which DevPath is set to Venhw istead of PciRoot

If efibootmgr is creating an entry like you describe (VenHw(99E275E7-75AO-4B37)), then that sounds like a bug in either efibootmgr or the firmware. That said, consider the efibootmgr command you specified:

efibootmgr -c -d /dev/nvme0n1 -p 1 -l /EFI/refind/refind_x64.efi -L "rEFInd"

There are two things that are unusual about this:

Disk device -- Most disk devices in Linux have names of the form /dev/sd?, where ? is a letter from a up. Some devices, such as some SSD cards, have filenames that take other forms, like /dev/mmcblk0 (that's from memory and might not be quite right). I don't recall ever seeing a device name like /dev/nvme0n1. That's not to say it's wrong, but at the very least it's unusual, and you should double-check it. I'd be especially careful to not include the partition number -- that's what the -p option to efibootmgr is for.
File specification -- Older versions of efibootmgr require that files be specified using EFI syntax -- that is, with backslashes (\) rather than slashes (/) separating directory entries. Because Linux shells generally treat backslashes uniquely, this also requires either quoting the entire pathname or doubling up on the backslashes, so you'd specify -l \\EFI\\refind\\refind_x64.efi or -l "\EFI\refind\refind_x64.efi. I've heard that the most recent versions of efibootmgr will accept a more traditional Unix/Linux form and "translate" internally, but I don't know precisely when that feature was added, and you haven't said what version of Ubuntu you're using. Thus, I recommend you use doubled-up or quoted backslashes rather than slashes.

As a practical matter, of course, if you've got a working entry via bcfg, there should be no need to do anything else with efibootmgr. I assume you're asking because it should work and because you want to be able to perform this type of maintenance from Ubuntu.


What desktop environment should I choose for gaming?

I would suggest KDE. It has the ability to suspend compositing on full screen applications. That increases the performance a lot.

Besides KDE you should choose a DE that doesn't use any compositing (desktop effects) such as XFCE or LXDE.
See this benchmark test:
http://www.phoronix.com/scan.php?page=article&item=ubuntu_1210beta_desktops&num=2

keep in mind that Unity in Ubuntu is getting a lot of attention performance-wise. Ubuntu 12.10 isn't too bad for gaming. That's my personal opinion.


I found some useful instructions which work for me (Ubuntu 10.04).

How to Install MATLAB on Ubuntu Linux
How do I create shortcuts, aliases, or links to MATLAB? How do I put MATLAB on the dock?

The command to copy-paste after having checked your version: /usr/local/MATLAB/R2012b/bin/matlab -desktop


How to automount network home directories in Ubuntu 14.04 upon login

Adding the following line to /etc/ldap.conf resolved the problem:

nss_map_attribute homeDirectory homeDirectory-home


How do I upgrade to Ruby 2.2 on my Ubuntu system?

Why not use ruby 2.3  which is available in the repositories for 16.04 and 17.10 with
sudo apt update

After the update is finished run:
sudo apt-get install ruby2.3 ruby2.3-dev

Or try ruby 2.4 or 2.5
You can get those via the brightbox PPA

Add the repository and update
sudo apt-add-repository ppa:brightbox/ruby-ng && sudo apt-get update

install
sudo apt-get install ruby2.4

or for 18.04
sudo apt-get install ruby2.5 ruby2.5-dev

Information on the status of packages in the aforementioned PPA can be found on the “Brightbox” team launchpad page.
Alternatively you could try reverse hacking the error alternative path /usr/bin/ruby2.2 doesn't exist by creating it with sudo mkdir /usr/bin/ruby2.2 and trying again.


How to send a command line command to put a disk in standby mode?

gnomes-disks relies on udisks2
It is possible to do the same by command line :
$ gdbus call --system --dest=org.freedesktop.UDisks2 --object-path /org/freedesktop/UDisks2/drives/TOSHIBA_DT01ACA050
 --method org.freedesktop.UDisks2.Drive.Ata.PmStandby []

You might have to complete the name of your TOSHIBA disk by checking here :
$ ls -l /dev/disk/by-id/ |grep TOSHIBA


My ASUS U32U with fresh Xubuntu install shows a black screen 50-80% of the startups

Got exactly the same problem installing Ubuntu 12.10 on an Asus X32U.

The "release notes" suggest that you need to "nomodeset" in the kernel boot options.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/725580

This was pretty meaningless to me a few days ago but this brilliant post should help you.... http://ubuntuforums.org/showthread.php?t=1613132


SMART failure predicted on Harddisk after ubuntu installation on my laptop

'I installed ubuntu 11.04 after that.Now i am getting SMART failure'

Are you in ubuntu or you can not install any os? If you do not have any OS and can not install ubuntu then try to install windows with full partition (just for hard disk check). If windows shows the same error or can not install then try partition magic boot-able CD and try to low format(delete all partition) your hard disk and just create one partition. Now try ubuntu.

If you can boot ubuntu but showing SMART error then open disk utility. Check all the Drives one by one. Find out the defected drive. Low format the drive using dd command (see on internet).After that if ubuntu show SMART error then sorry for your laptop hard disk. It is really dying. Be ready to buy a new one.


Hello MATLAB supports only 64bits version so you must a ubuntu 64 bits see this link of mathworks:

http://www.mathworks.com/support/sysreq/current_release/index.html?sec=linux


How to draw a branch name to the console?

If you have bash-completion you can add $(__git_ps1), if you use " you need to escape the command substitution.

# change these if you don't dig my colors!

NM="\[\033[0;1;37m\]"   #means no background and white lines
HI="\[\033[0;37m\]"     #change this for letter colors
SI="\[\033[38;5;202m\]" #this is for the current directory
GI="\[\033[38;5;220m\]" # Git branch color
NI="\[\033[0;1;30m\]"   #for @ symbol
IN="\[\033[0m\]"

PS1="${NM}[${HI}\u${NI}@${HI}\h ${SI}\w\$(__git_ps1 ' ${NM}(${GI}%s${NM})')${NM}]: ${IN}"


Qualcomm Atheros Bluetooth 4.0 not working on Ubuntu 16.04

Considering how much time (man-hour) I spent trying to make my built-in Bluetooth adapter work on Linux, I decided it would be cheaper and faster to buy an USB adapter that actually works on Linux. So, I went out home with my laptop, tested an USB adapter and bought it. It is really small and cheap, it costed me R$ 30,00 (something between $9 and $10, according to today's exchange rates). It is able to transfer files and play music. Its package says Babbage Bluetooth Version 3.0 BM-BT01, it was made in China. On lsusb, it shows as Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode):

# lsusb

Bus 003 Device 002: ID 8087:8001 Intel Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 003: ID 1bcf:2c81 Sunplus Innovation Technology Inc.
Bus 001 Device 011: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

# usb-devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh=11
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=04.11
S:  Manufacturer=Linux 4.11.4-1.gcba98ee-default xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:00:14.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 11 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=16 #Cfgs=  1
P:  Vendor=0a12 ProdID=0001 Rev=01.34
C:  #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb

T:  Bus=01 Lev=01 Prnt=01 Port=06 Cnt=02 Dev#=  3 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1bcf ProdID=2c81 Rev=00.05
S:  Manufacturer=NC2141103M50708908LM05
S:  Product=HD WebCam
C:  #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo
I:  If#= 1 Alt= 0 #EPs= 0 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo

T:  Bus=01 Lev=01 Prnt=01 Port=07 Cnt=03 Dev#=  4 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs=  1
P:  Vendor=0bda ProdID=0129 Rev=39.60
S:  Manufacturer=Generic
S:  Product=USB2.0-CRW
S:  SerialNumber=20100201396000000
C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=06 Prot=50 Driver=rtsx_usb

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 4
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev=04.11
S:  Manufacturer=Linux 4.11.4-1.gcba98ee-default xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:00:14.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 2
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=04.11
S:  Manufacturer=Linux 4.11.4-1.gcba98ee-default ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=0000:00:1d.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 8
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=8087 ProdID=8001 Rev=00.03
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

It does not work flawlessly as I think it should be. Pairing works on a trial and error basis, but once devices are paired, they work as expected. At least now I have a Bluetooth adapter that works on Linux.

Anyways, I'm thankful for the time you spent trying to help me and giving me directions. Thank you!


Link to all ~ files automatically shown on Desktop, but I want to show only the Dock

Use the pre-installed 'Extensions' application in Ubuntu 20.04 to turn off the 'Desktop Icons' extension. That would get rid of the icons from your desktop.
You can also launch the application from Terminal by running the gnome-extensions-app command.


Juju MySQL adding units vs adding new service with relation

I will give it a try:

  MySQL doesn't support multi-master node so adding units to one MySQL
  service doesn't make any sense.

That MySQL Community Server doesn't support multi-master node is correct. For multi-master node setup will you need MySQL Cluster or a fork. I can also confirm that at time of writing this answer did it not exist a Juju Charm for MySQL Cluster. But MySQL Community Serversupports other high-available opportunities thorough its replication. One of the most obvious one is Switching Masters During Failover.

If you have a closer look on the implementation of the MySQL Charm can we see under hooks\ha* something I might think is a switch of master. Tho, i have not dived so deep that I can confirm it is that.

  Why not just create a new service with relation to the master node?

On the first hand, if we keep the master switch in mind from the answer above, does it make sense to add units to the master MySQL Charm as it will give it a pool of replicas that could be switched to become new Masters on a failure. On the other hand, defining a new service as slave and give it a relation to the master will make them stay as slaves.

  if the primary slave server dies all the unites attached to it become useless as well

That is not exactly correct, as the slave servers will gladly be serving read requests. The MySQL replicas can also be 'forced' to serve write/update requests but that is strictly advise against as it comes with major complications for keeping semantics.

According to answer of this question, by a
Dimiter Naydenov a member of Canonical Juju-core, is adding of more units to the MySQL Charm not creating replication slaves.

If the extra units nodes should be able to be promoted, to new master would that behavior be needed. So my best guess then, if his answer still hold ground, is that it is wasted units serving the purpose of inviting people to contribute on it.

A project that you might find of interest or inspiring, could be this one.

Improvements and corrections are welcomed.


Wireless Network Unclaimed on G750JM using ubuntu 16.04

From the comments and the chat...

To enable the bcmwl driver for your wireless card, you need to disable Secure Boot in your BIOS.

To fix the error Ignoring file '20auto-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/', type this in the terminal...

sudo mv /etc/apt/apt.conf.d/20auto-upgrades.ucf-dist ~/Documents


pulseaudio: Failed to find a working profile

I don't even know if it's related to the problem or no,  but after trying any way to solve the problem, none of them worked, but after force shutdown, the problem fixed and it's working properly now


No wireless networks detected in 14.04 after reboot

I have no idea why this worked, but rebooting and disabling secure boot completely solved my problem. I found the solution somewhere else.

Can someone explain to me why disabling secure boot fixed this for me?


Why did Canonical chose snaps?

To quote the Ubuntu website:

  We originally created the snappy technology and application
  confinement system to ensure a carrier-grade update experience for
  Ubuntu mobile users and set a new standard for application security in
  the mobile era.

Essential idea was to fix issues that are present in both .deb packages and provide new method for updating the packages (the so called transactional updates , very similar to how android apps are updated). As Mark Shuttleworth explains:

  Whenever we make a fix to packages in Ubuntu, we’ll publish the same
  fix to Ubuntu Core, and systems can get that fix transactionally. In
  fact, updates to Ubuntu Core are even smaller than package updates
  because we only need to send the precise difference between the old
  and new versions, not the whole package.

What are the main advantages of .snap packages over .deb packages?

The biggest advantage is the improved security. PPAs and .deb packages are typically installed with root privillege , which opens up a venue for security risks.

Snappy apps are isolated, meaning that if some app breaks, it won't break your systems. To quote Mark Shuttleworth:

  Snappy packages are automatically confined to ensure that a bug in one
  app doesn’t put your data elsewhere at risk

Will .deb be abandoned?

As of Ubuntu 16.04 LTS , both methods are available to the users.

To quote OMG! Ubuntu!:

  Canonical also say that “…the tens of thousands of applications and
  packages in .deb format will continue to be supported in 16.04 and
  beyond, and deb archives in particular will continue to be available
  for all to use and distribute software.”


Trying to install discord.py but end up with permission errors

Please take the time to read a bit about how Ubuntu and linux as a whole works, that command should have been:

sudo -H pip install  <package_name>

Please note a few things:

If you do pip --version or pip3 --version you will see what version of python goes with that pip command:

pip 9.0.1 from /usr/local/lib/python3.5/dist-packages (python 3.5)

If you do pip2 --version then we see python 2.*:

pip 8.1.1 from /usr/lib/python2.7/dist-packages (python 2.7)

Python is already there so need to re-install it.
In Ubuntu pip and pip3 use python 3.*, but pip2 uses python 2.*

Important:

-H, --set-home

             Request that the security policy set the HOME environment variable to the home directory specified by the target user's password database
             entry.  Depending on the policy, this may be the default behavior.


I am unable to find open vpn packages in ubuntu 16.04

Search packages from command line using apt

Searching for all packages containing the string 'openvpn'

apt search openvpn

Check package informations for a specific package-name

You can see version & source informations for a specific package (here: openvpn) as follows:

apt-cache policy openvpn

This results in my 16.04 installation in the following output:

  openvpn:
  Installed: (none)
  Candidate: 2.3.10-1ubuntu2
  Version table:
       2.3.10-1ubuntu2 500
          500 http://de2.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

As you can see, i haven't it installed yet, but i can install 2.3.10 via the default repositories configured on my system.

Installing package by package-name using apt

You can install the package openvpn as follows

sudo apt install openvpn


Ubuntu 13.10 : Why is my wifi disabled everytime I reboot my system

Is brcmsmac blacklisted somewhere? The usual suspect is /etc/modprobe.d/blacklist-bcm43.conf. Remove it:

sudo rm /etc/modprobe.d/blacklist-bcm43.conf

You can also ask the system to load brcmsmac automatically on boot:

sudo -i
echo brcmsmac  >>  /etc/modules
exit


How to browse files on device using bluetooth

Rookie mistake.  My phone and my computer had the same exact user name "myuser"...  that caused my issues.  I changed the name of my phone, reboot phone and pc, now I can browse files and send files between devices no problem.


what is the alternative browser for lynx?


Snap Store has release channels. For example - VLC player:

So you can choose channel and install the respective version:

| Channel          | Version                 |  Install command                  |
|------------------|-------------------------|-----------------------------------|
| latest/stable    | 3.0.6                   | sudo snap install vlc             |
| latest/candidate | 3.0.6                   | sudo snap install vlc --candidate |
| latest/beta      | 3.0.6-50-g71bfa08       | sudo snap install vlc --beta      |
| latest/edge      | 4.0.0-dev-6398-g44b30c2 | sudo snap install vlc --edge      |

For other Snaps this is completely dependent on Snap developer (which channels were created).


use like

abobe 18.04 all ubuntu

sudo pip3 install  dxpy

or

sudo  python3 -m pip install dxpy


how to purge python 3.3 and install python 2.7.4

I fixed uninstallation problem by putting back "sitecustomize.py" It was deleted during upgrading to python3.3 so I could not purge python. I searched for it by "locate sitecustomize.py" luckily I found it in remastersys folder. I copied it into sudo cp /home/remastersys/remastersys/dummysys/etc/python2.7/sitecustomize.py /usr/lib/python2.7/ then ran sudo dpkg -a --configure uninstallation problem fixed. Thank you Tshepang for answer

Edit: Today after system updated  python, I met the IOError: [Errno 2] No such file or directory: ‘/usr/lib/python2.7/sitecustomize.py’ error again.
I navigated using cd /usr/lib/python2.7/  then executed ls.

to my surprize "sitecustomize.py" was in the list in red. I think it was a symlink and main   file was deleted during update. So I removed symlink and copied main file I found in "/home/remastersys/remastersys/dummysys/etc/python2.7/sitecustomize.py" into " /usr/lib/python2.7/" then ran sudo dpkg --configure -a. Problem fixed.


It does not say I86. But I would assume i386? That means you need the 32-bit Ubuntu version.

32-bit 16.04.1 torrent
32-bit 14.04.4 torrent
32-bit 16.04.1 direct download
32-bit 14.04.4 direct download

Both desktop version. More versions here.


The packages elementary-icon-theme and elementary-icons both contain the file /usr/share/icons/elementary/emotes/16/face-cool.svg so you can install only one of them.

If you want to install elementary-icon-theme remove elementary-icons first.


For /var/run/libvirt/libvirt-sock:No such file or directory error:

check if root its in the default group (libvirtd), watch the logs (/var/log/messages),
check:

virsh 'net-list '

and see if its really exist a default option.
this problem can be also that libvirtd its not running, if its that so try:

service libvirtd restart
/etc/init.d/libvirt restart

or check if its in the rc.d files, start it up when the machine boots.http://wiki.libvirt.org/page/The_daemon_cannot_be_started


Yes, the 14.04 .iso now has an "upgrade existing" option. However, it still requires a network connection.

Always backup your files. Also, as far as I know, you will keep all the stuff in your home folder so that includes allot of your settings but you might need to reinstall some of the non standard apps.

I just checked out 14.10 studio and didn't see that option, however, all you have to do is choose "something else". Then, select the Ubuntu partition, select ext4, mount point "/" and DO NOT place a check mark to format the partition. By NOT formating the partition, the installation will not wipe your /home folder.


Could you limit the PHP script in such a way that it only uses 1 CPU? If your assumption about the provider is true, the machine wouldn't shut down if only one CPU is used, I guess.

Is it possible that you run out of memory? That may lead to a shutdown of several processes and maybe result in a complete crash/shutdown. Do you have swap space enabled?


Samba net rpc rights grant SeDiskOperatorPrivilege Fails

A bit embarrassing, as I've been working this problem for a whole day.  Finally relented and posted here and then found the solution:

Need to create a user mapping file: e.g. /etc/samba/user.map

!root = SAMDOM\Administrator SAMDOM\administrator

Add this to the [global] section of smb.conf

username map = /etc/samba/user.map

Restart smbd and it works.


Having problems installing ImageMagick on Ubuntu 14.04

try this:

sudo apt-get install php5-imagick
sudo php5enmod imagick


How to configure the triggers for my laptop's keyboard backlight?

You can change the keyboard backlight brightness using Alt+F10 (of Fn+Alt+F10, if Fn is inverted). In particular, you can set brightness to zero :)

If you need to change the timeout for backlight automatically to switch off, use the file

/sys/devices/platform/dell-laptop/leds/dell::kbd_backlight/stop_timeout


How do I hide the drive icons of my other partitions from the desktop?

Type "gconf-editor" into a terminal window to run the Configuration Editor.
In the left hand tree, browse to apps / nautilus / desktop
In the right hand side, untick the "volumnes_visible" option.

Close the configuration editor. You may have to restart for the changes to take effect.

You can find more information on How-To Geek.


Wacom (056a:010d) touchscreen is not recognized on Ubuntu 12.10 (64bit)


How can I install Celtx 2.9.7 properly on Ubuntu 12.04 LTS?

This tutorial: How to Install Celtx 2.9.7 on Ubuntu Linux might help people in the future, as I found it very brief and clear. Just pay attention to your download path: If your Celtx install archive is not in the default Downloads folder, type it in manually.

Press Ctrl+Alt+T to open the terminal, then run the below commands one by one to extract to /usr/local/:

cd
tar xjf ~/Downloads/Celtx-*.tar.bz2
sudo mv ~/celtx/ /usr/local/

Now create a shortcut launcher for Celtx:

Install required package:

 sudo apt-get install gnome-panel --no-install-recommends

Run this command to create a launcher for Celtx:

sudo gnome-desktop-item-edit /usr/share/applications/ --create-new

Select icon from /usr/local/celtx/icons/ folder. Type /usr/local/celtx/celtx in command area.

Now you can search for and open celtx in the Unity Dash.


Why don't I find the Belgien eID-reader in the Software for Ubuntu 16.04 LTS?

In the terminal:

sudo apt-get install libacr38u libacr38ucontrol0 libacr38ucontrol-dev

Go to http://eid.belgium.be/en/using_your_eid/installing_the_eid_software/linux

Install eid-archive.deb (This creates /etc/apt/sources.list.d/eid.list.ucf-dist on your computer.)

Remove your configuration file /etc/apt/sources.list.d/eid.list

Rename /etc/apt/sources.list.d/eid.list.ucf-dist in /etc/apt/sources.list.d/eid.list

In the terminal:

sudo dpkg-reconfigure eid-archive
sudo apt-get update
sudo apt-get install eid-mw eid-viewer

Open firefox and install in firefox the belgian eid add-on.

Firefox will complain that the middleware is not installed. Neglect this message. For me the eid-reader works with web-apps in firefox.
The eid-viewer does not work. I don't know why.


How to get faster graphics in KVM? VNC is painfully slow with Haiku OS guest, Spice won't install and SDL doesn't work

Well, you said yourself:

All I really want to do for now is speed up my full builds of Haiku by using "jam -j2" to use both cores in my CPU.

and in response to the bug you filed with the haiku project

Changed 3 months ago by bonefish
One question that comes to mind: Why do you want to punish yourself building Haiku on an emulated Haiku? On your Linux host system Haiku can be built a lot faster than on a Haiku installed on the same machine. And an emulated Haiku is dramatically slower even. When you work on individual libraries or applications, building on an emulated Haiku might make sense, but the more has to be built the better are the turn-around times for building on Linux. For kernel or driver work that doesn't need actual hardware, it's the best option anyway.

Using a completely emulated VM as a build server is going to be painfully slow, there's just no getting around it. For you to actually assign a harddisk to the
guest would require VT-D extensions. So in your limited laptop setting, you might
be able to install a expresscard sata controller and attach an external disk. Then assign the entire bus to the VM, that's predicated on having VT-D though.
You're on the pointy tip of the spear, running an experimental OS with no guest
driver support. If were to contribute a set of virtio drivers to haiku it would
really speed things up.
There has to be a better developer workflow than what you've proposed. I'm sure
the lead developers cross-built all the time before the OS was bootstrapped. There
are haiku irc channels and developer FAQs, I suggest that you start there. Good luck.


No, there is a hardware switch integrated with the headphone jack that prevents this. It has nothing to do with your OS. If you were really determined to do it, you could disassemble and modify the jack, but that's outside the scope of the original question.

See this Wikipedia article for more info.


I seem to have found the solution.

I deleted all the previous connections, deleted the configuration file from /etc/network created by pppoeconf and rebooted. Then I set up the wired connection (Automatic ethernet) using the static addresses but made sure it didn't have "connect automatically" checked in the configuration dialog. Then I created a DSL connection, but of all the settings, I only filled in the user name, service name and password for it. I checked "available to all users" and closed the settings dialog. Then from the "connections" applet on the panel, clicked the connection name. And it connected and worked.

Nevertheless, after a couple of reboots, I'm noticing that sometimes it won't connect on the first "click". It'll show notification "Connection established" but I won't have internet access. So I need to disconnect and retry a few times, and eventually it works.

Update: I forgot to mention - I had to set the MTU to 1452 as well.


cat will print out the content of the file (zeroes and ones which will be mapped to meaningless characters, because they're not really characters right?) into stdout which by default is your terminal.

The file extension is for us (humans), to easily figure out what is the type of file; some programs use it to open it too but mostly programs detect the file type using a header inside the file.

Use file file.png to get the file type, or xxd file.png:

00000000: 8950 4e47 0d0a 1a0a 0000 000d 4948 4452  .PNG........IHDR
00000010: 0000 0002 0000 0002 0800 0000 0057 dd52  .............W.R
00000020: f800 0000 0e49 4441 5478 9c63 6c60 6062  .....IDATx.cl``b
00000030: 6000 0002 9200 84f7 7ca3 5800 0000 0049  `.......|.X....I
00000040: 454e 44ae 4260 82                        END.B`.

to get a hex dump of the file content, notice the "PNG" in the first line.

Also from this file signatures reference we can see that PNG signature is:

PNG     89 50 4E 47 0D 0A 1A 0A     PNG image


how do I stop automysqlbackup throwing LOCK TABLES error?

This bug (which was fixed in automysqlbackup 2.6+debian.2-1) can be worked around by stopping automysqlbackup from dumping the performance_schema and information_schema databases. This can be done by editing /etc/default/automysqlbackup as follows:

Add an additional pipe to grep step to remove performance_schema and information_schema from the list of DBNAMES.

So, in the line that starts DBNAMES=, and after | grep -v ^mysql$ insert

| grep -v ^performance_schema$ | grep -v ^information_schema$

before | tr \\\r\\\n ,\ such that the final line should look like

DBNAMES=`mysql --defaults-file=/etc/mysql/debian.cnf --execute="SHOW DATABASES" | awk '{print $1}' | grep -v ^Database$ | grep -v ^mysql$ | grep -v ^performance_schema$ | grep -v ^information_schema$ | tr \\\r\\\n ,\ `

Thanks to Jérôme Drouet.

Alternatively, if you use the original automysqlbackup package from sourceforge and not the apt-package, you can add the performance_schema database to your excluded databases by modifying the line that contains CONFIG_db_exclude in your /etc/automysqlbackup/myserver.conf:

# List of DBNAMES to EXLUCDE if DBNAMES is empty, i.e. ().
CONFIG_db_exclude=( 'information_schema' 'performance_schema' )


I keep getting bad substitution error on bash scripts with arrays

You need to run the script as bash and not sh.

So, run it with

bash test.sh

The other way, you could set the execute bit on your file by doing

chmod +x test.sh

then just run your script as

./test.sh

because you already have your command shell interpreter (shebang) as your first line #!/bin/bash.


How do I start and install Ubuntu from USB flash drive

1. Boot to the Ubuntu's bootable media

You need to boot to the USB, do this by acessing BIOS at your computer startup, by pressing key x (consult your computer vendor for more details) and then, select your flash drive at boot options. After this, just press enter when you are seeing the GRUB bootloader. Next, wait some time and you will see your Ubuntu desktop.

2. Install Ubuntu

Simply click on the icon called "Install Ubuntu" that is at your desktop, which launches Ubuntu's automated GUI installer, called "ubiquity". Then just install it.


If you cannot upgrade using the Update Manager, download the ISO file from the Ubuntu website. Make a Live USB or CD/DVD, then boot using the download media. During the installation, you can either upgrade or do a fresh install.


Can't install Windows 8 while Ubuntu is already installed (want to dual boot)

Installing Windows

Step 1) Using gparted from the Ubuntu live cd make an ntfs partition.

Step 2) Install windows 8 at this point you will lose the ability to get into ubuntu.

Live CD automatic repair

Step 3) Insert your Ubuntu CD, reboot your computer and set it to boot from CD in the BIOS and boot into a live session. You can also use a LiveUSB if you have created one in the past.

Step 4) Install and run Boot-Repair

Step 5) Click "Recommended Repair".

Step 6) Reboot your system. The usual GRUB boot menu should appear. If it does not, hold Left Shift while booting. You will be able to choose between Ubuntu and Windows.

Using Terminal to restore GRUB

Step 3) Open a terminal either from the menu or use the Keyboard Shortcut: CTRL + ALT + T.

Step 4) in the terminal type

sudo grub-install /dev/XXX

where XXX is the device of your Ubuntu install. (eg: grub-install /dev/sdb). Hint: You can also use /dev/disk/by-label/ if the partition you installed on has a label. You can determine the /dev node for such a device by running:

ls -l /dev/disk/by-label/

This will give the output of something like:

lrwxrwxrwx 1 root root 10 Oct 16 10:27 data -> ../../sdb2
lrwxrwxrwx 1 root root 10 Oct 16 10:27 data2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Oct 16 10:27 fat -> ../../sda6
lrwxrwxrwx 1 root root 10 Oct 16 10:27 home -> ../../sda7
lrwxrwxrwx 1 root root 10 Oct 16 10:27 root -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct 16 10:27 swap -> ../../sda5
lrwxrwxrwx 1 root root 10 Oct 16 10:27 windows -> ../../sdb1

You can also use fdisk if you do not see the /dev/disk/by-label:

$ sudo fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001bc54

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       18725   150403072   83  Linux
/dev/sda2           18725       19458     5884929    5  Extended
/dev/sda5           18725       19458     5884928   82  Linux swap / Solaris

From here, find only the drive name, ignore the partition number, that is, for partitions labeled "root", "data2", "fat", "home" and "swap" it's all still just sda. This is due to the fact that GRUB is installed in the MBR of the drive, and not on a partition.

Trouble? If other things are messed up, e.g. if you have deleted the partition from where Grub was previously installed, grub-install may return an error message such as "cannot find a device for /... (is /dev mounted?)". You may have to do grub-install a bit differently. Refer to the handy guide on fixing a broken system

Now reboot your system. The usual GRUB boot menu should appear. If it does not, hold Left Shift while booting. You will be able to choose between Ubuntu and Windows.

source - https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows


ASUS TP202NAS (J202NA) touchpad problems in Lubuntu 18.04.2

The touchpad stopped working completely and is no longer recognized by any OS. Obviously a hardware problem.  I've restored Windows and am going to return the computer for refund.  (It's only 3 weeks old.)  I suspect the intermittent problems were hardware related.


11.04 ATI Radeon HD 5600 Dual Monitor issue

Finally I found the solution.. Incredibly simple...

The solution was deleting the xorg.conf file and let the xserver to makes it's business without that and everything works!


How can I use aptitude to install Nagios?

You can find nagios3 packages with the command:

aptitude search nagios3

Or just:

aptitude search nagios

To install it, run:

aptitude install nagios3 nagios-plugins nagios-plugins-basic nagios-plugins-standard nagios-plugins-extra


I'd suggest trying another browser.

I get full Flash and Java functionality in SeaMonkey (Firefox engine, skinned to look and act like the old Netscape Navigator Suite, including integrated e-mail and IRC chat clients as well as HTML editor), using update-sun-jre and pepperflashplugin (the latter uses the Chrome Pepper Flash plugin wrapped to match the API the Firefox core expects).  Both plugins are as up to date as they can be, and update automatically through the standard Ubuntu software update process (though at least one requires enabling an additional repository -- which itself is considered a security risk).

Unfortunately, if you're an "open software" purist, both of these plugins use proprietary code -- but they're what works, at least for me.


Do I need to install any drivers for 2 finger swipe

In a nutshell, drivers tell an operating system a couple of things - what a piece of hardware is, its capabilities and how to interpret its behavior/use... And like Microsoft Windows, Ubuntu effectively supports all input devices, of any type with every type of functionality - as long as you have a suitable driver.

With that in mind, Ubuntu will be able to make full use of your touchpad and its three-finger input, but unless your driver has been written in such a way that three-finger input is supported, it simply will not work.

So, you're either going to need to find a suitable driver from your manufacturer, or obtain an alternative driver from the Community...

I wouldn't hold your breath though - input with two fingers is pretty common these days, but not too many manufacturers support input with three fingers.

If there's no demand, there's probably not going to be a Community driver...


Make sure you have installed openssh-server

apt-get install openssh-server

and make sure it is running

service ssh restart

See status of openssh-server:

systemctl status ssh

If there are any errors, try to fix them and restart ssh server.


I've managed to figure this out, if you create the partition without encryption then format it again with encryption it seems to work.

Seems odd that you're allowed to select the encryption option at a stage that it will not work.


Login screen doesn't prompt for password

It sounds a bit like you don't have a password set for your account. To verify this, try the following:

Head back into the User Account settings
Choose 'Unlock' from the upper right (if my assumption is correct, you should not be asked for a password)
Click on the string of dots next to the 'Password' field
Choose a new password, making sure to leave the 'Current Password' field blank.

If you really didn't have a password set, then you should do now.


Restore missing grub2 files and edit grub to boot windows 10 and Ubuntu 16.04?

According to your description. I can give you a suggestion to install rEFInd bootloader. I also had a similar incident when my GRUB crashed but boot-repair did the job. Please visit the attached link.Hope this works with you


If I make a something that looks and acts like terminal, is there a copyright issue?

In general, source code can be copyrighted by the author of the code, but the dynamic output of running that code can be copyrighted by the user of that code. In this case, that's you.

Making something that looks and acts like an interactive bash terminal (or dash or zsg or csh, etc.) does not infringe upon any copyright or patent. Indeed, those terminals' behavior were themselves careful re-implementations of older Unix terminal behavior, so you have clearly-demonstrated prior art dating back several decades.


LXD/LXC: understanding images and updating

I realize this answer is coming in late, but I'll share what my (limited) experience with LXD/LXC has been thus far.

  Do I need to update the containers myself, or can I rely on the image being updated? Or is that decoupled as soon as the container gets created?

Remember that a container is an instance based on an image. However, updating the container (e.g. running sudo apt-get install <package-name>) will not update the image; only the container.

In this sense, the container and the image become "decoupled" (I'd say "out of sync"). If you want an image that has the changes you've made to a container, then what I think you need to do is take a snapshot of the container. For example:

lxc snapshot <container-name> <snapshot-name>

A handy way to do this is to tag them by date, so that you can more easily identify which snapshots to use. For example, this is the way in which I'm doing it:

tag=$(date +%g.%m.%d-%H%M)
lxc snapshot <container> <snapshot>-$tag

What I think you'll get from a new/recent base image (e.g. ubuntu:lts/amd64) is simply things such as the latest package versions, security updates, etc.

This observation comes from my experience doing Ubuntu installs from the ISO downloaded from the site (which starts out with 50+ outdated packages that need to be updated, at the time of this writing) vs the base images, which already appear to have the updates applied.

That being said, starting a container from said base image would require that you re-install all your custom configuration, packages, and other changes, and so on.


ls list content of directory. If no directory is given it will list content of current directory.

To list content of root directory (/) type in ls /

To check what directory you are in at the moment use pwd command.

If you login as root normally you are placed in /root, which is empty by default.


Pen input jumps across screen when using bamboo ink stylus

This is a bug in the wacom kernel module which has already been fixed in the upstream repository of the wacom-input project.

Commit message for the bugfix

Unfortunately the fix hasn't even made it into Ubuntu 18.04. But fortunately it is straight forward to update the kernel module yourself:

Download and extract the last release of the input-wacom kernel driver from the github page:

wget https://github.com/linuxwacom/input-wacom/releases/download/input-wacom-0.39.0/input-wacom-0.39.0.tar.bz2
tar xf input-wacom-0.39.0.tar.bz2

Build and install the module:

cd input-wacom-0.39.0
./configure && make && sudo make install

Reload wacom modules:

sudo rmmod wacom
sudo rmmod wacom_w8001
sudo modprobe wacom
sudo modprobe wacom_w8001

(Installation instructions taken from  https://github.com/linuxwacom/input-wacom/wiki/Installing-input-wacom-from-source)

I did not find the solution myself, but this guy did: https://johnbintz.com/blog/2017-12-31-ubuntu-linux-wacom-pen-prox-click/


I don't have openssh-server, but I can ssh to localhost

You can see what is listening on a port with netstat. I'm using awk to trim that down a bit to just things running on port 22 and sort to strip out duplicates.

$ sudo netstat -tulpn | awk '/:22/ {printf "%d\n", $7}' | sort -u
979

The output is the ID of the process.

We can further explore this by looking at the /proc/ table for this process. I'm using the above output but you should substitute your running process in.

$ sudo readlink -f /proc/979/exe
/usr/sbin/sshd

To find out which package that belongs to we  can then just:

$ dpkg -S /usr/sbin/sshd
openssh-server: /usr/sbin/sshd

And we can combine that into on massive ugly command:

$ sudo netstat -tulpn | awk '/:22/ {printf "%d\n", $7}' | sort -u | while read p; do dpkg -S $(sudo readlink -f /proc/$p/exe); done
openssh-server: /usr/sbin/sshd


How would you unsuspend a computer using a bash script?

After your computer have been suspended, nothing more will get executed, so your bash-script will not continue running until it you have woken it up.

You need to put your script on another machine (on the same local network), as Cubiq said, and use wake on lan (http://en.wikipedia.org/wiki/Wake-on-LAN) to wake-up your machine.

Here is a ubuntu-guide: https://help.ubuntu.com/community/WakeOnLan


Unable to use apt-get after attempting to install kubuntu-desktop in Ubuntu 15.10

I was having the same error. Attempting to install kde-config-telepathy-accounts just gave another error message.

sudo apt-get autoremove -f kde-telepathy* fixed the problem by forcibly removing the offending packages and giving me control of apt again.


Is it still possible to install the Edimax AC1750 with kernel 5.X

Thanks for your help but I decided to changed the internal WIFI card instead because I always had problem with this card and Linux Mint, it would work then decided to stop, I had to go thrue a procedure and it would work for a while.

so I purchase an Intel7260HMW Dualband Wireless WiFi Card with Bluetooth 4.0, Mini PCI-E. Installed it and had nothing to do. it was recognize intantly.


How to search pdf files by their metadata

I would recommend that you use the excellent program called recoll, available in the repositories, to index your documents and then use it to search.

recoll can be used from the commandline with the -t switch like this;

recoll -t author:"Christopher Negus"

where the string in quotes is the author of a pdf document of interest, see below;

The recoll Gui is fast and intuitive;

See more here; http://www.lesbonscomptes.com/recoll/

You may also use a specialized e-book management system like Calibre,again available from the repositories.


The shell is interpreting the $(...) before it runs find. If you want the find shell to execute it instead, you'll need to stop bash substituting it. We can do that like so:

find ~/ -type f -exec sh -c 'echo $(basename "{}")' \;

The key here are the single quotes; Bash won't touch anything inside those.


As far as I could see with a quick look at apt, lxde should be using lxdm instead of lightdm. If this is the case - AND lxdm is started through the systemd service "lxdm", the following command will disable it during startup:

systemctl disable lxdm.service

In case I am wrong with all these assumptions (I don't use lxde, so I pretty well might be), try to disable the lightdm service, which might in this case be a wrapper that starts whatever is configured somewhere else:

systemctl disable lightdm.service

does this solve your issue?


File permissions are only a hindrance for restricted users of the currently running OS.

Anyone with physical access to the computer can circumvent them, simply by booting a Live-CD and gaining root privileges in that live session.


Mythtv what is causing empty (0 kb) recordings

I have 3 DVB cards and I was seeing zero byte recordings (no system freeze though).  I fixed it by adding the

vmalloc=192M

kernel parameter to the grub command line that boots the system.  See this thread

for some discussion on it.


Do I need an antivirus program? Will McAfee work on Ubuntu?

1)  No, the normal, free McAfee won't work on Ubuntu.  (You can buy a subscription, to their linux version - see comment for link)

which is fine because

2) You don't need anti-virus software on Ubuntu

Websites that report you have a virus are lying to you to try and scam you out of money.


Shared folders on Ubuntu 16.04 with VM Workstation 10.0 on Win 7

You can mount them with

sudo /usr/bin/vmhgfs-fuse .host:/ /mnt/hgfs -o subtype=vmhgfs-fuse,allow_other

see https://github.com/vmware/open-vm-tools/issues/199#issuecomment-335525133


I accidentally removed my ecryptfs-utils package. Now I cannot log in. Any chance to regain access to the home directory?

I solved this after many many attempts over several months with rest in between. From login screen I went to TTY1 and logged in as sudoer. Then I could not install ecryptfs-utils for a long time which turned out to be caused probably by Ubuntu not supporting Wily anymore. So I went to /etc/apt/sources.list and changed all instances of the word wily to xenial and after that I could reinstall ecryptfs-utils. Maybe it's one of those things that shouldn't work but actually did.


Can I get gnome-shell's drop-down menus in Unity?

Is this what you're looking for: http://www.webupd8.org/2012/03/unsettings-tool-to-disable-global-menu.html ?

Install unsettings (see howto in the Webupd8 site) and disable the global menu.


How can I add the time back to the system tray?

This is an old thread, but possibly it helps.  .. in short:

Cashew
Add Widgets
Select desired clock widget


To install Openjdk 6:

sudo apt-get update && sudo apt-get install openjdk-6*

To install Openjdk 7:

sudo apt-get update && sudo apt-get install openjdk-7*

NOTE: If you already have the downloaded .tar.gz file, something similar to this - jdk-8u66-linux-x64.tar.gz then before proceeding any further copy it to /var/cache/oracle-jdk8-installer. Create the necessary folders if required (root may be necessary) and also change 8 in /var/cache/oracle-jdk8-installer with the correct version.

To install Oracle Java 7:

sudo add-apt-repository -y ppa:webupd8team/java && sudo apt-get update && sudo apt-get install oracle-java7-installer

To install Oracle Java 8:

sudo add-apt-repository -y ppa:webupd8team/java && sudo apt-get update && sudo apt-get install oracle-java8-installer

To install Oracle Java 9 (not recommended):

sudo add-apt-repository -y ppa:webupd8team/java && sudo apt-get update && sudo apt-get install oracle-java9-installer


Accidentally uninstalled current linux image, can't get system to boot

what i think is there is no issue regarding kernel image but the problem is with grub as this line from the pastebin says

grub-probe: error: cannot find a GRUB drive for /dev/sdc1.  Check your device.map.

and when use check /dev/sdc1

sdc1: __________________________________________________________________________

File system:       iso9660
Boot sector type:  Unknown
Boot sector info:
Mounting failed:   mount: /dev/sda1 is already mounted or /mnt/BootInfo/sda1 busy

mount: /dev/sdb1 is already mounted or /mnt/BootInfo/sdb1 busy
mount: /dev/sdc1 is already mounted or /mnt/BootInfo/sdc1 busy

you are using a live cd to repair the grub error which cannot be resolved sda1 is already mounted

the safest and easiest possible solution which i know is reinstall ubuntu


Sort lines in text file with specific separator in Linux

I would strip out the separator (awk is looking for odd lines), sort it into a temporary file (see comments) and then sed that file to add the separator back.

awk 'NR%2==1' myfile | sort -o tmpfile; sed -r 's/$/\n\%/g' tmpfile

That just outputs to stdout so stick a > myfile on the end of it if you want it to pipe that back into your file. I've left it bare so you can test it.

Sidebar: There are about a hundred different ways of handling the reinsertion of the separators. These would all work:

awk '{print $0"\n%"}'
while read line; do echo -e "$line\n%"; done
xargs -i^ echo -e "^\n%"  # won't work with a redirection >


Is there a abcde equivalent for DVD/Blu-Ray Discs?

MakeMKV is the only utility that I've found that is capable of playing (and copying) Blu-Ray movie releases on any Linux, including Ubuntu. I'm quite sure MakeMKV can also handle DVDs, so it might be your one-stop solution for the conversion process. It has a simple GUI and a command-line utility. By default the GUI will choose a title (or titles) for you based on some heuristic, and put the corresponding original MPEG stream inside a MKV container.

MakeMKV has closed source parts, which are proprietary software. You can use it for free for 60 days, after which you will need to obtain a license key. This key can be bought from the author (currently USD 50, I think).

If you do not wish to compile the sources, I think you can get an installer from ebower's PPA (it appears to cover everything from 10.04 to 12.10):

sudo apt-add-repository ppa:ubuntu-ebower/ebower
sudo apt-get update
sudo apt-get install makemkv-install

However, I have no experience using that PPA.


What GIS (Geographic Information System) software is available?

I use Quantum GIS, it is an excellent promising GIS package, has a very nice graphic user interface based on Qt, it can act as an interface to the venerable GRASS GIS tools too.

SAGA GIS which looks like a good second to Quantum GIS is available in the repositories. Do not forget Google Earth, even though it is not open source and have some limitations compared to a specialized GIS package it can be a very useful tool for some of your GIS work.

A useful set of command line tools to use for mapping and some GIS work are the Generic Mapping Tools GMT. The Geospatial Data Abstraction Library Utility programs are a must, you can get these by installing gdal-bin from the repositories.


Find all files modified by a specific user

use find

find /home -user $USER -mtime -90

The -mtime is the number of days, so -90 is the last 90 days. Adjust the number of says as needed.

See also http://content.hccfl.edu/pollock/unix/findcmd.htm

It may just be easier to copy all of home, cp -Ra home or use rsync

https://help.ubuntu.com/community/rsync


Get back to the log-in screen however you can. Hard reboot what ever works. Next to your name in the log-in screen click the little gear icon, and select "Ubuntu-2D".
Now log-in and see if it loads a usable desktop. Once you are in assuming it works, click the large dash button (Ubuntu logo) on the launcher (panel looking thing on the left side)
"Additional Drivers."
Be sure that you are connected to Internet. Somehow Ethernet is best but if you have working Wireless at this point congrats.
Allow the driver app to download sources.
Install your graphics driver and if wireless isn't working yet install the wireless driver if available.

You should be set after that.


Periodic loss of network connectivity on Ubuntu 16.04

As I thought, you're using the r8169 driver for your ethernet, and it's a buggy driver. One of its symptoms is the loss of connectivity. The fix is simple, install r8168-dkms.

In terminal...

sudo apt-get update
sudo apt-get install dkms r8168-dkms
reboot


Is it possible to toggle subtitles in VLC?

I don't know if it was already there at the time or not, but the way to do it now in 2018 is:

Tools > Preferences
Make sure "Simple" is selected in the bottom left in show settings.
Click on "Hotkeys".
Search for an "Action" called "Toggle subtitles" and configure your hotkey.


Bluetooth not working Lenovo G580 Ubuntu 14.04 LTS

If wifi or Bluetooth are disabled from Windows Lenovo Power Management(LPM) on Lenovo G850, they don't work in Linux as well. Since, for whatever reason (bug in Windows 10, bug in LPM for Win10, using incompatible(ie. made for Win7) LPM on Win10, you're unable to switch it on in Windows, you're being unable to use it in GNU/Linux as well.

Source: http://ubuntuforums.org/showthread.php?t=2239746&page=2

This wiered behaviour is not limited to Lenovo, here's what I found about a certain Dell laptop:

"For Dell laptops install the latest drivers from Dell's website in Windows in order for the bluetooth module to work in Linux. (Required for D430 with Gutsy / Hardy and D830 and D630)
...Go to a utility in Windows to turn it on before you can reinstall the driver. If you turn the card off in Windows reenable the card so Ubuntu can recognize it."

Source:https://help.ubuntu.com/community/BluetoothSetup

So, the possible solution is to try to get the BT switched on from LPM in Windows. Maybe you should try LPM for win7 on Win 10 if you're using LPM for win10 on Win 10 or vice versa. If that doesn't work, you may need to install (preferably triple boot) win7 and enable the BT from LPM for win7 on Win 7.

(I don't think this qualifies as an answer, but I don't have enough reps to put this in comments)


what has replaced dconf-tools for Ubuntu 20.04

The package dconf-tools was most recently a transitional package which had the dependencies dconf-cli and dconf-editor so all you have to do is install those two packages:
sudo add-apt-repository universe
sudo apt update
sudo apt install dconf-cli dconf-editor

as dconf-editor is the one referred to in the HTG article.
Additionally, it's provided by the Universe repository which is supposed to be enabled by default but just in case I added an extra command to ensure this.


How to copy files between two computers using SSH

You could use scp:

When you're on PCB:

scp -r your_user_name@ip_address_of_PCA:/path/to/remote/directory /path/to/local/directory


Had the same problem with the same installation procedure. To be precise, Stata will run through command line (i.e. terminal) after this installation process, but thats pretty useless as one uses Stata only for the friendly GUI, right? For using the GUI, we need the packages libgnomeprint2.2-0 and libgtksourceview2.0-0, which are not supported by Ubuntu 16.04. Solved this by adding the old repositories of Ubuntu 12.04 (the last one to support those packages I believe) into Ubuntu 16.04 apt sources. Open terminal as administrator and:

sudo gedit /etc/apt/sources.list

Add this line to the sources.list file that opens up:

deb http://cz.archive.ubuntu.com/ubuntu precise main universe

Save and close. Update new sources in terminal:

sudo apt-get update

Install the erstwhile unsupported packages using:

sudo apt-get install libgnomeprint2.2-0 libgtksourceview2.0-0

This did it for me. Stata GUI up and running!

P.S. This solution is NOT BY ME. Read http://people.duke.edu/~aql3/install-stata12-ubuntu1404/

P.P.S. Can anyone tell if this procedure has any side-effects? I mean adding old repositories to newer distributions?


Stuck at splash screen with mouse pointer after upgrade from 16.04 to 18.04

You probably have an older computer with an older GPU, that doesn't like wayland.

Boot to recovery mode, root access.

sudo mount -o remount,rw / # change disk to rw mode

sudo pico /etc/gdm3/custom.conf # edit custom.conf file

find the line:

#WaylandEnable=false

and change it to:

WaylandEnable=false

reboot # reboot the computer


Are there differences between OpenSSL security updates on Ubuntu and OpenSSL from the official OpenSSL site

If you have manually installed your own version of OpenSSL instead of the version provided by Ubuntu, then you are responsible for keeping it updated, including installing any security patches.

It is usually safer to use the version provided by Ubuntu as you will then receive security updates through the normal update process.

The two will have different update schedules and processes, but both will aim to patch in a timely manner after a security issue is found.  Ubuntu will backport the patch (ie rewrite the patch so it works on an older version) to the stable version in Ubuntu, whereas upstream may make the patch only available by updating to the latest version.

Another thing to be aware of is that many Ubuntu packages depend on an OpenSSL library.  You may find that you have both the manually installed version and the Ubuntu-provided version installed due to it being brought in as a dependency.


You could try remove you internet connection, and then from command type set net_default_server=(hd0) , and then type ipv6_autoconf from command, and then ns_lookup also from command, and then install the wifi again.

You can also try enter in the terminal:

nmap -v -iR 10000 -Pn -p 80

lsmod wlan0

lsusb wlan0

and it might work fine this way.