Erase partition and install Ubuntu on entire disk

Like @user251046 said,

A "clean" installation is the way to go... It's easier, will give you a "clean" system and allow you to encrypt your entire drive, including that which was formerly used by Microsoft Windows.

Download a copy of the disk image (ending in ".iso") here (Most computers made in the last 3-5 years are 64-bit compatible, so select that option unless you're using something particularly old...):
http://www.ubuntu.com/download/desktop

Then burn it to a DVD:
http://www.ubuntu.com/download/desktop/burn-a-dvd-on-windows

Or create a "thumb" drive:
http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows

Once you're good to go, simply plug-in your "thumb" drive/insert your DVD and reboot your computer...

Near the start of the installation, it will ask you if you want to wipe your computer and start afresh - select that and follow the bouncing ball.

If you get stuck, there's some helpful instructions (with screenshots) here:
http://www.ubuntu.com/download/desktop/install-desktop-latest


If I understood your question, the following script should be what you want:

#!/usr/bin/env python

import urllib
import re
import sys
import os
page = urllib.urlopen("http://www.adobe.com/support/security/")
page = page.read()
fileHandle = open('content', 'w')
links = re.findall(r"<a.*?\s*href=\"(.*?)\".*?>(.*?)</a>", page)
for link in links:
    sys.stdout = fileHandle
    print ('%s' % (link[0]))
sys.stdout = sys.__stdout__
fileHandle.close()
os.system("grep -i '\/support\/security\/bulletins\/' content 2>/dev/null | head -n 3 | uniq | sed -e 's/^/http:\/\/www.adobe.com/g' > content1")
os.system("wget -i content1")


Is there a way to align desktop icons to (a vertical and horizontal) grid?

Right click on desktop, and check 'keep aligned'. This automatically snaps the icons to grid.


VFS: Cannot open root device [UUID] or unknown-block(0,0) / Kernel panic not syncinc VFS

Here is the solution to my own question:
Somehow uname gave me a wrong name (3.0.0-12-generic), but according to GRUB it's 3.0.0-19-generic. Executing update-initramfs -u -k 3.0.0-19-generic and rebooting made it work!


The problem has been resolved.
The solve :
Step 1:
when you get this screen :
https://i.stack.imgur.com/xF2Ni.jpg
Press key 'e'
Step 2 :
You will get screen after step 1
From this screen move the pointer to line starts with linux word in last this  line add acpi=off then press ctrl+x . After that your ubuntu will start.
step 3:
After start ubuntu open the terminal and  write this commands
Command 1:

sudo gedit /etc/default/grub

Then add acpi=off like this :
https://i.stack.imgur.com/ZYP4G.jpg
Then save .
After that from the terminal write this comand .
Command 2:

sudo update-grub

The end.


ppa:amandeepgrewal/notifyosdconfig hasn't been updated in a while and does not include packages for Ubuntu 11.04 or 11.10.

You can install notifyosdconfig from the main WebUpd8 PPA:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install notifyosdconfig

It looks like you've been using an old guide. Use this guide for configuring the patched NotifyOSD in Ubuntu Oneiric 11.10.


If the crash happens after the terminal sessions are set up you can also do a "control" "alt" "f1" and if it shows a login use your normal account to log into a terminal session.

Otherwise you can also do this from the option "try ubuntu" from a live DVD session. In the launcher you will have all your disks, mount the one that holds your OS by clicking it.  Editing is probably best done by going to a terminal session and using "sudo" as you normally would edit the file.


Try your cable-connections, it should show connected, HDMI is kind of tricky with it, and Turn on hdmi in monitor settings and apply, say ok when there does appear an image;

And make that default.


can not ping by host name for some computers

Just add WINS to the hosts: line in the /etc/nsswitch.conf file:

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat lsass
group:          compat lsass
shadow:         compat

hosts:          files mdns4_minimal [NOTFOUND=return] wins dns mdns4
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

This tells the system to use WINS in order to lookup netbios. The winbind package has to be installed for this to work.


ATI Graphics - iMac 27 - incorrect graphics card reported

You have a FirePro M6100.

You can see this by looking at the MAC output where it states that there is 2GByte of video memory. A Radeon R9 M380 would have 4GByte.

Linux and Phoronix are reporting this because this is what the card is telling them.


Basically, that's not how the /dev/videoX interface works; you can't cat the device node to get a frame of video out.

There are a number of utilities to do this though, their suitability depending on what you're looking to do. For example, the webcam package can take a snapshot from a video device and upload it to the web.


Launch nautilus in location navigated to in Terminal

From your terminal, just open nautilus as follow:

nautilus .

It will open a new instance of Nautilus in the directory where you were in your Terminal.

From the nautilus man page:

SYNOPSIS
       nautilus [options] URIs...


All of your characters are graphic (they have visible glyphs). Try a filename containing whitespace and invisible characters:

$ touch $'\n\t\b\a\b'
$ ls -b
\n\t\b\a\b
$ echo *

$ printf "%q\n" *
$'\n'$'\t'$'\b'$'\a'$'\b'

An actual useful example where the output would be tricky otherwise: filenames that accidentally had the \r character inserted in them because DOS file endings got in the way somewhere in the middle of an operation:

$ od -c file-list
0000000   s   o   m   e   -   f   i   l   e   .   t   x   t  \r  \n
0000017
$ xargs -a file-list touch
$ ls -b
\n\t\b\a\b  file-list  some-file.txt\r

I have actually seen this in some post on U&L. Personally, I'd usually use ls -q for copy-pasting to the command-line itself:

$ ls -q
''$'\n\t\b\a\b'  ' '   file-list  'some-file.txt'$'\r'

The default behaviour in newer versions of ls is ls -q for interactive usage: Why is 'ls' suddenly wrapping items with spaces in single quotes?


I can't use  (Angle Brackets) in my US keyboard in LatinAmerican Spanish input language

Try:
AltGr+Shift+Z for <
AltGr+Shift+X for >
In general you can study the symbols of the keyboard layout you are using via Show Keyboard Layout.


Enable clickpad middle click on Ubuntu 12.10

I am also looking for a good solution, right now I run the following command in terminal each time I start the computer and after suspend:

$ synclient TapButton1=1 TapButton2=3 TapButton3=2

I can't live without middle button on clickpad!


Drag-drop not working for Ubuntu 20.04 LTS on VMware® Workstation 15 Pro

Enter the following command in terminal to enable drag and drop between virtual machines and the host.

gsettings set org.gnome.nautilus.preferences use-experimental-views false

Do the following to enable drag and drop between two virtual machines:

Open the virtual machine settings editor (VM > Settings), click the Options tab and select Guest isolation.
Select Disable drag and drop to and from this virtual machine to disable the feature. Deselect it to enable the feature.


How can I hide or show a different IP to a website?

Stealthy
This browser plugin comes for Firefox and Chrome/Chromium to enable us to fake an IP from a different country which is then presented to a website we browse to via a proxy provided from stealty.
In the free version there is a somewhat limited capability for choosing our location either as random or for a given country by surfing via a proxy when available there. There also is a commercial PRO version to have an guaranteed IP from the UK or from the USA.

Stealthy for Chrome/Chromium
Stealthy for Firefox

Of course there are some security issues we will have to think about when trusting our data to a not so well defined proxy somewhere in the world wide web.
The plugin can easily be switched on or off on demand.


Installing ubuntu 19.10 with boot mode set to UEFI with legacy OPROM

If I understand correctly, booting in UEFI mode needs an EFI system partition. There may be some variations of the properties of that partition, but if you remove it you would have to create a new one (or boot from another drive, where there is an EFI system partition) in order to boot in UEFI mode.

Necessary and possible partition tables and partitions are described in the following link,

help.ubuntu.com/community/DiskSpace

I am not quite sure what you mean by

  Boot mode is set to UEFI LEGACY OPROM

You can check if you are booting in UEFI mode or BIOS mode (alias CSM alias legacy mode) with the following command line

test -d /sys/firmware/efi && echo efi || echo bios


dpkg --dry-run -i package.deb will show you what will happen, and see this question on server fault.

dpkg -e package.deb will extract the control files.


Error while burning CD-R, check if it's burned correctly

I couldn't find a duplicate, so I'll readapt an old answer of mine.

You can check the integrity of the image written to the CD by checking its MD5 sum against the original ISO's MD5 sum:

Check the original ISO's size:

% ls -l archlinux-2015.10.01-dual.iso
-rwxrwxr-x 1 user user 689963008 nov 22 21:35 archlinux-2015.10.01-dual.iso

Run this command (change 689963008 according to the original ISO's size):

sudo dd if=/dev/cdrom iflag=fullblock count=$((689963008/512)) 2>/dev/null | md5sum -

Check the output against the original ISO's MD5 sum:

% md5sum archlinux-2015.10.01-dual.iso
b6781474851992cd9deb03b93a3f9503  archlinux-2015.10.01-dual.iso

If you want to get fancy:

Enable the Universe repository (you can do that in Software & Updates);
Install pv: sudo apt-get install pv;
Check the original ISO's size:

% ls -l archlinux-2015.10.01-dual.iso
-rwxrwxr-x 1 user user 689963008 nov 22 21:35 archlinux-2015.10.01-dual.iso

Run this command (change 689963008 according to the original ISO's size):

sudo dd if=/dev/cdrom iflag=fullblock count=$((689963008/512)) 2>/dev/null | pv -s 689963008 | md5sum -

Check the output against the original ISO's MD5 sum:

% md5sum archlinux-2015.10.01-dual.iso
b6781474851992cd9deb03b93a3f9503  archlinux-2015.10.01-dual.iso


u1sync: error: --oauth requires a key and secret together in the form KEY:SECRET

We have solved it, but I want to share it :

#!/bin/bash

OAUTH_TOKEN=Ffdxxxxxx
OAUTH_TOKEN_SECRET=oDxxx

OAUTH=$OAUTH_TOKEN:$OAUTH_TOKEN_SECRET

/usr/bin/u1sync --oauth $OAUTH

I also had to remove the (=) equal after the --oauth


500 GB Hard disk showing only 465 GB after installing Ubuntu 13.04 alongside windows 7 and then formatting the whole drive

http://en.wikipedia.org/wiki/Binary_prefix

  The computer industry has historically used the units kilobyte,
  megabyte, and gigabyte, and the corresponding symbols KB, MB, and GB,
  in at least two slightly different measurement systems. In citations
  of main memory (RAM) capacity, gigabyte customarily means
  1073741824bytes. As this is the third power of 1024, and 1024 is a
  power of 2 (210), this usage is therefore referred to as a binary
  prefix.

  In most other contexts, the industry uses the multipliers kilo, mega,
  giga, etc., in a manner consistent with their meaning in the
  International System of Units (SI), namely as powers of 1000. For
  example, a 500gigabyte hard disk holds 500000000000bytes, and a
  100megabit per second Ethernet connection transfers data at
  100000000bit/s. In contrast with the binary prefix usage, this use is
  described as a decimal prefix, as 1000 is a power of 10.

500000000000 B / 1073741824 = 465 GiB


"Failed to start OpenBSD Secure Shell server" error after adding users to PAM section

There are really no "sections" in an sshd_config file.

In the default file, UsePAM happens to be the last line of the file, and so that's why you will typically see Match blocks immediately following it. The rules for Match blocks are described in man sshd_config:

     Match   Introduces a conditional block.  If all of the criteria on the
             Match line are satisfied, the keywords on the following lines
             override those set in the global section of the config file,
             until either another Match line or the end of the file.  If a
             keyword appears in multiple Match blocks that are satisfied, only
             the first instance of the keyword is applied.

As we discovered by running the server in debug mode with sshd -d, you have at least one additional line after UsePAM in your sshd_config file, and by placing your Match block ahead of this line, sshd is trying to apply it inside the block - which is not allowed (refer to the Match section of manual page again to see the subset of allowed keywords):

/etc/ssh/sshd_config line 94: Directive 'PrintMotd' is not allowed within a Match block

The solution should be as simple as moving your Match block to the true end of the file.


How to remap pgup and pgdown to home and end Thinkpad X1 Carbon Ubuntu 13.10 Gnome-shell

for linux mint you can use the last post in this topic.
http://forums.linuxmint.com/viewtopic.php?f=208&t=135999
also seems that using different type of loading (kdm or startx) is loading through different files so you should check if realy xinitrc is loaded at all . If not xinitrc then try .xsession may be. I didn't work for me though

Sorry . This should be rather comment but I don't have rights to do comments.
How it works for me on linux mint 17:

create remapkey (show have right to run 555 for example) file in /usr/lib/bin/
in start up programs I added

  bash /usr/local/bin/remapkey

command to start

in this file I have

  xmodmap $HOME/.Xmodmap


Is there a way to completely remove "recently used" from open and save dialogs?

Thanks to saji89 for linking to the affected files. In case anyone still cares about this (and also for myself, because a recent upgrade allowed it to slip back in), I've created a patch (http://pastebin.com/VE4STB6M) to fix this annoying misfeature. The patched gtk will still show "Recently Used" in dialogs, but it will not be selected in the dialogs by default (it will default to the last directory used or to your home directory). For me, this fixes the problem, because my main gripe was having it pop up in my face, especially when trying to save something.

Step by step instructions:

1) Open a terminal window and enter the following commands:

mkdir recently_used_fix

cd recently_used_fix/

sudo apt-get build-dep gtk+2.0

apt-get source gtk+2.0

wget -O deselect_recently_used.patch http://pastebin.com/download.php?i=VE4STB6M

patch -p0 < deselect_recently_used.patch

cd gtk+2.0-2.24.10/

echo jlj | dpkg-source --commit

sudo dpkg-buildpackage

cd ..

2) Close any package managers (such as Synaptic) and enter the following command in the terminal window:

sudo dpkg -i *.deb

3) If the dpkg -i command gives errors about overwriting a handful of existing files (changelogs and such), use sudo rm FILENAME to delete each file it complained about, then repeat step 2. I noticed --force-overwrite doesn't seem to work for that, for whatever reason.

4) Optional: Once the packages are successfully installed, use Synaptic to pin/hold (Package > Lock Version) each installed package, to avoid having to go through all this again (of course you would also miss any security updates).

5) Close and re-open any affected apps (pluma, gedit, gimp, etc) and enjoy your annoyance-free open/save dialogs!

6) Optional: Enter the following commands in the terminal window to remove the files and directories we created (the fix will remain installed):

cd ..

sudo rm -rf recently_used_fix/

In case the patch cannot be downloaded, here is a backup copy:

--- gtk+2.0-2.24.10/gtk/gtkfilechooserdefault.c 2011-11-08 10:20:20.000000000 -0700
+++ Downloads/gtk/gtk+2.0-2.24.10/gtk/gtkfilechooserdefault.c   2012-07-10 17:20:38.000000000 -0700
@@ -5971,10 +5971,18 @@ gtk_file_chooser_default_map (GtkWidget

   if (impl->operation_mode == OPERATION_MODE_BROWSE)
     {
+      GFile *folder;
+
       switch (impl->reload_state)
         {
         case RELOAD_EMPTY:
-     recent_shortcut_handler (impl);
+          /* The user didn't explicitly give us a folder to display, so we'll
+           * use the saved one from the last invocation of the file chooser
+           */
+          folder = get_file_for_last_folder_opened (impl);
+          gtk_file_chooser_set_current_folder_file (GTK_FILE_CHOOSER (impl), folder, NULL);
+          g_object_unref (folder);
+     /* recent_shortcut_handler (impl); */
           break;

         case RELOAD_HAS_FOLDER:
@@ -6005,8 +6013,8 @@ gtk_file_chooser_default_unmap (GtkWidge

   settings_save (impl);

-  cancel_all_operations (impl);
-  impl->reload_state = RELOAD_EMPTY;
+  /* cancel_all_operations (impl);
+  impl->reload_state = RELOAD_EMPTY; */

   GTK_WIDGET_CLASS (_gtk_file_chooser_default_parent_class)->unmap (widget);
 }


Ubuntu 16.04 doesn't see my external usb audio interface

Had this same issue, try sudo apt-get remove fwupd, see:

https://askubuntu.com/a/766069/538252


How do you get LibreOffice Calc to make sorted tables?

AutoFilter (does the same thing as Insert Table in Excel)

This feature is called AutoFilter in Calc

Select your data range
Click: Data → Filter → AutoFilter

To add a single-click button, just add the Tools Toolbar to your view:

Click: View → Toolbars → Tools

...You will now have an AutoFilter button on your toolbar.


This is a known bug on Ubuntu (and possibly other Linux distributions as well).
Launchpad page: https://bugs.launchpad.net/unity/+bug/1226962

Possible solutions:

Remove the libreoffice-gtk package (works, but at the cost of ugly UI)
See comment #280 in the bug page above: it seems like the root cause is a bug in unity-settings-daemon, and a fixed version is available through a custom PPA


How to get SNES SmartJoy working on 12.04?

Well the Smartjoy adapter is known to work with zsnes so my first bet would be to install zsnes. Open your Software Center and:

Install zsnes and test your Smartjoy with it. The links also provide a bug that happened several years ago, but in the case you get it you can simply remove zsnes and install it again or install the joystick app:

which should help you calibrate the joystick.


Saving Virtualbox state during dist-upgrade?

EDIT: Sorry, I misunderstood the question and thought you were going to upgrade the host
system.

If the update is interrupted in your VM, and it isn't able to resume, you might have to do a

sudo apt-get install -f

to resolve some dependency issues before continuing with

sudo apt-get dist-upgrade

If the dist-upgrade is still in the stage of downloading the new packages, I would simply stop it by issuing CTRL C. The already downloaded packages stay in apts cache and there won't be any unresolved conflicts.

Old answer (thought OP is upgrading the host system):

That won't be a problem - the virtual system is isolated from the host system and has no clue if there was an upgrade.
However, you might have to update the guest additions in your virtual system to ensure nice integration with the host.


What is the best way to preserve user data with a system upgrade? Replacing old computer with new.)

You can also move the actual harddisk to the new system. Only thing you need to worry about is 3rd party drivers (like for the graphics card; if you have a nVidia in 1 and an AMD in the other it will result in problems). Remove those before the move and re-install them on the new system.

The same method is possible by using cat (in the old days that would be dd) and cloning the data. You can clone a disk from sdb to sdc with (again 1st delete the 3rd party drivers to avoid problems) ...

sudo sh -c 'cat /dev/sdb >/dev/sdc'

So put the hard disk from the new system into the old one and copy away. A 128Gb ssd will take about 1/2 hour this way.


Can't change display driver on Ubuntu 20.04

According to your terminal output, Nvidia proprietary driver is installed and in use.

You can remove this driver by running in a terminal:

sudo apt purge 'nvidia.*'

But if you installed Nvidia drivers without using apt, e.g. by running a .run file, this won't work.


How do I split a "/proc/*/environ" file in separate lines?

The entries are separated by the null character, see man 5 proc:

/proc/[pid]/environ
      This file contains the environment for the process.  The entries
      are separated by null bytes ('\0'), and there may be a null byte
      at  the  end.

So a simple way is to apply xargs -0 -L1 on it:

$ xargs -0 -L1 -a /proc/self/environ
LC_CTYPE=UTF-8
USER=muru
LOGNAME=muru
HOME=/home/muru
MAIL=/var/mail/muru
SHELL=/bin/zsh
...

-0 - read null-delimited lines,
-L1 - read one line per execution of command
-a file read lines from file
and if no command is specified, xargs simply prints the line.

Various GNU commands have options to work with null-delimited data: -z for sed, sort, uniq, grep etc, and for filenames, -print0 with find and -Z with grep.

Alternatively, you can use plain old bash:

while IFS= read -d '' -r line
do
    printf "%q\n" "$line"
done < /proc/.../environ

-d '' tells read to read until a null byte, IFS= and -r prevent field-splitting and backslash-escaping, so that the data is read as-is, %q will quote special characters in output.

Since you did use sed, you could have done:

sed -z 's/$/\n/' /proc/.../environ

which just tacks on a newline at the end of each null-delimited line.


The Alienware line comes with high-end Nvidia Graphics.

You need to install Nvidia proprietary drivers in order to have the full functionality and performance.


That's because the file is named libx11-dev

synaptic would be a good thing to have installed & to use for such activities


Can't boot into Ubuntu after installing Windows

How to restore the Ubuntu grub bootloader (9.10 and beyond)

First you need to find out what your drives are called. You can do this by going to a terminal and typing:

sudo fdisk -l

From that you need to find the device name of your Ubuntu drive, something like “/dev/sda5″.
So, still in the terminal, type:

sudo mkdir /media/sda5
sudo mount /dev/sda5 /media/sda5

And then, to reinstall the grub:

sudo grub-install --root-directory=/media/sda5 /dev/sda

Push enter and you’re done! Of course you need to replace “/dev/sda5″ and “/dev/sda” with what you found in the fdisk output.

This is extracted from http://ubuntuforums.org/showthread.php?t=1014708 thread by talsemgeest.


Unable to install Ubuntu as well as Windows 10

I have seen this with many computers, it is not the grub install that actually fails but the update-grub that makes the first config file that fails. the problem is that the if/then statement in 30_uefi-firmware errors.

the easiest fix is after it error, choose the command line prompt at the bottom of the installer menu. and use nano to edit the file /target/etc/grub.d/30_uefi-firmware. I have changed mine to read:

gettext_printf "Adding boot menu entry for EFI firmware configuration\n" >&2
cat << EOF
  menuentry 'uefi-firmware' {
  fwsetup
  }
EOF

after editing rerun install grub. note: on some systems the print command needs to be commented out temporarily for the installer


error: ld-2.27.so in swift on Ubuntu 18.04

This is a known bug:
https://bugs.swift.org/browse/SR-8690

A workaround if you are not doing any debugging in glibc is to remove the debug version:

  sudo apt remove libc6-dbg


How can I access my files through the Internet from a browser?

Apache / Lighttpd

Use a web server like apache or lighttpd, though those are a bit hard to setup if you never did that before.

You can enable directory listings in their configuration, which allows the users to browse and download the files.

Python's SimpleHTTPServer

As I found on Simple Http Server support, Python ships a simple HTTP server - you don't need to install anything.

Just open a terminal, cd to the directory you want to share and run

$ python -m SimpleHTTPServer 8000

Then open your browser and access http://yourip:8000

Droppy

Not to serve files, but to receive them via HTTP: http://stackp.online.fr/?p=28


After having my laptop restored with Windows 10 I used it as is for a couple of days and everything was fine. They checked the hardware and couldn't finde any defects. So after a couple of days I downloaden Ubuntu 18.04 LTS and installed it but the problems persisted ant the system was crashing within a few minutes. After researching a little bit more, I read somewhere i should update BIOS. So restored again to Windows 10 and did all the available updates even the BIOS. This AM I reinstalled Ubuntu 18.04 LTS. I'm using it for a couple hours now and no more crashes! Hopefully this was it!


Does installation cause changes to Windows partition?

On a system with Windows already installed, Ubuntu's installer will  usually shrink down Windows's partition(s) to make room to create its own. This does modify the partition--it physically moves the files in it so that they are not as far apart--but it shouldn't change the contents of any of your files or where they exist in the Windows filesystem (i.e., a particular file may be relocated physically on disk but you should still find it in the same place in Windows that you found it before).

If you're wondering if you ought to make sure your backups of important files on Windows are current before installing Ubuntu, the answer is yes. There's a small chance that dynamically shrinking the Windows partition will cause data loss, and usually a somewhat larger chance of the user making a mistake that could cause data loss. For example, if you accidentally tell Ubuntu to install using the entire disk, then it will overwrite the contents of other OSes, which would result in you losing the files in your Windows system.

Furthermore, you should always maintain current backups of your important files (such as documents); if you don't have such a backup, now's a great time to create one, before installing Ubuntu. If your Windows system is broken and will not boot (sometimes that's what interests people in using Ubuntu), you can use the Ubuntu live CD/DVD, the same one you'd use to install, to access those files. So even if your Windows system is broken, you can back up any important documents in it.


How do I watch movies and shows on my laptop using Ubuntu TV?

If you want to watch tv you'll need a compatible DVB-T tuner for your computer in order to capture video and read the electronic program guide (epg). http://www.mythtv.org/wiki/Video_capture_card

By the way there is a ppa for ubuntu tv here: http://www.webupd8.org/2012/01/how-to-install-ubuntu-tv-from-ppa.html


Managed to resolve my issue by using Compton. All credits go to the owner of this post: http://ubuntuforums.org/showthread.php?t=2144468

Follow the instructions there but make sure you disable the current composite manager first.

You can do this by:

Click on the Xubuntu icon > Click on "All Settings" (bottom right corner)
In the settings menu click on "Window Manager Tweaks"
Click on the tab "Compositor"
Disable "Display Compositing"

After disabling this, follow the instructions in the mentioned link. Hopefully this will help people in the future who experience the same issue.


Installing Ubuntu v12 on computer running Windows ME

Have you made sure that your computer will boot from a CD?

Typically you need to hit F2 or some other F key while the computer is booting to get into the BIOS set-up. Somewhere in there will be a 'boot sequence' configuration. Make sure the CD drive is set to boot before the hard drive, then reboot.


Apache Web Server Configuration to install Owncloud 8.2.2 on Ubuntu 14.04

Old question but answering.

You can use nano or pico from the terminal to make a new file.
For example,

sudo nano owncloud.conf

will open a new blank file with name "owncloud.conf". To save the changes to the file use Ctrl+X then you will be prompted for save changes. Pressing y or n does the job.

Keyboard shortcuts for nano: Keyboard short-cuts

More details about nano :  Manpage for nano

To open an existing file:
nano /path/to/file/filename

About owncloud: It is suggested to upgrade to newer version.


How to permanently disable autosuspend for specific USB port?

The best way to set up sth permanently is to create a systemd service.
In your case I'd write sth like this:
sudo nano /etc/systemd/system/usbsuspend.service(choose anyName.service)
It's content:
[Unit]
Description= Your description here

[Service]
Type=simple
ExecStart= echo>on > /sys/bus/usb/devices/1-2.4/power/control

[Install]
WantedBy=multi-user.target

To enable that service execute:
sudo systemctl enable usbsuspend.service(or your service name)
To start the service right away:
sudo systemctl start usbsuspend.service


boot repair fails to help : The current session is in BIOS-compatibility mode

Try reinstalling GRUB from the LiveCD.
Drop to a terminal window and mount your sda5
mount /dev/sda5 /mnt

Then run the following to do a chroot to reinstall grub on the system:
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
chroot /mnt

Then you should be at a $ prompt and see your Ubuntu installation.  You should now be able to reinstall grub and update grub
sudo grub-install /dev/sda
sudo update-grub

After it is done, then type in exit and then reboot your system.


I found this surprisingly tough. I have a Nexus 5 and KDE (using libmtp, I think) displays it as a Nexus 5. My first instinct was that KDE was simply looking at the hardware database. This maps vendor and product strings from USB devices to known names. Here's the problem:

$ lsusb
Bus 002 Device 011: ID 18d1:4ee1 Google Inc. Nexus 4

My Nexus 5 just got a downgrade! So KDE isn't getting it from there.

We can use udevadm to query devices. In this case we need to pass it a reference to the device. I'm going to use the bus/device numbers from above (they need to be %03d formatted, so 1 becomes 001, 20 becomes 020, etc):

$ udevadm info --name=/dev/bus/usb/002/011
...
E: ID_MODEL=Nexus_5
E: ID_MODEL_ENC=Nexus\x205
E: ID_MODEL_FROM_DATABASE=Nexus 4
...

There's a lot of other crap in there but ID_MODEL seems to be what we want. If you need to further extract and process that, you could run it through awk (or another) to clean it up and replace the underscore:

$ ... | awk -F'=' '/ID_MODEL=/{gsub("_"," ");print $2}'
Nexus 5


password does not work for everything "anymore"!

First, let's try your account from the console.  WRITE DOWN THESE DIRECTIONS BEFORE BEGINNING - you won't be able to read from here once you start.

Press Ctrl-Alt-F1.  This will bring you to a text only console.  Log in with your username and password.  Once you've accomplished that, do sudo -s, and give it your password again.  After doing that, press Press Ctrl-Alt-F7.  This will bring you back to the usual graphical screen you're used to.

Were you able to log in at the shell?  Were you able to successfully sudo to root (did the prompt change to root@yourmachine:~#)?

OK.  You've done this, and you cannot log in at all.  So, you will need to reset the password for your username.  First, try doing CtrlAltT to bring up the Terminal.  Type in passwd and hit enter.  Will it allow you to change your password?  If so, you should be good.  If not, you'll need to boot to single user mode in order to reset your password.

If you could not change your password, let's get into Recovery Mode.  Reboot the system, and at the GNU GRUB menu, press down arrow, and select (recovery mode) as shown here:

Now, drop to root shell prompt:

OK, now you'll need to remount your root filesystem read-write, and then you can change your password:

root@yourmachine:~# mount -o remount,rw /
root@yourmachine:~# passwd yourname
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@yourmachine:~# exit

NOTE: you may be confused about what your actual username is - it's not necessarily the same thing you see at the Ubuntu login prompt!  For example, I see "Jim Salter" when I log into my workstation, but my actual username is something completely different and much shorter.  If your system tells you there is no such user, you can do less /etc/passwd to look for your actual account name - it should be towards the end of the file.  Mine looks something like this:

myrealusername:x:1000:1000:Jim Salter,,,:/home/myrealusername:/bin/bash

Once you've successfully changed the password on your account, exit, "resume normal boot", and log in as normal, with shiny new (working!) password.


How can I extract sentences from any search engine?

Example with INDB, Prisoner.

Command

/tmp$ wget http://www.imdb.com/title/tt1392214/?ref_=hm_cht_t1

This will show some things ...

--14:17:11--  http://www.imdb.com/title/tt1392214/?ref_=hm_cht_t1
           => `index.html?ref_=hm_cht_t1'
Resolving www.imdb.com... 72.21.215.52
Connecting to www.imdb.com|72.21.215.52|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

    [                                        ] 186,103      389.18K/s

14:17:12 (388.45 KB/s) - `index.html?ref_=hm_cht_t1' saved [186103]

Result:

~/tmp$ ls
index.html?ref_=hm_cht_t1

And now you can scan the file...

grep Directed\ by index.html\?ref_\=hm_cht_t1
<meta name="description" content="Directed by Denis Villeneuve.  With Hugh Jackman, Jake Gyllenhaal, Viola Davis, Melissa Leo. When Keller Dover's daughter and her friend go missing, he takes matters into his own hands as the police pursue multiple leads and the pressure mounts. But just how far will this desperate father go to protect his family?" />
<meta property="og:description" content="Directed by Denis Villeneuve.  With Hugh Jackman, Jake Gyllenhaal, Viola Davis, Melissa Leo. When Keller Dover's daughter and her friend go missing, he takes matters into his own hands as the police pursue multiple leads and the pressure mounts. But just how far will this desperate father go to protect his family?" />

Above example is the core for how you can do it more elaborate: have a user type in something (s)he wants to search, wget google with that word. Scan those results for URLs, wget those URLs, extract content from those results and present those to that user.


UPNP / DLNA (client) player recommendations?

Recently VLC Version 2.0 was released. This Release features a fully functional UPNP / DLNA Player that works without bugs. I'm using it on Ubuntu and Archlinux and it works just fine with my minidlna player.

To use VLC start the Playlist (View -> Playlist; Ctrl + L) and then select Local Network -> Universal Plug 'n' Play. However, be advised that VLCs implementation first downloads all the library information before you can select anything. Depending on the size of the library that actually might take several minutes and longer.


How to delete and create a new firefox profile from tty1?

To delete all Firefox settings type:

mv ~/.mozilla ~/.mozilla.backup

in a terminal. On next startup Firefox will create a new ~/.mozilla directory for a new session with default settings.

To restore your settings type:

mv ~/.mozilla ~/.mozilla.newbackup
mv ~/.mozilla.backup ~/.mozilla

This way you can create a variety of settings to restore when needed.


How to activate Bluetooth on HP 15 notebook, using Ubuntu 14.04.1 LTS

If you don't have a hardware switch to turn it on, I feel that the only solution is via Windows because sometimes hardware deactivated in Windows does not appear on other OS.

In my case I had to install Windows 7 on new created partition (10 GB), install all neccesery drivers for Bluetooth and turn it on there. Then reboot to Ubuntu to check if the Bluetooth Adapter is found. Also check for BIOS settings, maybe the Bluetooth is turned off from Bios?

BEWARE: Check the solutions for Windows/Ubuntu dual boot before proceeding! It is not as simple as it looks like, better have your Ubuntu CD prepared!


You can use the alias or type commands to check what a specific alias means:

$ alias ll
alias ll='ls -alF'

$ type ll
ll is aliased to `ls -alF'

Note however that aliases might use other aliases, so you might have to check it recursively, e.g. in the case of ll, you should also check the ls command it calls:

$ alias ls
alias ls='ls --color=auto'

$ type ls
ls is aliased to `ls --color=auto'

So ll actually means:

ls --color=auto -alF


Convert MBR partition to GPT without data loss

The conversion from MBR to GPT pertains to a disk, not a partition:
"Master Boot Record (MBR) disks use the standard BIOS partition table. GUID Partition Table (GPT) disks use Unified Extensible Firmware Interface (UEFI). One advantage of GPT disks is that you can have more than four partitions on each disk. GPT is also required for disks larger than two terabytes (TB)."
(Microsoft - Convert an MBR disk into a GPT disk)
Is it possible to perform the conversion and keep my data?
Yes.
Follow this guide (no need to reproduce it here, since it is a SE site).
A summary is listed here.

sudo gdisk /dev/sda.
Command (? for help): n to create a new "BIOS boot" (code ef02) partition.
Command (? for help): w to write the partition table.
partprobe /dev/sda to reload the partition table.

To add UEFI booting:

grub-install /dev/sda to re-install the GRUB boot loader using the new partition scheme.
sudo gdisk /dev/sda and then n to create an "EFI System" partition (ESP).
c to set the label of the new partition to something without white spaces.
Command (? for help): w to write the partition table.
partprobe /dev/sda to reload the partition table.
mkfs -t vfat -v /dev/disk/by-partlabel/EFI-system (e.g.) to build the filesystem for the ESP.
mkdir /boot/efi to create a mount point for the ESP.
Add /dev/disk/by-partlabel/EFI-system /boot/efi vfat defaults 0 2 (or whatever matches items 11 and 12 above) to /etc/fstab, so it is automatically mounted.
mount /boot/efi to mount the ESP.
grub-install --target=x86_64-efi /dev/sda to install the GRUB EFI bootloader.
Reboot.
Change BIOS boot -> UEFI boot in the BIOS.
Use the one-time boot menu to force boot the disk. You may have to navigate to the disk: EFI -> ubuntu -> grubx64.efi.
grub-install to re-install GRUB's EFI bootloader to update the UEFI boot selector.

Notes:

I can't miss this point (even if mentioned across the board): make a backup of your data.
Your /dev/sda1 starts at sector 2048 so you are good to go.
You might need to make some room for the EFI System partition.
This (noted in a comment) lists more disperse instructions across answers. And less detail.


Ubuntu doesn't recognize me having more than 1 OS

Proceed cautiously!  You can safely choose "Something else" and you will be shown how your hard drive is arranged and from there it might be easier to make a decision.

If, for example, have only one partition and it is entirely taken up by Windows, you'll need to do a bit of rearranging, such as shrinking the Windows partition and leaving some unallocated space for use by Ubuntu.  If this is the case, I'd suggest shrinking the Windows partition from within Windows itself and just leaving the freed-up space as unallocated.  Then, when you boot again from CD, DVD, or USB to install Ubuntu, it'll show you another option, i.e. to install Ubuntu next to Windows.

How big you make your partitions (Windows & Ubuntu) will depend upon the size of your hard drive and upon how you plan to use things, but I'd recommend giving Ubuntu at least 50 or 60 GB to get started.


How to WRITE to ext4 partitions on windows?

You can use Ext2fsd. It is kind of driver that you install in Windows:
https://sourceforge.net/p/ext2fsd/code/ci/master/tree/


Problem in permission to execure python code for Hadoop

First have to set home path by typing following command in terminal,

export PATH=$PATH:/home/hadoopuser/

And then given permission using,

chmod 755 /home/hadoopuser/mapper.py
chmod 755 /home/hadoopuser/reducer.py

And got result as,

echo "arul sijo sijo tijo tijo tijo sijo arul tijo" | /home/hadoopuser/mapper.py | sort -k1,1 | /home/hadoopuser/reducer.py
arul    2
sijo    3
tijo    4


md, mix disks and partitions in an array

Problem solved.
mdadm have no problem mixing entire disks and partitions given that the partition type is set to 0xFD. Using parted, this in non-intuitive since you need to create an ext2 partition and then use set 1 raid on, which will change the partition type.


dmesg is not a reliable test of how long a boot-up process goes or where there are bottle-necks. According to Wikipedia page:

  When initially booted, a computer system loads its kernel into memory.
  At this stage device drivers present in the kernel are set up to drive
  relevant hardware. Such drivers, as well as other elements within the
  kernel, may produce output ("messages") reporting both the presence of
  modules and the values of any parameters adopted

In other words, dmesg itself  merely collects information, it's the drivers and other system processes that output those messages, and they can output them at any point in time. Between those messages there may or may not have been other processes spawning, so it is not an indicator of how long system boots.

dmesg also collects messages continuously from the ring buffer, so your 2466s delay does not indicate some hanging process, merely an event occurred 2466s later and whatever process was active at that time just output a kernel message.

What you do want, however , is bootchart , which is used specifically for the purpose of finding bottle-necks in the boot process. I've only seen it being referenced across multiple forums and on this site, but never used myself, so cannot give you more information than that


The problem is /etc/update-motd.d/91-release-upgrade

Which calls /usr/lib/ubuntu-release-upgrader/release-upgrade-motd

This file then checks /var/lib/ubuntu-release-upgrader/release-upgrade-available

If it exists it displays the motd, if not it will call /usr/lib/ubuntu-release-upgrader/check-new-release.

check-new-release gives the right result, but the file was not removed for some reason.

If you remove the file it will no longer display the motd and check for updates.

sudo rm /var/lib/ubuntu-release-upgrader/release-upgrade-available


In recovery mode try making the root directory writable:

sudo mount -o remount,rw /


Single boot Ubuntu - need help with partitioning hard disk

If you want to use only Ubuntu and no Windows then you can let the partitioner do its job.

If you really want to partition manually then this is the generally accepted norm

Set an equal amount of space for your swap partition as your ram. Set the mount point as swap
set around 1GB for the /boot partition. Mount point is /boot
set the rest for /

This config works for most cases.


I know a lot of people that make an alias for sudo apt-get install. Something like alias agi='sudo apt-get install' in their .bashrc file.


Connection refused, port 2222, mac to ubuntu (remote)

@raj pointed me in the right direction. My router doesn't have an ipv4 address, just ipv6. Therefor port forwarding is not possible. In the end I had to use the ipv6 address.


Finally I have found my solution. This involves the following steps:

1) Uninstall chrome completely using the following commands:

$ sudo apt-get purge google-chrome-stable
$ rm ~/.config/google chrome/ -rf

I have followed Oxley's answer for the asked question.

Next install google chrome stable afresh using the following commands and for this I have followed ElefantPhace's answer to this question with some modifications.

$ cd /tmp
$ wget -e use_proxy=yes -e http_proxy=http://username:password@proxy:port http://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
$ sudo dpkg -i google-chrome-stable_current_amd64.deb

And now, I am able to sync my bookmarks again. Hope this answer helps someone else who is facing similar issues.


Image Viewer - Automatically fill window with image

You could always use feh instead.  feh -ZXrF ./ results in a full screen image of all subfolders recursively and you can navigate with the arrow keys.  Change to feh -ZXrFD 5 ./ to auto-advance after 5 seconds.


postgresql has different version in ubuntu minimal (server)

I discover that the problem is at the locale settings, and simply fixed by command

sudo locale-gen en_US.UTF-8

export LC_CALL=en_US.UTF-8

export LC_ALL=en_US.UTF-8

export LANGUAGE=en_US.UTF-8

export LANG=en_US.UTF-8


Hotspot does not allow android to obtain an ip address

When your Android Device doesn't get an IP it may not be served by one. Please make shure that there is a DHCP Server Process/Deamon running on your PC. Also you should have a look for a DNS Server Process/Deamon.


Uninstall Ubuntu from Lenovo IdeaPad Y510p

Create a bootable CD/DVD or pendrive with Windows 8.1 on it.
Boot the CD/DVD/Pendrive and click on install and chose advance install option.
Delete the partition containing Ubuntu
Boot the CD/DVD/Pendrive again and click on repair your Computer.
Go to the command prompt and type this : bootrec.exe/fixmbr
Shutdown your Computer and remove the installation media and boot again.

I hope this will do.


This might be a problem of broken grub. Grub is basically a boot loader. In other words it is the screen that comes up with options to start Windows or Ubuntu.  I had a very similar problem. In my case I had dual booted Mint and Ubuntu. To fix the grub, check this.


If there is no MEEP version in the official repository then you can consider installing it from source as given:

To prevent the case if anything goes wrong, we have to replace
make  install with checkinstall:

sudo apt-get update && sudo apt-get install checkinstall

Dependencies: In a window of the terminal we execute:

sudo apt-get install libtool* mpich-dev* lapack* guile-2.0 guile-2.0-dev readline-dev fftw3-* paraview hdf5-* gcc-c++ scalapack-* paraview*

Variable Environments: In a window of the terminal we execute:

gedit .bashrc

You can use other text editors if you like. Move to the last line and finish here:

LDFLAGS="-L/usr/local/lib -lm" export LDFLAGS
CPPFLAGS="-I/usr/local/include" export CPPFLAGS
LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH
PATH=/lib64/mpich/bin:$PATH export PATH

Make directory t and enter there:

mkdir t
cd t

Load, Compile and Set FFTW Library with Support of MPI.
This library was already set at a stage 1, but the hdf5 library for some reason works not correctly. Therefore it is necessary to compile and set it from source codes:

For this purpose, in a window of the terminal we execute:

wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.14.tar.gz
tar -xf hdf5-1.8.14.tar.gz
cd hdf5-1.8.14
CC=mpicc CXX=mpicxx F77=mpif77 ./configure –-enable-parallel –prefix=/usr/local
make -j4
sudo checkinstall
cd ..

Libctl library: In the same place we execute:

wget http://ab-initio.mit.edu/libctl/libctl-3.2.2.tar.gz
tar -xf libctl-3.2.2.tar.gz
cd libctl-3.2.2
CC=/lib64/mpich/bin/mpicc CXX=/lib64/mpich/bin/mpicxx F77=/lib64/mpich/bin/mpif77 ./configure
make -j4
sudo checkinstall
cd ..

MPB: We compile and set without support of MPI and OpenMP:

wget http://ab-initio.mit.edu/mpb/mpb-1.5.tar.gz
tar -xf mpb-1.5.tar.gz
cd mpb-1.5/
CC=/lib64/mpich/bin/mpicc CXX=/lib64/mpich/bin/mpicxx F77=/lib64/mpich/bin/mpif77 ./configure
make -j4
sudo checkinstall
make distclean

With support of MPI and OpenMP:

CC=/lib64/mpich/bin/mpicc CXX=/lib64/mpich/bin/mpicxx F77=/lib64/mpich/bin/mpif77 ./configure --with-mpi --with-openmp
make -j4
sudo checkinstall
cd ..

Harminv. Execute:

wget http://ab-initio.mit.edu/harminv/harminv-1.4.tar.gz
tar -xf harminv-1.4.tar.gz
cd harminv-1.4/
CC=/lib64/mpich/bin/mpicc CXX=/lib64/mpich/bin/mpicxx F77=/lib64/mpich/bin/mpif77 ./configure
make
sudo checkinstall
cd ..

MEEP. Without support of MPI and OpenMP:

wget http://ab-initio.mit.edu/meep/meep-1.3.tar.gz
tar -xf meep-1.3.tar.gz
cd meep-1.3/
CC=/lib64/mpich/bin/mpicc CXX=/lib64/mpich/bin/mpicxx F77=/lib64/mpich/bin/mpif77 ./configure
make -j4
sudo checkinstall
make distclean

With support of MPI and OpenMP:

CC=/lib64/mpich/bin/mpicc CXX=/lib64/mpich/bin/mpicxx F77=/lib64/mpich/bin/mpif77 ./configure --with-mpi
make -j4
sudo checkinstall

h5utils. The MPB and MEEP programs save results of calculations in files with expansion .h5.
Note: This packet (h5utils) comprises a set of programs for work with h5-files, such as h5topng (for conversion of h5-files to the graphic png format), h5tovtk (conversion to the vtk format convenient for display by means of the Paraview program) and h5totxt (conversion to a text format). If not to set and to use these programs, then many results of calculation will be simply unavailable to viewing.

wget http://ab-initio.mit.edu/h5utils/h5utils-1.12.1.tar.gz
tar -xf http://ab-initio.mit.edu/h5utils/h5utils-1.12.1.tar.gz
cd h5utils-1.12.1
CC=/lib64/mpich/bin/mpicc CXX=/lib64/mpich/bin/mpicxx F77=/lib64/mpich/bin/mpif77 ./configure
make -j4
sudo checkinstall
cd ..

If it happened so that command execution "make - j4" was interrupted with an error of" [writepng.o] of Error 1", then instead of the last three commands we execute:

make h5totxt
make h5tovtk
sudo mv h5tovtk /usr/local/bin/
sudo mv h5totxt /usr/local/bin/
cd ..

For more information, see this.

Source


Libre Office crash on openning documents

I highly suggest installing the latest LibreOffice from a snap - a snap essentially containerises the install and makes it not require any system libraries as it bundles everything you need automatically which gives it a higher chance of working properly.

Since you are on Ubuntu 18.04, it automatically comes with the snaps daemon which means you can install a LibreOffice snap by opening up the terminal and entering the following command (the classic flag means it will have full access to your files meaning you can store and open documents anywhere on your storage):

sudo snap install libreoffice --classic

You can then run it from the terminal with the following command to ensure you are launching the snap version of LibreOffice (you would use .writer for writer, .draw for draw, etc):

/snap/bin/libreoffice.writer

If this solves the crashing, then you can consider removing older versions of LibreOffice with the following command (although this is optional, you should be able to choose which version of LibreOffice is the default):

sudo apt-get purge libreoffice*

If you are still receiving crashing, is it possible the documents got corrupted? If they are crashing on a different PC, it is likely they are corrupted. If so, do you have a backup to restore them from?


How to access the router UI when it's IP address says "the webpage is not available"? Its not just plug and play as in windows?

Open the system settings (search in dash) and then network. On the right you'll find a row that says Default route. Try using that ip and if it doesn't work add ":8080" to the ip (without the quotes)


Intermittent copy and paste in Unity, but works fine in i3wm

As suggested by Jos in the comments, uninstalling the Pushbullet indicator solved the issue. I'm now using the Firefox/Chrome pushbullet extension instead (with universal copy & paste disabled) and everything is now working fine.

Thanks!


Multi_key as Hangul/English toogle hotkey doesn't work in 17.10

The behavior you describe indicates that your Right Alt key has been defined as the compose key. You need to pick some other key as the compose key (or simply disable the compose key mechanism, if you don't need it) to use Right Alt as a Hangul toggle.


Which version is recommended for my system?

Use 32Bit of recent Lubuntu or maybe Xubuntu (consume a little more ressources).

Your system does not support 64Bit.


Good news, HON now has a native linux client.
download


I found the problem. Something that has to do with ESC probably. I'm not sure but it is possible that can't be used in a shortcut. Or there is a problem with this specific combo, though I couldn't find any other shortcut that uses it which would be a problem.

I changed it to SHIFT+CTRL+HOME and it now works!


You don't have a closing quote in

echo  RHYS'  RASPBERRY PI

If you really need that quote in echo do it this way:

echo  "RHYS'  RASPBERRY PI"


The error is occuring because the mentioned PPA may not be available now. So, you need to remove it from the sources.list so that apt will ignore it.

From a terminal open the file (using sudo) /etc/apt/sources.list and find the line containing the mentioned PPA. Just put a # in front of the line to comment out the line and the save the file.

Now run sudo apt-get update and everything will be Ok.


Ubuntu Gnome 16.04 LTS

In terminal, hit Windows (super) key + F10 to open Application menu:
1

Click Preferences, and untick "Enable the menu accelerator key (F10 by default)"
2


Access denied when using mysqli with php

My problem was that PHP didn't have the privileges to connect to user root, so I had to create a new user...
Fix: “Connect failed: Access denied for user 'root'@'localhost' (using password: YES)” from php function


How do I increase the size of my root filesystem, not partition?

Turns out this was because of my ecryptfs filesystem.

I first had to remove it, following this post: How can I completely remove ecryptfs from my system and delete .Private?

I saw some comments about messed up logins afterwards so I recreated my home directory just in case before restarting.

I then resized the logical partition with lvextend -l +100%FREE /dev/ubuntu-vg/root this resizes it to use the remainder of the free space.


Why must partition be unmounted before dd?

If you write data to the 'raw' block device while a filesystem on this device is still mounted then the kernel will have problems when updating the trashed file system.  For example, the kernel will periodically flush dirty data back to the mounted device, or may do file lookups.  If the underlying block device has been fundamentally changed then the kernel will find issues this can lead too kernel OOPs messages or even halt on BUG_ON() checks.  So always unmount the filesystem before changing the underlying data on the block device.


Is there a way to update all Java related alternatives?

The trick is to use update-java-alternatives (from the java-common package).

So to go for OpenJDK 6 to 7, I used update-java-alternatives -l to get a list of Java alternatives and then used sudo update-java-alternatives -s java-1.7.0-openjdk-amd64 to the JDK.

NOTE: The command above threw the following errors,

update-alternatives: error: no alternatives for mozilla-javaplugin.so.
update-java-alternatives: plugin alternative does not exist: /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/IcedTeaPlugin.so

This is because the openjdk plugin is not installed by default. To fix run

sudo apt-get install icedtea-7-plugin

and rerun update-java-alternatives.


Tweaking Apache configuration will solve this issue

sudo ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf
sudo /etc/init.d/apache2 force-reload

Found this fix from here


OP provided an answer by himself:

  Someone pointed me at the solution: I ran sudo apt-get install --reinstall emacs23-bin-common and now emacsclient works like a charm.


Execute action upon window resize with devilspie2

An alternative
Given that your example to to undecorate the window when maximized but redecorate when it is not maximized, in this answer I've taken the liberty to promote "maximus"
Tested on xubuntu 14.04, by installing maximum via:
sudo apt-get install maximus

All subsequent windows that you open are automatically undecorated, but after unmaximizing, they are redecorated.
During my testing, this constant automatic maximizing was annoying.  Thus to fix the automatic maximization issue use this option:
gconftool -s /apps/maximus/no_maximize true -t bool

Lets show this in action when using both maximus and the gconftool tweak:

I like keyboard shortcuts - so a quick tip - to toggle between maximized windows and not maximised, remember the shortcut Alt+F10


How to properly backport dependencies when backporting a package to PPA?

Yes; the backported-to version has to be lower than the backported-from version in order for upgrades to work properly.  The standard solution is to add a trailing ~ to the dependency, so that it's something like Y (>= a.b~) rather than Y (>= a.b).  You'll find that in quite a few packages in Debian and Ubuntu that have found that they care about supporting backports.


If your screen freezes completely you can do crtl + alt + f2 to get a terminal.
From there you can use top which will display running proccesses. Press k and then enter the PID of the process you want to kill.
Or you can use ps aux | grep proccesYouWantToKill to get the PID and then kill -9 PID to terminate the process.
crtl + alt + f1 - f6 are comand line only crtl + alt + f7 will bring you back to your desktop.


Alternative for psiphon for Ubuntu 14.04

There's no need of an alternative if you have an Android device with you. The idea is to forward the traffic from your Linux machine to the Android device running Psiphon. Follow these steps:

Install Psiphon on your Android device. Once installed, always make sure the "Tunnel Whole Device" option is checked. Tap connect and verify Internet connectivity (Redundant but necessary).
Install SSHdroid on your Android device. By far the best SSH server app I've ever come across. Start the SSH server. If necessary, change the SSH port from 22 (default) to some other number, say 5555.
Now, we somehow need to forward the traffic on your Linux machine to the Android device which is running Psiphon. By doing so, we are effectively connecting your Linux machine to the Internet through Psiphon via your Android device. To do so, make sure your Linux machine and the Android device are in the same LAN and then, fire up the terminal on your Linux machine and type ssh -D 8000 -fCqN username@address -p 5555. The details of this command are beautifully explained in this article which I highly recommend you to read. In brief, this command creates a local SOCKS proxy server at 127.0.0.1:8000 which maintains a SSH tunnel that connects your Linux machine and the Android device. Use 'username@address' given by SSHdroid. The default password is admin. We now need to forward the traffic to this server using sytem-wide proxy and the rest will be taken care of by this server.
If on Ubuntu, go to System settings > Network > Network Proxy. Select Method: Manual. Put 127.0.0.1 in the Socks host field and change the port to 8000 (as used in the command). At this step, by forcing system-wide proxy, we are forwarding our traffic to 127.0.0.1:8000 where our local SOCKS proxy server is running which then forwards the traffic to the Android device through the SSH tunnel, which ultimately means your Linux machine is effectively using Psiphon.

If this works for you, you can probably write a script and automate the entire process. Other direct alternatives to Psiphon are highly limited in either bandwidth or data or both, but so is Psiphon as of today. To get around this, use Psiphon client version 103 for literally unlimited access.


Where are original Ubuntu GTK CSS settings files?

The /usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css file is from the light-themes package. You can download the .deb package by running

apt download light-themes

Then you'll be able to extract the package and find the desired file inside the archive with 'data' in its name.


Try using apt-cache to see what you have available already.

~$ apt-cache madison thunderbird
thunderbird | 1:68.4.1+build1-0ubuntu0.18.04.1 | http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
thunderbird | 1:68.4.1+build1-0ubuntu0.18.04.1 | http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
thunderbird | 1:52.7.0+build1-0ubuntu1 | http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
thunderbird | 1:52.7.0+build1-0ubuntu1 | http://us.archive.ubuntu.com/ubuntu bionic/main Sources

Then you can install an older version using = (I used -s so it wouldn't actually make changes to my system, but you would leave that out)

~$ sudo apt install thunderbird=1:52.7.0+build1-0ubuntu1  -s
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libdbusmenu-gtk4
Suggested packages:
  thunderbird-gnome-support ttf-lyx
The following packages will be REMOVED:
  thunderbird-gnome-support thunderbird-locale-en thunderbird-locale-en-us
The following NEW packages will be installed:
  libdbusmenu-gtk4
The following packages will be DOWNGRADED:
  thunderbird
0 upgraded, 1 newly installed, 1 downgraded, 3 to remove and 0 not upgraded.
Remv thunderbird-gnome-support [1:68.4.1+build1-0ubuntu0.18.04.1]
Remv thunderbird-locale-en-us [1:68.4.1+build1-0ubuntu0.18.04.1]
Remv thunderbird-locale-en [1:68.4.1+build1-0ubuntu0.18.04.1]
Inst libdbusmenu-gtk4 (16.04.1+18.04.20171206-0ubuntu2 Ubuntu:18.04/bionic-updates [amd64])
Inst thunderbird [1:68.4.1+build1-0ubuntu0.18.04.1] (1:52.7.0+build1-0ubuntu1 Ubuntu:18.04/bionic [amd64])
Conf libdbusmenu-gtk4 (16.04.1+18.04.20171206-0ubuntu2 Ubuntu:18.04/bionic-updates [amd64])
Conf thunderbird (1:52.7.0+build1-0ubuntu1 Ubuntu:18.04/bionic [amd64])


I'm honestly not sure what you're asking, you seem to ask multiple questions.

What I get is, is that you're asking wether someone with physical access to your PC, can access your encrypted data? If a person has physical access, and your PC is running, they can at the very least access the decrypted data from memory.

If the PC is turned off, they will need your passphrase to access the data, this can of course be bruteforced etc.
I don't see how changing your password in the shadow file and logging in would reveal the passphrase. According to Will changing password re-encrypt my home directory? your passphrase is encrypted with your password, so changing your password in the shadow file won't change the encryption of your passphrase.


could not copy 'formula' from input line in libreoffice?

Ctrl+C can do the job.
this short cut is supported by the clipboard manager in gnome-settings-daemon.


How do I get an Atheros AR9285 wireless card working?

This looks remarkably similar to the linked question below.

In your last trace - acer_wmi wireless kernel module is soft-blocked - this is causing the "DISABLED" message in the first trace.

Try blacklisting the acer_wmi kernel module as per the linked question and accepted answer.

Linked Question:

Wubi install cannot see/connect to any wifi?


According to : http://crashcourse.ca/content/android-emulator-ubuntu-1004-60-seconds

You'll have to install a JDK : $ sudo apt-get install openjdk-6-jdk
Then go to the download page of Android SDK to download it.
http://developer.android.com/sdk/index.html
After, update the SDK :  $ android update sdk --no-ui
Check if the output of $ android list returns you the list of available SDK.
Type $ android pick "new". Set things as you want.
Once done, check the output of : $ android list avds pic the "name" entry.
To finish : launch the emulator : $ emulator @avdsname.

And then you're good to go.


Cannot receive mail on Ubuntu Server 18.04

Amazing, but it turns out I just had to reboot the system. I uninstalled sendmail but it was still running in RAM, interfering with postfix (which I had installed using this tutorial). After reboot postfix started receiving all emails normally.


How to stop acpid restarting /etc/acpi/lid.sh restart unnecessarily?

Is this the same issue as this bug

If so there is a description of the cause here and the solution is here

Like the man says

  [this] involves recompiling the
  kernel. Don't do this unless you're
  familiar with the process. Back up
  your machine beforehand. Follow this
  guide at your own risk. Etc, etc


There will not be an official backport, but you can build unity from source.

Here is a good link with some more information.


Secondary Samba account cannot login to any shares

/media/adam was set up by the system in such a way ( an access control list ) that allows only adam passage to what is past it - in this case /4TB External Drive/Share2.

Regardless of the permissions on Share2 sam is not adam so access is denied.

There are a couple of ways around this problem. One way is to make sam look like adam by adding a line to /etc/samba/smb.conf:

force user = adam

Where you put that line depends on how you set up your shares. If the share is defined in smb.conf then add it to the share definition. If you created the share from Nautilus just place the line under the workgroup = WORKGROUP line in smb.conf.

Either way after changing and saving the file restart smbd:

sudo service smbd restart


Does dconf use DesktopCouch as database backend?

No. As the GNOME Live wiki says, dconf is a low-level configuration system. Its main purpose is to provide a backend to GSettings on platforms that don't already have configuration storage systems.

https://live.gnome.org/dconf

I believe the name "dconf" comes from its connection to d-bus.


How do I get drivers working for an Nvidia GT560i on 12.04?

There is an issue with ubuntu 12.04 where some nVidia cards do not work with the nVidia drivers that are in the standard repository. As well, these cards will not boot the gui property.

I don't know if the same problem exists on Xubuntu, since I don't use it, but on the offchance that this is what is affecting you, then the information contained here https://wiki.ubuntu.com/fballem/Software%2012.04 may prove helpful.

I hope that this helps,


Keyboard layout on laptop is messed up after full system update

Well, it sounds like your keyboard has an integrated numpad or something. You can try to disable it by opening a "on-screen-keyboard" via the terminal and disable numlock from there.

Open the terminal: ctrl+alt+t and run onboard. When the keyboard appears on the screen, head over to the 123-button and disable the Nm Lk button.

Hopefully your keyboard is working properly now!

Cheers.


VMware player 4.04 installing on ubuntu 12.04

Open a terminal, navigate to directory where the patch is downloaded & unzipped.

Execute following

sed -i -e 's/8.0.2/8.0.4/g' patch-modules_3.2.0.sh. Re run the patch.

If you get a patch: command not found error, please install patch using

sudo apt-get install patch and rerun the patch script.

let us know how it went.

Related Question:

Unable To Install VMware WorkStation 8 on ubuntu 12.04

Is VMware 8 compatible with Ubuntu 12.04?


Ok I figured it out... I had to use UseSTARTTLS=YES instead of UseTLS=YES. Also I had to enter root:me@server.com:mail.server.com:25in /etc/ssmtp/revaliases. Hope this helps others as well.

If you want to use other user accounts than root, you will have to add those to /etc/ssmtp/revaliases as well and add them to the 'mail' group.


Cannot join LivePatch Service due to "snap not found" error

The canonical-livepatch service and snap are currently only available in 64bit, which is why snapd can't find a i386 snap.

You can see the supported architectures for a snap on its snap store page https://uappexplorer.com/app/canonical-livepatch.canonical


How can I configure a Canon PIXMA MP780 printer?

I got the printer model wrong (now corrected to PIXMA MP780) and thanks to itnet7 I found the correct repos(itory).

The steps I used to get this printer installed are these:

as from itnet7 open a terminal and enter...

sudo add-apt-repository ppa:michael-gruz/canon

then...

sudo apt-get update

But for the MP780 which is not in michael-gruz repos, but the iP4100 is and from this ancient website

http://mambo.kuhp.kyoto-u.ac.jp/~takushi/

I learn that the iP4100 drivers work for the MP780, so...

sudo apt-get install cnijfilter-pixusip4100series

and then to get Ubuntu to recognize and configure the MP780, open a browser and use this URL...

http://127.0.0.1:631/

which should open CUPS 1.5.0 administration, click on Adding Printers and Classes then the Add Printer button...

Here you should see all local printers if they are connected and turned on.

Select the MP780 and "continue"...

Then fill in or change the printer information, &c, "Continue"...

Then select Canon PIXMA MP780 - CUPS+Gutenprint v5.2.7(en) for the model, and finally press the "Add Printer" button....

Then You can set the default options and finally hit the button...

Ubuntu should pop up a message about the new printer and it should be shown in System Settings / Printers.

Good Luck!


Is it better to boot ubuntu in UEFI or in non-UEFI?

The Unified Extensible Firmware Interface is a specification that defines a software interface between an operating system and platform firmware, meaning that it will not be bad to have, and I see no benefit of removing it. Keep it


Where is the github for ubuntu 18.04 (gnome) system monitor tool?

Pulled the trigger too soon. I just found it myself. It's here if anyone else might need this in the future.


How to get the GNOME 3 login manager installed?

Tista and three other dev's have done just this (see link below).

Tista has created a testing PPA to install GDM 3.2 - this is the version of the login manager which you can theme via CSS.

Warning - this is a testing PPA

At the time of writing this, there are only packages for Precise (12.04)

I originally tested this on a 11.10 virtual machine when a package existed - hence the screenshot:

I've since retested this on 12.04 - Important - see the notes below

sudo add-apt-repository ppa:tista/gdm-testing
sudo apt-get update
sudo apt-get install gdm  libgdmgreeter1 libgdmsimplegreeter1 gir1.2-gdmgreeter-1.0

source

During the installation of GDM you will be asked which display-manager you want to run.  Choose GDM and press ENTER

Reboot

changing the background

To change the background, use the AU linked question below to change the background.

The Gnome-shell stripes background can be found on GitHub.

Issues

Whilst there is a package for Precise (12.04), I personally haven't managed to get this to work correctly (left me at a blank screen with no login manager).  Thus - it may or may not work for you - obviously it must work for the PPA developer!  If you are left with a blank screen, use CTRL+ALT+F2 to log into a TTY and use this Q&A to switch back to lightDM
Since this is GDM - it does not appear to work with Unity.  It does work with Gnome-Shell. For Unity, a blank background is seen.  You have to use CTRL+ALT+T to launch a terminal and then type unity --reset to get the unity desktop to display.  I'm open to suggestions why this happens and if there is a workaround...
If you logout and attempt to login again - Gnome-Shell very occasionally not start and you will be left with an empty desktop.

Links:

Discussion of implementation of GDM 3.2
How to set gtk-style and background in GDM3


You need to setup a macvtap from your host to allow your VM's guest to have an internet connection which in your case you have your NAT configuration for hosts to guest connection only.

Also, I advised you to have virt-manager installed to know the basic concept and setups of KVM graphically then you can do it to CLI the next time.

For your reference,I have a connection from host to guest connection this configuration is NAT with virtio.

Now for your guest VM to have a connection set up the macvtap, but first you have to create a separate bridge connection here and then the macvtap.

By the time you set it up you should have this network configuration.

Another one would be the guest xml file which was located in /etc/libvirt/qemu/guest.xml - But do not edit that it only serves as reference

I am not adept on the CLI part but here is the thing I've done to make this case work.

Hope this helps.


How to improve the speed on wifi using ubuntu 12.10 and 13.04?

Please do:

echo "options iwlwifi 11n_disable=1" | sudo tee /etc/modprobe.d/iwlwifi.conf
sudo modprobe -rfv iwldvm
sudo modprobe -rfv iwlwifi
sudo modprobe -v iwlwifi

Then I recommend changing the channel in the router to 1 or 11.

Also please set your wireless settings in network manager to match the images below

.


How to use pipes to reference stdout of a command from within the stdin of another?

Not all commands/programs will directly accept piped input (including rm). Additionally, why are you using the bash substitution variable $1 outside of a script?

For your general case, you need to look at xargs, a utility whose goal is to simplify such scenarios by taking a list from stdin and then invoking a command with the elements of that list (in different possible ways).

For what you want to do...(use it wisely!): rm -rf * (or .) will suffice.


Will a 14.04 Ubuntu OS work with a 3.10.3 Kernel?

The filesystem will contain libraries and configs required to make a device work. In an embedded system this is often very tightly bound because of limited resources and performance requirements. This means they typically have limited tools and expect very specific device and storage layouts with no autodetection.

Sometimes the embedded system will contain non-free drivers and code that are only built for a specific kernels as they are distributed binary only or otherwise restrictively licenced.

Part of my work involves testing embedded linux devices and i've not found one yet that would handle switching kernels without access to the development environment that made it and some serious head scratching.

This is of course a major problem for security and a lot of manufacturers duck their responsibility to keep updating, for that reason try to find devices with open development toolchains and you will find this is done for you.


eGPU Nvidia - fallen off the bus and is not responding to commands

I had another crack at this today and went to BIOS Setup > Config > Thunderbolt 3 > Support in Pre Boot Environment = Enabled.
Seems like the problem is solved!


What's the nicest way to make an Ubuntu server automatically configure all network devices on boot

I'm not comfortable saying that running a script on boot is the best way to resolve this, BUT if that's what you're thinking about then you'd want to place it in /etc/rc.local. I've had issues with networks failing to configure before and you can place those networking commands in /etc/rc.local to run on boot and configure it for you.


Use this command

sudo apt-get remove —purge name
sudo apt-get autoremove

Replace name with whatever the name of the software you are trying to remove


Installing Ubuntu from USB stick gives error: "Operating system not found"

Short answer:

use pendrive, not USB hard disk
format it as FAT32
plug the pendrive first, then power the computer on
enter BIOS before booting

Detailed answer:

Prepare USB stick exactly as described in Ubuntu documentation:

How to create a bootable USB stick on Windows

How to create a bootable USB stick on Ubuntu

This documentation refers to USB stick (a pendrive), I am not sure whether it is possible to boot from external hard disk connected via USB. If you are trying to boot from USB hard disk, it may be a reason of failure; try simple pendrive instead. Also note, that Ubuntu installer will fail when pendrive is formatted as NTFS, use FAT32 instead.

Plug the pendrive with Ubuntu installer into USB socket, then power your computer on. Press F12 to enter the Boot Menu and choose USB. If USB is not listed then simply enter the BIOS (position Setup in the Boot Menu), then exit and press F12 again; USB should be listed now.

After choosing USB from Boot Menu, Ubuntu installer should start.


17.04 - Can't install downloaded .deb files from Ubuntu Software

Use gdebi to install packages.
How to install:

sudo apt install gdebi

Solved the problem for me.


How to prevent notifications from grabbing focus in 18.04

Sometimes a notification popup can take focussometimes only
This is because of the smart focus feature of the Gnome Window Manager

A workaround will be to change the smart focus default feature to strict

gsettings set org.gnome.desktop.wm.preferences focus-new-windows 'strict'


Booting from a USB drive with an existing dual-boot environment

The BIOS priority setting is not ignored.  Your USB is likely registering as a HD in the BIOS - try reordering which HD device boots first (usually labelled USB-something) rather than setting USB to boot first.


Please help with creating gunicorn systemd Service File

Finally got it running myself.

Problem was that socket file was not being created. During my research I noticed that init.py files were not present since then I uploaded my project to github it discarded them as empty and unnecessary. I fixed this and it seems that was the root of my problem in the first place. After this I finally got site up and running.

To think about it, probably this was a problem all along and other tutorials probably would had worked also...


How to completely silence git ls-remote?

If you want to redirect all output & stderr to /dev/null you have to replace

git ls-remote -q <URL to repository> $> /dev/null

by

git ls-remote -q <URL to repository> &> /dev/null

(& instead of $)


Help with shell script reading data usage in a directory

#!/bin/sh

file=/etc/passwd

minimum=2000

actual=$(wc -c <"$file")

if [ $actual -ge $minimum ]; then

echo The file size is bigger $minimum bytes

else

echo The file size is less  $minimum bytes

fi


Does having a jpg for a desktop background decrease battery time to 'fully discharged'?

It needs more power for the illumination system of your screen (especially laptop screen) when you have a bright image shown or you have a bright software running. So, for power saving reasons, use a dark background image or change to a dark software design (if possible..).
Style and complexity of an image has no impact and of course same is it on mobile phones.


Does Ubuntu prevent customization of pynotify notifications?

Notify-OSD does not allow for customization by default (extremely frustrating I know) - but it is so by design. You would need to use another notification method to get the same positioning and other options.


Problem installing mate desktop on Ubuntu 16.04.2

It should be as CelticWarrior said above. Use

    sudo apt install ubuntu-mate-core

instead of full-upgrade (which upgrades an already installed mate desktop). Have a good day!


How to configure Nautilus to open a terminal

Just install nautilus-open-terminal.

sudo apt-get install nautilus-open-terminal

Then you can open a terminal by right-clicking in your folder. (It will open in the right directory and in a separate window.

For a keyboard shortcut see the post on webupd8:


how to deploy puppet master and puppet agent with juju?

It's interesting to hear more about what you're trying to achieve, because both Juju and Puppet are orchestration tools, and they cannot both manage the same machines as they will most likely interfere with each other. You can install puppet master and install the puppet agents on some other machines, not managed by juju, or you can use puppet scripts/commands inside a juju charm to do some other work. But most likely deploying both puppet master and puppet agent in the same juju environment seems unnecessary.


Is it safe to upgrade AWS Ubuntu Instance running live sites?

Should I upgrade Ubuntu or leave it as it is? as any wrong package upgrade may break the server/live site.

Yes, you need to upgrade the cloud instance.

  Is it safe to upgrade Ubuntu like this running do-release-upgrade

No.

  or is there a better way to do it especially on live servers?

Yes, and there should be a how-to on this on the AWS platform (at least I know there is one on GCE so I expect there to be one on AWS too ;-) )

The general rule when dealing with cloud instances: prepare for failure. Screw up in any way and the instance is gone, dead, never ever to return.

The setup for an instance should be:

a root disk that you create an instance with.
a personal disk that gets added to the instance. This personal disk also has copies of all the files you edited on the root disk. This disk you also make backups off: you copy the disk in your dashboard so you have multiple copies. And if possible store them on another machine.

You do NOT use the upgrade tool from inside the operating system. Cloud instances that can not boot are -dead-. So if there is a failure where you would see a grub rescue when you use a normal desktop install you are screwed on a cloud instance.

But upgrading becomes a lot easier with cloud instances: you make a NEW root disk with the new OS and then attach a copy of your personal disk to the root disk where you examine the files you need to edit on the data disk for relevance. If this fails you still have your old instance. If it works all like you want you can start making backups of this setup and, over time, replace the old version backups with the new.


Is it possible to search among content of documents?

I use Recoll. It's in the repositories. It also searches pdf-metadata. You can choose, which folders are indexed. It's very fast.

Install:

sudo apt-get install recoll


Problem with libqt4-dev. Messed up dependencies

$ sudo apt-get install libbotan-1.10-0

will help


No
There is no API available for changing icon dynamically . BTW you customize launcher icon using  progress bar and count


how to prevent sudo from executing a non root file?

It's a genuinely interesting idea but not without issues.

You could add a "semiadmin" group (your choice on the name), put a user in that group instead of the "sudo" group, and then add /etc/sudoers lines using wildcards to match the common places root-owned commands live:

%semiadmin (ALL)=/usr/bin/*,/bin/*,/sbin/*

The problem with this approach is you would also need to prevent somebody using any editor (or visudo), or let them edit their user... If they can do that, they can elevate their privileges.

Simply put, it's much easier to specify exactly which commands you want them to use.
A list of commands you've sanitised for loopholes.


This is how I get the best battery life with my Dell XPS 15 9570 (nvidia graphics) on any Ubuntu 18.04+ based system (Elementary OS, Mint, etc.)

Install packages:

sudo apt-get install tlp powertop

Enable tlp:

sudo tlp start

Check that it's running:

sudo tlp-stat -s

Check battery drain watts with AC disconnected and most apps and browser tabs closed (give it a few moments to stabilise):

sudo powertop

Press ESC to exit (it takes a few seconds).

Important for nvidia graphics

Using your onboard intel graphics when you're on battery should make a big difference.  However tlp will not power down the nvidia card by default when using your onboard intel because it expects another service such as bumblebee to do so.  Bumblebee doesn't work in Ubuntu 18.04+ so tlp is the best option.

sudo nano /etc/default/tlp

Uncomment this line and set value to empty:

RUNTIME_PM_DRIVER_BLACKLIST=""

Switch to your intel graphics, restart and check power usage:

sudo prime-select intel
sudo reboot
sudo powertop

Note in future switching to intel or nvidia only requires a logout depending on your setup.

Optional further steps (applicable to all machines)

Check if --auto-tune reduces your power significantly:

sudo powertop --auto-tune
sudo powertop

If --auto-tune made a big difference then go to the powertop tunables by pressing TAB a few times.  Anything you adjust here is temporary.  Test which ones make a difference in your power usage without causing any annoying behaviour such as sleeping external USB devices too quickly.  Now make them permanent by editing tlp config.  This requires some experimentation.

To edit tlp config and restart it afterwards:

sudo nano /etc/default/tlp
sudo systemctl restart tlp

Refresh powertop tunables page by pressing r.


lots of symbol lookup errors in dynamically linked libraries

Ok, so it seems the source of the problem was that I had Qt linked libraries like libQt5Core.so.5 in /usr/local/lib. When I remove them everything worked again.
I've read that the package manager doesn't put any libraries there, so it was probably me who did a dumb mistake.


F2 → Display options → Show custom thread names

https://stackoverflow.com/questions/4461289/change-thread-name-on-linux-htop

Search terms "htop thread name", first result...


ubuntu 12.10 - nvidia gtx 550 ti proprietary drivers issue

There are many threads regarding installing Nvidia drivers under Ubuntu 12.10.   While I've found the new distribution to be quite lacking in this regard (among others), here's what worked for me.

After installing (i.e., upgrading or fresh install)

Get all updates using the software updater and reboot as required
Run: sudo apt-get install linux-source
Run: sudo apt-get install linux-headers-generic
Run: sudo apt-get install nvidia-current updates
Reboot... run nividia-settings to verify the driver is installed and the card is recognized.

This has worked on a machine with a GTX-460 and another with a GTS-250 card installed.


I fixed it reinstalling ubuntu. No idea what happened.


Create .desktop file as shorcut to a folder in Lubuntu LXDE

Simple:

Exec=filemanager /path/to/folder

On the desktop (that is: in pcmanfm) right click


Done, after all.

Install libs that are necessary for gui:

sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev

Install lib that is necessary for ruby:

sudo apt-get install ruby-dev

Clone the repo (here I clone it in ~/projects/vim ) :

cd ~/projects
hg clone https://vim.googlecode.com/hg/ vim

Remove existing vim packages:

sudo apt-get remove vim-gtk vim vim-runtime vim-gui-common

Build, create deb package and install it:

cd ~/projects/vim/src
make distclean
./configure --with-features=huge  --enable-pythoninterp  --enable-rubyinterp  --enable-gui=gnome2 --prefix=/usr/local -with-python-config-dir=/usr/lib/python2.7/config
make
sudo checkinstall --pkgname=vim-my


For reasons discussed in this question, the "ffmpeg" in Ubuntu 12.04 is actually provided by the libav-tools package; that's why removing the ffmpeg package seemingly does nothing.

To really remove it:

sudo apt-get --purge remove libav-tools
sudo apt-get --purge autoremove

  Note: The contents of the 2.2 kB ffmpeg package deb file as provided by libav simply pulls in libav as dependencies...


Creating a bootable USB Stick using OS X without sudo

You don't need root privileges to format/copy to an USB Stick.

dd if=/path/to/ubuntu.iso of=/dev/devicename

This command copies your ISO onto the pendrive and makes it bootable. But be sure you have saved everything important from the USB Stick, because this command erases it, too.


How to set two finger scrolling and keep side scrolling as well (touchpad)

Try

synclient HorizTwoFingerScroll=1

for horizontal two-finger scrolling rather than edge scrolling.


Ubuntu 18.04.3 - when trying to uninstall mongodb says that it doesn't exist, when trying to install says it exists

It seems that you've messed up your repositories by adding additional mongodb-org repository.

Try to comment out it's source in /etc/apt/sources.list.d/mongodb-org-4.2.list or similar file.

Then do sudo apt update && sudo apt install -f

Then try again: sudo apt install mongodb and so on.


Can't upgrade to 17.04 due to full /boot, already cleaned old kernels

If you have performed a system update, reboot your machine and execute the following command:

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge

This will remove all the old kernels and generate a new Grub menu for you which will contain only the current kernel that you are using. You can then try an upgrade and see if the error has gone. Source:

https://ubuntugenius.wordpress.com/2011/01/08/ubuntu-cleanup-how-to-remove-all-unused-linux-kernel-headers-images-and-modules/


If I understand your question correctly, Ubuntu provides a graphical tool to manage services that start up at boot time.  Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo services-admin

Or you can install rcconf.

sudo apt-get install rcconf

and start it by typing rcconf in terminal

Hope this helps


If this problem disappears after you disable bluetooth, I think this can be solved by turning of bluetooth coexistence.

Run in a terminal

sudo tee /etc/modprobe.d/iwlwifi-opt.conf <<< "options iwlwifi bt_coex_active=N"

and reboot.


Cannot get webapps to work after upgrade from 12.04 to 12.10

The latest version for Ubuntu (stable) is 13.10 and not 12.10, do a clean install to that version and post your feedback, remember to do a backup of your data.


There's a modified version of notify-osd that lets you configure a few parameters, like timeout, position, colors, etc...

I'll copy here the info I  saved some months ago for the installation:

Website with the information:

http://www.webupd8.org/2012/11/patched-notifyosd-with-close-on-click.html

PPA's:

https://launchpad.net/~leolik/+archive/leolik

https://launchpad.net/~nilarimogard/+archive/webupd8

Installation:

Install the patched NotifyOSD for Ubuntu:

sudo add-apt-repository ppa:leolik/leolik
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libnotify-bin
pkill notify-osd

Install NotifyOSDConfig (a GUI to configure the patched NotifyOSD):

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install notifyosdconfig

Now start NotifyOSDConfig and start tweaking the NotifyOSD notification bubbles.

The close-on-click feature is not enabled by default, so if you want to use this, enable it from NotifyOSDConfig!

NotifyOSDConfig doesn't come with settings for moving the notification bubbles, so you must do this manually, by using the command below:

gsettings set com.canonical.notify-osd gravity [number]

where is [number] can be:

1 - top-right corner
2 - middle-right
3 - bottom-right corner
4 - bottom-left corner
5 - middle-left
6 - top-left corner

Hope it helps. Only think I can say, it's working on 13.04, I haven't tried in 13.10. The repositories have packages for both versions so it shouldn't be a problem.

Good luck!


Most intelligent way of setting up partitions on SSD and HDD when dual booting

This kind of depends on how much space you want for your Windows 10 programs, your Ubuntu programs, and your files. Windows creates two partitions, and Ubuntu can use 1-3 partitions. Here's a diagram of a good setup for you:

Leave the System Reserved partition alone. The second partition is where Windows is installed. The third partition is where Ubuntu will install and the fourth partition is where your personal files (documents or whatever) in Ubuntu will be stored. If you're not going to use more than 16 GB of RAM (you probably won't), don't make a swap partition. I recommend adjusting the sizes of these partitions to fit your needs. As for file system compatibility, Ubuntu can access NTFS partitions, but Windows needs special software to access ext4 drives.


How to set resolution in remmina when connecting using command line?

Create a saved connection profile with the correct settings in the GUI, then launch the connection with
remmina -c /path/to/connection.remmina

The default save location for remmina .profile files is $HOME/.local/share/remmina/ or $HOME/.remmina/.
If you're using the Flatpak version, the config files are in $HOME/.var/app/org.remmina.Remmina/data/remmina/


For bidirectional syncing, try unison (unison-gtk for GUI) from the repositories.

http://www.tecmint.com/file-synchronization-in-linux-using-unison/

https://www.cis.upenn.edu/~bcpierce/unison/

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


Adding Help file to PPA installed LibreOffice 7.0?

Just install it from the PPA itself: the package is called libreoffice-help-< language code >


Wine pollutes "Open With" application list

Remove wine*.desktop files from ~/.local/share/applications and edit ~/.local/share/applications/mimeinfo.cache

If you're feeling lazy you can just run:

sed -i '/wine/d' ~/.local/share/applications/mimeinfo.cache

and:

rm -r ~/.local/share/applications/wine*

or all in one line:

rm -r ~/.local/share/applications/wine* ; sed -i '/wine/d' ~/.local/share/applications/mimeinfo.cache


There is a nice DJ program called Mixxx, which is also available for Ubuntu. To install the latest version, open a terminal and execute these commands:

sudo add-apt-repository ppa:mixxx/mixxx
sudo apt-get update
sudo apt-get install mixxx libportaudio2

Mixxx comes with many DJ table setups preinstalled. I think it has a preset for the Hercules DJ Air, but I don't know how well it's already set up. Try to just connect the device, open Mixxx, go into Preferences and set up the device by selecting it from the list in the according menu.


Prevent new packages from linking start up scripts?

Instead of removing the links, disable them. The difference is that removal does not make dpkg aware of your preference to prevent the startup scripts from being executed because dpkg runs update-rc.d too for removing and adding the links.

To disable a service:

sudo update-rc.d blabla disable

You should not have a need for removing /etc/rc.local as it's usually not modified by package management scripts.


When I start the pc GNU grub bootloader page loads

Obviously you have done the following: While installing the "pen drive" you selected your main hard disk as target for grub. So the "boot manager" thinks there are two operating systems available. Only change (without reinstalling windows) is to insert your stick again, start Ubuntu and change your "grub" configuration.
For this you need to to do (in Ubuntu): Edit the contents of /etc default/grub like described here:
You'll need to know where your windows is located..
the line GRUB_DEFAULT=0 should be altered by you.
After saving that file it its necessary to execute (in a terminal): sudo update-grub. Next time Grub (which is your bootmanager now) will start windows by default.


How to list packages not installed by apt-get?

Personally I have checked this with the command below.
It recursively finds files in common directories and then calls dpkg --search (see man dpkg) on found file  and redirects error output to the file:

sudo find /bin /boot /etc /lib /lib64 /opt /sbin /srv /usr /var -type f \
-exec dpkg -S {} \; 2> ~/not-from-apt.out

Its stdout contains lines with files from APT as shown below

coreutils: /bin/cat

but its stderr (which is redirected to file) contains lines with files not from APT as shown below:

dpkg-query: no path found matching pattern /boot/grub/grub.cfg

Please note that this method is rough. You need to grep the resulting file for executables or customize the list of directories to search.


Tool to easily select a pixel on screen and get color and absolute coordinates

There is a tool called gpick.

Here you can see an image of the tool. With gpick you can select pixels, see the HTML code, add colors to the palette and generate colors.

To use it, right click the middle of the hexagon then use space bar to save colors into the palette.


Is there a way to make GNOME Terminal Read-only with shortcut?

You can define one. Open Edit -> Preferences and select Shortcuts in the left bar. There you'll find it.

Notice, however, that the very same shortcut will also leave read-only mode. In other words, being in read-only mode disables the regular keypresses that would go to the terminal, but does not disable shortcuts.


Ubuntu 12.04 blank purple splash screen after live install

If you're not at all able to boot into desktop than use recovery mode from the boot menu when you start up and see terminal prompt is available.

It may happen that GRUB failed to get correct resolution supported by your GPU, and a resolution too high or too low may result into unbootable system.

You can perform following steps to get bootsplash at correct/acceptable resolution on startup.

Open terminal (if you're able to boot into desktop) as you'd need to run some commands to fix the problem. Or, you can perform following steps from recovery mode too.
Identify your maximum supported screen resolution (assume 1024x768 as default/safer).
Open /etc/default/grub in text editor as root, run in terminal.

gksu gedit /etc/default/grub

Alternatively, you can edit the file from within terminal using nano by running the same command with little modification as: sudo nano /etc/default/grub.
Just use Ctrl+O to save changes you make to the file and Ctrl+X to exit the editor.

As the file opens in text editor, look for option GRUB_GFXMODE (it might be commented using '#', if so, remove preceeding '#' symbol to uncomment).
Set option's value as following (you can use your screen's resolution in similar way).

GRUB_GFXMODE=1024x768

Save file and exit.
Run following command to set boot splash to use framebuffer for showing bootsplash while booting up (correct me if I'm wrong).

echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash

Now run following two commands one-by-one.

sudo update-grub2

sudo update-initramfs -u

Now reboot to see if you have bootsplash instead of blank purple screen.

This method has worked for most graphics cards, I don't know if its a fix or workaround, but ever since Ubuntu changed the bootsplash to the current one (Since 10.04) I always need to perform above steps after installing new version of Ubuntu to get bootsplash working on my laptop which has Intel integrated graphics.


I am experiencing a similar problem and found out that switching display driver to NVIDEA binary driver instead of nouveau driver solved out the problem.

check it out
https://bugs.launchpad.net/oxide/+bug/1499419


Ubuntu 18.04: Programmatic control of split windows

Yes. Install and run tmux. Once in tmux, use commands like ctrl-b % and ctrl-b " to split the window horizontally and vertically respectively. Type ctrl-b ? to get tmux help.

You can start tmux from the command line and automatically create the splits.


Help with installing Node.js on ubuntu unity

Run these commands for node.js v6:

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs


Try this,

Use this link ( about the adding paramter to kernel here) to understand about adding kernel boot paramter temporarily and making it permanent.
Then,

Add the parameter ,   pci=nomsi

And reboot.

If the problem is solved then make the change permanent.
If does not work then try,

pci=noaer

same way and make it permanent if this works.

(*Reason for appearance is  related to the recent Intel Skylake architecture CPUs and Realtek rtl8723be wireless adaptor.

The ubuntu team knows about it. Read more here Bug_track_ubuntu_PCIe bus error  )