ubuntu 14.04 stuck in login loop, cannot login using any tty

Getting into recovery mode

Essentially the steps are the same as described in this answer

Boot the computer
On the grub menu select Advanced options for Ubuntu.
Select any entry that says recovery.Image
Select root shell . Image

Working around root shell

Once in the root shell, you can view the logs and attempt to gain a slight idea of what the issue might be. Logs are located in /var/log directory. The logs that you might consult are dmesg.0, kern.log, kern.log.1, syslog.

Here you can attempt to reset your own password, as well as create new user, in case your current username still fails to log in. That implies making chances to the system. However, initially root shell starts with your hard drive mounted in read-only mode. To allow changes to your system, do mount -o remount,rw /.

Changing your own password

That is fairly simple. Run passwd yourusername . You will get a prompt that asks to enter new Unix password and confirm.

Creating new user

Run useradd -m -G sudo newusername , where newusername is the new username that you want to have for new account. This command also adds the user to sudo group, so that you have admin privileges on that account.
Run passwd newusername to create password for that user
Confirm that the new username works properly by runnning su newusername

Regaining files with the new account

You can do this either from root shell or attempt to login graphically with new username first. My preference would be second choice.

change ownership of the previous home directory with sudo chown -R newuser:newuser /home/oldusername.
At this point you can either leave the directory untouched (suggested) or move files to your new directory. If you choose to move the files, continue reading. In your new directory create new directory called oldstuff. You can use mkdir ~/oldstuff for that.
You can approach this from couple different angles. If you only want stuff in the default directories, like Pictures,Downloads, and Videos, you could run something like this : find /home/olduser/Documents/ /home/olduser/Videos/ /home/olduser/Pictures /home/olduser/Desktop -type f -print0 | xargs -0 mv -t ~/oldfstuff. Beware that this command takes all the files from all those directories and stuffs them into one, thus if there's any duplicate names , they might not be moved over. Now, better way is to use rsync SOURCE DEST, for instance rsync -r /home/olduser ~/oldstuff.

LiveCD Recovery

As an alternative to the root shell recovery from grub, you can try LiveCD recovery. Basic idea is to take live media, such as installation USB or CD, mount your hard drive, bind certain folders,change root directory of the live media to the one on your hard drive, and change password or create users as described above. The process is well described on the Ubuntu documentation page.

Boot the Ubuntu Live CD.
Press Ctrl-Alt-F1
sudo mount /dev/sda1 /mnt (note sda1 is just example, you have to find which one is your Ubuntu partition with lsblk or sudo blkid. For instance , I know /dev/sda5 is my Ubuntu partition because it is TYPE="ext4")
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
sudo passwd yourusername
sudo useradd -m -G sudo newusername
sudo passwd newusername
When everything is done, sudo shutdown -r now to reboot back to your laptop's hard drive.


There was a similar issue to this at the Ubuntu forums; I don't think any apt-get or dpkg fixes will work until the gstreamer problem has been fixed.

What you could do is rename the offending list so it is not read by dpkg:

sudo mv /var/lib/dpkg/info/gstreamer0.10-plugins-ugly.list /var/lib/dpkg/info/gstreamer0.10-plugins-ugly.list.old

If you have any more stuck packages this method should work for them too- just replace gstreamer with another package name; at least a similar fix worked at the Ubuntu forums for various packages.

You should now be able to run

sudo apt-get update

and you can install anything you require or even reinstall the gstreamer plugins if you wish and a fresh list file for them will be downloaded.


Understanding my ubuntu desktop appearance

What you want is to use Ubuntu MATE I think. It looks like this:

Download it here: https://ubuntu-mate.org

Direct download link: http://cdimage.ubuntu.com/ubuntu-mate/releases/16.04.4/release/ubuntu-mate-16.04.4-desktop-amd64.iso

If you want it to look like in the image above you should download Ubuntu MATE 16.04. There has been some changes to the GUI in 18.04.


Install new Yaru theme on Unity Desktop 7

You have a typo. It's supposed to be "Suru" icon theme instead of "Saru" icon theme.

To install it run

sudo apt install suru-icon-theme


quickly run ERROR: run command failed Aborting

quickly run
Can't execute bin/myapp
ERROR: run command failed
Aborting

try

chmod +x


Unless something has changed recently you should have this file: /etc/UPower/UPower.conf containing:

# Only the system vendor should modify this file, ordinary users
# should not have to change anything.

[UPower]

# Enable the Watts Up Pro device.
#
# The Watts Up Pro contains a generic FTDI USB device without a specific
# vendor and product ID. When we probe for WUP devices, we can cause
# the user to get a perplexing "Device or resource busy" error when
# attempting to use their non-WUP device.
#
# The generic FTDI device is known to also be used on:
#
# - Sparkfun FT232 breakout board
# - Parallax Propeller
#
# default=false
EnableWattsUpPro=false

# Don't poll the kernel for battery level changes.
#
# Some hardware will send us battery level changes through
# events, rather than us having to poll for it. This option
# allows disabling polling for hardware that sends out events.
#
# default=false
NoPollBatteries=false

# Do we ignore the lid state
#
# Some laptops are broken. The lid state is either inverted, or stuck
# on or off. We can't do much to fix these problems, but this is a way
# for users to make the laptop panel vanish, a state that might be used
# by a couple of user-space daemons. On Linux systems, see also
# logind.conf(5).
#
# default=false
IgnoreLid=false

# Policy for warnings and action based on battery levels
#
# Whether battery percentage based policy should be used. The default
# is to use the time left, change to true to use the percentage, which
# should work around broken firmwares. It is also more reliable than
# the time left (frantically saving all your files is going to use more
# battery than letting it rest for example).
# default=true
UsePercentageForPolicy=true

# When UsePercentageForPolicy is true, the levels at which UPower will
# consider the battery low, critical, or take action for the critical
# battery level.
#
# This will also be used for batteries which don't have time information
# such as that of peripherals.
#
# If any value is invalid, or not in descending order, the defaults
# will be used.
#
# Defaults:
# PercentageLow=10
# PercentageCritical=3
# PercentageAction=2
PercentageLow=10
PercentageCritical=3
PercentageAction=2

# When UsePercentageForPolicy is false, the time remaining at which UPower
# will consider the battery low, critical, or take action for the critical
# battery level.
#
# If any value is invalid, or not in descending order, the defaults
# will be used.
#
# Defaults:
# TimeLow=1200
# TimeCritical=300
# TimeAction=120
TimeLow=1200
TimeCritical=300
TimeAction=120

# The action to take when "TimeAction" or "PercentageAction" above has been
# reached for the batteries (UPS or laptop batteries) supplying the computer
#
# Possible values are:
# PowerOff
# Hibernate
# HybridSleep
#
# If HybridSleep isn't available, Hibernate will be used
# If Hibernate isn't available, PowerOff will be used
CriticalPowerAction=HybridSleep

When percentage is true (default), the lines:

PercentageLow=10
PercentageCritical=3
PercentageAction=2

Means at 10% remaining you are told battery is running low. At 3% remaining a critical warning is issued saying battery is about to die. At 2% remaining your machine shuts down.

When percentage is false, the lines:

TimeLow=1200
TimeCritical=300
TimeAction=120

Means at 1200 seconds (20 minutes) remaining you are told battery is running low. At 300 seconds (5 minutes) remaining a critical warning is issued saying battery is about to die. At 120 seconds (2 minutes) remaining your machine shuts down.

The configuration file settings should be duplicated in gsettings which you can confirm with:

$ gsettings list-recursively | grep plugins.power | grep time
org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0
org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0
org.gnome.settings-daemon.plugins.power time-low 1200
org.gnome.settings-daemon.plugins.power time-action 120
org.gnome.settings-daemon.plugins.power time-critical 300
org.gnome.settings-daemon.plugins.power use-time-for-policy true

and with:

$ gsettings list-recursively | grep plugins.power | grep percentage
org.gnome.settings-daemon.plugins.power percentage-low 10
org.gnome.settings-daemon.plugins.power percentage-critical 3
org.gnome.settings-daemon.plugins.power percentage-action 2


Resized partition with gparted size with df -h

I ran into you while attempting to solve this problem.

I think I may may kind of fixed it.
http://pastebin.com/RNE9uC7u

I was looking at this persons pasted output.

Try running

 lvextend -L +1G /dev/mapper/kvg-root

the +1G is however much space you are adding. Try doing +9G.

then do

 sudo resize2fs /dev/mapper/kvg-root


Headphones are detected as input device when plugged (Ubuntu 20.04)

I have dual boot with Ubuntu and Windows 10 and I realized that the problem only happens when I reboot from Windows into Ubuntu. If I shut down the laptop and then  boot straight into Ubuntu, the headphones are recognized correctly.


The Docker repository currently have packages for 20.04 (focal), so you can follow official guide or use commands below:
sudo apt install curl
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt install docker-ce


On Ubuntu Studio 20.02.4, I encountered the same problem, either using Jackd or not.
Turns out that Zoom's input was muted in Ubuntu. So here's what to do to solve this benign (yet frustrating) situation :

Start a zoom meeting (or open the "audio" settings in zoom).
Open UBUNTU's SETTINGS.
Go to the "SOUND" tab.
In the "VOLUME LEVELS" section, make sure that "ZOOM VoiceEngine" is at its maximum level. [if you don't see "ZOOM VoiceEngine", that's because you haven't followed "step 1" ;)]

That's it!
Below, a screenshot of said settings.


After computer upgrade streaming media is choppy

30 kb/s or even 30 kB/s is not enough speed to stream videos continuously. You will have to pause a video as soon as it starts buffering and wait for it to buffer for a while before you play it.


Allowing computers in network view sites in my web server

The requesting machines have to ask for the virtual hosts by name as part of the request for apache to know which site to serve up.

If the virtual host names are not actual hostnames that can be resolved by DNS, then you'll need to add these names to the client machines "hosts" file or equivalent.

For example your server maybe has 192.168.1.17 as and IP and you've set up a few virtual hosts in apache on it and called them "testsite" and "experiment.whatever.tld".

Just using the ip with no hostname in the request (by typing into browser for example) apache will serve  the first virtual host it finds.

But it sounds like you maybe are not actually using virtual hosts? The files you want to show are in for example /var/www/somecoolsite/index.html ? You may need to make sure to include the trailing slash in the url: http: //ipaddress/somecoolsite/ unless you have apache configured to add it it by default as needed.


Screen goes into power saving mode on boot up

This is an old problem which has now been solved. It was a hardware problem that has been fixed.


Launching script containing virtual env through desktop icon

To run your python script within the virtual environment, you simply have to execute the python binary which is in the bin folder of your virtual env folder.

Ie : if your virtual env within /home/alexis/myvirtualenv and if the script you want to execute is named /home/alexis/scripts/my_python_file.py, you will have to run your python script this way :

/home/alexis/myvirtualenv/bin/python /home/alexis/scripts/my_python_file.py

For your specific needs :
Try to put the following code within spyder.sh :

#!/bin/bash
/home/alexis/tensorflow/bin/python spyder3  # you may have to put the full path to spyder3


If you mean like a piano roll editor and really accurate MIDI, LMMS should do the trick. It is in the Ubuntu repositories, but I would recommend using the version in this PPA.
https://launchpad.net/~tobydox/+archive/lmms

Also, install the appropriate sound font, and make your midi channels use it. This is also in the repositories, the package is: fluid-soundfont-gm. The soundfont is located in /usr/share/sounds/sf2 when installed.


How can I list files that the current user can access?

The best I've been able to build so far is using bash's tests:

find . -exec bash -c 'd=-;r=-;w=-;x=-; [[ -d {} ]] && d=d; [[ -r {} ]] && r=r; [[ -w {} ]] && w=w; [[ -x {} ]] && x=x; echo "$d$r$w$x {}"' \;

A sample of that output:

drwx ./dlls/mscoree/tests
-r-- ./dlls/mscoree/tests/metahost.o
-rw- ./dlls/mscoree/tests/metahost.c
-r-x ./dlls/mscoree/tests/mscoree_test-stripped.exe.so
-r-- ./dlls/mscoree/tests/testlist.c
-rw- ./dlls/mscoree/tests/Makefile.in
-r-- ./dlls/mscoree/tests/debugging.o


How to fix the error, while updating my package list in Ubuntu 16.04?

You are using Xenial but your sources.list contains links for Precise. To rectify that,

Backup your current sources.list:

sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak

Create a new source.list:

sudo nano /etc/apt/sources.list

Copy and paste the following into it:

deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

Then, on the keyboard press the following:

Ctrl + X then Y and finally Enter.
Finally, try updating your sources:

sudo apt-get update

EDIT:- The ppa error is what it says. That ppa doesn't have a release file for Xenial. To remove ppas, please follow this answer at AskUbuntu.


The simplest solution

Here's what you can do (simpler than you feared :) ):

Open Dash
Type Idle (or Idle3, depending on the version)
Drag the icon from Dash to the Unity Launcher:

Then the right- click text sais:

(Which is Dutch for: "Remove from launcher")

The command to run Idle

To complete the answer: the command to run Idle is:

/usr/bin/idle

or for  specific version(s) e.g.: /usr/bin/idle3, or: /usr/bin/idle-python3.4

Simply look inside the .desktop file in /usr/share/applications in the line, starting with Exec= for the right command.

Prevent an extra icon from Idle when it is launched

Idle produces windows of the WM_CLASS "Toplevel". To make these windows appear under the same icon as you just put in th launcher, do the following:

Copy the global idle.desktop file from /usr/share/applications to ~/.local/share/applications.

cp /usr/share/applications/idle.desktop ~/.local/share/applications

Open the file (drag it over an open gedit window).
Add to the bottom of the file the line:

     StartupWMClass=Toplevel

Log out and back in. From then on, all Idle windows will appear under one icon:

That's it...

EDIT

As a result of the fact that windows of one WM_CLASS in principle only appear under one Launcher icon (at a time) in Unity, please note:

Although the chances are practically none, grouping Toplevel windows under the Idle icon could show a downside in rare situations:

If you run different versions of Idle at the same time (e.g. editing code for two python versions at the same time), all windows are grouped under the icon of the version that started first:

If you run python applications, using tkinter as a GUI (quite unusual these days), usually secundary windows are set as "child" of the main window by using wm_transient()

In "unpolished" applications (like Idle), this might not be the case. In such cases, the secondary window ("Toplevel" windows in tkinter), will also show up under the Idle icon, If Idle ran first.

But again, normally this will probably never happen, and if it does, it does no harm but what I described.


What is the Equivalent Command to Ubuntu's GUI "Mount"?

Your script is not working because of a spelling error in the definition of PARTITION.

Because of this, PARTITION is empty (while PARTION contains what you want) and /dev/$PARTITION becomes /dev/.

Note that the variable $USER already contains the username, so no need to set it (unless you want to do the mounting from a different user).


If the vulnerability to exploit is in the browser (or plugin it uses) then yes. They're just as exploitable as their counterparts on Windows and OSX. There are of course plenty of single-platform examples too but many Flash (for example) exploits are cross-platform.

Thankfully most exploits are just droppers (to install something else on the computer) and most of those aren't compatible with Linux. But you shouldn't get complacent and get cocky. Web security applies to everybody. Just because people aren't targeting you today, doesn't mean they never will.

There are antivirus products for Linux (AVG, ClamAV) that go some way to detect bad things but the market hasn't caught up with Desktop Linux users yet IMO.


black screen startup. Try Ubuntu now asks for password

Solved myself.

I attempted to reinstall again but this time chose which partition to install on and was able to select the boot loader location.

Seems strange that with a fresh install from USB, the boot loader was not installed on the hard drive.


What exactly happend to the fbb-font in LateX when using the Ubuntu (13.10) installer

You can download the font from This link and after that follow This tutorial on how to install the font.

Just let me know when you need some more help.


econfguration incorrect while trying to install ubuntu

To change boot drive order in BIOS:

Power down PC

Hold down the F10 Key

Turn on power (be sure that F10 is still held down)
When the PC starts to boot you will be redirected to a screen asking you whether you want to go to setup or continue with boot.

Select F2 and go to setup
Navigation in setup will depend on your BIOS but there should be a boot order you can manipulate to boot from CD (or Optical drive), HDD, etc...


Libreoffice has no menubar in Kubuntu if global menus are enabled

This is only a workaround - I will not mark it as solved, as I'm hoping for answers on how or at least when this could be fixed.

Workaround: while this will not bring the standard menubar (when global menus are enabled as indicated in the question), it will make Libreoffice usable by providing access to its menus in one of the user interfaces that become available if experimental features are enabled.
Global menus have to be disabled (as panel widget or as window button) in order to access Libreoffice menus of the standard interface.
Enable experimental features under Tools - Options - Advanced.

Then go to View - User interface and select of the UIs from the lower part of the list.

Each of them is different (somewhat similar to the different versions of msoffice), but they all provide access to the menus in various forms. For example, the "Tabbed compact" UI provides menus in tabs and shows a button to the right-upper corner to access among others the different UIs.


I installed 12.10 alongside windows 7 for a freind, i think the same method should work for vista.

first install wubi for 12.10 on the site: http://www.ubuntu.com/download/desktop/windows-installer.

install it on windows, run it and install your ubuntu from it. just follow the install wizard and it will ask for reboot of your system when through .

The rebot automatically opens ubuntu and finalise setup.
then it'll restart, asking you normally, to choose which os to boot with.


Some keyboard keys not working since upgrade to 11.10

If your keyboard doesn't work while loading the BIOS (that loads before Ubuntu and is OS independent), it's not an Ubuntu problem, not related to any update. I can't think of any way in which a OS can change how the BIOS manages keyboard. Installing another OS (Ubuntu 11.04 or Windows) is not going to solve this.

The most likely cause is some hardware related problem. You can try to attach an USB keyboard to the computer and enter the BIOS from it.

If you don't fear screwdrivers and the laptop is not under warranty you should check the connection of the keyboard to the main-board. Otherwise is time to get it to a computer repair shop.


hey  i also get same problem as you get.
 i dnt get pop up sound when volume is turn on

Solution
(i did )

you can right click sound logo in between scissor and battery
select the master channel
there are two choice for you

built-in-audio streo (HDMI)
built-in-audio stereo

just simply choose built-in-audio stereo (also make sure you have choice playback devices in "CURRENT MIXER")

i hope this help you! cheers  mate


On the web there are reports of crashes on quite similar operations that seem to be related to a unhealthful maximum size setting of the PermGen.

Seeing through your VM args you seem to have 256 MB allowed for PermGen but only 384/512 MB for your heap, which is at least an uncommon setting in my experience. For a process with such a small heap I would not expect that the PermGen would need any special setting (but this actually depends on what your process does).

However, if you run out of ideas, I would try to remove this VM argument:

-XX:MaxPermSize=256m

This may have your app running into OutOfMemoryError: PermGen size sometime - if there really was a cause for this setting - but at least not a complete VM crash. That way you could at least troubleshoot if the crashes are related to this setting.


Here are some ways to optimize ubuntu for performance:

1. Optimize disk access with noatime:

Each file and folder on your linux system has a file-creation timestamp and a modification timestamp. Apart from that, linux tries to keep track of “access time” for each of these files. Now keeping track of the access time has its performance-cost, and if you want to remove this performance cost, you need to specify “noatime” attribute in the disk partition entries in your /etc/fstab file. Edit this file in your text-editor and add the noatime option for your disk partition:

UUID=97102801-14e3-9752-7412-d9c57e30981w / ext4 errors=remount-ro 0,noatime 1

2. Optimize Swappiness:

Swappiness is the tendency of the linux kernel to prefer disk-swapping vis-a-vis physical memory. The default swappiness value of 60 was kept considering server installations. If you are a desktop user having a machine with good RAM, you would normally prefer disk-swapping to be minimal. You can safely reduce this value to 10. To do so edit the file /etc/sysctl.conf and add the following:

vm.swappiness=10

(Just change the entry if it already exists, don’t make a duplicate!)

3. Install preload:

If you typically use the same programs regularly, preload will help you by loading into memory, the programs that you use most frequently and thus speed them up. To install:

sudo apt-get install preload

4. Place your mission critical apps in /dev/shm:

Few weeks back, I was having performance issues with running Eclipse on ubuntu. After tweaking and optimizing various JVM settings in vain, the thing that really made the difference was placing the entire JDK folder on ramdisk. The /dev/shm folder is like a virtual ramdisk (on ubuntu and derivatives) where you can place your temporal, high-priority stuff to run them in “best performance” mode. Assuming you have to place your JDK folder on the virtual ramdisk, the command is:

cp -r jdk1.7.0_05/ /dev/shm/

5. Remove unwanted programs from startup:

Ubuntu comes loaded with a ton of baggage, and if you are someone like me, you might feel obliged to reduce some burden off your system by disabling unwanted software from startup. You can do this by going to “Startup Applications” in the System menu, but ubuntu hides the pre-installed apps by default. To overcome this limitation, open your terminal and issue the below command:

sudo sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop

Now you can go through the startup programs list and can disable the unwanted ones. Common sense will tell you that if you don’t use bluetooth on your machine, you can get rid of the "Bluetooth Manager". Similar is the case with “Backup Monitor” in case you don’t need to sync your backups in real-time. Here is the list of services that I’ve safely disabled without causing any issues:

Backup Monitor
Bluetooth Manager
Chat
Desktop sharing
Gwibber
Ocra screen reader
Personal file sharing
Screen saver
Ubuntu one
update notifier

6. Uninstall software that you don’t use:

The next step is to remove those software that you don’t use at all. Again, some common sense but with some caution is needed here. There are some programs (like empathy) that form the core part of ubuntu, so it won’t allow you to apt-get remove.. them without removing unity itself. In such cases, we will disable such programs from starting up as services (next step). Some of the programs that you may safely remove are:

apt-get remove samba-common
apt-get remove cups
apt-get remove avahi-daemon avahi-autoipd

I typically uninstall all three after a new installation. The first one is needed for file-sharing in the local network if you have one. Second is the print daemon, and third is used to broadcast common network services across the local network and finding local hosts by using friendly names like “local.workstation”.

7. Disable unwanted daemons:

In case you don’t want to remove the cups program as you might need printing in future, you can disable it for the time being. To do so, issue the below command:

echo manual | sudo tee /etc/init/cups.override

You can disable any daemon in this manner by doing a manual override, just replace the “cups.override” with the daemon name that you want removed such as:

echo manual | sudo tee /etc/init/bluetooth.override
echo manual | sudo tee /etc/init/ufw.override
echo manual | sudo tee /etc/init/mysql.override
echo manual | sudo tee /etc/init/tty2.override
echo manual | sudo tee /etc/init/tty3.override
echo manual | sudo tee /etc/init/tty4.override
echo manual | sudo tee /etc/init/tty5.override
echo manual | sudo tee /etc/init/tty6.override

Later, if you want to enable that daemon, all you to do is delete the .override file.

8. Optimize Nautilus to behave in a speedy manner:

This is totally optional. Nautilus, by default, tries to show thumbnails of each and every file in a directory. If the directory contains a lot of files, this causes a noticeable delay. Now if you are in the habit of regularly previewing thumbnails of your images, don’t do this optimization. Otherwise, if previewing thumbnails don’t matter to you and all you are interested in is speed (like me), you can go to Edit->Preferences->Preview-tab and set the preview settings to Never.

9. Disable translation downloads in aptitude:

This setting is for speeding up the downloads from apt repositories rather than your machine. By default, ubuntu adds additional translation repos when you issue “apt-get update” command to update your repository settings. If you only need English, you can disable translation downloads by editing /etc/apt/apt.conf.d/00aptitude and adding this line to it:

Acquire::Languages "none";

Source: My blog post


Strange freeze when loading IntelliJ IDEA Editor

I've experienced a similar freezing issue with IntelliJ IDEA 2016.2.4 (162.2032.8) on Ubuntu 16.04.1 (64-bit) when importing a project.

JetBrains support suggested the following work-around:

Before the UI becomes unresponsive change from "Packages" to "Project" view.

That allowed me to proceed past the freezing.

The support referenced this unresolved issue from 2008 regarding this behavior: IDEA-18765 Slow synchronous package view tree update


This kind of issue can usually be resolved in the sort of the same manner whether you're on Win 7/8/10. I don't know exactly how this works for Windows 10 but I would be surprised if it's significantly different.

Windows 7 and 8 has a tool called bootrec on the install media that you can use to fix these kinds of boot issues.

Insert and boot from the Windows install media (USB/DVD)
Press any key at the "Press any key to boot" message
Click "Repair your computer" (or similar). R may also work.
Select "Troubleshoot", then select Command Prompt. Basically, your first goal here is to get to a command prompt.

So, when you have a command prompt window open and ready, run bootrec with whatever commands may be necessary (or all of them) -- these are:

bootrec /FixMbr --  will write a Windows Vista and Windows 7 compatible MBR to the system partition.
bootrec /FixBoot -- will write a new boot sector to the system partition. If your system is Windows 7, FixBoot will write a Windows 7-compatible boot sector and so on.
bootrec /ScanOs will scan the hard drives for any installations. ScanOs will also print installations that are not currently in the BCD.
bootrec /RebuildBcd will scan for installations on your hard drive and allows you to select which to add to the BCD.

When it has finished, remove the USB/DVD and restart your PC.

Source: https://neosmart.net/wiki/bootrec

(The above website also has a lot of potential solutions for errors that occur).


How can I slow down music with Clementine?

It's not possible currently. There is an open feature request: Wishlist: tempo/pitch shifter

You could use Audacity to change speed/tempo. See Where to get Audacity Stable?


How can custom compose key combinations be defined for all applications?

The way I'm aware of is to enable the XIM input method, which you can do from Language Support. At next login your ~/.XCompose file should then be effective also for QT apps.

Caveat: XIM is an old technique, and some users experience issues. Still worth a try IMO.


Ok, this is usually a hardware issue but could be drivers. Normally if you see it related it X it's a stale video driver. Try updating your video drivers. Finally you can always

echo 0 > /proc/sys/kernel/hung_task_timeout_secs

This will effectively quite is symptom but the problem will remain. This is certainly related to either failing hardware or bad drivers. The fact that you can actaully reboot via command line leads me to believe that it's a bad video driver. Make sure your running the latest video driver and that when you upgraded to 12.04 you kept using the same driver you were using when it was working (open v.s. propitiatory).

Another thing to look at is making sure you don't have any network shares mounted. When you log out of X network manager terminates a wireless connection. This will cause the system to hang for several minuets per file system read.  During shutdown this can be quite a lengthy process.  The quick test/fix is make sure all remote shares are unmounted before logging out. If that is the case then you should try adjusting your mount commands to show that they are network mounts and should be unmounted before you turn off the wifi connection. This varies by file system and mount type.


Accessing the web site via web server out site the LAN

I would suggest you to use the tool Uncomplicated Firewall - ufw, at this state. It is easy to use front end of iptables. It's GUI version is called gufw.

1. Install the app:

sudo apt install ufw

2. Setup the default policy to deny all incoming traffic and allow all outgoing:

sudo ufw default deny incoming
sudo ufw default allow outgoing

3. Allow the incoming traffic on certain ports. For example if your Apache server listen to port 80 use this rule:

sudo ufw allow 80/tcp

Or you could use Apache's application profile:

sudo ufw allow Apache

Maybe you will want to allow the access also to the SSH port. For this case limit is better rule:

sudo ufw allow 22

Or use the default application profile for SSH:

sudo ufw allow ssh

4. Enable the firewall:

sudo ufw enable

References:

How To Set Up a Firewall with UFW on Ubuntu 16.04
UFW Essentials: Common Firewall Rules and Commands
Ubuntu Documentation Community Wiki: UFW


What is this “(arg: 1)” appearing in terminal/tty after I pressed a combination of keys?

That’s a digit argument, a feature of the readline library built into bash:

digit-argument (M-0, M-1, ..., M--)
    Add  this digit to the argument already accumulating, or start a
    new argument. M-- starts a negative argument.

This feature makes it simpler to add or delete text in the currently edited command line. Let’s say you want to write echo gggg:

Enter echo followed by space
Press the Meta key (which may be Win, Alt and/or Esc for you) and type 4g

But how often do you need to type a single letter so many times that this would save you anything? The feature is primarily designed for readline commands, see chapters 8.2.1–8.2.3 of the Reference Manual (“C” meaning Ctrl, “M” meaning Meta).

You can move back one word with Meta and B, but what if you wanted to move back multiple words at once? You can either hold Alt and press B multiple times, or use the digit argument:

There’s a typo on your command line five words back:

$ echo one two tree four five six seven█

Press the Meta key, type 5 and press Meta and B. Et violà:

$ echo one two █ree four five six seven

Fix the typo and either press Enter to shoot or End or Ctrl+E to move to the end of the line again.

You can delete a single word by pressing Meta and Backspace, but what if you wanted to delete multiple words at once?

You forgot a word on your command line:

$ echo one two four five six seven█

Press the Meta key, type 4 and press Meta and Backspace.

$ echo one two █

Type the missing word followed by space and press Ctrl+Y to paste what was just deleted. Et violà:

$ echo one two three four five six seven█

You’re right, you could’ve also moved to there as just explained without deleting anything. We’re on Linux, there are always several ways of doing the same thing.

And what’s a “negative argument”? It does the same, but in the opposite direction, so Meta -2 Meta Backspace deletes the next two words of the command line. “But one could use Meta 1 Meta D to do the same thing!” Glad you got that, welcome to your command line.

Further reading:

Bash Reference Manual, Chapter 8.2.4: Readline Arguments
Press alt + numeric in bash and you get (arg [numeric]) what is that?

Time-Saving Tricks on the Command Line


How to open System Settings>Appearance with command line

What works on my 20.04 system is not gnome-control-center appearance as you would expect, but:
gnome-control-center ubuntu

I found this out by starting up gnome-control-center and navigating to the Appearances tab; then starting up dconf-editor and navigating to the org.gnome.ControlCenter tab, where the value of the key last-panel was ubuntu.
Hope this works on your 16.04 system too. There is no Ubuntu panel in the panel list, nor in the man page, probably because this is a Ubuntu-specific modification to the Gnome framework.


you can use Timeshift it creates a restore point. It always worked for me.

$ sudo add-apt-repository ppa:teejee2008/ppa
$ sudo apt-get update
$ sudo apt-get install timeshift


How do I add myself into the sudoers group?

Login as root or su to get root prompt

type visudo

an editor will open find a line says

root ALL=(ALL) ALL

add one with your username below that

user ALL=(ALL) ALL

Type ctrl+x Type Y to the prompt


How to install Wine or Winetricks and Virtualbox into Ubuntu 16.04

Do not listen to the other complex answers.
All of the files are available from the standard ubuntu repos.  There are no ppa's to add. These are standard Ubuntu programs.
The software center does not work ( I have no idea why they shipped it).
That is why you cannot do anything.

However, you will need to checkmark all of the boxes in the software and updates applet:

Also it is good to go to the next tab and check off the sources is OtherSoftware for canonical partners.  This will give you skype and some other things.  (Hit the "Super button" or "windows" key and type "software" to get the screen above.

In a terminal session (CTRL+ALT+T). Simply type:

sudo apt-get update
sudo apt-get install wine
sudo apt-get install virtualbox

I think wine tricks will be there too.
You might want to install play on linux

sudo apt-get install playonlinux

Be sure that when you install wine that you are online.  It will want to ask you about installing some stuff from microsoft.  Make sure you agree to the terms and then select the forward button.  Do not do anything until it installs completely because a popup window will come for the fonts.  You might miss it if you have many windows open.

You can find these in the app store (not so good) or through synaptic (recommended)

sudo apt-get install synaptic

You do not need apt-get and can simply use sudo apt install  in 16.04 but I use the old way to help people because it works in all versions.


Mount Google Drive and Dropbox to system (only online)

The current answer is incorrect. There is actually a way to mount your cloud storage as if it were its own drive.
The method is called google-drive-ocamlfuse. There is a version for 16.04 and down to at least 12.10.
To install it, you do need to add the PPA, but I've used it before and trust it.
sudo add-apt-repository ppa:alessandro-strada/ppa
sudo apt-get update
sudo apt-get install google-drive-ocamlfuse

Usage instructions from WEB UPD8:
Run google-drive-ocamlfuse to authorize it with your account.
Make a directory somewhere (~/gdrive for example): mkdir ~/gdrive.
Mount Google Drive to the folder you created: google-drive-ocamlfuse ~/gdrive
By default, the app only refreshes lists every 60 seconds. You can change this in the config file: ~/.gdfuse/default/config.
To make it mount on startup, add this command to Startup Applications (Unity): google-drive-ocamlfuse /path/to/gdrive. Even if you made the folder in your user directory, use an absolute path for this.

As for Dropbox, something a little more general exists: CloudFusion. This actually supports both Google Drive and Dropbox, but it looks like it only works for one at a time.
The installation is a bit more manual for this one.
sudo apt-get install git
git clone git://github.com/joe42/CloudFusion.git
sudo apt-get install python-setuptools gcc libssl-dev libffi-dev python-dev fuse-utils opencv-dev libhighgui2.4 libcvaux2.4 sikuli-ide python-pycurl python-libxml2 python-imaging  tesseract-ocr
cd CloudFusion
sudo python setup.py install

The GitHub page has full configuration instructions.
For Dropbox:

Simply copy the Dropbox configuration file located at cloudfusion/cloudfusion/config/Dropbox.ini to your home directory. If you do not have a Dropbox account already, you can create a new one at https://www.dropbox.com. Edit the configuration file by adding your username and a password.

For Google Drive:

Copy the Google Drive configuration file located at cloudfusion/cloudfusion/config/GDrive.ini to your home directory. Add your client_id, and client_secret to the configuration file. Details on obtaining these are inside the configuration file.

To start:

cloudfusion --config ~/db.ini mnt
This assumes that you saved the configuration file as db.ini to your home directory. If you simply copied the configuration file as suggested, replace db.ini with the respective file; i.e. Sugarsync.ini or Dropbox.ini. If the login process is not yet fully automatized, as with Google Drive, a browser will open, and you have to allow CloudFusion access to your account manually.
Enjoy accessing your files in the directory mnt/data.

For more advanced options, check the linked page.

So, yes it is possible to mount cloud storage, using those two programs.


sift command not working Ubuntu version 14.04

First, you need to change to the folder with the demo, for example:  cd Donwloads/siftDemoV4.

Then run it: ./sift <Large.pgm >resultsfile.key.
It's important to use ./, which tells Ubuntu to run the binary from the current folder.


Step-by-step:

Stop MySQL Service:

sudo service mysql stop
Kill all running mysqld:

sudo killall -9 mysqld
Starting mysqld in Safe mode:

sudo mysqld_safe --skip-grant-tables --skip-networking &
Start mysql client:

mysql -u root
After successful login, please execute this command to change any password:

FLUSH PRIVILEGES;
You can update mysql root password:

UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root';

...this did not work for me so i did:

In MySQL 5.7, the password field in mysql.user table field was removed, now the field name is authentication_string.

First choose the database:
mysql> use mysql; And then show the tables:
mysql> show tables; You will find the user table, and see its fields:
mysql> describe user; You will realize there is no field named password, the password field is named authentication_string. So, just do this:
update user set authentication_string=password('XXXX') where user='root'; As suggested by @Rui F Ribeiro, alternatively you can run:
mysql> SET PASSWORD FOR 'root' = PASSWORD('new_password');

Please execute this command:

FLUSH PRIVILEGES;
Exit mysql console:

exit
Kill mysqld_safe and start mysql:

sudo killall mysqld_safe && sudo service mysql start


How do I fix a vboxdrv setup failure in VirtualBox?

Finally got this working. Looks like DKMS is not working as it should(?).
After reinstalling virtualbox-dkms, my VMs are back up.

sudo apt-get --reinstall install virtualbox-dkms


Is there an easy way to change filetype association?

You can install 'Ubuntu Tweak' which has an option to easily change filetype associations. Pay attention that you install the version corresponding to your Ubuntu version.


I don't think it's designed for that. However, you might be able to accomplish the same thing by sharing folders. I imagine something like this:

You first create the business and personal accounts. I don't know if this is permitted, so you'll have to check that.

You log into the business account and share a folder with your personal account. Then you log out of that account and into the personal account. You accept the invitation, and then the business account will be synchronized even if the primary account is the personal one. It should work, but I haven't actually tried it. If you do, please provide feedback.


Debian package for Ubuntu 20.04 is not available via repository as of now.   You can install sayonara using snap. Open terminal and execute below command to install it via snap.
sudo snap install sayonara


You set somewhere in config path like /dspace and user which run tomcat do not have permission to read this directory (if exist at all)

  Failure during filter init: access denied ("java.io.FilePermission"
  "/dspace" "read"):java.security.AccessControlException: access denied
  ("java.io.FilePermission" "/dspace" "read")


Ubuntu Touch - access USB serial for Arduino

Most of the serial port drivers are not built into the kernel on the BQ (and many other manufacturers) phones/tablets. This is true whether you're running Android or Ubuntu on the device.


closing laptop lid does not shut all applications down

You could try putting this in a file, marking it executable, and referencing it in your xinit or rc.local:

#!/bin/sh
while true
do grep -v open /proc/acpi/button/lid/LID0/state
  if [ $? ]; then
    killall mplayer
  else
    pidof mplayer; if [ $? ]; then screen -d -m "sh -c 'mplayer -loop 0 -novideo /usr/share/example-content/Ubuntu_Free_Culture_Showcase/*' "; xlock; fi
  fi
  sleep 1
done

It's pretty straightforward, ask me if you have questions. Obviously it will only work problem-free if you do not use mplayer while using it.


SSL certificate error : certificate file does not exist or is empty

You should check the following:

The certificate is actually present at the location.
The certificate is not empty.

Having done that, you can then try to check your sites's virtual host file.

In the /etc/apache2 folder there is sites-enabled folder which has the virtual hosts file as symlinks with sites-available folder.

Not you can check the virtual host file either in  sites-available or sites-enabled folder.

The correct form should be :

<VirtualHost IP ADDRESS :443 >
DocumentRoot <path/to/sites/folder>
ServerName <domain name>
SSLEngine on
SSLCertificateFile /etc/ssl/crt/primary.crt                 #edit path as needed
SSLCertificateKeyFile /etc/ssl/crt/private.key              #edit path as needed
SSLCertificateChainFile /etc/ssl/crt/intermediate.crt       #edit path as needed
#Include /etc/options-ssl-apache.conf #optional for some configs

</VirtualHost>

Of course : Change the names of the files and paths to match your certificate files:

SSLCertificateFile should be your primary certificate file for your domain name.
SSLCertificateKeyFile should be the key file generated when you created the Certificate signing reques.
SSLCertificateChainFile should be the intermediate certificate file (if any) that was supplied by your certificate authority.

Save the changes and exit the text editor after making appropriate changes.
Restart your Apache web server using one of the following commands:

/usr/local/apache/bin/apachectl startssl
/usr/local/apache/bin/apachectl restart


Clashing keybinding byobu and vdebug vim

You can easily disable F5 in Byobu by adding this one line to the file ~/.byobu/.tmux.conf:

unbind-key -n F5

Full disclosure: I am the author and maintainer of Byobu.


How to enable Nautilus mounted remote shares in a file system dialog

If the share is mounted it should be in Media/mount-point, you can also find it in ~/.gvfs.


How to download specific images from a site index with wget?

wget supports regexes with the --accept-regex parameter.

So wget -A "1024x768.jpg" would download any file ending with "1024x768.jpg". If you want different sorts of resolutions the digits can be changed to match d+. Something like:

wget -A "d+xd+.jpg$"

(pseudo example). The regex depends on the shell you use.


Changing hostname in newly created user account

/etc/hostname is a global file defining the hostname of your complete PC not only for one user.

To edit it you have to have root permissions using sudo. Therefore the new user has to be in the sudoers file. Enable a new user for sudo running

sudo adduser <userName> sudo

as the user who already has sudo rights (so from the one where you created the new user ;) )

Note that you must also edit the file /etc/hosts so the hostname there matches that in /etc/hostname.


Keyboard incorrectly mapped when using Open NX

The OpenNX client should have a setting to decide which keyboard layout you wish to use. Nomachines client does and OpenNX is supposed to be an open replacement, if I recall correctly. Look for it in the session preferences.


Working Ubuntu 18.04 setup
Tested in an Ubuntu 18.10 host.

ubuntu-18.04.1-desktop-amd64.sh
#!/usr/bin/env bash

set -eux

# Parameters.
id=ubuntu-18.04.1-desktop-amd64
disk_img="${id}.img.qcow2"
disk_img_snapshot="${id}.snapshot.qcow2"
iso="${id}.iso"

# Get image.
if [ ! -f "$iso" ]; then
  wget "http://releases.ubuntu.com/18.04/${iso}"
fi

# Go through installer manually.
if [ ! -f "$disk_img" ]; then
  qemu-img create -f qcow2 "$disk_img" 1T
  qemu-system-x86_64 \
    -cdrom "$iso" \
    -drive "file=${disk_img},format=qcow2" \
    -enable-kvm \
    -m 2G \
    -smp 2 \
  ;
fi

# Create an image based on the original post-installation image
# so as to keep a pristine post-install image.
if [ ! -f "$disk_img_snapshot" ]; then
  qemu-img \
    create \
    -b "$disk_img" \
    -f qcow2 \
    "$disk_img_snapshot" \
  ;
fi

# Run the copy of the installed image.
qemu-system-x86_64 \
  -drive "file=${disk_img_snapshot},format=qcow2" \
  -enable-kvm \
  -m 2G \
  -smp 2 \
  -soundhw hda \
  -vga virtio \
  "$@" \
;

GitHub upstream.
This script will do two QEMU runs:

first an installation run, skips this if already done.
then a regular boot

The first time QEMU comes up:

Install Ubuntu
continue, continue, continue...
wait a few minutes
at the end "Restart now"
now you can close the QEMU window

The installer looks like this:

After the install is complete, the script automatically takes a post-install disk snapshot to ubuntu-18.04-desktop-amd64.img.qcow2, and creates a diffed copy to ubuntu-18.04-desktop-amd64.snapshot.qcow2.
It then runs with ubuntu-18.04-desktop-amd64.snapshot.qcow2, and saves any post-regular-boot changes there.
So next time you re-run ./ubuntu-18.04.1-desktop-amd64.sh just starts back from where you last left off.
And if you want to start from the pristine post-manual installation stage to test stuff in a clean environment, you can just:
rm ubuntu-18.04-desktop-amd64.snapshot.qcow2
./ubuntu-18.04.1-desktop-amd64.sh

The snapshot will be re-generated starting from the clean install.
The snapshot only stores the diffs between the original image, and so it does not take a lot of disk space.
This setup has, by default, a funky system that automatically resizes the guest resolution to best fit the QEMU window size, you can see this if you do one of:

drag the window with the mouse
toggle fullscreen with Ctrl + Alt + F or or start QEMU with -full-screen

Notes:

-vga virtio option is to be able to get higher resolutions: https://superuser.com/questions/132322/how-to-increase-the-visualized-screen-resolution-on-qemu-kvm/1331924#1331924

-soundhw hda enables sound. Why QEMU does not enable it by default beats me.

Once inside the VM, reduce the GRUB menu wait time and show some boot messages for next boot with:
printf 'GRUB_TIMEOUT=1\nGRUB_CMDLINE_LINUX_DEFAULT=""\n' | sudo tee -a /etc/default/grub
sudo update-grub

TODO clipboard sharing

How can I copy&paste from the host to a KVM guest?
https://unix.stackexchange.com/questions/109117/virt-manager-copy-paste-functionality-to-the-vm
https://unix.stackexchange.com/questions/59079/clipboard-doesnt-work-in-kvm
https://wiki.archlinux.org/index.php/QEMU#SPICE
https://www.linux-kvm.org/page/SPICE

Tried -spice port=5930,disable-ticketing + remote-viewer spice://127.0.0.1:5930, and spice-vdagent is pre-installed on guest, but no success.
The root cause of the mess is that QEMU devs seem more focused on non-interactive usage, rather than implementing things like this reliably and therefore killing VirtualBox once and for all: https://bugs.launchpad.net/qemu/+bug/614958
TODO: host 3D acceleration
Still with SPICE and QXL, glxgears gives 1k FPS, and the exact same with regular SDL. But on host __GL_SYNC_TO_VBLANK=0 vblank_mode=0 glxgears gives 20k FPS, so I'm guessing graphics were not accelerated?
Related: https://unix.stackexchange.com/questions/108122/installing-ubuntu-13-0-desktop-in-qemu
Disable networking (e.g. for malware analysis)
Pass: -nic none on the CLI.
Mentioned at: https://wiki.qemu.org/Documentation/Networking#How_to_disable_network_completely
Share a host directory with the guest
Add to QEMU CLI:
-virtfs local,path=/path/to/share,mount_tag=host0,security_model=mapped,id=host0

and mount on guest with:
sudo mkdir /mnt/9p
mount -t 9p -o trans=virtio,version=9p2000.L host0 /mnt/9p

More details at: https://superuser.com/questions/628169/how-to-share-a-directory-with-the-host-without-networking-in-qemu/1301973#1301973 That also shows the corresponding fstab entry.
https://serverfault.com/questions/516097/how-to-efficiently-share-hosts-folder-with-kvm-guests claims is is not ultra fast though.
More dedicated question: How to share a folder between KVM host and guest using virt-manager?
This section was tested on Ubuntu 20.04 host.
Prebuilt bootable images
If you want an image that boots without the need for any interaction on the installer, see: Is there any prebuilt QEMU Ubuntu image(32bit) online?
Server
The exact same procedure as mentioned for desktop also worked for the server image.
I just wasn't able to do the initial install with -nogrphic to get rid of the GUI entirely: How to boot and install the Ubuntu server image on QEMU -nographic without the GUI?
But after the initial boot, after editing GRUB configs I achieve that: How to get to the GRUB menu at boot-time using serial console?
However, for the most part, you will likely just want to use the cloud image instead of the server image with emulation, as it does not have the interactive installer, and is usable from the CLI by default.
Tested on an Ubuntu 18.04 host, QEMU 1:2.11+dfsg-1ubuntu7.3, nvidia-384 version 390.48-0ubuntu3, Lenovo ThinkPad P51, NVIDIA Corporation GM107GLM [Quadro M1200 Mobile] GPU.


Permission denied in FTP even though I'm the owner

After you install the ftp server with sudo apt-get install vsftpd you will have to configure it. To enable write access you have to edit the /etc/vsftpd.conf file and uncomment the

#write_enable=YES

line, so it should read

write_enable=YES

Save the file and restart vsftpd with sudo service vsftpd restart.

For other configuration options consult this documentation or man vsftpd.conf


Sorry, but if you need to ask how to do that ... just don't. You are more than likely to hose your system. I see already 1 issue: the mesa version in your download is 18.0. Ubuntu 18 is on Mesa 18.1 so it is already a newer version than the one you will download. That might be a problem.

There is a FAR easier method for doing this: use the PPA for it (see this launchpad page). It was updated 5 hours ago so you might be in luck. You can add it with this command and it will add all the packages listed on the website; you will need the package xserver-xorg-video-intel.

sudo add-apt-repository ppa:oibaf/graphics-drivers

From the description of this PPA:

  This PPA provides updated X (2D) and mesa (3D) free graphics drivers
  for Radeon, Intel, and Nvidia hardware. Updates packages provide:

  All packages are automatically built twice a day when there are upstream changes
  Vulkan 1.1+ on recent Intel and Radeon GPU
  OpenGL 4.5+ support and new OpenGL extensions: http://mesamatrix.net
  OpenCL support with updated libclc
  gallium-nine support installed by default.
  VDPAU and VAAPI Gallium3D accelerated video drivers
  OpenMAX IL Bellagio and XvMC only on zesty and older - disabled since artful due to not being broadly used
  packages built against latest LLVM
  Disabled Ubuntu MIR

If the features you mention are not in there yet you could ask about it on the Phoronix forums. Those are the people that will update the drivers for us.


Windows 10 update screwed up grub-not getting any options to dual boot to Linux

Just wanted to tell I had Windows 10 only(not upgrade from Windows 7 or Window 8.1 to Windows 10).

This is happening to you because windows now use an upgrade new system, not only to upgrade from previous windows but from older windows 10 versions. In your case the windows 10 anniversay update was the reason. This when installed, it's like installing a new system from the scrach so no matter what solution you find, when a new windows 10 version came up this could happen to you again unless you use different hard drive for each system, each one with their on MBR.


How do you select an arbitrary application to "open with"?

If you'r using 11.10 i found this for an application called nedit.

Quoting mc4man

  fairly easy - nedit's .desktop is missing something to allow it to be shown in the r. click context menu

Code:
gksudo gedit /usr/share/applications/nedit.desktop

  find the Exec= line & add a %f to end, leave a space between nedit & %f - ignore the untitled document 1 that also opens - close it without saving, do save the nedit.desktop

Code:
[Desktop Entry]
Version=1.0
Name=NEdit
Exec=nedit %f
Icon=Nedit
Terminal=false
Type=Application
Categories=Motif;Utility;TextTools;
GenericName=Text editor
GenericName[en]=Text editor
GenericName[nl]=Tekst verwerker

  Then you'll find it by right clicking on your file > open with > other applications
  After that it will be shown directly in the r. click menu

  If you wish to set nedit as default for all text files then use the right click > Properties > open with instead

If, in other hand, you're using 12.04 you can do it like this:

  If you want to delete applications from the openwith list you have to edit the following file from command line

  /usr/share/applications/mimeinfo.cache

  If you added item by yourself, or you want to add new item you need to edit the following file from command line

  ~/.local/share/applications/mimeinfo.cache

  default actions you need to edit the following file from command line

  ~/.local/share/applications/defaults.list


The general form of the script (with UPPERCASE for editable entries) is:

#!/bin/bash

ask=`zenity --list --title="WHATEVER Options" --column="0" "OPTION1" "OPTION2" "OPTION3" "OPTION4" --width=100 --height=300 --hide-header`

if [ "$ask" == "OPTION1" ]; then
    COMMAND_FOR_OPTION1
fi

if [ "$ask" == "OPTION2" ]; then
    COMMAND_FOR_OPTION2
fi

if [ "$ask" == "OPTION3" ]; then
    COMMAND_FOR_OPTION3
fi

if [ "$ask" == "OPTION4" ]; then
    COMMAND_FOR_OPTION4
fi
exit 0

When the window opens, no option is selected yet. To select (that is, before pressing Enter to apply):

use the first letter (and arrows if more than one entry starts with that letter) or first letters
any letter (that is any key except Enter, Backspace, Esc etc and modifiers) to select first entry and the up-down arrows for the rest.

Esc to dismiss.

The default text "Select items from the list below"  can be edited by using the option --text="Your text here"; the color and font of that can be changed as indicated here.


OpenSSL installed, but Ruby unable to require it

I've found the answer to my own question, and I think it would be more clear to post as an answer, rather than editing the question.

1st try. Let's go through the path of non-safe source link.

As pointed out here, a possible choice to bypass the openSSL check is to remove the safe https link and add the non-safe one:

gem source -r https://rubygems.org/
gem source -a http://rubygems.org/

This way, the installation seems to go fine, but somewhere around the process openSSL is required again (for nokogiri gem, if I remember it well).

2nd try. Rebuild Ruby (it was so easy).

By the time I asked this question, my brain was probably not working properly. After installing openSSL by the usual way:

sudo apt-get install openssl

I got to my ruby directory and typed the following lines:

pushd ext/openssl
ruby extconf.rb
make
make install
popd

This way, I had all dependencies issues and stuff solved (I guess). Then, running

./configure
make
make install

I've rebuilt Ruby and finally the installation went fine.


The off button eliminated in the right corner of above in ubuntu 12.04 (Unity)

Try this:

Hit Alt+Ctrl+T to open terminal and run following commands:

sudo apt-get purge indicator-session
sudo apt-get install indicator-session

And then restart you system!


Schedule sending mail of a log file content

You can send an email with one command like this:

mail -s 'Subject' you@example.com  < log.txt

mail expects a stream of input, if there is none, it gets standard input (i.e. it let's you type something). The < operator (unix file-stream) tells mail to read the contents of the file, rather than /dev/stdin (which is just a file as well).

Adding an attachment seems a little more difficult:

Sending files as mail attachments

If you want to check if the file is empty or not, you can do a test like this:

if [ -s test.txt ];
then
    echo "file is not empty";
fi

So your command would look like this:

if [ -s log.txt ]; then mail -s 'Subject' you@example.com  < log.txt; fi


Cannot install Oracle Virtual Box 6.1 in Ubuntu 20.04.1 LTS (Focal)

This sounds related to the 5.8 kernel issues.
If you boot into the latest working 5.4 kernel it will work.
Several bugs have been reported on the issue:
https://bugs.launchpad.net/ubuntu?field.searchtext=virtualbox+kernel


Sound not playing when unplug front speakers

i have this problem too, your computer (motherbaord if self built) probably came with a software to change the sound output when you unplugged a sound jack (you should see it in the notification tray in windows) and mine automatically asks me what i plugged in when i plug it in, this enabled me to use headphones on the mic jack, or like 4 headphones at once haha.

back to the point, im guessing your using a recent version of ubuntu so click the small speaker in the top right of your screen, then from the menu that appears click sound settings...

Under the output tab (should be already selected) you will see on the left the option of play sound through?

try clicking all the devices and options in that box with music playing

if it helps then you are welcome, its not always as complicated as windows, ubuntu is in some cases easier than we are used to:)


How do I connect Ubuntu 20.04 to a Smart-TV?

You can give a try to gnome-network-displays, installable through means of Flatpak system.
Keep in mind that it's considered "experimental" by its authors, meaning it may not work at all for you.
Also I don't know how it will be on Ubuntu 20.04 LTS, you'd better be on Ubuntu 21.04 (in beta as of my writing) cause it has several bugfixes and features relevant here.


Nice question. Will give just an half answer... just a seed to see if someone can prepare something starting on this. I have tested this in my system, two users (ubuntu and romano, the two administrators).

I go to a VC and log in as ubuntu --- then I run

sudo sudo -u romano DISPLAY=:0.0 zenity --warning

(the first sudo switch to superuser, the second sudo execute zenity as the user romano)

from a virtual console, the message will appear in "romano" graphical environment.

I suppose that with a bit of mangling the output of w to get the DISPLAY and the users and looping over them it would be possible to have a working solution. Non-graphical connected users can be informed using wall.

I see really difficult to do that without superuser privileges, tough.


grub-common is not available after waking up from hibernate

It's not possible the way I thought. The reason is that after Ubuntu 15.04 the init process is working with systemd which uses system units for the start process. Under https://ubuntuforums.org/showthread.php?t=2333934 You may find a tutorial how to setup a system unit in order to unset the recordfail after a succesfull resume form hibernate. I have also seen that the canonical team is migrating the old services to systemd so I hope that in the near  future they will deliver the "official" solution


If I look at this ( https://github.com/webmin/webmin/blob/master/mysql/backup.pl ):

#!/usr/local/bin/perl
# backup.pl
# Called by cron to backup a database, or all databases

$no_acl_check++;
require './mysql-lib.pl';

if ($ARGV[0] eq "--all") {
        $all = 1;
        $cmode = $config{'backup_cmode_'};
        }
else {
        $ARGV[0] || die "Missing database parameter";
        $cmode = 0;
        }

I would assume it is the database name.


Keyboard layout switches to English each time I reboot

I'm Italian and I had the same problem as you before yesterday evening. I came also in this thread but I didn't find a solution.

Default layout keyboard was selected as Italian but at every boot "switched back to English keyboard-layout, though the little icon in the panel says it was in Italian. I have to click on the icon every time to change it back to Italian. I tried removing the English keyboard-layout, but it didn't help". It was frustrasting.

I solved my problem changing Text settings from these:

to these, that work fine for me:

Now my default keyboard layout is italian and works as italian by default, not as english. Now I don't have to click on the icon every time to change it back to Italian.
I hope this can help you.


How do I extend my ubuntu partiation after I removed the windows partition?

First you need to boot from a liveUSB and use gparted to resize the partition.

As an alternative consider simply creating another partition in the unallocated space and use it maybe as a home partition. More information on how to do this here.


I recently upgraded my Windows and found my grub menu missing, which was stopping me from getting into my linux. I somehow found a way to get into my Ubuntu (17.04) and tried boot repair, but got the same error:

/usr/sbin/boot-repair-bin: line 18: /usr/share/boot-sav/bs-cmd.sh: No such file or directory
/usr/sbin/boot-repair-bin: line 19: cmd_start: command not found

After sometime my software updater suggested me a few more updates that were kind of dependencies to the boot repair I just installed. In case you didn't get it, do run these commands once:

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

If you have already done the first three steps, then sudo apt-get upgrade should help.


Invalid version string 'GNU/Linux'" when creating bootable USB stick

There are a few good ideas listed here:
https://help.ubuntu.com/community/Installation/FromUSBStick
https://wiki.archlinux.org/index.php/USB_Flash_Installation_Media

They include unetbootin, dd and Rufus (Windows).


Cannot install XBMC due to dependency issues

I had the same problem, and am ubuntu noob, so it might be a beginner mistake.

I needed to enable sources from "Community-maintained free and open-source software (universe)"

Now installed


Create xorg.conf manually. Copy xorg.conf from Step 3 of my post, and configure the correct BusID (using lspci | grep VGA, also noted in my post in Step 3). I had been discussing it in reddit post too.

Good Luck !!!


Ubuntu 64 bit Machinarium: error while loading shared libraries: libgtk-x11-2.0.so.0

apparently you have to install the libgtk2.0-0:i386 package.

sudo apt-get install libgtk2.0-0:i386


Quad monitors are certainly possible, here's my setup driven by 2 NVidia cards (using the proprietary NVidia driver):

although, in my particular setup, I wasn't able to make 3D acceleration work, but, as I remember, this was more a requirement of having two of the monitors rotated than having 4 monitors.

Also, I'm not using Unity, the window manager is XMonad, which I would recommend very much for such a setup unless you want to spend hours dragging windows from monitor to monitor and arranging them manually.

I'm using a custom xorg.conf file because, as I remember, I had to specify individual PCI bus IDs for each card to be able to use them - you may be luckier, but generally setting up a multi-monitor machine is an exercise from the "advanced" chapter of the book, do not expect full plug-and-play* (see update below). Again, in my case, rotated monitors complicated the matter a bit.

Here's my xorg.conf:

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" RightOf "Screen3"
    Screen      1  "Screen1" 0 0
    Screen      2  "Screen2" RightOf "Screen1"
    Screen      3  "Screen3" RightOf "Screen2"

    Option         "Xinerama" "1"
EndSection

Section "Files"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor3"
    VendorName     "Unknown"
    ModelName      "SamsungSyncMaster"
    HorizSync       30.0 - 84.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
    Option         "Rotate" "Left"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor2"
    VendorName     "Unknown"
    ModelName      "Dell 2007 WFP"
    HorizSync       30.0 - 84.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
    Option         "Rotate" "Left"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "BENQ"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 75.0
    Option         "DPMS"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "BenQ FP222W"
    HorizSync       30.0 - 84.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device3"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 210"
    BusID          "PCI:3:0:0"
    Screen     1
EndSection

Section "Device"
    Identifier     "Device2"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 8400 GS"
    BusID          "PCI:2:0:0"
    Screen          1
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 210"
    BusID          "PCI:3:0:0"
    Screen         0
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 8400 GS"
    BusID          "PCI:2:0:0"
    Screen          0
EndSection

Section "Screen"
    Identifier     "Screen3"
    Device         "Device3"
    Monitor        "Monitor3"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "DFP: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen2"
    Device         "Device2"
    Monitor        "Monitor2"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "DFP: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "TwinViewXineramaInfoOrder" "CRT-0"
    Option         "metamodes" "nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "CRT: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Now I'm pretty confident it is possible to plug another video card and extend this to a 6-monitor setup, but I feel the limited flexibility of my neck would not allow me to make a good use of 6 monitors :)

* Mid-2015 UPDATE: Recently I had to boot this machine from a USB stick with Kubuntu 15.04. I have to report that, to my amazement, it recognized and was able to use all 4 monitors without any manual setup (in portrait orientation). Rotating the monitors didn't quite work, but still the progress is impressive - I'm quite sure it only used one or two monitors previously. So I suspect that if you don't want portrait monitors, Kubuntu might work for you out of the box without any tweaks.


Installing kubernetes on my own hardware

Tim from the Juju team here. Yes, you're definitely able to install Kubernetes on your own hardware. The docs are unclear and that's our fault.

The recommended approach is to:

Install MAAS on your computers to turn them into a "cloud"
Install Juju on the machine that you wish to control your cluster
Run juju add-cloud to register your cluster with Juju (detailed instructions for registering a MAAS cluster with Juju are available)
Run juju deploy charmed-kubernetes after looking through the detailed manual installation instructions that describe how to customise the deployment for your needs

You will now have a standards-compliant Kubernetes cluster on your own hardware, for free.

Why the confusion? Well, the term "cloud" in the documentation is misleading. A "cloud" in Juju-parlance is jargon. It indicates a deployment target. Juju clouds are not tied to virtual machines living in the public cloud.

In that document that you posted, the section that you are looking for is "Multi node cluster".

You'll see MAAS (Metal as a Service) and Manual "clouds". Both of those "clouds" are bare-metal hosts.

the Manual cloud only requires SSH access to the hosts that you're intending on deploying to. Machines that it accesses become a compute cluster.
MAAS turns bare-metal machines into a cloud-like environment. It is very powerful and gives you control over networking and storage (which is not available with the Manual cloud.


Why does logging in to Unity session take so long?

15-20 seconds sounds about right, i got that sort of time when i was using 11.10, since i upgraded to 12.04 (being released tomorrow as of this writing), my login times and boot times have been cut down by about 60%.

In answer to your question, 15-20 seconds is not unusual at all for your hardware, my hardware is comparable to yours but with better graphics.


Can I burn Ubuntu 16 in a DVD with Ubuntu 14?

If you are using a rewritable DVD (DVD-RW), then Brasero will allow you to wipe or clean the disc, allowing you to write an image onto it like it was new. The disc will have to be fully erased before more data could be written.

If you are using a non-rewritable DVD (DVD-R, DVD+R, etc), then you cannot use it more than once. In that case, you can install 16.04 via a USB instead. A simple program to write .iso images to USB is UNetbootin, which can be installed with these commands:

sudo apt-get update
sudo apt-get install unetbootin

I'm sure this program can also be found in the software center too.


14.10 Dual Monitors are displayed as distorted single screen mode

This seems to be an issue with Compiz. I got it working with the following procedure:

On CompizConfig Settings Manager, go to "General Options", then "Display Settings" and do the following:

Uncheck "Deteck Outputs"
In the Outputs array, set the resolutions of each of your screens. The numbers after the resolution "1920x1080+0+0" are the offset. It's important to add this offset according to your needs. I have two full HD screens, so I added the following configuration:
1920x1080+0+0
1920x1080+1920+0

The second output has an offset of 1920, because it is on the right side of the first output, which has a width of 1920.

Credits to Rockwalrus for finding it out.


is there a way to actually see what are the changes in each level of git stash?

git stash show -p <STASH>

If no STASH is given changes in the recent stash will be shown.  From man git-stash:

   show [<stash>]
       Show the changes recorded in the stash as a diff between the stashed state
       and its original parent. When no <stash> is given, shows the latest one. By
       default, the command shows the diffstat, but it will accept any format known
       to git diff (e.g., git stash show -p stash@{1} to view the second most recent
       stash in patch form). You can use stash.showStat and/or stash.showPatch
       config variables to change the default behavior.


Can I set my user account to have no password?

You can't do that using the GUI tool, but you can using the terminal.

First, if your user has sudo privileges, you must enable its NOPASSWD option. Otherwise, sudo will ask for a password even when you don't have one, and won't accept an empty password.

To do so, open the sudoers configuration file with sudo visudo, and add the following line to the file, replacing david with your username:

david ALL=(ALL) NOPASSWD:ALL

Close the editor to apply the changes, and test the effect on sudo in a new terminal.
Delete the password for your user by running this command:

sudo passwd -d `whoami`

If you ever get prompted for a password, just type enter and it should work. I've tested this answer with LightDM, the lock screen, sudo, gksu and it works, but there's one more step to get it to work with pkexec (thanks muru).


Is there an easy way to kill a 'play' job (from sox)

You can kill a process by its name by using pkill.

If the utility is named play, the following would work.

pkill play


how do I activate the dash to display feeds from my online accounts in the social media lense?

I figured out how, it was my mistake.  In settings>privacy>search results I had online search results shut off.  I turned it on and now it working fine again.  I had it turned off because I can not stand shopping results cluttering my search for files on my computer.  If I want to go shopping I'll go to a website.


(software-properties-gtk) double running in the same OS. Is it a problem?

Use CTRL + ALT + T or open a terminal and type the following command

dpkg -l | grep software-properties-gtk

The output should look something like this

ii  software-properties-gtk     0.92.28         all          manage the repositories that
you install software from (gtk)

Explained

dpkg -l lists installed packages and adding | grep tells the computer to only list results matching what is specified. If there are two of the same program installed, it will be listed twice. The sample output above only shows the program is only listed one time.

On my computer, I have the following files for this program and this is normal

/usr/bin/software-properties-gtk
/usr/bin/X11/software-properties-gtk
/usr/share/man/man1/software-properties-gtk.1.gz


How can I resume a download started in Chromium?

You can resume any download using the wget command provided:

You know the url of the file
You have the partially downloaded file and know its location
The server the file is on supports resuming downloads

Getting the required information
In Chromium, go the the chrome://downloads/ page. Find the failed download that you want to resume. To get the url, right click on the "Retry download" link and click "Copy Link Address". The location to the file will be ~/Downloads/NAME.crdownload - NAME is the file name that is displayed above the url in the entry on the chrome://downloads/ page.
Downloading the file
The command to resume the download is:
wget -c URL -O FILE

where URL is the url of the partially downloaded file and FILE is the location of the partially downloaded file. Make sure you escape any spaces in the file path.
If the server supports resuming downloads you will see a progress bar like this:
100%[++++++++++++++++++++++++========================>]

where the '+'s indicate what was previously downloaded and the '='s indicate what is currently being downloaded.
If the server doesn't support resuming downloads, you will get an error message and it will fail to download. In this case you have no choice but to restart the download.


How can I change the color of gedit's spell checking underline?

This is not really an answer to the problem, but a quick trick:

change the set of colors used by gedit in the preferences.
In some sets the light gray is clearly visible.


After an update and reboot in Ubuntu 20.04 I can no longer complete the boot

I solved!
I went into recovery mode again. I managed to activate the network by following the instructions of this:
https://core.docs.ubuntu.com/en/stacks/network/network-manager/docs/configure-wifi-connections and other solutions on askubuntu regarding access to the network in command mode (this: Ubuntu Resolving Host & Wifi Problem).
In particular the command:
dhclient -v wlan0

Replacing wlan0 with the name of our device (mine was wlp3s0 for example)
At this point, having the network
I could run:
sudo apt-get update

then I ran:
sudo apt-get install --reinstall ubuntu-desktop

(as indicated here:
Boot stuck - how to start GUI from the command line?)
and finally:
reboot

It took a while to complete the final part of the boot, but it finally went!


Most applications (Well, all applications) that are in the repo will work with 64bit versions of Ubuntu. So things like Firefox, Gedit, Chromium, etc. The majority of applications that are only i386/x86_32bit only will still install and run without any additional changes needed. Even less will have issues with linked or shared system libraries. You can install the ia32-libs package which will install most needed 32bit shared libraries needed for 32bit software to work.


Generally networking on Linux is the same as on Windows.

But it depends on whether you are using any Microsoft specific network services. Most of them can be used with Linux too.

Regarding the ISP, it does not make any difference for ISP which OS are you using unless they are using something very specific.

The more important thing to think about is to get a Linux literate admin for your network.


Touchpad not working in my asus X556UF. i'm using ubuntu 16.04 LTS

I have the same laptop and had the same problem

Run

sudo -H gedit /etc/default/grub

In the open window edit line

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

it should look this way

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.nopnp"

Save file and run

sudo update-grub

Run

echo "blacklist i2c_hid" | sudo tee /etc/modprobe.d/i2c-hid.conf
sudo depmod -a
sudo update-initramfs -u
echo "synaptics_i2c" | sudo tee -a /etc/modules

Reboot.

What it does is, it removes the synaptics hid drivers from the blacklist and allows them to be loaded at the initialization of the RAM file system, allowing your touchpad to work at boot.


Linux Ubuntu 12.04 - TeamViewer 8 - microphone/speakers problem

Teamviewer 8 is actually running through wine, and is not a native Linux application per se, but rather an application ported to run atop Wine. You might try reviewing your wine configuration to determine if your wine config recognises your hardware. It should, but it may not. An updated version of Wine may also help resolve the issue if you are following the Ubuntu Wine Team ppa you might note that many updates have occurred for Wine since the first 12.04 LTS release.


Black screen with lines and dots when installing using NVIDIA 2070 Super

I had the same problem and I solve this situation. Firstly I use nomodeset and then install and open Linux. After this, open a terminal and write this
sudo add-apt-repository ppa:graphics-drivers/ppa && sudo apt update

and then open Software & Updates -> Additional Driver then select you wanted to use which graphic drivers and apply. Then restart pc. I solve it this way.
Reference link (for driver install).


When you trash a file that's not on the same partition on your home directory, it's moved to the .Trash-1000 directory on the root of whatever partition you are.
Make sure that directory .Trash-1000 is writable for the user under which you want to trash the file.

I got the same failure too, my root partition was different than my home directory - which is a encrypted partition. The directory /.Trash-1000 was not writable by the current user I was logged in.
Solved by running

sudo chown MYUSERNAME /.Trash-1000


Want to take several partitions and create one big one in GParted

First, unmount the partitions you want to delete (sda5, sda6): right-click the partition, choose "Unmount".

Secondly, delete the primary and logical partitions (sda4, sda2, sda7, sda5, sda6): right-click the partition, choose "Delete".

Then, delete the extended partition: right-click sda3, choose "Delete".

Now, you have sda1, followed by unallocated space.

Either boot the installer and select "Install Ubuntu alongside Windows", or
Right-click the unallocated space (rectangle filled with grey color), choose "New". Create a partition for the operating system, and a swap partition. Then, boot the installer, select "Something else" and assign the mountpoint "/" to the partition where you want to install Ubuntu into.

  "I format a partition and there is still space being taken on it."

It's normal. Some file systems reserve space for metadata, when they are created. This improves performance.


Problem with nvidia-persistenced not working

May 2019

With regards to the errors:

... nvidia-persistenced: Failed to open PID file: File exists
... nvidia-persistenced: Shutdown (5232)

I got this error on Ubuntu 18.04.02 LTS after installation of the CUDA toolkit (10.0) and trying to follow the recommended post installation actions. I followed the guide to install via the nvidia repository.

https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#install-persistenced

The issue for me was that the daemon was actually running already.

To verify run:

ps aux | grep persistenced

and you should get something along the lines

root       714  0.0  0.0   8864  1396 ?        Ss   19:44   0:00 /usr/bin/nvidia-persistenced --verbose
root      6723  0.0  0.0  22000  1112 pts/0    S+   20:25   0:00 grep --color=auto persistenced

Process 714 (in your case the pid will likely be different) is the daemon already running which is why when I executed the command again it failed.

So the service was actually installed already by the cuda packages.
To confirm this run:

systemctl list-units --type service --all | grep nvidia

and you should get something like the following:

  nvidia-persistenced.service                           loaded    active   running NVIDIA Persistence Daemon

This confirms the service is already up and running.


Random freezing problem with Ubuntu 14.04.3 LTS, Lenovo laptop T420

First check your laptop specification. Basically there is much trouble with some hardware for you kernel. and also the performance of your integrated graphic.

In case someone else finds this, a kernel upgrade fixed a similar problem.
I had Ubuntu 14.04.2 kernel version 3.16.0-30, and doing a "apt -y upgrade" ended me up at kernel 3.16.0-49, and that solved the problem.


I have figured out how to solve this.  The problem is a combination of two things

apt-mirror is not downloading deb files for the i386 architecture
(I'm running this on a 64-bit CPU)
'apt-get update' expects the i386 files to exist (or at least the
i-386 Packages)

So, my solution is to simply force apt-mirror to download the i-386 files (in addition to the amd64 files).  Previously, the /etc/apt/mirror.list file contained entries like this:

deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse

For each of those, I changed them to

deb-amd64 http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse

as well as a line for the i-386 files:

deb-i386 http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse

I then ran 'apt-get update' with no error messages.


Cannot permanently remove boot entry using efibootmgr

When logged into the installed Ubuntu, type the following command, as root, to delete a specific entry:

efibootmgr -b 0006 -B

The number (0006) is the hexadecimal number representing the entry you want to delete.

and type in the terminal:

sudo update-grub


Can I set different Transparent backgrounds for Terminal?

The options for gnome terminal do not allow you to set a transparency mask for a background image.

You can either choose from a solid color background, a background image where you can set the opacity shade of that image or transparent background image where you can set the level of transparency for the background.

If you select a image as a background you wont be able to see tru that image.

What you can do is create an image in a format that allows transparency (ie png) and set that image as your background for the terminal.

Step by step

I have started with this image called ubuntu-backgrounds7.jpg

I have open it with Gimp and set the transparency of it to 75% and saved it as ubuntu-backgrounds7.png in a folder inside my home.

I then go to Edit > Profile Preferences > Background and set the image I have just created as the selected background for my terminal.

You can then adjust the opacity for the background with the slider to get the desired shade on your background.


Try the following.

Use this code for 32-bit system:

sudo apt-get install libxss1
wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb
sudo dpkg -i google-chrome*.deb

For 64-bit system use:

sudo apt-get install libxss1
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

This installs a needed library for Google Chrome, then downloads the latest version of Chrome to  the current working directory and installs it.

Run google-chrometo start the browser.

You can also download it here Download Google Chrome.


apt-get mass install packages from a file?

Something along these lines ought to do the trick.

apt-get install $(grep -vE "^\s*#" filename  | tr "\n" " ")

The $(something) construction runs the something command, inserting its output in the command line.

The grep command will exclude any line beginning with a #, optionally allowing for whitespace before it. Then the tr command replaces newlines with spaces.


ubuntu won't load in dual boot with windows 10 in Uefi mode

Among many solutions this is the solution that worked for me :

Start LiveCD Ubuntu
Open a new terminal and download Boot-Repair.
Start Boot-Repair > Advanced Options > Uncheck "Secure boot" in Grub Options > start the repair.
Reboot PC > access Bios setting > deactivate Secure boot.


Repair solve your problem.

1st option : get a disk including Boot-Repair

The easiest way to use Boot-Repair is to burn one of the following disks and boot on it.

Boot-Repair-Disk is a disk starting Boot-Repair automatically.

Boot-Repair is also included in Linux-Secure-Remix.

Remark : you can also install the ISO on a live-USB (eg via UnetBootin or LiliUSB or Universal USB Installer).

2nd option : install Boot-Repair in Ubuntu

either from an Ubuntu live-session (boot your computer on a Ubuntu live-CD or live-USB then choose "Try Ubuntu") or from your installed Ubuntu session (if you can access it)
connect to the Internet
open a new Terminal, then type the following commands (press Enter after each line):

  sudo add-apt-repository ppa:yannubuntu/boot-repair
  sudo sed 's/trusty/saucy/g' -i /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list

 sudo apt-get update
 sudo apt-get install -y boot-repair && (boot-repair &)

Using Boot-Repair

Recommended repair

launch Boot-Repair from either :
    the Dash (the Ubuntu logo at the top-left of the screen)

    or System->Administration->Boot-Repair menu (Ubuntu 10.04 only)
    or by typing 'boot-repair' in a terminal

Then click the "Recommended repair" button. When repair is finished, note the URL (paste.ubuntu.com/XXXXX) that appeared on a paper, then reboot and check if you recovered access to your OSs.
If the repair did not succeed, indicate the URL to people who help you by email or forum.

This will work for me. I hope this is help you.


How to disable web app prompt on ubuntu 15.04 and Firefox 38?

I have found the answer by disabling Unity desktop integration from Modules > Extensions.


How to enable Thinkpad L380 Yoga fingerprint reader on Ubuntu 16.04/18.04?

Yes, 06cb:00a2 is the ID of L380 yoga's fingerprint reader.

Based on my search result,
it seems like the drive is not yet provided.

Following post from Lenovo, L570 has a driver for Ubuntu. And since 380 is a successor of 370/570, hopefully they support it later on.

For more info please refer to the links below.
Lenovo forum post regarding L570 fingerprint
“Fingerprint readers integration” team

By the way, I'm on the same page with you.


How can Adobe Acrobat Reader be seriously installed in Ubuntu 15.04?

Follow this link.

If you get any dependencies issue, try opening the .deb file in Ubuntu Software Center. It will download the required files and repair the installation.

EDIT: Check the change in link.


Am I allowed to add user to a particular group upon installation of my package?

Although not literally mentioning what you ask for, the spirit of what is the policy is clearly readable here:

  "These scripts must be idempotent (i.e., must work correctly if dpkg needs to re-run them due to errors during installation or removal), must cope with all the variety of ways dpkg can call maintainer scripts, must not overwrite or otherwise mangle the user's configuration without asking, must not ask unnecessary questions (particularly during upgrades), and must otherwise be good citizens."

This implies imo that you should never make the installer change users/groups without explicitly asking for it. Preferably making him or her perform the action him- or herself.

Other arguments not to automate this:

If errors occur, either on install or uninstall, consequences could be severe
You should always consider to make sure the system is restored to how it was before your application was installed, if he or she decides to uninstall. Especially on users/groups, this can interfere with settings and profiles the user made for whatever reasons after he installed your application.

In short, I would be very, very restraint to automatically change users & groups.


I think about adding a second hard drive to my laptop

I have a second drive in an old tower, with / and the swap file on a forty gig /dev/sda and /home on a 300 gig /dev/sdb. Works fine. (It's a salvaged system pieced together from scraps.) However, a second hard drive on a laptop would be a fearsome drain on your battery.


What's the easiest way to set up a LAMP stack?

sudo apt-get update
sudo apt-get install tasksel
sudo tasksel install lamp-server

It will install all the basic LAMP stack for you, prompt for MySQL root password, etc.

More specifically it will install the following packages, and their dependencies.

mysql-client-core-5.1 libwrap0 apache2
libaprutil1-dbd-sqlite3 tcpd
libapache2-mod-php5 apache2.2-common
apache2-utils php5-common
libaprutil1-ldap libaprutil1
php5-mysql mysql-server-core-5.1
libdbi-perl libplrpc-perl mysql-server
apache2.2-bin libdbd-mysql-perl
libhtml-template-perl
libnet-daemon-perl libapr1
mysql-server-5.1 libmysqlclient16
ssl-cert apache2-mpm-prefork
mysql-common mysql-client-5.1

You might also want to take a peek at the Ubuntu Server Guide.


Graphical ssh private key prompt not showing up

I think what you're really looking for is keychain, which is similar to the ssh-reagent you mention. Once configured in your .bashrc it'll prompt for the passphrase of the key(s) you asked it to manage only when you launch the first terminal after login and makes sure every new terminal knows about your ssh-agent.


Inconsistend fuzzy, pixelated fonts in KDE desktop environment on Ubuntu 17.10

So, I searhed some more, and I found a possible cause and workaround of the problem:

In the troubleshooting section of the ArchLinux' wiki on font configuration it states that

  "96 DPI is not a standard. You should use your monitor's actual DPI to get proper font rendering, especially when using subpixel rendering.(...) If fonts are still unexpectedly large or small, poorly proportioned or simply rendering poorly, fontconfig may be using the incorrect DPI."

and links to the Display size and DPI section in the wiki's Xorg entry where it further states that

  "Having the correct DPI is especially necessary where fine detail is required (like font rendering). Previously, manufacturers tried to create a standard for 96 DPI (a 10.3" diagonal monitor would be 800x600, a 13.2" monitor 1024x768). These days, screen DPIs vary and may not be equal horizontally and vertically."

It got me thinking about whether my screen's DPI were detected incorrectly, so I checked in KDE's display manager. In the displays menu there is a "Scale display" option. This made me recall that I did fumble with that right after install of KDE, and then remembered something I read about KDE handling fractional scaling poorly. I had like, I thought, scaled the display to 1.2x. Rescaling it to 1x makes fuzzy fonts look fine. The ArchLinux wiki Xorg entry further states

  "While you can set any dpi you like and applications using Qt and GTK will scale accordingly, it's recommended to set it to 96, 120 (25% higher), 144 (50% higher), 168 (75% higher), 192 (100% higher) etc., (...)"

I have so far tried forcing 1.5 scale, which works fine.

PS: This is of course more of a workaround than addressing the issue, but at least it works. It still doesn't answer why fonts in some texts where affected while others not. (E.g. the fuzzy fonts in TexStudio, while the highlighted line is clear.)

[EDIT] I fumbled around some more. Seemingly it is the scaling in the displays menu that's causing the problem. Using 1x scaling in Diaplay and forcing font sizes 120, 144 in the fonts menu, seems to  work without problems. Setting fonts to default but scaling displays on the other hand creates fuzzy text like seen in the pictures I posted.


I have a dvd movie that won't play in Ubuntu16.04

I got to a point in my use of Ubuntu 16.04 when I started having this same problem. Tried to install certain apps and got errors about unmet dependencies and there's never a way to fix those dependencies. After trying everything ( I mean, everything ), eventually, I had to just upgrade to 18.04 and start life afresh. I wish there was another way though I always life to run the latest OS anyway.
You might want to try these:

1  Remove ( uninstall ) the dvd player software completely.
2. Update the system
3. Upgrade all software ( distr-upgrade )
4. Reinstall the software

As far as I know, VLC has been the only app I've come across that's able to play any type of media extension but if the reinstallation does not fix it ( and you're using root privileges ), try re-install the OS or upgrade it.

Cheers!


Sound problem with Toshiba Satellite L35-SP1011

(Solution proposed by OP on the question body seems to work)

Edit /etc/modprobe/alsa-base.conf with your favorite text editor and add the following line to it so that the correct sound module is loaded:

options snd-hda-intel model=asus

After this your sound card should start working.