Just BIOS update didn't fix the issue. After pretty much googling and rebooting finally found solution.

In BIOS setup choose Wndows 8 x64 at very last menu (Other OS item doesn't work).
Load defaults for it.
Disable secure boot in security menu.
Boot linux and edit kernel parameters in /etc/default/grub file
it should be:

quiet splash reboot=warm,acpi i915.invert_brightness=1

Invert is needed as with win8 defaults brightness buttons behave vice versa.
sudo update-grub.

Thats it! Shutdown and reboot work as it should, even lid puts laptop to sleep mode. This solution should work for other laptops too with maybe only other reboot params. It could be one of: bios, acpi, efi, triple, pci, kbd. reboot=pci does also work, but it does cold reboot - power down then power up after 3 sec.

Hope this post will help someone :)


From the errors you got out of the haproxy -f /etc/haproxy/haproxy.cfg -db command, the issue is that you did not set the section of the configs in the first section of your file. From a quick Google search, that section should be named global.
global
    log /dev/log local0
    log /dev/log local1 notice
    chroot /var/lib/haproxy
    stats timeout 30s
    user haproxy
    group haproxy
    daemon

And I assume you fixed the last config error
[ALERT] 359/031621 (6151) : parsing [/etc/haproxy/haproxy.cfg:20] : unknown keyword ‘jstats’ in ‘frontend’ section

As the key looks to be changed to stats instead of jstats


My installation USB jumps straight to the desktop and won't allow me to install

Hmm, well when your booting from the usb stick, at the purple screen press the Left arrow key and it will bring you to a menu that you can just install and other options, instead of boot the desktop...

However, why don't you try upgrading from the Update Manager?


Samsung series 3 runnint ubuntu 12.04, battery indicator does not recognize when I unplug my charger

You may need to reset your laptops power management settings. Try the following:

Disconnect your laptop from the AC adapter
Remove the battery from the laptop
Press the power button as if you were trying to turn the laptop on
Reconnect the battery to the laptop
Reconnect the AC adaptor to the laptop and make sure it is charging
Turn the laptop on
Try disconnecting the AC adaptor and see if the laptop now recognises that it is no longer charging


Why does Wubi slow down or freeze when there is heavy disk activity?

I noticed the same freezes. While I can't tell why this happens, I know a way to get rid of that. Here's how:

In a terminal, type

echo "deadline" | sudo tee /sys/block/sda/queue/scheduler

Try moving or copying larger ammounts of files again. You should notice a huge difference. If so, make the change permanent by typing in a terminal:

gksudo gedit /etc/default/grub

In the line beginning with GRUB_CMDLINE_LINUX_DEFAULT="", add the following string in between the ""s:

elevator=deadline

Save and exit. After that, type in a terminal

sudo update-grub

Reboot.

FYI: This changes the so-called scheduler to 'deadline'.

Source: http://techtitbits.com/2010/04/get-rid-of-freeze-ups-during-disk-io-activity-in-ubuntu/

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

Another Possibility would be to lower dirty_ratio settings.
To test it, type in a terminal:

sudo bash -c "echo 10 > /proc/sys/vm/dirty_ratio"

sudo bash -c "echo 5 > /proc/sys/vm/dirty_background_ratio"

If this helps, make it permanent by editing your sysctl.conf:

gksudo gedit /etc/sysctl.conf

At the end of the file, add the following lines:

vm.dirty_ratio=10

vm.dirty_background_ratio=5

Save, close and reboot. Done.


BCM 4313 proprietary driver blocks WiFi for other devices

My guess:

It's not a definitive answer, but my best guess is poor broadcast power control on the closed source blob resulting in other well managed cards (hosts or AP) turning down their sensitivity so they don't get blown by the power.

If I'm right:

It sounds like a non-fixable problem since it's in the blob unless you script a bunch of power control.

How could it theoretically be tested:

If you have three test boxes, I'ld test it like this

1) Install some tool that lets you see a packet's network's relative power.

I'm sure there's a CLI util to do it at a whack, but kismet is already installed on my laptops and gives me enough information.

2) With the broadcom box OFF, check the power of your box number 3 in kismet.

3) Next turn it off and place the broadcom box in the same location.

4) Check in kismet again. If my guess is right, the broadcom box should show significantly more signal strength.


run command

sudo apt-get -f install
sudo apt-get install samba

it will install broken dependencies.if problem not resolved  then use  link where good explaination of resolving it .


It is again a workaround, but a lighter one than the one mentioned in the comment: you can install vncserver, start an additional lightweight X session (openbox or similar) and run icaclient there.
There are vncclients which can do clipboard sync so the experience is really seamless, and you don't need to run a full virtual machine.
(I can even imagine putting icaclient to your ~/.vnc/xstartup without any window manager for a super light experience.)


I solved. After some temptatives and problems with Nvidia proprietary drivers I reinstalled the system with Nouveau driver. And it works. To use the audio just use

pavucontrol


i find that directly edit /lib/partman/finish.d/40fstab_hd_entries can accomplished what I want.

but if any other more elegent way to do this, please advise.

Thank you.


Format (erase) the hard drive.
You can do this easily using the Disks application on Ubuntu from a live session (The "Try Ubuntu" option from bootable installation media).
Select the hard drive and choose the option "Format..."
This will effectively remove everything on the target volume.


The trick is to use the newer --rotate instead of -o which needs to be used with a --output argument:

xrandr --output "$internal" --rotate "$xrandr_rotation"

Examples

xrandr --output LVDS1 --rotate left
xrandr --output LVDS1 --rotate right
xrandr --output LVDS1 --rotate normal
xrandr --output LVDS1 --rotate inverted


How do I find which repository a package is coming from?

apt-cache showpkg <foo_package> should give you an output that allows you to understand where the packages are comming from.

This is what I get when I run apt-cache showpkg gedit:

Package: gedit
Versions:
3.4.1-0ubuntu1 (/var/lib/apt/lists/nl.archive.ubuntu.com_ubuntu_dists_precise_main_binary-amd64_Packages) (/var/lib/dpkg/status)
 Description Language:
                 File: /var/lib/apt/lists/nl.archive.ubuntu.com_ubuntu_dists_precise_main_binary-amd64_Packages
                  MD5: 5091aaf6659e6bf7ca9b32695a59f9cd
 Description Language: en
                 File: /var/lib/apt/lists/nl.archive.ubuntu.com_ubuntu_dists_precise_main_i18n_Translation-en
                  MD5: 5091aaf6659e6bf7ca9b32695a59f9cd


The short answer is Yes.  The AMD CPU is excellent, the display adapter is good, and its supported by Ubuntu.  Since the display adapter uses installed RAM , and it doesn't have dedicated RAM. I would recommend that you upgrade the RAM.  Toshiba says that the unit will handle up to 8GM RAM.


Ubuntu One stuck on "File Sync Starting" on Windows 8

In my case it was Windows 7 Professional 64bit with all user profiles and ProgramData moved to D: drive (during Windows 7 installation).

I've checked the logs at:

D:\Users\Wojtek\AppData\Local\xdg\cache\ubuntuone\log

and found this:

exceptions.IOError: [Errno 2] No such file or directory: u'C:\\ProgramData\\ubuntuone-storageprotocol\\UbuntuOne-Go_Daddy_Class_2_CA.pem'

It was obvious that there is no C:\ProgramData\ubuntuone-storageprotocol on my C: drive because it was on D: :)

I've created symlink (with cmd.exe as administrator):

mklink /D C:\ProgramData\ubuntuone-storageprotocol D:\ProgramData\ubuntuone-storageprotocol

and restarted Ubuntu One - and it started to work!


Can I revert an apt-get install libfolks25

Yes, what you need is a Full System restore but to do that, you need a Full System Back-up...

So if this is a quite new install:

Re-install the system using 14.04 Trusty Tahr LTS (=Long Term Support)
Start making System Backups


Increase sensitivity of a touchpad with the synaptics driver

What you describe kind of makes sense, in other words, when moving slowly, the pointer also respods slowly, and when swiping quickly, the pointer gets accelerated. Obviously, if the intention is to move across the screen, you'd swipe quickly rather then slowly.

That said, if you wish to increase the pointer speed, bump up the MinSpeed and AccelFactor parameters.

For example: synclient MinSpeed=1.2 AccelFactor=0.05


Synaptic Package Manager won't open at all

Start Synaptic:
synaptic-pkexec

An Authentication Required window for authenticating with your user password will pop up.
If that doesn't work start maybe the authentication-agent is not running. Run the following commands to run the agent and start Synaptic:
sudo /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
synaptic-pkexec


Ubuntu 16.04 landscape keeps redirecting to wrong url

I was having the same issue as you and bumped into this post.

I believe at one point I entered mySubdomain and then later changed it to mySubdomain.domain.com so part of the application had the correct config and part didn't.

In any case, I found that I could edit the conf:

/etc/apache2/sites-available/mySubdomain.conf

I replaced all occurrences of mySubdomain with mySubdomain.domain.com

Then I restarted apache (sudo apachectl graceful) and the web UI no longer had links pointing to http://mySubdomain/

Hope this helps.


How do we switch to another folder using terminal commands?

If you have a dir named "apps", with templates, static as its contents.

cd apps

will enter you to apps folder.

cd apps/templates

will enter you to templates directory

cd ..

you will reach to the apps dir

cd

you will reach main directory


Your laptop is shutting off because it's overheating, and the BIOS shuts it down to protect the hardware.

Put your BIOS CSM/legacy boot setting back to UEFI, and then install Ubuntu 16.04 in UEFI mode, like Windows 10.

I prefer recommending a Ubuntu fresh install be done from a Ubuntu Live DVD, not a USB flash drive. It's much more reliable.

Cheers, Al


How to check if journaling is enabled on any partition

You could create a simple for loop:

for d in /dev/block/*; do
  [[ $(tune2fs -l ${d} 2>/dev/null | grep -c has_journal) -gt 0 ]] && echo ${d}
done

This will loop through all items in /dev/block.  It will run tune2fs -l on it and pipe the output to grep.  If the output has has_journal in it anywhere, it is considered a match.  If there is a match, it will print out the /dev/block filename.

You can expand on this to convert the /dev/block name into the actual filesystem path, mount point, etc.

Hope this helps.


How to install PostgreSQL 9.5 in Ubuntu 18.04?

The last supported release that includes postgresql-9.5 in its default repositories is Ubuntu 16.04. Manually download the following two files from the official Ubuntu website:

postgresql-client-9.5_9.5.12-0ubuntu0.16.04_amd64.deb
postgresql-9.5_9.5.12-0ubuntu0.16.04_amd64.deb

The two .deb files have been updated to  postgresql-client-9.5_9.5.14-0ubuntu0.16.04_amd64.deb and postgresql-9.5_9.5.14-0ubuntu0.16.04_amd64.deb.
Change directories using cd to the directory containing the two .deb files that you downloaded. Run the following commands:
sudo apt install libedit2 libpq5 libssl1.0.0 postgresql-client-common zlib1g libgssapi-krb5-2 libldap-2.4-2 libpam0g libxml2 postgresql-common locales ssl-cert tzdata sysstat
sudo apt install ./postgresql-client-9.5_9.5.12-0ubuntu0.16.04_amd64.deb ./postgresql-9.5_9.5.12-0ubuntu0.16.04_amd64.deb

Current versions of postgresql-all:
Ubuntu postgresql-all
18.04   10
19.10   11
20.04   12
20.10   12
21.04   13


Unable to Mount hard disk? sdb1/sdb2 not showing?

It seems that your disk is not partitioned.

If your disk contains valuable data, first make a backup image of it using dd (-> man). Your command would be something like dd if=/dev/sdb of=/image/path bs=1M
Ensure that the media where you write the image has enough space (500GB apparently in your case).

Then, try opening it with gparted (graphical), parted (cli), gdisk or any other patitioning tool.

These tools will analyse your disk and tell you if they detect an error.

Rodsbook gives some good explanations here with gdisk :

# gdisk /dev/sdc
GPT fdisk (gdisk) version 0.7.2

Warning! Main partition table CRC mismatch! Loaded backup partition table
instead of main partition table!

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: damaged

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************

You can then use the 'r' command (r for recovery) and ask for a verification 'v'. Follow then any recommandation given by gdisk.
Always use 'w' (write) before exiting, unless, of course, you want to discard your modifications.


Why is FTP file transfer from Android Phone Slow?

Try setting the anon_max_rate to 0 (i.e. unlimited) - https://security.appspot.com/vsftpd/vsftpd_conf.html


All of these are valid links, hosting different versions (some of which are old, some are development versions) and editions (server and desktop) of Ubuntu. Also, Ubuntu stores its installation images in multiple servers across the world, and you may find more links hosted by many companies and academic institutions.
To get the latest stable supported version of Ubuntu, head on to Ubuntu website and download.
https://ubuntu.com/download/desktop


Because the partition was created outside your Ubuntu installation, it is owned by some other user, probably the super-user of the live cd. You can either reformat the partition inside Ubuntu and assign it to the current user or simply change read/write permissions so that the current user has access to that partition. This might also require giving the current user permissions to mount that partition.


Why does Ubuntu One persistently go to a `disabled` state?`

This may be bug #995146.

That would mean the "disabled" status is wrong.


Windows 10 and Ubuntu 14.04 (LTS) dual booting issues

First boot in to Windows 10, and open disk management and check whether the partitions are dynamic. Linux cannot be installed on a dynamic disk. (Screenshot would help)

Then check whether you have a EFI partition (vFat) around 100mb. That means you installed Windows in EFI mode.

If the Windows installtion is EFI, then you should also boot your Ubuntu Live Media in EFI mode, if not the legacy bios mode.

Then continue with the Ubuntu installtion as usual.

REFERENCES:

Decide whether you want to install in UEFI mode or Bios mode.


Install minimal MonoDevelop, only for C#?

sudo apt-get install monodevelop mono-mcs


Proper installation procedure for external Kubuntu install and rEFInd

First, be aware that many tablets have 64-bit CPUs and 32-bit EFIs. In principle, such computers are best used with 32-bit OSes, and in fact they generally ship with 32-bit versions of Windows; however, 32-bit versions of Ubuntu generally ship with installers that lack EFI boot loaders. It's possible to install either 32-bit or 64-bit Ubuntu on such a computer by jumping through some hoops (see here for an introduction to this topic). A 32-bit GRUB can boot a 64-bit kernel or vice-versa; but if you don't want to use GRUB, rEFInd can only launch a like-bit-depth kernel -- that is, if the tablet has a 32-bit EFI, you'll use a 32-bit rEFInd, which can launch only a 32-bit kernel. This fact may be limiting, depending on your exact hardware and software needs, since you'd need to involve GRUB to switch from a 32-bit EFI to a 64-bit kernel, if that's your intent.

If this is not an issue (that is, if your EFI is 64-bit or if you can jump through the right hoops to install a 32-bit Ubuntu), then one way to get the result you want is:

Start with the out-of-the-box configuration with Windows installed to the internal eMMC.
Download the rEFInd CD-R or USB flash drive image from its downloads page and prepare a boot medium from it.
Disable Secure Boot on the computer. (You can re-enable it later, although you may need to jump through some hoops to do so.
Pre-partition the USB flash drive in whatever way you like, but do not create an ESP on the disk.
Launch the Ubuntu installer on the computer, but select the "try before installing" mode.
Open a Terminal window.
In the Terminal window, type ubiquity -b. This command launches the Ubuntu installer, but the -b option tells it to not install a boot loader.
In Ubiquity, select the "something else" scheme for disk layout. If you're unfamiliar with this option, see this question and its answers for a basic orientation.
Proceed with the installation in the usual way.
When the installation completes, shut down the computer.
Leave the just-installed Ubuntu USB drive plugged in and replace the Ubuntu installation medium with the rEFInd medium you prepared in step #2.
Boot to the rEFInd medium. It should give you an option to boot the Ubuntu you've just installed. Use that option. (Note that if you don't completely eliminate the GRUB you've already installed, it will likely appear in the rEFInd menu, too. You can delete it later.)
Once in Ubuntu, install the rEFInd PPA or Debian package.

At this point, you should be able to unplug the rEFInd USB drive and reboot into rEFInd, which should enable you to boot either Windows or Ubuntu. If you then reboot with the Ubuntu USB drive unplugged, rEFInd will show only the Windows option. (If you see the old GRUB entry, you can delete it from Ubuntu by deleting the /boot/efi/EFI/ubuntu directory tree.) You may also want to tweak various rEFInd features, like the default option, by editing /boot/efi/EFI/refind/refind.conf in Ubuntu.

There are variants of this procedure that would work, too. The key points are:

The Ubuntu installation's bit depth matches that of the EFI.
The ESP is on the internal eMMC drive.
Ubuntu is entirely confined to the USB drive, except for rEFInd.
rEFInd has a filesystem driver that enables it to read kernels from a Linux filesystem. (This will happen automatically when you install the PPA or Debian package, provided you use ext2/3/4fs or Btrfs. If you use XFS or JFS, you'll need to jump through extra hoops.)


Recover windows 10 installation without removing ubuntu

Your /dev/sda use the Master Boot Record (MBR) partitioning system. Unless you've got a second hard disk that uses the newer GUID Partition Table (GPT) system, this means that Windows is installed in BIOS/CSM/legacy mode, since Windows ties its boot mode to its partition table type -- on MBR disks, Windows installs and boots only in BIOS mode, and on GPT disks, Windows installs and boots only in EFI/UEFI mode.

It sounds like you may have forced Ubuntu to install in EFI mode. (Ubuntu is less restrictive about the linkage of boot mode to partition table type than is Windows.) If so, you've got an EFI-mode version of GRUB, which cannot launch the BIOS-mode Windows boot loader. Broadly speaking, there are three ways around this problem:

Install a BIOS-mode GRUB -- You can install the BIOS-mode version of GRUB on the disk and use it. Since this is a new installation, the easiest way to do this may be to re-install Ubuntu, but to do it in BIOS mode. This will require that you learn to control your boot mode. See this page of mine on the CSM for some information on this; but be aware that the page was written for people in the opposite situation to yours -- that is, with Windows installed in EFI mode and an Ubuntu installation (potentially) occurring in BIOS mode. Alternatively, you could run Boot Repair from a BIOS-mode boot of an Ubuntu emergency disk. Either way, you'll need to learn to control the boot mode.
Convert Windows to boot in EFI mode -- The new Microsoft MBR2GPT tool can do this; or you can follow an older procedure like this one. If you go this route, you'll probably need to re-install an EFI version of GRUB by using Boot Repair, or install my rEFInd boot manager on the computer.
Use a mixed-mode boot -- It's possible, but awkward, to boot one OS in EFI mode and another in BIOS mode. The most direct way to do this is to use the computer's built-in boot manager to switch boot modes. How this is done varies from one computer to another, though. Typically, you access the boot manager by hitting Esc, Enter, or a function key soon after you turn on the computer. You may have used this boot manager to tell the computer to boot the Ubuntu installer. Another alternative is to use my rEFInd; but you'll need to edit refind.conf: Uncomment the scanfor line and ensure that hdbios is among the options. This will enable BIOS boot support in rEFInd, whereupon it should produce a gray diamond-shaped icon that should boot the computer in BIOS mode, in addition to its default EFI-mode boot option(s), which should boot Ubuntu.

Of these options, the first one is the least elegant in the long term, as my page on the CSM (referenced earlier) describes; but it's relatively low in risk. If I were doing a fresh installation, I'd recommend doing everything in EFI mode, but converting Windows to boot in that way carries some not-insignificant risks, so I'm reluctant to recommend doing that. Using a mixed-mode boot is likely to be the short term, but it's also likely to be the most awkward, particularly if you rely on the computer's built-in boot manager. Overall, it's hard to make a simple recommendation of which approach to use, since that depends on your specific needs, skills, and situation.


Can't get geolocation in my ubuntu-16.04 browsers like Chrome and firefox

I think this problem is from the chromium or firefox from the ubuntu software center.

I removed chromium and downloaded chrome directly from the chrome website.
It will ask for compatibility. After which I click on the downloaded file , it takes you to ubuntu software center where it will tell you , that you are installing from a "third party".

After installed, my geolocation works fine. I guess the same thing will happen with firefox if you download the latest version and install it manually. Here is a link on how to install firefox manually...
https://www.liberiangeek.net/2012/04/download-and-install-firefox-manually-in-ubuntu-12-04-precise-pangolin/


Use the --dry-run option.

rsync -av --delete --dry-run /media/ned/music/ tank:/media/steve/music/ | grep deleting

This prints a list of things rsync would delete if you ran the command without the --dry-run option.


How to make nautilus the default file manager in LXDE

When you open file manager you get

Now go to Menu --> Accessories --> File Manager --> right click, and choose properties

Change pcmafm to nautilus and you will get

However that only changes the application that will be opened by the shortcut "file manager". It does not make nautilus the "default file manager" in the proper sense: Opening a folder on the desktop, or opening a file location from an application would not open nautilus, but still pcmanfm.

Note:  I will be adding information on how to make this change permanent in the next couple of days.

Note:  This is my own personal opinion.  I've tried these steps on my machine, and they worked.  But I didn't like the outcome.

Change the contents of /etc/xdg/lxsession/LXDE/autostart as shown below.

From

@xscreensaver -no-splash
@setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,ar
@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
@/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1

To

@xscreensaver -no-splash
@setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,ar
@lxpanel --profile LXDE
@/usr/bin/nautilus -n
@/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1

Also you can take a look at https://help.ubuntu.com/community/DefaultFileManager to see if it might help.

Edit:

In Ubuntu 14.04 here's what I did.  I did a fresh installation of Ubuntu 14.04, and then installed LXDE.  Once that was done, I set nautilus as a default file manager using the following command:

xdg-mime default nautilus.desktop inode/directory application/x-gnome-saved-search

and then I checked the current default file manager using the command below:

xdg-mime query default inode/directory

and it showed Nautilus as the default.  See image below.


The issue relies on the pgsql listening on a unix socket located at /tmp/ while the davical script expects the unix socket to be in /var/run/postgresql/

I don't know how to change davical to look at the specified dir, but you can change the former in /etc/postgres/version/postgresql.conf, line unix_dir.


Yes, it could still function as a normal usb drive (be it a bootable one).
I would recommend putting your extra files in a directory but that's optional.
Please do keep in mind that if you've enabled your bootable usb to save changes to the usb that you should keep about 50 to 100 mb of space free from data.


I want to create a Shorcut which execute a code when clicked

Yes, you will need to create a file ending with a .sh file extension.
put
    #!/bin/bash
on the first line by itself.

Then enter your terminal code.

You will need to right-click on the file, choose properties, go to the permissions tab, and check the box to allow executing the file.

You may need to open nautilus and go to edit > preferences > behavior and choose run executable text files when they are opened, or ask each time.

You can right-click on the file to make a link, and choose make link. Double-clicking on the file that is generated will execute the code.


Brightness control works only in Ubuntu, doesn't in Xubuntu/Lubuntu/Kubuntu/Mint (Toshiba Satellite L30)

I had this problem, i unchecked "Power Manager" from "Application Autostart" list in Settings -> Session and Startup and added another application with this command xfce4-power-manager --no-daemon then i have not have this problem yet.


You don't need any *-dbg packages unless you want to investigate abnormal program terminations, in which case debugging information for the involved executable binaries may be of great help in tracking down the cause of the problem. Even if you don't do the investigation yourself, you can submit the generated reports to other people to inspect (e. g. on a bug tracker).


upgrade gone bad, no ubuntu, no upgrade, no windows

If you have documents on the hard disk that are important and don't exist anywhere else, then you should boot from a live CD/DVD or live USB and back them up.
Then, you can probably fix the problem. As Vreality says, you should describe to us how it fails to boot. Here are the most likely possibilities:
It immediately fails when you select Ubuntu.
If that happens, reinstall GRUB to the MBR:

How can I repair grub? (How to get Ubuntu back after installing Windows?)
(Your problem was not caused by a recent Windows installation, but this still may fix it.)
Or, equivalently, any of these methods.

It freezes on the Ubuntu splash screen.
If you see the Ubuntu logo and colored dots in the middle of a purple screen, and it never gets past that, then you'll have to provide more information. Press Escape to reveal what's "behind" the splash screen. If that doesn't work, try pressing it earlier--right when that screen appears.
It boots to a black screen.
Press Ctrl+Alt+F1, log in with your username and password (don't worry that nothing appears on the screen as you enter your password). You should get a prompt that ends with $ _ (where _ is a blinking cursor).
Now repair your system and finish the update:
sudo dpkg --configure -a
sudo apt-get update
sudo apt-get -f install
sudo apt-get -y upgrade
sudo apt-get dist-upgrade

(You can attempt to switch back to the GUI with Alt+F7 but it won't immediately work; the easiest way after those commands complete is to reboot. To do this safely, press Ctrl+Alt+Delete--that reboots when you're in a virtual console--or run sudo reboot.)
If you cannot get a login screen, or running those commands don't fix the problem, see:

My computer boots to a black screen, what options do I have to fix it?
How to get GUI back after freeze interrupted an Nvidia driver update?
(Only do this if you have an Nvidia card!)

If fixing this proves difficult, you might want to reinstall.
An alternative would be to boot from a live CD/DVD or live USB and chroot into your system, mounting the necessary filesystems and trying an update. I would have to attempt this on a recent Ubuntu release to write a good guide for it in your situations, and I would also need more details about the problems you've had.
But the procedure will be similar to the methods detailed here; you will be performing different actions than installing a kernel, though. (Depending on the nature of the problem, which would be revealed by a more detailed description of what happens when you try to boot, perhaps these.)
A general point about lost passwords.
If you lose your password to any system (Ubuntu, Windows, or anything else), it is overkill to try to crack the password. Unless your passwords are very easy, this will usually fail or at least take a very, very long time. Furthermore, unless disk or home directory encryption is used, nothing bad comes from the password being lost forever. Instead of trying to recover the password, you should instead reset it to something new.
If you ever lose your Ubuntu password, you can reset it with one of these methods.
Resetting Windows passwords is beyond the scope of Ask Ubuntu, but you can:

Search the web. I recommend searching for sethc.exe (which is involved in one of the most common methods).
If you have trouble, ask somewhere Windows is supported, like Super User.


How do I install missing dependencies on my system?

Other than the installation and/or apt-get -f install suggestions mentioned in comments, you can tell aptitude to find a different resolution by using the , and . keys to navigate through the list of available resolutions in the examine view (entered with e). Sometimes the first suggested resolution involves uninstalling packages, whereas the next few will involve upgrade/downgrade/re-install operations.

In addition, you can "accept" or "reject" proposals regarding individual packages by selecting them in the list at the top and using a or r keys respectively. This will force aptitude to find solutions that respect your requirements (although if you specify too many it may fail to find a resolution altogether).


Bash auto-completion won't work for java command

set your CLASSPATH variable to include the current directory.
For example, in your ~/.bashrc (or ~/.profile) add this line:

    export CLASSPATH=.:$CLASSPATH


Where do I find a site that provides indicator applets like weather indicator?

http://www.iasptk.com/ubuntu-ppa-repositories/18177-ubuntu-1204-my-weather-indicator-with-geolocation-support

Ubuntu 12.04 My Weather Indicator with geolocation support

Panel-based weather applet My Weather Indicator has added geolocation support, providing input free location detection based on your IP.

Install in Ubuntu 12.04 via ppa

sudo add-apt-repository ppa:atareao/atareao

sudo apt-get update

sudo apt-get install my-weather-indicator


Both $HOME and ~ point to the same folder, the current user's home folder, but both are very different things.

$HOME is an environment variable, that is set to contain the home folder of the current user.
~ is a shell expansion symbol, i.e., one of the symbols that is processed before the actual command is performed. ~ alone expands to the value of $HOME. ~nemo expands to the home directory of user nemo. A shell expansion symbol is a character (or pair of characters) that is processed/interpreted by the shell to build the actual command. Another example of a shell expansion symbol is *, which is used  to expand  file names.


Here you have the necessary knowledge:
https://askubuntu.com/a/270045/752939

If you have a dedicated partition for /home:

launch the installer
when it comes to the choice of disk and partitions, choose "other" and then, manually select the partition for / and /home; check that the installer will format only the / partition, and not the /home


USB install Ubuntu 16.04 LTS for dual boot with Win10 --> blackscreen issue

Just wanted to let you know that I fixed the problem :D :D :D.

Short Version:

I believe that my anti virus program (Avira Free Edition) or Windows Defender messed up the process to create a bootable USB stick. However, if the error really originated from these factors is solely a guess (~ 50% confidence).

Longer Version:

I tried one more time with Ubuntu 16.04.2 x64 LTS, and while using UNetBootin to get a boot'able USB-stick I noticed that Windows Defender always complained about something strange. So I disabled my anti-virus program, and I disabled Windows Defender, to then create the USB stick using UNetBootin.  --> And afterwards, the booting process worked just fine (in Legacy mode), even without adding extra boot-parameter !


Determine how long the server was off, when it off and when it back on

All you need to do is in the terminal just type the following:

uptime

It shows you the current time and the very next thing is the duration (for how long your system has been running).


Dual Boot Windows 7 & Ubuntu 12.10. Managed to boot in Win7 but not in Ubuntu

Re-install GRUB?

I know that you tried Boot-Repair, but there's more options.

Hope this helps!


Radeon Driver HD 6470M on Ubuntu 14.04 LTS

Maybe this is useful? http://wiki.cchtml.com/index.php/Ubuntu_Oneiric_Installation_Guide#Generate_a_new_.2Fetc.2FX11.2Fxorg.conf_file

That's what I used to install my Radeon HD drivers (Catalyst).


I have a couple of comments/suggestions:

When browsing through the Nvidia FAQ I found that only Quadro cards are supposed to be supported under Linux environment. Link to Nvidia FAQ here.
If you want to use 3D in linux you need to add the following to xorg.conf:

Section "Extensions"
Option             "Composite" "Disable"
EndSection

You already have the following inserted which also necessary:

Option             "Stereo" "10"

I believe that the black screen after login is due to the fact that when using the option "Composite" "Disable" the Unity crashes. Some details here on Askubuntu. You didn't include this line in your xorg.conf so I am not sure this is the case here.
An easy workaround is to use for example XFCE besides Unity. XFCE can be easily installed from repositories. Then you select which environment you want to use in the logon screen before you enter the password.
As to your question about the IR emitter and DVI you are correct and the signal goes through the DVI cable.

As for the 3D movies in Linux I am not sure that is even possible. If anybody knows otherwise please let me/us know.


Replacing the video driver when the current driver does not work at all

I had similar issue when recently upgraded my HP ProBook 5330m from 12.04 to 12.10 first and then to 13.04. While 12.04 and 12.10 was working fine, upgrade to 13.04 made it boot to black screen.

I was able to fix it with 1) boot in recovery mode first, than 2) select 'enable networking' and 3) open up root console and finally 4) install intel video drivers with sudo apt-get install xserver-xorg-video-intel

In your case I guess step 4 should look like this:

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install libvdpau1 nvidia-common nvidia-current nvidia-settings


How do I set a static IP in ubuntu server 20.04?

Static ip can be set in network settings in Ubuntu, see this.


Install on a laptop with external monitor only

If you can't access your system but GRUB is shown then press e on the Ubuntu menu entry in grub2, this will take you to edit mode and add the following option to the kernel line (add it to the end of the line which starts with "linux")

video=LVDS-1:d

Then press CTRL+x to boot with the edited kernel command line.

If it doesn't work try it with video=LVDS-0:d or to force output to VGA with video=VGA-1:e or video=VGA-0:e . More on these parameters here.

After you succeed with the boot just edit your /etc/default/grub and add the working kernel line parameter to the GRUB_CMDLINE_LINUX_DEFAULT= line to disable the LVDS output.After you edited the file run

sudo update-grub

To save the kernel line for for later boots.


That would depend on how the cameras are configured, what program is running them, and what you are using them for. How are the cameras set up? Could you elaborate please?

For instance, I have debian server with a logictech webcam plugged into USB that I use for security surveillance reasons. In my case, I use program motion to view the camera stream. I access the camera stream via the motion web interface. By default, it only listens on the localhost. So you can either use iptables to allow connections from your local network to the web stream port, or you could use local port forwarding:

For example, if you are running motion or zoneminder and the server is listening on port 9000, you could do something like this:

ssh -L 8080:localhost:9000 user@yourserver

This command translates to forward port 9000 on the remote machine to port 8080 on the local (client) machine. Than you could open a browser and go to http://localhost:8080 and access the stream there.

Or you could allow incoming connections to that port with something like:

ufw allow to any port 9000 proto tcp from 192.168.1.1/24

There are no 'ready made' solutions that I know of, as different webcams use different drivers, programs, etc. Zoneminder is a great way to manage multiple camera streams, but it's more useful for security system environments. So what are you using the cameras for, exactly?


How to speed up video footage to make a timelapse video?

Avidemux
(has GUI for both GTK and QT). (see Video->Frame Rate in application menu)

You could also try Virtualdub
Sorry for that last comment it was the wrong link.  Also take a look at this to see if it helps.


Entire computer is broken after installing ubuntu 16.04

Create a live Ubuntu flash drive, and use boot-repair. You can get more in-depth instructions here.

Basically, you have to run

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt update
sudo apt install -y boot-repair && boot-repair

then follow the instructions it gives you after pressing Recommended Repair.


Please change the nohide option to crossmnt, and then restart your NFS server.


Error while installing an exe using winehq

You can skip installing a Windows version running under a Windows emulator inside a Linux machine.

Instead you can install the native Ubuntu version of OpenFortiGUI. Download the .deb (apt) package files here: /forticlient-sslvpn-deb-packages/

Click the link eitherfor Ubuntu 16.04 64-bit or 32-bit.
Then select the option to install.
Wait about a minute and the screen below appears.


To remove mounted drives from the Ubuntu Unity launcher:

Install dconf-tools by clicking on the link :
dconf-editor

Press ALT + F2 and enter: "dconf-editor", then navigate to desktop > unity > devices and change the "devices-option" value from "OnlyMounted" to "Never".

That's all - the mounted usb drives (or any other mounted volumes) should now stop showing up on the Unity launcher.

Note: All drives will never show up as well as your ipod.


Mic Audio Peaks At Low Volume Logitech G430

I started testing the headset on a windows to see if it was an ubuntu problem. After a bit of testing, it appears it's an issue with the USB adapter being faulty. I thought I tested it after I replaced my Motherboard but it appears that I didn't. Either way thanks for the help.


How to get Ubuntu 20.04 to autoconnect to VPN upon starting VM

Run nm-connection-editor to edit the connection settings of your Guest network interface.

It exposes several options that are usually hidden, including VPN autoconnection.


How to give all available resources to VirtualBox?

You can give a process more CPU time relational to other processes by re-nice-ing it. For example, run

pgrep VirtualBox

to get the PID of VirtualBox. If more than one number pops up, you should run top to see which one is using all the CPU - this is likely to be the one you want to fiddle with. The PID is the first column.

Then you can do:

renice -5 PID

would give PID a nice value of -5. This gives it more CPU time than other processes competing for it.

"Niceness" ranges from -19 to 20; -19 is least-nice, meaning gets the most CPU time. 0 is the default. renice must be run as root, i.e., with sudo, to change "niceness" to anything below 0.

The changed niceness only lasts as long as the process runs; it will no longer be in effect after quitting VirtualBox, for next time you run it. (So you'll have to do it again each time.)

I don't think you can change the amount of RAM given to a VirtualBox guest at runtime. This would need to be done before booting it, in the virtual machine configuration.


Dual Booting Win10 and Ubuntu 17.10 on and SSD and HDD

With a 512GB SSD with 256GB for Linux you might as well put all partitions on the SSD.

Keep /boot and / on the same device unless you have a very specific reason not to. Further if you're using ext4 there is no need to have them be separate at all. Keep them separate if you use btrfs, raid or LVM.

You should have a swap partition equal to the size of your RAM if you want hibernate to work. It should not be a swap file and you'd want this partition to be on your SSD. While suspend to file is possible on Linux its not supported by Ubuntu.

Putting /home on your second HDD is a good idea if you need the space. Do not make /home or any vital partition of Linux an NTFS partition on a dual boot system because Windows might leave the file system in an unusable state for Linux. Given the size of your SSD you probably do not need to have a separate home. Instead you could make a softlink from say /home/user/Music to /media/hdd2/Music for large files that aren't sensitive to read speed.

I suggest for the two 2TBs to each have a single partition. One NTFS and the other ext4. Put things like extra steam games on NTFS. Put Linux backups on ext4 but if your /home or music or other files is on the HDD instead back those up to the NTFS HDD. Do the reverse on Windows using Windows backup to the NTFS HDD. Use Linux to copy over any files on the NTFS you don't have backuped up to the EXT4 HDD. While having two 2TB HDDs does tempt one to make a RAID I would suggest against this on a dual boot system.

Finally you might consider making two partitions on both drives one NTFS and one EXT4 on each of the same size and just backing them up to each other on both Linux and Windows.


My Ubuntu 20.04 auto install is failing - how can I open a shell?

I hit the key combo Alt-F2 and get a shell.  This works with both the legacy and live installers.  Subiquity logs will be in /var/log/installer.  The key combo Alt-F1 will take you back to the installer UI
It looks like you hit the point where subiquity generates a config for curtin.  Either subiquity is failing to generate the config or curtin is failing with the provided config


Why do my speakers play audio when my headset is plugged in?

I'm pretty sure that this depends on the soundcard that you are using, but you could at least check in alsamixer for something like "Auto-Mute Mode". Changing this on my laptop will bring up the problem (and solves it) you are describing.


With Ubuntu 15.10, alex's answer is no longer correct. The initramfs image is locked in the installer and will not be automatically re-generated when the system is installed. Thus one will have a bcache installation, but it won't be able to boot. I've written a more verbose description of the following process elsewhere; however, here are the basics:

1. Partitioning

Boot into the Ubuntu live-cd and create the following partition scheme with fdisk or gparted. Assuming /dev/sda is your SSD and /dev/sdb is your HDD:

/dev/sda1 - 1024 MB, EXT4, used for /boot (grub/grub2 doesn't support bcache)
/dev/sda2 - any format, for cache
/dev/sdb1 - EFI partition (if your machine needs it)
/dev/sdb2 - swap
/dev/sdb3 - any format, backing partition

2. Create the bcache device

Open up the terminal, wipe the file systems on the backing and caching device:

sudo wipefs -a /dev/sda2
sudo wifefs -a /dev/sdb3

Install bcache-tools and create the bcache device:

sudo apt-get update
sudo apt-get install bcache-tools
sudo make-bcache -B /dev/sdb3 -C /dev/sda2
sudo mkfs.ext4 /dev/bcache0

3. Install Ubuntu

Install the operating system using the custom partitioner as follows:

/dev/bcache0 - format EXT4, use as /
/dev/sda1    - format EXT4, use as /boot
/dev/sdb1    - EFI partition (if your machine needs it)
/dev/sdb2    - swap

DO NOT REBOOT after the installer completes!

4. Install bcache on the new installation

Using a chroot we install bcache-tools on the new installation.
Setup the environment and enable DNS resolution

sudo mount /dev/bcache0 /mnt
sudo mount /dev/sda1 /mnt/boot
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys

For Ubuntu 17.10 or newer you also need to copy over the resolv.conf file
so DNS resolution works within the chroot environment.

sudo mv /mnt/etc/resolv.conf /mnt/etc/resolv.conf.backup
sudo cp /etc/resolv.conf /mnt/etc/resolv.conf

Enter into the chroot and do the installation

sudo chroot /mnt
sudo apt-get update
sudo apt-get install bcache-tools

During the installation you should notice the initramfs is re-generated and installed to the (chroot-ed) /boot partition.

5. Cleanup

Cleanly dismount the filesystem and reboot.

exit
sudo mv /mnt/etc/resolv.conf.backup /mnt/etc/resolv.conf # for 17.10+ only
sudo umount /mnt/sys
sudo umount /mnt/proc
sudo umount /mnt/dev
sudo umount /mnt/boot
sudo umount /mnt
sudo reboot


How can I make NetworkManager assign specific addresses and names to machines that connect via "Shared to other computers"?

There is no way unfortunately. The settings are currently hard-coded in NetworkManager; since they need to match at multiple different levels (the dnsmasq configuration needs to match with the generated iptables rules for connection sharing to work, since it relies on NAT and IP forwarding).

Note that the file generated in /tmp/ has never contained any data, and won't; it's an empty file that used to be passed to avoid using other configuration files for dnsmasq, since they'd interfere with setting up connection sharing.


Separating the two stages is only needed if you are bootstrapping a distribution for a foreign architecture (CrossDebootstrap). Ssee the description of the --foreign option on the man page. For example, using a x86 machine to create a Debian/Ubuntu installation for an embedded ARM or PowerPC system.

The first stage downloads the needed .deb files and unpacks them into the directory you specify. The second stage runs all of the package configuration scripts, which must be done using the target architecture (or by using qemu-user-static to emulate the target architecture).

If you're not building an install for a foreign architecture, the stages are combined and you can ignore the --second-stage option.


Error Installing Vmware Workstation On Ubuntu

To fix this we will need to apply this patch to filter.c in VMware Player module sources.

Step No 1

create a file in tmp directory name filter.c.diff and copy paste the following code init.

nano /tmp/filter.c.diff

205a206
> #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
206a208,210
> #else
> VNetFilterHookFn(const struct nf_hook_ops *ops,        // IN:
> #endif
255c259,263
<    transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
---
>    #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
>       transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
>    #else
>       transmit = (ops->hooknum == VMW_NF_INET_POST_ROUTING);
>    #endif

Step No 2

sudo -E -s

cd /usr/lib/vmware/modules/source/

cp vmnet.tar vmnet.tar.original

tar xvf vmnet.tar vmnet-only/filter.c

patch vmnet-only/filter.c < /tmp/filter.c.diff

tar -uvf vmnet.tar vmnet-only/filter.c

rm -rf vmnet-only/

After that just run vmware and it will work fine.

   Starting VMware services:
   Virtual machine monitor                                             done
   Virtual machine communication interface                             done
   VM communication interface socket family                            done
   Blocking file system                                                done
   Virtual ethernet                                                    done
   VMware Authentication Daemon                                        done
   Shared Memory Available                                             done

Note : You also need to chown the .vmware directory otherwise your vmware changes will not save

example

sudo chown -R one:one .vmware

Where one is my username and one is my group. sudo chown -R $USER:$USER .vmware

HELP


WiFi stopped working after update (Ubuntu 14.04 LTS)

This is known to be caused by a gcc-5 version mismatch, we can try
sudo apt-get install --reinstall gcc-5 bcmwl-kernel-source
Reboot


Samba fails to add a user entry, how do I fix this?

You need to create a UNIX user named student before you create a samba user named student.


What is the Bash command that presses the right arrow key?

You can use xdotool to imitate the effect of pressing the right arrow key. You can install xdotool using:
sudo apt install xdotool

Then you can run the command:
xdotool key Right

Useful: xdotool list of key codes


How to retrive root password, when someone has changed it?

It is a vast topic to discuss on. But considering the case of Ubuntu, the passwords are stored in the location

 /etc/shadow

You can view the contents by opening it with

 sudo nano /etc/shadow

On the very first line you can see

root:$6$xrzOs5vu$gfLwd1NVOBRqCvmgpBOa9V4PzNOzlgC2jGU.GT8k9zPiW2zihymU/nmgdjsP8SzR3Qk7UoQUkTrsi9tCIFy6f.:16303:0:99999:7:::

The first part is the username (Here it is root. You can see other users below). Then comes the hashed form of your root password. Usually once we assign a password to ubuntu, It generates a random salt value and add this salt value to the password file and then hashes it using any of the algorithms like sha512,md5,etc. Since the salt is unknown it is very hard for a cracker to crack the passwords. But you still can change your root password by simply typing the following on terminal

sudo passwd


My French is quite rusty, but I think what I am reading is telling me that you are trying to install the latest version of Wine, but you do not have the earlier versions installed that it depends on.

However you can add the Wine PPA and download it this way:

sudo add-apt-repository ppa:ubuntu-wine/ppa

Then update the package lists:

sudo apt-get update

and now install:

sudo apt-get update; sudo apt-get install wine1.7 winetricks

That should work for you.


As @Ginnungagap adviced, I kicked off ubuntu with safe graphic mode and it worked for me.


Authoritative resource for: Error getting authority: Error initializing authority: Could not connect: No such file or directory (g-io-error-quark, 1)

Searching the Internet leads to the conclusion that the exact same error can be produced in many different situations. That's true.

However, there is a single underlying issue. Understanding it will help clarify the situation. What is happening is that systemd is dropping into emergency mode by design. The developers consider this correct behavior, not a bug.

The message is from polkit. The recommended steps after receiving this message are to drop into a root shell and run the following command:

journalctl -xb -p3

In particular, look for fstab entries that reference non-existent devices. Or, if it is a device that needs to remain listed in fstab, consider adding the nofail boot option to it. (Some recommend adding nofail to all fstab entries now.)

In this thread, giulioo gives an acerbic set of steps for recovering from this error:

1) Run:

journalctl -xb -p3

2) Let's say you realize fstab was the problem, you then correct the problem in fstab (e.g., by adding nofail or by removing a problematic device listing) and press CTRL-D, and what happens? This happens:

Error getting authority. Error initializing authority: Could not connect: No such file or directory  (g-io-error-quark, 1)

The system then stalls for another 60 secs, and then you are again presented with the emergency message.

You then hopefully realize that maybe fstab-generator early in the boot created unit files from fstab and systemd is using the "old" unit files instead of the updated fstab.

So you try:

systemctl daemon-reload

Again you get:

Error getting authority. Error initializing authority: Could not connect: No such file or directory  (g-io-error-quark, 1)

But this time the system won't stall, so you again press press CTRL-D and you get:

Error getting authority. Error initializing authority: Could not connect: No such file or directory  (g-io-error-quark, 1)

Finally, this time after a few seconds the system will boot succesfully.


HP Stream 11 Touchpad buttons not working correctly

I wasn't sure about that option myself.

what fixed the touchpad for me was upgrading the kernel.  I think someone mentioned 3.16 fixed it (or not) but I went ahead and jumped to 3.19.

Warning - I have terrible wifi issues.  it disconnects every few minutes.  I hope it's not a result of this upgrade as the touchpad is terrible without it.

I don't want to give any false or misleading information so just do a little research on how to upgrade your kernel, its a very simple process.

once the touchpad is working you can do two-finger scrolling and two-finger tap to right-click.  The mechanical buttons will also function without breaking everything.


My ubuntu can't kill the process which occupy too much memory?

Since the memory isn't allocated but only reserved, this will fill up some other parts of the system like the page table but not the physical memory which the Out of memory killer handles. Try using memset() on your memory block before leaking it.

You might also be interested in looking up about /proc/sys/vm/overcommit_memory

From: https://www.kernel.org/doc/Documentation/sysctl/vm.txt

  overcommit_memory:

  This value contains a flag that enables memory overcommitment.

  When this flag is 0, the kernel attempts to estimate the amount of
  free memory left when userspace requests more memory.

  When this flag is 1, the kernel pretends there is always enough memory
  until it actually runs out.

  When this flag is 2, the kernel uses a "never overcommit" policy that
  attempts to prevent any overcommit of memory. Note that
  user_reserve_kbytes affects this policy.

  This feature can be very useful because there are a lot of programs
  that malloc() huge amounts of memory "just-in-case" and don't use much
  of it.

  The default value is 0.


Unable to locate VLC package in my repositories?

vlc is in universe repository. Most probably that's not enabled. You can either go to software center to add it run

 sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"

(copied from How do I enable the "Universe" repository?)

After that, run

 sudo apt-get update
 sudo apt-get install vlc


The Lenovo variant of the EM7455 has a feature we know as "FCC_AUTH" turned on. This disables the radio until the driver sends a "magic message" to the modem. This feature is well known from older Sierra modems. ModemManager supports the magic message for modems in QMI mode, but we have so far got away with ignoring it in MBIM mode.  The EM7455 changes that...

Basically we know a way around the issue but it isn't yet implemented in current libmbim/ModemManager versions. Sorry about that. I'm sure this will be fixed soon, being a show stopper for the Lenovo EM7455.

See the discussion here for full details: https://lists.freedesktop.org/archives/libmbim-devel/2016-April/000703.html


Ubuntu Server failed to fetch during update

I have the next records in my /etc/apt/sources.list:

deb http://ua.archive.ubuntu.com/ubuntu eoan main restricted
deb http://ua.archive.ubuntu.com/ubuntu eoan universe
deb http://ua.archive.ubuntu.com/ubuntu eoan multiverse
deb http://ua.archive.ubuntu.com/ubuntu eoan-updates universe
deb http://ua.archive.ubuntu.com/ubuntu eoan-updates multiverse
deb http://ua.archive.ubuntu.com/ubuntu eoan-updates main restricted
deb http://ua.archive.ubuntu.com/ubuntu eoan-backports main restricted universe multiverse
deb http://ua.archive.ubuntu.com/ubuntu eoan-security main restricted
deb http://ua.archive.ubuntu.com/ubuntu eoan-security universe
deb http://ua.archive.ubuntu.com/ubuntu eoan-security multiverse

I do not have InRelease in my config.

But you could check documentation about this option:

  InRelease-Path (inrelease-path) determines the path to the InRelease
  file, relative to the normal position of an InRelease file. By
  default, this option is unset and APT will try to fetch an InRelease
  or, if that fails, a Release file and its associated Release.gpg file.
  By setting this option, the specified path will be tried instead of
  the InRelease file, and the fallback to Release files will be
  disabled.


How to identify relation between HID /dev/input/* files and real hardware?

You may use the tool lsinput that you can get installing the package input-utils.

sudo apt-get install input-utils
sudo lsinput


systemd-journald High CPU Usage causes system shutdown

If your system is shutting down from overheating you should immediately start using Intel Powerclamp. It comes when installing thermald and installing tlp is also highly recommended.

The advantage of slowing down your CPU when it is about to overheat and shutdown is it gives you a chance to analyze what is happening at that time without it shutting off completely.

The other advantage of slowing down your CPU is avoiding possible damage to a chip that costs $478 (or whatever) not including labor to replace it.

You can read more about all three here: Stop cpu from overheating

The main concern I've had about constant logging in the past is when it grows > 1 GB when normally it's about < 1 MB before it's rolled over and compressed. A disk full due to looping errors is a pain.


First, check whether you actually have PHP 7.3 installed. Ubuntu / Kubuntu 18.04 comes with PHP 7.2 by default, so the package name would be php7.2-mysql. In case you installed PHP 7.3 from a PPA or some other repository, you might want to check the name of the package in that repo (though there's a good chance that the package's called php7.3-mysql).

Secondly, the package php7.2-mysql contains the mysqli functions, among others. You might say, the package contains all bundled PHP extensions for working with MySQL, and there are several. Just because the (very) old style mysql_ functions were removed doesn't mean that the name of the package changed.

Thirdly, after you installed a new package with PHP extensions, you need to restart the services in question so they "know about" the new functionality. At least the webserver (Apache, NGINX, ...) needs to be restarted. If you're using a separate PHP service like PHP-FPM, you need to restart that, too. The details depend on how you set up your server.


Getting a driver for a NETGEAR A6201 WiFi USB Adapter

I have been looking for a proven reliable way to use USB drive as an apt repository and simply apt-get install the driver. I have, so far, been unsuccessful. I propose another method that will get the prerequisite build-essential installed.

This method, although it is tedious, will work. The list of deb files you need is this (with the exception of bcmwl-kernel-source): https://paste.ubuntu.com/p/GbZ689gYXw/

Create a folder on your desktop to hold the files. I suggest:

mkdir ~/Desktop/debs

Browse the USB drive and look in pool/main/b for build-essential; in pool/main/d for dkms and dpkg-dev; in pool/main/f for fakeroot and so on. Continue until every package on the list I provided is dragged into the debs folder.

Now, back to the terminal:

cd ~/Desktop/debs
sudo dpkg -i *.deb

EDIT: Now let’s install the driver. Please download this file and transfer it to the desktop of the Ubuntu machine: https://github.com/kaduke/Netgear-A6210/archive/port-to-4.15.zip

Right-click it and select ‘Extract here.’ Now back to the terminal:

cd ~/Desktop/Netgear-A6210-port-to-4.15
make
sudo make install
sudo modprobe mt7662u_sta

Your wireless should now be working.

Please tell me how it proceeds; I will probably have one final step.


How can I symlink a subdirectory of /usr/share/ca-certificates?

Try placing them in (a subdirectory of) /usr/local/share/ca-certificates instead of /usr/share/ca-certificates. That location is also mentioned in /usr/share/doc/ca-certificates/README.Debian (on Debian 8 Jessie).


Problem with GRUB not being on Hard Disk

You can manually install GRUB onto a device if it was installed to the wrong place by issuing

sudo grub-install /dev/sdX

Quoted: However if the above doen`t make it possible to boot the OS you can use "Rescue a broken system" at the USB drive's startup menu to install GRUB.

Follow the prompts to start up your system, selecting the hard disk partition when requested. The “Enter rescue mode” screen appears which provides options to mount your system. Your broken system will be mounted and made accessible with a command line interface. You can then use command line operations and editors to fix configuration files. If you need to reinstall the boot loader, you can choose the “Reinstall GRUB boot loader” entry.

Source: Super User: Ubuntu Server installed from USB puts GRUB on the USB drive instead of the hard disk


kate: get back old document switcher (as in Ubuntu 14.04)

After writing to the developer's mailing, I learned that this feature is still there but no longer implemented as a plugin.

It is called Quick Open and available from the View menu. It is assigned the shortcut Ctrl+Alt+O by default.


How can I make an existing persistant live USB installation load more of the OS to RAM?

Check out these instructions. To summarize:

align the partitions with the SD card erase block size (so the filesystems are aligned when created).
Move directories like /tmp and /var/log to RAM by making fstab entries. Also turn off access time tracking for / with the noatime option in fstab.
Link other directories like /var/cache/apt/archive and your browser cache to a place in /tmp.
Make RAM home based users for quickest access -- you may not explicitly write much in your home directory, but the GUI and browser certainly do.


Are Device Drivers integrated in the Kernel?

Most of hardware drivers are built into linux kernel. It is always better when they are. But in some cases you can or have to install them separately:

1. Hardware vendor does not disclose protocol to interact with hardware and releases closed source proprietary drivers. In this case there is no way but to install them separately.

But frequently there are also alternative open source drivers that are created by reverse engineering. These drivers are integrated into the kernel but may perform not as good as proprietary.

Example: AMD and Nvidia video drivers, Epson printer and scanner drivers, etc.

2. Open source driver exists but is not integrated to mainline kernel yet. Or is integrated to unstable versions, or to unsupported by Ubuntu kernel versions.

In this case drivers can be obtained from PPAs or as source code from github or other places.

Example: Focaltech touchpad driver, Realtek bluetooth driver, etc.

3. Sometimes open source drivers in mainline kernel exist but do not perform as good as some alternative open source drivers developed by hardware vendor or community.

In this case it is an option to install alternative drivers.

Example: Realtek wireless drivers.

If some of your hardware is not supported, it is always good to report it to launchpad. Someone will take care of it and add support to linux kernel. Also co-operation with testing is helpful.

I would like to add an important note regarding installation of standalone drivers.

In most cases hardware drivers are built and installed as kernel modules.

If you build a kernel module from source, after kernel is upgraded the module will not work. It is built for a specific kernel version. You will have to re-install it after each kernel upgrade.

That is why it is always preferred to install drivers from PPAs with DKMS packages, or install them using DKMS manually.

In this case after each kernel upgrade the module will be automatically re-built and installed for a new kernel.

Bad example is installing Nvidia drivers from .run files downloaded from Nvidia site. In this case the driver is not registered correctly in DKMS and after first kernel upgrade you will have a black screen.

But you can always get all Nvidia drivers packed as DKMS from PPAs.


Does man command invoke less command to display manual contents?

By default, yes. This can be overridden via $PAGER and $MANPAGER in turn.


Blueman tray crashes on Ubuntu Studio 20.04 session start

I have had this problem constantly in Mate on my Raspberry Pi 4. Until the bug is fixed the graphical manager is more trouble than it's worth and I can always use bluetoothctl in the terminal. So my solution was to execute 'sudo apt-get remove blueman' and delete the files in /var/crash. They shouldn't grow back, and the first reboot was quicker than ever before.


NetworkManager[1108] <error> [1606315511.1371] dhcp4 (eno1): error -111 dispatching events

This seems to be a bug in network manager's dhcp4 client.  It has been resolved upstream here.
Make sure your software is up to date, it is likely that this issue would have been integrated into a dot release in the meantime.
If you are up to date and still have the same issue, please log a bug against Ubuntu to ensure the patch gets integrated into 20.04.
This bug report includes the following workaround:

Just add
[main]
dhcp=dhclient

into NM's configuration (/etc/NetworkManager/conf.d/use-dhclient.conf for example), and then restart NetworkManager.service.


How to get package list from one PC and install that on another PC?

First, make sure that /etc/apt/sources.list and /etc/apt/sources.list.d on PC2 are equal to those on PC1.

Then, on PC1, do

dpkg --get-selections > installed-packages
apt-key exportall > repo-keys

Transfer the files installed-packages and repo-keys to PC2, and do

sudo apt-get install dselect
sudo apt-key add repo-keys
sudo dpkg --set-selections < installed-packages
sudo apt-get dselect-upgrade -y

If you don't have any packages installed from PPA's you can skip the repo-keys commands.

Disclaimer: this used to work a few years ago, I haven't had the need to try it recently.


Use Gparted for modifying your partitions.  The GUI interface is easy to use for resizing, moving, creating and deleting partitions.  As the first answer advises, you may consider backing up your important data before the operation.  I will mention that the gparted partition manager is very robust and with care, the data would hardly be corrupted.  I have modified partitions twenty years, using gparted almost like using a word processor and have never lost 1 byte of data.  Just be particular which partitions you choose to delete, if any.

You can use either of your drives for the install.  I you chose the Alongside Windows option, the installer will shrink the partition according to your specification with the slider and use the space you give it to create what it needs for the installation.  It'll create two partitions, one for swap and one for the actual install.

You can manually create the partitions for the install.  You should create a partition for Ubuntu that has at least 50 gigs.  This will be an ext4 type partition.  You'll also need to create a swap partition.  This should be about 1 1/2 the size of the ram have in your computer.

On the do something else option choose the partition you create for the installed.  Set it for root /.  I wouldn't recommend your trying to create separate partitions for /home or any of the other options.  Ubuntu will automatically create your /home folder no different from the way Windows create your /users/home directory.

Specify your boot disk which is most likely /dev/sda for your boot drive.  This will automatically give you both Windows and Ubuntu in the boot options menu to select from.

The install won't affect your Windows partition.  Only the partition where you specify the install.  It'll just add Ubuntu to the Boot partition of your specified drive.

Where should I put my personal files

By default they will be in your /home/yourname directory.  You'll find this in the file browser when you boot into Linux.  The same way you find your personal files in Windows in c:\users\yourname.  Any new file or document you create will be placed there by default.  You'll also have default folders of Pictures, Videos, Documents, Downloads, Music, and Desktop to choose from, that will be clearly visible in your File Browser.

The File browser

From Ubuntu you will be able to easily mount your Windows partition and browse and use your Windows Documents.  However, you can't do it the other way around.  Windows can't access the Ubuntu partition.


How to Setup tempfs/RAM Disk (Generally and for LuaLaTeX)?

/var/run is tied to the specific running instance of a machine at a time due to storing PIDs of the running processes, I would only avoid placing that on a RAM disk if you are using a virtual machine and suspend the VM often.  /var/lock is intended to prevent more than a single instance of a given application from running and thus should also be fine.  If you have a service which is not well behaved and uses the leftover pid/lock files to detect crashes you should either relocate the paths they store the information or find alternatives.

Source: http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/var.html

There are estimates running applications on a RAM disk may result in performance increases of in the 10x range.  The bandwidth between your process and memory is definitely faster on modern AMD64 systems, thus this claim has substance if you are IO bound somewhere between the CPU and the disk.


What is nautilus-desktop - CPU hungry process [Ubuntu 18.04]

A subsidiary process of the Nautilus file manager, added in v. 3.2.2. Don't worry, every once in a while it happens to the best of packages.  It's rare this happens, so you need not uninstall it, just kill it if it gets hungry again.


How to save the Krusader Password and Bookmarks

This answer is assuming you're using the KDE desktop environment.

According to the Krusader documentation the bookmarks are stored in a krbookmarks.xml file located in:

~/.kde/share/apps/krusader/krbookmarks.xml where ~/ is your Home directory.
According to this Launchpad Answer the Konsole bookmarks are
located in:

~/.kde/share/apps/konsole/bookmarks.xml
According to this old Forum Post Kwallet stores it's password in:

~/.kde/share/apps/kwallet/kdewallet.kwl

Although this is an old forum post but I assume the location hasn't changed as it fits in with the general location scheme used by Krusader, Konsole and other KDE apps.

In order to restore these files after a fresh install you should follow these steps:

Backup the files to an external HDD/USB or even a partition on your computer that won't be formatted. (I dual boot so I place files I want to keep onto the Windows partition during the re-installation of Ubuntu.)
Proceed with the re-installation of Ubuntu.
Re-install the necessary applications (KDE/Krusader/Konsole/Kwallet Manager).
Copy the relevant files back to the relevant locations as listed at the start of this answer.


Is there a way to paste multiple lines to the left of multiple lines (keeping formatting) in libreoffice writer?

Yes, LibreOffice Writers offers a feature named "Block Selection Mode". You can enable it using the shortcut CTRL+SHIFT+F8. Then, you can copy content "vertically" and paste it the same way.
Generally, pasting the content of a "block copy" won't touch the formatting of the target lines, but maybe, the pasted content may acquire formatting of pre-existing, adjacent content. So, in your example, the "3" will most likely acquire bold formatting from the adjacent "g" letter.


How can you download an app from the Software Center from a PC without Ubuntu to a USB

Here is the link you need in order to get the .deb contained in the repositories.

http://packages.ubuntu.com/


Cannot seem to get bash history along with others working

I'm not 100% sure what -sh is, but you might be using sh, not bash. From memory, new users default to sh. To make them automatically use bash, modify /etc/passwd with root permission. e.g. one of

sudo vim /etc/passwd
sudo nano /etc/passwd
gksu gedit /etc/passwd

Then, find the line with your username in it. Change the final part from (e.g.) /bin/sh to /bin/bash. Restart the terminal or log in/out again.


Notification when some input (stdin, file, named pipe) is available?

If you are asking if that's possible in bash, the answer is no; see also here:
https://stackoverflow.com/questions/37049612/equivalent-of-select-system-call-in-bash
However, there is the select() system call (see "man 2 select") which you can use in scripting languages like Perl, Ruby, Python, and of course in compiled languages like C or C++, but not in bash.
What select() does is it waits until data from any of several file descriptors is available.


What type of installed/updated packages recommend the option to reboot

Usually only packages for kernel upgrades, video card drivers and other hardware device drivers recommend rebooting.


Ok, I got it working. It was a simple issue. I just had to open zynaddsubfx before starting Qjackctl. In the above post, I had to change directories by doing this cd /etc/security. Then, I had to open the file limits.conf. That is where I put in the code:
@audio -  rtprio     -99
@audio -  memlock    unlimited
@audio -  nice       -19

After this, I saved the file.

These settings are at the very bottom of the page. After doing this and reinstalling aconnectgui I was successful.


this post:
How to install PHP 5.2.x on ubuntu 14.04?

tells you how to install it on 14.04 (which is called "build from source" which you can look it up by). Should alsso work on 18.04 I think (but didn't try)

Easier method is running a virtual machine with older Ubuntu version installed (I'm suggesting 12.04 where 5.2 was still around).

another aproach is to run everything insider docker container, like this one:
https://hub.docker.com/r/kuborgh/php-5.2/

but I'd follow other suggestions: your PHP is insecure and running anything production-like is going to eventually lead to a security breach and financial losses, even your boss should understand that and simply accept the upgrade process to PHP 5.6 at least.


You could try Google Chrome as browser. This has Flash 11.7 built-in.
Yes, 11.7 for Linux, while 11.2 is the "official" latest release for Linux. How? Because Chrome uses the Pepper API for which Adobe is still developing.
As Google mentions on their support page:

Linux users: Adobe Flash Player uses a cross-platform API, Pepper API
(PPAPI), to run its plug-in in Chrome. You might notice some of the
known issues below specific to Linux Chrome:

Mouse locking may not work.
Viewing Adobe Access (DRM) content is not supported, since Adobe does not support it on Linux.
Stage3D content will always be rendered through software.
Adobe Connect in presenter mode will not work with this version of the Flash Player.
Installing Adobe AIR Desktop applications from the web will not work. This includes applications such as Pandora’s Desktop music player, Tweetdeck, Flickr Desktop Search, Twhirl and Amazon’s Music Downloader.
Installation of the Octoshape Grid Delivery Enhancement will fail.

This has been announced in 2010 on the Chromium Blog. Note that Chromium does not have a bundled version of Flash included (and therefore requires the installation of the 11.2 version).
Example: on google-chrome-stable version 28.0.1500.52-r207119, runs version 11.7.700.203 of Flash as you can see below.


The standard Ubuntu NVidia drivers generate some problems on slightly older and slightly newer NVidia hardware.

If you want more then the standard Ubuntu repository drivers, install the xorg.edgers PPA.  As the xorg.edgers group ask not to give installation instructions directly without linking to their page, this is the best I can do for now...

If you don't know what a PPA is or need some guidance about rolling forward and backward of driver versions after reading their page, leave a comment below.


No admin access to BIOS to change boot priority

Enter your BIOS setup utility and change the boot sequence so that the CD is the first entry in the list of boot devices. The Ubuntu minimal CD being very small (<40MB) and text only should be able to boot successfully, even on older systems where the graphical Ubuntu live DVD/USB does not boot successfully. There is no need to use a different Xubuntu CD, because you can select and install the Xubuntu desktop from the Software selection menu inside the Ubuntu minimal CD installer.

You should be able to enter the BIOS setup utility without administrative rights, unless it is password protected by an unknown password, and even so you can remove the BIOS password by removing the CMOS battery from the motherboard for 5 minutes and then putting it back in. This will also reset all BIOS/UEFI settings back to their defaults.

CMOS battery


After having installed the bluez-utils  we have access to some nice command line tools to show and manage bluetooth devices:

hciconfig --all # shows all known devices
hcitool scan # shows devices that are connected
sdptool browse # shows available services on the remote device


How to resolve error when installing Perl CPAN modules?

Install the cpanminus script to get, unpack, build and install modules from CPAN.

sudo apt-get install cpanminus
cpan App::cpanminus

Now install the module GD::Graph with the following command:

cpanm GD::Graph

How to install CPAN modules


Triple boot Windows Vista, Ubuntu 11.10, Kubuntu 11.10

By default wubi will remove the existing install prior to installing the second.

The best you can do is to install Kubuntu inside your Ubuntu and then choose at login which to use.

If you find there is not enough room it is possible to increase the size of the wubi disk - https://wiki.ubuntu.com/WubiGuide#How_do_I_resize_the_virtual_disks.3F

Search for kubuntu-desktop in Software Centre or if you wish to do so from a terminal the command is

sudo apt-get install kubuntu-desktop

You will end up with multiple entries in your menus.

If you wish to then remove kubuntu you can find details here - make sure to use correct version

http://www.psychocats.net/ubuntu/puregnome

Wubi Guide - https://wiki.ubuntu.com/WubiGuide


How to install build-essential:i386 to compile a 32-bit executable on a 64-bit system?

Yes, for anything that is not already packaged in Ubuntu, or in a PPA that you've added, you will have to manually install all the dependencies needed to compile it. For anything already packaged in Ubuntu, you can run apt-get build-dep $package and it will install the build dependencies for that package, however, if there are any additional or changed dependencies from what was used in the version built in Ubuntu, you will still need to manually install those additional or changed dependencies.


You need to install GRUB (GRand Unified Boot-loader).

The installer should have asked if you want to install GRUB and you should have said YES.
I think you can choose OS at boot time by pressing F8 or F12.

You should install a boot-loader either from Ubuntu (if you manage to start it) or directly from Windows.


Not able to install anything in Ubuntu 12.04 Software Center

try sudo apt-get install command from the terminal, it might help


Prevent pdf file's content from modifying

I think he means preventing content from copying it. There is no way to prevent that. If you can read it, then you can copy it. The only way how to make it harder is convert all pages to pictures. Then you can read it, but you will not be able to plain copy the text without some OCR.


How to implement a text based quiz using Bash?

The quiz framework I have come up with is posted below, and also at my my Github account.

As it looks rather complicated, I better give some explanation of how it works.

In the script, the Ubuntu versions and codenames of all the releases so far are stored in two arrays. The variables are then initialised outside of the until loop, so they can be incremented as necessary in the loop using C style (( var++ )) notation.

I then create another array for the question numbers, in this case for 19 questions I must include 0 - 18 inclusive:

questions_order=(15 4 1 10 8 3 13 0 11 16 2 7 5 17 6 9 14 18 12)

and then shuffle it using shuf and create a new array and use that for this particular run of the script:

shuffled_order=( $(shuf -n19 -e ${questions_order[@]}) )

This must be done outside of the loop, as I only want it executed once.

In short, the loop now runs until the current number of questions is equal to the "${target_questions}" variable, and then the results are given.

When a user gives a response to a question it will be interpreted by the various conditions in the case statement. Non answers (blanks), wrong answers, correct answers, and passes are all detected and receive responses, and the various variables are all incremented (e.g. for a wrong answer, (( wrong++ ))).

When the last question has been answered, the user's performance is evaluated where the number of right, wrong answers and passes (if any) are relayed and the time taken is also given.

This is a brief explanation, but the script itself has various comments that should make the workings clear(ish)! It could be adapted for any other type of quiz, say on capitals and countries.

When you have copied the script into a file, make it executable (chmod u+x), and run it with ./scriptname or place it in your ~/bin folder and call it by name like any other program, assuming your ~/bin is in PATH.

#!/usr/bin/env bash

# by mik, aka Exactus29, https://github.com/Exactus29
#
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

#########

# Requires at least bash 3.1. As it makes extensive use of arrays, it would be a pain to
# try to write it to be sh compatible, but it may be possible.

# arrays for questions and answers
codenames=("Warty Wharthog" "Hoary Hedgehog" "Breezy Badger" "Dapper Drake" "Edgy Eft" "Feisty Fawn"
"Gutsy Gibbon" "Hardy Heron" "Intrepid Ibex" "Jaunty Jackalope" "Karmic Koala" "Lucid Lynx" "Maverick Meerkat"
"Natty Narwahl" "Oneric Ocelot" "Precise Pangolin" "Quantal Quentzal" "Raring Ringtail" "Saucy Salamander")
versions=(4.10 5.04 5.10 6.06 6.10 7.04 7.10 8.04 8.10 9.04 9.10 10.04 10.10
11.04 11.10 12.04 12.10 13.04 13.10)

# must intialize quest_index at -1 so we can use array index 0
quest_index=-1
target_questions=19
# we start question counter at 0, so we can increment it to the value in number_questions
questions=0
# the other variables below will all be incremented as necessary in the quiz
correct=0
wrong=0
no_response=0
pass=0

# declare questions_order array and then shuffle it and use that for this run of the script.
# must be declared outside of the loop, as only want it executed once
questions_order=(15 4 1 10 8 3 13 0 11 16 2 7 5 17 6 9 14 18 12)
shuffled_order=( $(shuf -n19 -e ${questions_order[@]}) )

printf "\nPress 0 to exit the quiz at any time.\n"
printf "You can ignore case in your answers, but correct spelling of the Ubuntu codenames is crucial.\n"
printf "Please enter the word pass if you don't know the answer.\n\n\n"

timer_begin=$SECONDS

until (( questions == target_questions )); do

(( questions++ ))

(( quest_index++ ))

new_index=$( echo ${shuffled_order[$quest_index]})

# alternate style of questions, separate odd and even

    if (( questions % 2 > 0 )); then
        new_question="${codenames[$new_index]}"
        ans="${versions[$new_index]}"
        question_text="Ubuntu release had the development codename"
    else
        new_question="${versions[$new_index]}"
        ans="${codenames[$new_index]}"
        question_text="was the Ubuntu development codename (both adjective and animal) for release"
    fi

read -p "(${questions}) What ${question_text} ${new_question}? " response

# necessary to switch on nocasematch to cover if the answer is in capitals, as can't use normal [Mm] in case statement
shopt -s nocasematch

    case $response in
    "$ans")
          printf "Well done, correct answer. "
          (( correct++ ))
          if (( questions < target_questions )); then
              printf "Next question.\n\n"
          else
              printf "\nHowever, the quiz has now finished. Let us calculate your performance...\n"
              sleep 1
          fi
       ;;
       0)
          printf "\nOk, time to finish with the quiz.\n"
          break
       ;;
    "pass")
         (( pass++ ))
         printf "Ok, you passed on this one..."
         if (( pass >= 10 )); then
            printf "The passes are mounting, as you have now had ${pass} passes.\n"
         elif (( pass >= 2 )); then
            printf "Please try to give an answer, as you have now had ${pass} passes.\n"
         fi

         if (( questions < target_questions )); then
            printf "Let us try another question.\n\n"
         else
            printf "\nHowever, the quiz has now finished. Let us calculate your performance.....\n"
            sleep 1
         fi

       ;;
       *)
          if [[ -z ${response} ]]; then
              printf "Please provide an answer, as a blank answer is counted as a wrong answer; "
              (( no_response++ ))
              (( wrong++ ))
                if (( no_response == 1  )); then
                    printf "${no_response} blank response has been given so far. \n"
                elif (( no_response > 1 )); then
                    printf "${no_response} blank responses have been given so far. \n"
                fi
          else
              (( wrong++ ))
                if  (( questions % 2 > 0 )); then
                    printf "That is incorrect..."
                else
                    printf "That is incorrect, ${response} was not the codename of ${new_question}. \n"
                fi
          fi

         if (( questions < target_questions )); then
            printf "Let us try another question.\n\n"
         else
            printf "\nHowever, the quiz has now finished. Let us calculate your performance.....\n"
            sleep 1
         fi
       ;;
    esac

done

quiz_duration=$(( SECONDS - timer_begin ))
# could further process the $quiz_duration if it is over 60 seconds, and output the total in
# minutes and seconds using bc or awk

# checking against target_questions here, i.e. all of the questions
if (( questions == target_questions )); then
    if (( correct == target_questions )); then
        printf "\nYou got them all right in ${quiz_duration} seconds, well done!\n\n"
    elif (( no_response == target_questions )); then
        printf "\nYou gave ${no_response} blank responses, and so effectively gave ${no_response} wrong answers.\n\n"
    elif (( wrong == target_questions )); then
        printf "\nYou got them all wrong in ${quiz_duration} seconds, oh dear!\n\n"
    elif (( pass == target_questions )); then
        printf "\nYou passed on all the questions. Was this just a trial run?\n\n"
    else
        printf "\nOut of ${target_questions} questions, you got "
        # have to do this now because we have added the pass option, as you can have none wrong/correct,
        # some correct/wrong, and some passes
        (( wrong > 0 )) && printf "${wrong} wrong and "
        (( correct > 0 )) && printf "${correct} correct "

        if (( pass == 0 )); then
            printf "with no passess at all in a time of ${quiz_duration} seconds.\n "
        elif (( pass == 1 )); then
            printf "with 1 pass in a time of ${quiz_duration} seconds.\n "
        elif (( pass > 1 )); then
            printf "with ${pass} passes in a time of ${quiz_duration} seconds.\n"
        fi
    fi
fi

exit

The quiz itself in action, with randomised questions:


why exim4-daemon-heavy is removed when i remove mysql 8.0 / mysql 5.7

apt-get --purge -y remove mysql*

means "Remove any package whose name contains mysq (mysq followed by zero or more l). This includes the MySQL client libs that are needed by exim4-daemon-heavy.

Use

apt-get --purge -y remove 'mysql.*server'

to only remove the MySQL server packages.


System can not reboot after completing installation

I have the same problem. I put Ubuntu 18.04.1 LTS on USB stick as a bootable volume. Specifically, I formatted it on Mac and then ran it on a pc.

The solution I found was to press Ctrl - C after ejecting the USB stick.


Using Sox you can you can reduce noice.

Sox can be installed with :

sudo apt-get install sox

To use sox, you can follow this article at www.zoharbabin.com.

Or:

For direct use with ffmpeg you can try following code.

Source :ubuntuforums.org

ffmpeg -i input.avi -vcodec libx264 -crf 24 -preset slow -filter:v hqdn3d=4.0:3.0:6.0:4.5 -acodec aac -strict experimental -ab 192k output.mp4


I have Elementary OS and windows 8.1 installed but want to remove Elementary OS and install Ubuntu. How can I do that?

It's simple.  Boot to the Ubuntu LiveISO and choose the Do Something Else option.

Follow the GUI prompts and pick the partition with the OS you want to remove the install partition.

When you pick the partition, you'll have the option of reformating the partition.  Of course reformating the partition will remove all the files from your previous OS.  If you choose not to reformat the drive, the installer will remove the system directories and replace them with Ubuntu.

If you choose not to format, your /home folder will be preserved.

If you are trying to preserve your home folder, you might consider renaming that folder before the install.  Some of the configurations files in the Elementry OS might conflict with some of the options in the Ubuntu configuration.

You can later copy your documents to the new home folder created.


What is the name of the default eBook file icon in Xubuntu 15.10?

The icon is /usr/share/icons/elementary-xfce/mimes/*/application-epub+zip.png:

How did I find it?

Look up mimetype of an epub file, which turned out to be application/epub+zip.
Look up the default Xubuntu icon theme, which is elementary-xfce provided by the xubuntu-icon-theme package
Look in the mimes directory of that icon theme. There are application-epub+zip.png files available for sizes 16, 22, 24, 32, 48 and 64.


It is not safe to boot from an Ubuntu LiveUSB in UEFI mode on Samsung laptops.

Samsung UEFI had a bug that could brick the laptop.

If you switch off "UEFI Boot" in BIOS settings, it should be safe.

I bought a similar Samsung laptop in 2014 and installed Ubuntu in legacy mode with no problems. Then after I read that there was a commit with a workaround, I tried to re-install Ubuntu in UEFI mode last year.

I could successfully boot in UEFI mode and install Ubuntu. But after grub was installed, the UEFI was ruined and it was not possible to boot any OS except booting from DVD. USB boot didn't work.

I could find a firmware (that was very hard because Samsung doesn't make firmware available for download) and a Windows flashing utility, then I found a hack how to flash with resetting NAND memory. I did it using Live WindowsPE image.

I won't do it again, becuase it was a pure luck to find a flashable firmware because the firmware doesn't let to reflash or reset the existing firmware. I found a bit newer release for a similar (not exactly same) laptop.

Otherwise I would have to solder out the flash and restore it manually.


To retrieve the update logs, simply run the following command:

$ gedit /var/log/apt/term.log

Then scroll to the bottom to view the latest updates installed on your computer and any errors if you have any.


Slow Ubuntu 14.04 and freezing applications. Why?

Your Acer Aspire One 722 netbook has no discrete graphics processor, so your AMD C60 dual-core 1.333GHz processor has to do all the graphics processing using the integrated AMD Radeon HD 6290 graphics processor. Ubuntu's Unity desktop is too heavy for your CPU and it's slowing your operating system down. You would get better performance if you installed an Ubuntu flavor with a lightweight desktop environment, either Xubuntu or Lubuntu. Lubuntu looks clunky like Windows XP, but it is even more lightweight than Xubuntu in case Xubuntu is also too slow.

Because the choice is down to Xubuntu vs. Lubuntu, hopefully someone who has had experience with a similar processor to yours will be able answer the question of whether Xubuntu would run OK on your netbook.


I've found a half solution to the problem. If I boot with kernel-mode-setting disabled (add "nomodeset" after "GRUB_CMDLINE_LINUX_DEFAULT=" in /etc/default/grub) the color works fine. However, the intel video driver doesn't work with non-kernel mode setting, and it reverts to the vesa driver. This makes things slow and disables a lot of features. I'd still like to get the Intel driver working properly.


Take a look at the man pages for the shuf and xargs commands, this might be what you are looking for:

shuf -n [Number of files to move] -e [PATH to the files to be moved] | xargs -i mv {} [PATH to the dest]


First, download the .deb files.

You get .deb files of Wine here:

Download site

Use the filter on the page and set it so that it shows only packages for the version of Ubuntu your attempting to install.

If you need any dependent .deb files search for them, and download which ones you need at:

Search and download site

Save them to flash drive.

To install it on your desktop pc, run:

sudo -i
cd /media/user/flash_drive/
dpkg -i *.deb


Copy the SSH keys into your ~/.ssh folder (if it doesn't exist create it via mkdir -p ~/.ssh)

run ssh-add ~/.ssh/whatever-the-name-of-the-private-key-is to add the SSH key into the system (provide password for key if one exists)

SSH into the server by running ssh -o IdentitiesOnly=yes -i ~/.ssh/whatever-the-name-of-the-private-key-is user-name@ip.address.of.vps


I found a solution to the same problem in an answer for another askubuntu question: https://askubuntu.com/a/39602/1943

Basically you have to set Thunar as default file manager for xfce:

http://ubuntuforums.org/showpost.php?p=10884462&postcount=16

Once you do that, xdg-open and gnome-open will avoid using exo-helper to open nautilus. Somehow gnome and xfce get interwoven.

EDIT: the downside is that now Thunar opens instead of nautilus when opening folders.
But I find it less frustrating, on the other hand I could uninstall xfce4 if I really don't want it


How to automatically visit a website in the background after Ubuntu booted?

How about catching the error messages in that file too:

@reboot w3m http://example.com/ > test_file 2>&1


how to configure web browser for a https server running on the same wifi network?

Why do you set the proxy settings ? If your Android isn't acting as a proxy but as a HTTPS server, you don't need to set any proxy on your desktop, only putting https://192.168.1.7:50345in your address bar.

Could you please try it and tell us the answer?

You could also try directly with curlon command line, curl -v https://192.168.1.7:50345


From the permissions on /var/www/forms/, drwxrwxr-x, group and owner can read, write, and execute; and anyone can read and execute.  So from what you have described, the new user should be able to read and execute, but not write to /var/www/forms/.

However, depending on file ownership, and settings on individual files, the users may still be able to modify files within /var/www/forms/.


Install updates without breaking shell theme?

I think I found my answer - at least for the messed up GTK+ theme.

An application named "unico" has to be installed to activate this theme.

At deviantART (where I found the theme), the following sentence is listed under "known bugs":

  "Because gnome-shell and gtk3 is still in development there may be a lot of bugs present after each update of the packages gnome-themes-standard, unico engine and gnome-shell."

I guess I'll just have to stick with the default theme...


Error: Failed to execute child process "kfmclient" (No such file or directory)

After digging into shortcuts in Lubuntu, I found the solution.

First, I had to edit ~/.config/openbox/lubuntu-rc.xml

Replace the binding for W-e pointing to kfmclient (found it by searching for kfmclient), final result is <command>pcmanfm</command>.

Next, I had to run openbox --reconfigure in the terminal.

Now the shortcut works as expected.


Run the following command in a terminal:

xinput list

You will get an output that looks like this:

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=12   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ Laptop_Integrated_Webcam_1.3M             id=10   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=11   [slave  keyboard (3)]
    ↳ Dell WMI hotkeys                          id=13   [slave  keyboard (3)]

It displays all the input devices connected. Note that they all have an id.
Since 12 is the id for my touchpad, running the following command will disable it.

xinput set-prop 12 "Device Enabled" 0

In Ubuntu versions >12.04 you can also directly disable via

xinput --disable 12

(and enable via a similar command)