How can I extract pages containing a given string from a PDF file?

Overview

Here's a script I quickly put together which should do the job. Make sure to read the preamble and the comments for information on how to use the script and how it works.

Script

#!/bin/bash

# NAME:         extract_pdf_results
# VERSION:      0.1
# AUTHOR:       (c) 2014 Glutanimate
# DESCRIPTION:  Extracts PDF pages that contain supplied string and concatenates them to a new file.
# FEATURES:
# DEPENDENCIES: pdfgrep pdftk
#               ➥install on Ubuntu/Debian with sudo apt-get install pdfgrep pdftk
#
# LICENSE:      GNU GPLv3 (http://www.gnu.de/documents/gpl-3.0.en.html)
#
# NOTICE:       THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
#               EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
#               PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
#               IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
#               AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
#               PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
#               YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
#
#               IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY
#               COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS
#               PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
#               INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
#               THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
#               INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
#               PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
#               PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
#
# USAGE:        extract_pdf_results <string> <pdffile>

STRING="$1"
FILE="$2"
FILENAME="${FILE##*/})"
BASENAME="${FILENAME%.*}"
DIRNAME="${FILE%/*}"

echo "Processing $FILE..."

## find pages that contain string, remove duplicates, convert newlines to spaces

echo "Looking for $STRING..."

PAGES="$(pdfgrep -n "$STRING" "$FILE" | cut -f1 -d ":" | uniq | tr '\n' ' ')"

echo "Matching pages:
$PAGES"

## extract pages to new file in original directory

echo "Extracting result pages..."

pdftk "$FILE" cat $PAGES output "${DIRNAME}/${BASENAME}_pages_with_${STRING}.pdf"

echo "Done."

Example

./extract_pdf_results.sh Lagrange ./test.pdf
Processing ./test.pdf...
Looking for Lagrange...
Matching pages:
3
Extracting result pages...
Done.


Pixelated launcher icons in the launcher

While writing this question, I opened the settings manager. Simply opening the appearance tab (where launcher icon size is a perhaps relevant option) caused the icons to revert to normal.


How to configure the default automount location?

In Ubuntu 13.04 you can tell udisks2 to automount in /media/ instead of /media/[username]/ by adding a udev rule that sets the environment var UDISKS_FILESYSTEM_SHARED. You can do this by adding a file called (eg) /etc/udev/rules.d/99-udisks2.rules that contains:

ENV{ID_FS_USAGE}=="filesystem", ENV{UDISKS_FILESYSTEM_SHARED}="1"

I think udev monitors the /etc/udev/rules.d folder to detect changes, but if not, you can force it to reload its rules with sudo udevadm control --reload. Note though that the new mount location doesn't seem to take effect until you physically remove and plug the external drive back in.

This doesn't work in Ubuntu 12.10 because it uses udisks version 2.0.0, and support for the above didn't appear until version 2.0.91.

For your convenience, you can paste the following into the terminal

echo 'ENV{ID_FS_USAGE}=="filesystem", ENV{UDISKS_FILESYSTEM_SHARED}="1"' | \
sudo tee -a /etc/udev/rules.d/99-udisks2.rules

Now anyone accessing your machine can access the removable disks you plug into it. So be careful. Tested on 14.04, but as pointed out above, it should work on 13.04 and later.


How can I use Texmaster on Ubuntu 19.10?

The folks who have the source code aren't getting it into the Ubuntu repositories any more, and haven't since 2012 as per their web page. No alternative is listed at https://alternativeto.net/browse/search?q=texmaster but since Texmaster itself is a Tetris clone, I searched further and found these Tetris-like games which are available.

The game's author can also be contacted.


Formatting a USB stick - unable to operate USB

There is a tool with a graphical user interface, that can help you perform the task to restore a USB stick to a standard storage device, mkusb.

mkusb 'wraps a safety belt around dd', helps you to identify and select the correct target device (the correct USB stick and not another device).
The standard storage device has an MSDOS partition table and a partition with the FAT32 file system.
If you want another file system, you can use mkusb to wipe the first mibibyte and after that use gparted to create the file system.

You find details how to install and use mkusb at the following links,

help.ubuntu.com/community/mkusb
help.ubuntu.com/community/mkusb/wipe

If mkusb cannot solve the problem at once, you may find a solution or at least an explanation (if the USB stick itself is read-only or completely 'bricked') via the following link,

Can't format my usb drive. I have already tried with mkdosfs and gparted - Analysis of the problem


I am not able to mark this as answered or closed, but steeldriver was able to point me to this thread:

How can I install software or packages without Internet (offline)?
without-internet-offline

To install the packages, I booted up a QEMU VM with identical specs to my server on another machine, piped the output of apt-rdepends gcc to a simple grep filter, and used apt-get download to get all of the deb files. They could then be transferred to the server via scp and the Old USB Trick.


You could disable automatic updates all together and just write a cron job that checks for updates at a specific time.

The package cron-apt could be used if you want to automatically download updates when server load is low but review them before installation. More info here: https://debian-administration.org/article/162/A_short_introduction_to_cron-apt


For this you need sftp

Firstly install ssh on all three computers

sudo apt-get install openssh-server
and find the ip of the computer using these commands:

sudo ifconfig | grep -o "inet addr:[0-9.]*" | cut -d ":" -f 2 | grep -v ^127

On the other computers do so in nautilus:

Click connect and bookmark it like this

Similarly do the same for the other machines use the bookmarks to nagivate the other computers


No matter what I researched and did I can't connect to my MySQL server

I got it fixed. Almost smacked myself for not thinking about this :)

I had to add a NAT rule to my router with port 3306 and the servers local IP address


You can change this message by editing the /etc/issue and /etc/issue.net.

Customizing your Logon with /etc/issue


you can connect by typing the IP address.
Here it's the full list: https://unturnedsl.com/


How to Diagnose and Fix Freezing For A few Seconds Every Few Minutes

When your desktop freezes, write down the exact time.

Either wait for the desktop to unfreeze or ssh into the machine, and then view /var/log/syslog for the time that you wrote down it freezing.

In the my case the logs had NOUVEAU lines around the time of the freeze, I replaced the Nouveau display driver with the NVIDIA binary driver, and that resolved the intermittent freezes.


It is a "state" where a package offers rules about how it should behave (install, upgrade, remove) and how it relates (eg: other packages or running services). This rules can be how to install it, how it depends on other packages, general information regarding the actual package and more.

When dpkg-gencontrol issues that type of error, it usually means that the package did not offer, or have any information to control what to do with said package. This information is typically found in what is called a "Control File" inside the package.

For the cases of Debian packages, you can find more information here
and from where the actual error description came from, I believe you can go here.

Note that stanzas (In computer terms I mean) can also mean states in which a service is at a specific moment. An example is found in How to enable or disable services? when a service is stopped or started.


Dual Boot 10.10 and 11.04 can't boot into 10.10 after an update

First mount the partition on which 10.10 is installed. You can do this by clicking the on the partition in nautilus sidebar.

Once mounted, run this command in the terminal

sudo update-grub2


Unable to customise Plank on Xubuntu 16.04

While pressing Ctrl, right-click on the mouse or touchpad then choose Preferences.


PC won't start after installing the latest version of Ubuntu

If you have a usb stick to hand you could turn it into a Ubuntu Live USB, boot into it and reinstall grub, this may help. Once in the live USB install "Boot Repair" and reinstall grub using this tutorial.
TUTORIAL
After this restart your PC and at least this should get you back into Windows if not Ubuntu as well.
Hope this helps.


How to create a custom launcher in Cairo Dock?

Aptana Studio 3 doesn't have a launcher icon

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

to create a launcher , then drag and drop it into cairo dock


Wired card not connecting after trying to connect

I had the same problem - and for some reason couldn't duplicate it with any kind of consistency.  It would just stop working for a bit, then work again, then stop again.  Pretty annoying.

I went into the Network Settings and ignored IPv6, and it seems to have fixed the problem.  Haven't had an outage since I did this.  Maybe it'll help?  As always, YMMV.

Happy holidays!

-Jose


My newly installed ubuntu software is not detecting sdcard.

You can install "flashrom" from the software center this may support your sdcards. Simply Open the software center and search flashrom.


xorg and modelines for sony Bravia KDL-40CX523

My sony tv (not the same model as yours) was also not detected

I ran

get-edid | parse-edid

from the command line to get the required settings and then run these commands on startup:

xrandr --newmode 1360x768 85.5 1360 1424 1536 1792 768 771 777 795 -hsync +vsync
xrandr --newmode 1920x1080 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
xrandr --addmode VGA1 1360x768
xrandr --addmode VGA1 1920x1080


xmodmap modifications aren't enough - anything else I can do?

I finally got this working after hours of trying. I found the file where the evdev scancodes are translated into xfree86 keycodes under X11, namely /usr/share/X11/xkb/keycodes/evdev. I opened that file as root and moved the key codes around using the default xmodmap settings as a reference (xmodmap -pke). My final edits were quite simple:

<LSGT> = 49; // This was 94
<TLDE> = 94; // This was 49
<LWIN> = 64; // This was 133
<LALT> = 133; // This was 64
<RWIN> = 108; // This was 134
<RALT> = 134; // This was 108


Can I install software even though the repository hasn't been updated for my Ubuntu release version?

You can try. Replace the $(lsb_release -sc) command in their instructions with trusty. Follow the rest of the steps.

However, note that because library versions change from version to version, the Trusty version might not be installable on Utopic, or might not work correctly.


Ubuntu 12.10: black screen after installing nvidia-current

It's a bit of a stab in the dark, but try this:

Boot the system, hold left-shift to get the grub menu
Press "e" to edit the kernel command line, and add "nomodeset", see here for more details on how to do this.
This should hopefully bring you to a usable system, even if only in console mode.
Now for the fun part. I suspect you're running into a bug that causes kernel modules to fail building due to missing kernel headers (bug report is here). To install the kernel headers, do

sudo apt-get install linux-headers linux-headers-3.5.0-25-generic

Replace 3.5.0-25 by your running kernel version (use the uname -a command to see this).

Once the new headers are installed, do sudo apt-get install nvidia-current.
Closely watch the console output. If you see a message like this:

Building only for 3.5.0-17-generic
Building for architecture x86_64
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.

it means the module wasn't compiled due to lack of kernel headers. This will tell you the version of the headers your system is expecting.
Once you get the modules correctly built, reboot normally and things should hopefully work.


I imagine it's because you're pressing a key... I'd consider setting the command to something that waits for a second, and then runs the command:

sh -c "sleep 1 && xset dpms force off"


Open Remote Terminal Location from Nemo in Ubuntu 13.10

You could create two actions in ~/.local/share/nemo/actions.

File remote_terminal1.nemo_action:

[Nemo Action]
Name=Open in remote terminal
Comment=Open current folder in remote terminal
Name[de]=Im entfernten Terminal öffnen
Comment[de]=Aktuellen Ordner im entfernten Terminal öffnen
Exec=<remote_terminal.py %F>
Icon-Name=terminal
Selection=none
Extensions=dir;
Dependencies=ssh;

File remote_terminal2.nemo_action:

[Nemo Action]
Name=Open in remote terminal
Comment=Open this folder in remote terminal
Name[de]=Im entfernten Terminal öffnen
Comment[de]=Diesen Ordner im entfernten Terminal öffnen
Exec=<remote_terminal.py %F>
Icon-Name=terminal
Selection=s
Extensions=dir;
Dependencies=ssh;

And finally a Python script remote_terminal.py (must be executable):

#!/usr/bin/env python2
# -*- coding: utf-8 -*-

import sys
import subprocess

path = sys.argv[1]

if '/sftp:' in path:
    sftp = path.split('/sftp:', 1)[1]
    settings = {}
    options, sep, settings['path'] = sftp.partition('/')
    for opt in options.split(','):
        name, sep, value = opt.partition('=')
        settings[name] = value

    cmd = ['gnome-terminal', '-e',
        'ssh %(user)s@%(host)s -t "cd /%(path)s && bash --login"' % settings]
else:
    cmd = ['gnome-terminal', '--working-directory', path]

subprocess.call(cmd)


GUI way is to open System Settings -> Displays
command-line way: run xrandr command to find out available resolutions  per display. Choose the one you want changed, run xrand --output $DISPLAY --mode $ZZZx$YYY

Example:

Changing eDP1 to 6840x480

$ xrandr
Screen 0: minimum 8 x 8, current 2390 x 768, maximum 32767 x 32767
eDP1 connected 1366x768+1024+0 (normal left inverted right x axis y axis) 345mm x 194mm
   1366x768       60.0*+
   1360x768       59.8     60.0
   1024x768       60.0
   800x600        60.3     56.2
   640x480        59.9
DP1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
VGA1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768       60.0*
   800x600        60.3     56.2
   848x480        60.0
   640x480        59.9
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

$ xrandr --output eDP1 --mode 640x480


Open Nvidia X server settings, disable the allow flipping checkbox in the OpenGL settings. That should fix the fps. And the software you use will not be the problem. OBS should be fully capable of doing 60fps constantly.


CIFS mount in /etc/fstab works in 14.04 but not 16.04

Turns out this is because cifs-utils wasn't installed. It's unclear to me why mounting a cifs drive worked fine without this package so long as the password was in /etc/fstab, but after installing it I get a proper password prompt.


Reading through this Unix and Linux post titled "Any options to replace GNU coreutils on Linux?", one option could be the Heirloom project toolset. It includes ls, among other things, and hopefully that ls behaves like you want it to. Of interest is this point in the highlights:

  Multiple versions of many utilities are provided to approach
  compatibility with various specifications and Unix flavors, namely
  SVID3/SVR4, SVID4/SVR4.2MP, POSIX.2-1992/SUSV2, POSIX.1-2001/SUSV3,
  and 4BSD (SVR4 /usr/ucb).

Note the last item: "4BSD (SVR /usr/ucb)".

It doesn't have an Ubuntu package that I know of. The installation instructions build an RPM, which you could convert using alien and then install. How do I install and manage RPMs?


Well, it does say what is going on: apt-get can't get a "lock" on the package management files (basically, the guarantee it's the only one who can access it)  So, the first idea would be that something else is installing.  You get this, for example, if the "Software Updater" is updating your system and at the same you think "gee, I want to install something".  The "Software Updater" got the lock, you try to get it and it's obviously refused.

Now, what you want is to figure out which process is actually having the lock.  For that we're going to use lsof, which means "list open files".  The file of interest is "/var/lib/dpkg/lock".

$ lsof /var/lib/dpkg/lock

Normally this should give you a process that "has" the lock.  Close that process and you'll be fine.

If there is no process, it's most likely a stale lock.  While I never needed to do it, I'd then remove the lock by issuing:

sudo rm /var/lib/dpkg/lock

Do note you can get the error when you forget "sudo" on package manager commands (apt, apt-get, aptitude, etc...), but yours included it.


So I finally found out:
Since GTK-3.10 the gsettings scheme org.gnome.desktop.interface menus-have-icons is not valid any more.
Instead the following command can "reactivate" icons for menus and buttons:
gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "{'Gtk/ButtonImages': <1>, 'Gtk/MenuImages': <1>}"


Can I access Ubuntu ports using a virtual machine?

There could be several things going on here:

1) Check the VM is configured to use bridging for the network.  By default, Virtualbox sets networking to NAT which will give you a 10.x.x.x IP on the guest rather than a suitable IP for your network;

2) Make sure the hostname for the guest can be resolved by the DNS on the network.  You could just connect via the IP instead of the hostname in the meantime;

3)  Make sure the Apache service is running on the host. sudo service apache2 start

4) If you have configured a firewall on the guest, make sure it's allowing traffic through port 80.

5)  Do some simple troubleshooting.  e.g. ping your lab machine from the VM guest, ping the VM guest from the VM host, ping the VM guest from your lab machine, etc...

Apologies if some, or all, of this is teaching you to suck eggs but detail was lacking in the post.  Plus, I still continue to be caught out by one or more of the above on occasion.

Rob

UPDATE:

Apologies, I have a hectic work schedule so I don't often get a chance to visit here.

The message you see about Apache not being able to resolve the hostname is due to the hostname not being in either /etc/hosts or defined in your DNS.  Do this, and that message will go away.

If you cannot get to your webserver with http://yourservername:80 then make sure port 80 has been opened on the firewall.

You can use nmap to check that the port is open

If necessary, install nmap sudo apt-get install nmap

nmap yourservername

This should give you a list of currently open ports.  For example:

Starting Nmap 5.21 ( http://nmap.org ) at 2014-03-12 17:23 GMT
Nmap scan report for backup (192.168.24.12)
Host is up (0.00021s latency).
Not shown: 998 closed ports
PORT   STATE SERVICE
22/tcp open  ssh
80/tcp open  http

Do these things first before worrying about the other message.

Regards

Rob


Bootable device not found Ubuntu 16.04 - no option in BIOS to select an UEFI file

After several hours I finally found a solution, and I cant believe how mind boggling this was. This is what you should do for your Acer Aspire ES series if you want to install Ubuntu.

The main problem is that the BIOS is preventing you from booting anything up but UEFI compatible systems, such as Ubuntu.

Start BIOS by pressing F2.
Disable Secure Boot and change the order of the boot sequence to boot on USB. (My particular Laptop does not have a CD-ROM drive and requires USB as the only option.)
Boot on USB and select to run Ubuntu in live test mode that allows you to get access to terminal commands.
Open terminal and run sudo ubiquity -b to run the installation process for Ubuntu.
Select "Something else" to customize your own partitions.
Create the following partitions as a minimum:

The / to store the file system
The swap space
The UEFI space

Install Ubuntu and press Continue Testing after installation is over.
Mount newly installed file system into:

sudo mount /dev/sda2 /mnt
sudo mkdir /mnt/boot/efi
sudo mount /dev/sda1 /mnt/boot/efi
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done

(where sda2 is the root partition and sda1 is the efi partition)
Load efivars: sudo modprobe efivars.
Reinstall GRUB:

sudo apt-get install --reinstall grub-efi-amd64
sudo grub-install --no-nvram --root-directory=/mnt /dev/sda

Update the installed GRUB:

sudo chroot /mnt
sudo update-grub

Move and rename the installed bootloader:

cd /boot/efi/EFI
cp -R ubuntu BOOT
cd BOOT
cp grubx64.efi bootx64.efi

Thanks to Sladek90 for the grub tutorial here: Unable to install Ubuntu on Acer Aspire ES1-533


Is there a way to use setTimeout in Gnome Shell Extension code?

Just to capture this in an answer:
const Mainloop = imports.mainloop;

...

Mainloop.timeout_add(1000, () => log('one second later!'));

As seen here.


How do I remove certain characters before or after a certain number from a list of files in terminal?

Try this:

rename 's/[^0-9]*([0-9]*)[^0-9]*(\..*)/$1$2/' *

[^0-9]* means anything but digits, any number of times
[0-9]* means only digits, any number of times
(\..*) means dot (\.), then anything (.*) - the extension
$1 is the content of what matched the first parentheses (the digits)
$2 is the content of what matched the second parentheses (the extension)

So if you have:

2012xyz.txt  ABC2011DEFG.txt  zyx2013.txt

you will get:

2011.txt  2012.txt  2013.txt


I disabled power management but the screen gets locked after 5 minutes

You need also to go to Settings -> Screensaver and disable it there too.
There is a screen blocking tab.


Is it safer to purge PPAs before upgrading to a new Ubuntu release?

No, it is not safe to simply remove a ppa through the package manager without restoring defaults. This can cause unwanted side effects (e.g. if this were graphics drivers you will have no access to the GUI).

To fully reset your system to defaults and to remove any unwanted ppa we may use the script ppa-purge

sudo apt-get install ppa-purge
sudo ppa-purge -purge <nameofppa>

followed by

sudo apt-get update


Try this command:

 grep -v -f file2.csv file1.csv > file3.csv

According to grep manual:

  -f FILE, --file=FILE
          Obtain  patterns  from  FILE,  one  per  line.   The  empty file
          contains zero patterns, and therefore matches nothing.   (-f  is
          specified by POSIX.)

  -v, --invert-match
          Invert the sense of matching, to select non-matching lines.  (-v
          is specified by POSIX.)

As Steeldriver said in his comment is better add also -x and -F that:

  -F, --fixed-strings
          Interpret PATTERN as a  list  of  fixed  strings,  separated  by
          newlines,  any  of  which is to be matched.  (-F is specified by
          POSIX.)
  -x, --line-regexp
          Select  only  those  matches  that exactly match the whole line.
          (-x is specified by POSIX.)

So, better command is:

 grep -xvFf file2.csv file1.csv > file3.csv

This command use file2.csv line as pattern and print line of file1.csv that doesn't match (-v).


If I download a package through apt-get on one machine and install on another, can I upgrade later?

All required info of a package are located in the package (like name and version). When you need to update, it is basically comparing the vesrion of the package you have installed and the version of the package in the repositories. So in short, apt-get update and apt-get upgrade will upgrade the package as long as the package is in the repositories installed on the second machine.


How to install wps-office on ubuntu 16.10?

Download libpng12-0_1.2.50-2+deb8u2_amd64.deb. If you use a 32 bit system, download the 32 bit deb file.

Install the package and then install wps-office.


How to remove the `CPU NN%` text from load indicator

Seems like to remove it one need to remove all the items from preferences -> Indicator items.


I can't boot after upgrading to 16.04 (from 14.04)

Had a similar problem on a Dell Latitude 5450.  It stalled at the Plymouth splash screen every time.  My guess is that Plymouth depends on an Nvidia driver that wasn't installed with 14.04 since the Latitude is Intel Skylake architecture.

After hours of trying every bit of advice I could find without success, I booted 16.04.1 as a trial from the USB stick.  Since it logs in as root, I could mount a spare external USB hard drive and copy the entirety of the laptop's /home directory structure to it.  I then repartitioned the internal drive, did a clean install of 16.04.1 on it without problems using the same user id, then copied the external /home back over the internal one.

Had to reinstall a bunch of apps.  Everying but Pithos picked up configuration data from the long gone 14.04 /home and came right back just as I had left it - Pythos did too, but choked on it and a file in .config had to be deleted.  It took about 2.5 hours of copying which could have been halved had my grsync backup been just before I accepted the upgrade rather than 2 days before.  Won't make that mistake again!


reboot stuck on "[1534.028775] Restarting system"

You can try this :

at terminal :

sudo nano /etc/default/grub

Find the line:

GRUB_CMDLINE_LINUX=””

and replace it by this line:

GRUB_CMDLINE_LINUX=”reboot=efi”

Save the changes and close the file.

sudo update-grub

Then try to restart.

Found this solutions at this website :

https://sites.google.com/site/easylinuxtipsproject/bugs#TOC-Reboot-fails


Ubuntu on external hard drive with no access to the flies

Etcher creates a live USB image, not an installation of Ubuntu. If that is what you did, you have probably deleted all the partitions and now you have a hard drive that can run Ubuntu Live and it can install it into a different hard drive.
Difference between LiveCD, LiveUSB, full-install, and persistence?

First, check that this is the case booting Ubuntu from your hard drive and checking the partitions in gparted. If your hard drive doesn't have the partitions you created any more, that is the problem. You will have to try to recover the data using the tools in https://help.ubuntu.com/community/DataRecovery

Use a different USB to install Ubuntu Live. You can use Etcher but I don't think it will give you the option to make it persistent. Unetbootin does. With this new USB, boot Ubuntu, install testdisk, connect your 1Tb hard drive and use testdisk for the recovery. Don't start booting Ubuntu from your 1Tb drive and installing things because every new data that it writes in that hard drive will potentially overwrite your lost files.

I have had best results with testdisk. Maybe if you restore your three partitions that you created, you will get most of your data back. The live image will have overwritten less than 4Gb. If that doesn't work, try a deeper search for files using testdisk and see what you are capable of recovering.


Consistent dialog concerning wine-silverlight

Such a problem can have multiple reasons. As its not clear what exactly the problem is in your case, I will describe solutions for the most common issues below.
1. Previous installation was somehow interrupted and files are corrupt
At first I would recommend to remove the whole wine prefix. This ensures that no corrupted files are left, which could prevent a proper installation.
First close all browser windows, then run (as a regular user, not root):
rm -rf ~/.wine-pipelight

The folder will be recreated automatically and contains only Pipelight specific data, so don't worry about any lost data.
Afterwards start the browser window again, open about:plugins, and check if it works then.
2. Outdated version of Pipelight or Wine-compholio
If it still doesn't work you should make sure that your version of pipelight and wine-compholio is up to date. You can use
 dpkg --list | grep "\(pipelight\|wine-compholio\)"

to check that. Currently (at the time of writing) you should have wine-compholio >= 1.7.12 and pipelight >= 0.2.4.2.
3. Unusual file system
Wine only works properly when you run it from a "usual" file systems - I have already seen installations, where users were trying to run wine from an NTFS drive mounted via FUSE, or other unusual network drive configurations, where Silverlight cannot be installed properly.
The easiest way to find out the used file system is by manually taking a look at:
/etc/fstab

If the file system is either a network drive or some other unusual file system mounted via FUSE, then this is most likely the problem. If it is not possible to switch to different file system you can alternatively modify the Pipelight config files, such that the wineprefix is located on a different harddrive. Example instructions how to setup something like this:
cp /usr/share/pipelight/configs/pipelight-silverlight5.1 ~/.config

# Open the new config file in an editor, for example gedit
gedit ~/.config/pipelight-silverlight5.1

# search for "winePrefix = $HOME/.wine-pipelight/"
# modify it for example to "winePrefix = /media/secondhdd/.wine-pipelight/"

Unrelated, but also very important: To watch DRM protected content, the file system where the wine prefix is located also has to support XATTR (extended attributes), otherwise you'll get error N8156-6205! You can ignore this if you don't want to use Pipelight to watch DRM protected content.
The following commandline illustrates how to check for extended attributes in the home directory (the default location of the wine prefix):
# Run this once, such that setfattr and getfattr is installed
sudo apt-get install attr

# XATTR check, from: http://wiki.gentoo.org/wiki/Netflix/Pipelight
touch ~/.xattr_test && setfattr -n 'user.testAttr' -v 'attribute value' ~/.xattr_test &> /dev/null; getfattr ~/.xattr_test 2>&1 | grep -q user.testAttr && echo 'It works!' || echo 'No workie!'; rm ~/.xattr_test &> /dev/null

If the result is "No workie!" (and the attr package is installed) then you are missing XATTR in the home directory. Here is an example of how it can be enabled for ext4.
4. If it still doesn't work ...
To get rid of the annoying dialogs the easiest way is either to uninstall pipelight, or at least to disable the problematic plugins:
sudo pipelight-plugin --disable silverlight

# if multiple plugins have problems:
# sudo pipelight-plugin --disable-all

Nevertheless this doesn't really solve the problem, but just hides the error. If you want to use Pipelight and need additional support, the fasted way is to ask someone in #pipelight on IRC freenode (be a bit patient if noone responds immediately), or alternatively post a more detailed error description on launchpad and we'll help you to track it down.


Compiling custom kernel with Ubuntu patches

I didn't find any patches, so I had to create one.

I needed two kernel sources: the one found in the linux-source package on Ubuntu and the stable vanilla kernel source that corresponds to the appropriate version of linux-source from kernel.org

Assuming I have extracted all archives to a, the vanilla one, and b, the Ubuntu one to my Desktop I run the command:

diff -Nur /home/mark/Desktop/a/ /home/mark/Desktop/b/ > the-patch.patch

the-patch.patch is the patch you can apply in any modified kernel sources (like pf-kernel) to apply the changes in the stock kernel.


Generate SSH key on computer A and use it to SSH from computer B to computer C

On system A:

mkdir /tmp/my-keys
cd /tmp/my-keys
ssh-keygen -t rsa -f some-name

it will generate a some-name file containing the private key, and a some-name.pub file containing the public key.

Next, copy the some-name private key to system B (the one you want to connect from). Place it in the .ssh directory for the user you'll connnect as. If the user doesn't have an .ssh directory, create it by running ssh-keygen in that system; or, if you don't want to (I think this is your whole point), manually create the directory, copy the some-name file into it, and ensure .ssh has mode 700, and the some-name file is 600. Both should be owned by the user in question.

Finally, copy some-name.pub public key to system C (or any system you want to be able to connect to, from B). Place it in the .ssh directory for the user you'll connect as. Rename it to authorized_keys, this is the list of keys SSH will examine; any private key which matches the given public keys will be allowed to connect.


After dual booting from Ubuntu to Windows nVidia GPU disappears?

When you boot Ubuntu it powers off the nVidia GPU. When you reboot power remains off so Windows doesn't see it. The same thing can happen with other devices when you reboot from Windows back to Grub and then Ubuntu.

The solution is to Shut Down and then Power On.

There is a reason why they call it "warm boot" versus "cold boot" and "soft boot" versus "hard boot". This is just one example.


openstack single-server install fails at juju bootstrap stage

I could be wrong but I didn't think the ubuntu openstack single-installer was supposed to be used in a hw vm.   It already builds everything inside of a single LXC container (nesting other servers inside that lxc container)

But also check the "issues" logged in github or the "bugs" logged in launchpad for the single-installer such as the one described in this thread.

https://github.com/Ubuntu-Solutions-Engineering/openstack-installer/issues/470


Error when starting applications installed via snap

After an update of Ubuntu, the error is gone. I had already done this, but it did not resolve the issue. The last update resolved it. I have not made any other changes.


Torrenting itself is not illegal; it's just a method of file transfer using multiple servers (the downloaders act as servers).

Any legal issues around using it relate to the content. If you do not have the legal right to download or upload material, then downloading or uploading it via Torrent is illegal.

Canonical (the company that develops Ubuntu) provides links to obtain Ubuntu images by torrenting. Obviously, you have the right to download it, so it is not illegal to do so by this method.

According to Wikipedia (emphasis added):

  The use of the BitTorrent protocol for unauthorized sharing of copyrighted content has led to a variety of novel legal issues. While the technology and related platforms are perfectly legal, law enforcement and prosecutorial agencies worldwide are developing new tactics and increasingly pursuing ways to address this avenue of infringement. Notably, the use of BitTorrent in connection with copyrighted material may make the issuer of the BitTorrent file, link or metadata liable as an infringing party under the copyright laws of various governments. Similarly, the use of BitTorrent to procure illegal materials could potentially make end users liable as an accomplice under various laws.


How do connect /var/www/html folder to the spring-boot project in /home/user

Did you try with a symbolic link?

usage: ln [-Ffhinsv] source_file [target_file]
       ln [-Ffhinsv] source_file ... target_dir
       link source_file target_file

Example

ln -s /home/MYUSERNAME/PROJECT_NAME/webapps/jsps/ /var/www/html

If destination folder already exists, you have to delete it


GRUB not installed correctly by ubuntu server manual process?

It turns out I booted the installer into the BIOS mode. See this article.

I tried to boot the installer into UEFI mode on that lenovo but the screen flashed once and then it just halted.

I tried to use the same live USB on another PC and it installed ubuntu to UEFI mode just fine. So there is something wonky with that Lenovo.


Will I be able to load my sticky notes or I will have to type them again?

Your notes should not have been deleted, but Ubuntu 12.04 does not comes with XPad pre-installed. So you should install it.


You can use the following command to restart the computer and the service should auto restart:

sudo shutdown -r now

To properly install proprietary NVIDIA drivers, you can check the following post where I have posted a step-by-step guide:

Asus Strix GTX970 Unable to get 1920x1080 Resolution Ubuntu 14.04

Hope this helps out!


No Music Preview on mouse hover over music file as in Ubuntu 11.04

This feature was lost with the upgrade to gnome 3/nautilus 3

You can use a preview plugin like gnome-sushi or gloobus preview though (I prefer gloobus-preview)


You can use the file utility to attempt to classify a file based on a sequence of filesystem tests, magic tests, and language tests - for example

$ file pynauty-0.5.tar
pynauty-0.5.tar: POSIX tar archive (GNU)

$ file opencv-2.4.10.zip
opencv-2.4.10.zip: Zip archive data, at least v1.0 to extract

When run on compressed files, the default is just to report that it contains "compressed data", but you can alter that behaviour using the -z switch

 -z, --uncompress
         Try to look inside compressed files.

i.e.

$ file -b octave-4.0.0.tar.gz
gzip compressed data, from Unix, last modified: Tue May 26 12:35:47 2015, max compression

whereas

$ file -zb octave-4.0.0.tar.gz
POSIX tar archive (gzip compressed data, from Unix, last modified: Tue May 26 12:35:47 2015, max compression)

Based on that, you could try running file -zb within a find command, and greping for the word "archive": something like

find . -type f -exec sh -c 'file -zb "$1" | grep -q "archive"' _ {} \; -print

The -b switch prevents false matches on the file name.


Bluetooth mouse lag -- Precision 5510 -- MX Anywhere 2 -- 16.04

Tried setting it up on Ubuntu 18.04 and happily (surprisingly, if I'm honest), it worked without any adjustments. True plug and play :-)


How to correctly write hosts file to redirect to ip with subdirectory

What you are trying to do can not be done from the hosts file. The hosts file is just to statically map IPs to hostnames. It has no say in what path HTML pages are loaded from.

If the html is using absolute links from the server root eg. <a href="/en/rest-of-the-link"> you can just add a . at the start to fix the issue so that instead of taking you to http://localhost/en/<rest-of-link> you will go to http://localhost/subdirectory/en/<rest-of-link>


How to make sure the server uses the gateway from eth0 at multiple DHCP network setup

Problem appears when eth1 go up, because also from dhcp got default gw param. You can add in /etc/network/if-up.d/ some script to returns default gw to eth0

Example:

sudo nano /etc/network/if-up.d/script

and put content

# Check for specific interface if desired
[ "$IFACE" != "eth1" ] || exit 0
# Return default interface and gw
route add default dev eth0

give script privilege

chmod 755 /etc/ppp/if-up.d/script

if-up.d will trigger script called script when eth1 go up and return default gw to eth0


Load Kernel Modules boot error after do-release-upgrade from 14.04 to 16.04

Fixed!

I ran sensors-detect and it found I needed w83627ehf and added this to my "/etc/modules" (in fact, /etc/modules-load.d/module.conf) file.

sensors-detect suggested I run /etc/init.d/kmod start and I did but this failed again as it wasn't able to load it87 so I commented that out of the /etc/modules-load.d/modules.conf file and boom, no more Load Kernel Modules error!

Alas I think I've still a little way to go before I can boot in a 4.x series kernel without that pesky hang (though secondary terminals work fine) on Starting Show Plymouth Boot Screen...

Hope this helps someone out in the future.


Nvidia Prime Render Offload "On-Demand" doesn't work with nvidia-driver-450 and ubuntu 20.04.1

There is no automatic switch in linux (automatic switch only works in windows) and use of Nvidia GPU can only be done by manually add the prefix before the command.
For Vulkan :
__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only
__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=non_NVIDIA_only

For GLX + OpenGL
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia
__NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 __GLX_VENDOR_LIBRARY_NAME=nvidia

But there is a little bug I reported in launchpad :
PRIME Profiles are not shown in nvidia-settings with 450 driver.
https://bugs.launchpad.net/ubuntu/+source/nvidia-settings/+bug/1895327
EDIT PRIME Profiles are now in the last drivers.
Source :

https://forums.developer.nvidia.com/t/prime-no-offloading-required-prime-is-it-supported/154181
https://bugs.launchpad.net/ubuntu/+source/nvidia-settings/+bug/1895327
http://download.nvidia.com/XFree86/Linux-x86_64/435.17/README/primerenderoffload.html


Executables in snaps and exposed in /snap/bin. In the case of Chromium it's executable is /snap/bin/chromium.


Error when running apt upgrade about initramfs attempting to resume from /dev/sda5

This is just information, as shown by the I:. It does not cause any problems for me and /dev/sda5 (my swap partition) continues to work fine.


Google really is your friend tuxgarage has a great guide on your problem and also the command you forgot to get network access is

sudo cp /etc/resolv.conf /mnt/temp/etc/resolv.conf


Creating a network with lxd on xenial-backports

The error message says:

failed to create listening socket for 10.95.139.1: Address already in use

When you create a new network with lxc network create, LXD spawns a new dnsmasq process for you, a process that binds to the new interface and only that.

It is weird that it complains that the address is already in use, because the new dnsmasq is on a separate independent interface. To make sure there is no race condition, try

lxc network delete lxdnatbr0

and then create it again.

If it does not work, run

ps ax | grep dnsmasq

in order to get a list of all dnsmasq processes.


Keyboard layout identical to "US Extended" on Macbook Pro

The best thing for you is to learn the keyboards of each world ... because by using a pc keyboard on a mac or a mac keyboard on a pc you'll restrict yourself on the real use of the machine.

After a simple search those links answer to your question, you'll just have to apply it to your needs :

How to configure a keyboard on Ubuntu (simple way but may not fit your specific needs) :
http://rabbitmoondot.blogspot.fr/2012/01/how-to-configure-ubuntus-keyboard-to.html
https://help.ubuntu.com/community/AppleKeyboard

and the hard one (but the one that I think will answer to your need) :
http://michal.kosmulski.org/computing/articles/custom-keyboard-layouts-xkb.html
https://help.ubuntu.com/community/Custom%20keyboard%20layout%20definitions

Best regards.


You need the correct Wine, Winetricks, the correct GTA version and a special patch.

Obtain a Steam-less version of GTA IV Title Update 7;
Obtain and install Wine 1.7.22 and the latest Winetricks;
Install and patch GTA with the XLiveLess Patch;
Backup the .wine directory in your Home;
Execute the following commands in a terminal (xterm is OK, those actions should make the game more stable):

rm -fr ~/.wine

export WINEARCH=win32

export WINEPREFIX="/home/YOURUSERNAME/.wine"

winecfg
Install the following common packages with Winetricks:

d3dx10

d3dx9_26

d3dx9_28

d3dx9_31

d3dx9_35

d3dx9_36

d3dx9_39

d3dx9_42

d3dx9_43

d3dx9

directx9

dotnet20sp1

dotnet20

dotnet30sp1

dotnet35

dotnet40

gfw

mfc40

mfc42

msxml3

msxml4

msxml6

physx

quartz

vb6run

vcrun2003

vcrun2005

vcrun2008

vcrun2010

vcrun6sp6

vcrun6

wmp10

wsh56vb

wsh57

xact_jun2010

xact

xinput

xna40
Play, like in the demonstrative video.
If the game hangs, set the Wine enviroment to "Windows XP".

Some textures might disappear and you may find occasional lag spikes or freezes during your gameplay; save your game often and backup your savegames from time to time.
You will not be able to play online and this guide may not work on pirated (and customized) copies; always buy a game if you really like it.

Please, feel free to comment under here or on WineHQ if you have more questions and don't forget to press the left UP arrow and mark as favorite if I'm of any help.

Have a nice day.


Dual Boot Ubuntu 16.04LTS + Win7 on Dell Precision 3620 gives "BIOS compatibility mode" Force UEFI issue

Overall, I agree with duncan, but I want to elaborate on his comment.

Old computers (most x86/x86-64 systems from before mid-2011) booted using a firmware type called the Basic Input/Output System (BIOS), which usually booted from disks that used the Master Boot Record (MBR) partitioning system. Both of these technologies were created in the 1980s, so they're very old by computing standards, and they've been showing their age for quite a while.

The successor to BIOS is a firmware type called the Extensible Firmware Interface (EFI) or its version-2.x variant, the Unified EFI (UEFI). Computers that use an EFI/UEFI generally boot from disks that use the GUID Partition Table (GPT). Confusingly, many people, and even manufacturers, refer to their EFIs as BIOSes, or sometimes as "UEFI BIOSes" or something similar. My guess is that the manufacturers do this because people know more-or-less what a BIOS is and substituting the term EFI or UEFI would be confusing; but this mis-terming creates its own confusion because people drag their BIOS knowledge along and try to apply it to EFIs, which leads people to make mistakes. The bottom line is that BIOSes and EFIs are very different types of firmware to tackle the same task of beginning the boot process.

Fundamentally, BIOS and EFI are incompatible boot systems -- a BIOS-based computer can't boot with an EFI boot loader and vice-versa. To ease the transition, though, most x86-64 (aka AMD64 or x64) EFI-based computers ship with a Compatibility Support Module (CSM), which enables them to boot with a boot loader designed for BIOS. The CSM is something like dosemu in Linux, in that it allows a newer environment (EFI or Linux) to run programs for an older environment (BIOS or DOS). One limitation of the CSM is that switching between BIOS-mode and EFI-mode booting is usually awkward. This awkwardness is largely a matter of user interfaces -- the switching requires use of the computer's built-in boot manager, which on most computers is very primitive. Another limitation is that some OSes, including Windows, tie the boot mode to the partition table type -- Windows will only boot in BIOS mode from MBR disks, and booting in EFI mode works best from GPT disks. This second factor makes it very difficult to install one OS in BIOS mode and another in EFI mode. To be sure, there are ways to do it, but they're awkward and seldom worth the effort.

Most computers that shipped with Windows 7 used plain BIOSes, but toward the end of the Windows 7 era, EFIs became available, so some Windows 7 systems shipped with EFIs. Some of these booted natively in EFI mode, but others relied on their CSMs to boot in BIOS/CSM/legacy mode. It sounds like your computer fit in the latter category. As such, you have three choices when setting up a dual-boot system with your existing Windows installation and a new Ubuntu installation:

Boot both in BIOS/CSM/legacy mode -- This is the simplest thing to do; however, if you accidentally boot the Ubuntu installer in EFI mode, you'll get the warning you describe; and if you force it to install in EFI mode, you'll end up with a mixed-mode installation at best and an Ubuntu that's unbootable at worst. To force a BIOS-mode installation, you must learn to control your boot process, either by selecting the BIOS-mode boot option for the Ubuntu installation medium or by removing the EFI-mode boot loader from the Ubuntu installation medium. Unfortunately, details of controlling the firmware vary from one computer to another.
Boot both in EFI/UEFI mode -- This is a possibility, and in some ways it's preferable to the preceding one; however, it will require you to convert your Windows installation from a BIOS-mode to an EFI-mode boot. This conversion is possible, but it's tedious, and there's a significant risk that it will go badly. "Go badly," in this context, means that your computer will no longer boot Windows and you'll need to re-install it! If you want to pursue this option, see this blog post for instructions. Microsoft also has a new tool, called MBR2GPT.EXE, that's supposed to be able to do the job; but it's only available with the latest Windows 10 version.
Do a mixed-mode installation -- If you tell the installer to continue at the prompt you've described, this is what you'll get; but depending on how the firmware is set up and how you partition the disk, the boot loader might not work, or even be installed at all. The easiest way to do this type of setup, given your starting point, is to create a ~550 MiB FAT32 partition with a type code of 0xEF in addition to the regular Ubuntu partitions. This 0xEF partition is an EFI System Partition (ESP), which holds EFI boot loaders. You can then install my rEFInd boot manager to the ESP and edit its refind.conf file: Uncomment the scanfor line and ensure that it includes hdbios as one of its options. When rEFInd launches, it will probably include an option to boot Windows in BIOS mode; and it will also provide at least one option to boot Ubuntu. Note also that mixed-mode setups are impossible on some (rare) computers. AFAIK, no Dells are among these.

Clearly, the easiest solution is to do a BIOS-mode Ubuntu install. The main difference between this approach on your EFI-based computer and the same thing on an older BIOS-only computer is that you'll need to learn more about controlling the boot process, so as to avoid accidentally installing in EFI mode. Unfortunately, details vary from one computer to another.

You may want to read my page on the CSM for some more background information. Be aware, though, that I wrote that page for the benefit of people with Windows 8 or later systems that currently boot in EFI mode and who might be instructed or tempted to install Linux in BIOS mode, not the other way around. Thus, the emphasis of my page is on preventing inappropriate use of the CSM, whereas you probably want to guarantee use of the CSM for your Ubuntu installation.


unable to use the 13.04 applications after login

I don't know what you mean to install "Gnome" since you are in fact using "Gnome 3". In any case, moving the mouse to the upper left corner and/or clicking there, should bring you the Dash. In the Unity's case moving the pointer to the left edge should be enough.

If you want to initiate the Ubuntu Software Center there are a couple of ways.

Bring up the dash, either moving the mouse to the upper left corner or pressing the Meta (or Windows) key then type 'software center'
Press Alt + F2 and type 'software-center', then press enter.
Open a terminal and type software-center, then press enter.


How to put Solaar in the System Settings panel?

Did you make it look like this...

[Desktop Entry]
Name=Solaar
Comment=Logitech Unifying Receiver peripherals manager
Exec=solaar
Icon=solaar
StartupNotify=true
Terminal=false
Type=Application
Keywords=logitech;unifying;receiver;mouse;keyboard;
#Categories=Utility;GTK;
Categories=Utility;GTK;Settings;X-Unity-Settings-Panel;HardwareSettings;
X-Unity-Settings-Panel=Solaar

Result:


To create a pair of ports you will need a utility called "socat".

sudo apt-get install socat

Creating ports

socat PTY: PTY:

That should create and link the virtual port pair for as long as socat is running.

check this for more details.

Also check this it may help.

But buddy I think it's easier to user USB to serial converter.


DELL 7530 NVidia Graphic Card not working in Ubuntu 16.04.4

Solved:

Ubuntu have just updated the kernel version from 4.14 to 4.15. With the upgrade the issue is solved.

For newly installed Ubuntu, ensure that u enable the update option during installing. This will ensure that yr kernel is 4.15.

After installation, on the 1st reboot, wait for the grub screen to appear.
Now enter E at the Ubuntu option. Use the "nomodeset" method. (google "dell nomodeset"). Use method 1 only. This will allow u to login without problem.

Once inside ubuntu, google "Ubuntu Nvidia Drivers", follows the step to install Nvidia driver. Select the Nvidia driver in via "additional drivers".
reboot the system.

That all.


I'll describe this with magnet: URI type and Transmission (i.e. case of
bittorent), but the same method can be applied to any scheme or file type.

Also I checked this with Debian Jessie, and I don't actually have Ubuntu
machine, but I believe it should work the same (at least for xdg-open,
note that file managers may choose to use different logic).

Find out the MIME type string.  For file MIME types, you can
 find it out with file command:

$ file -i Broken_Blossoms.webm
Broken_Blossoms.webm: video/webm; charset=binary
$

For the above file, MIME type is video/webm.

For URI handlers, the type is x-scheme-handler/<scheme>, where
<scheme> is the part of URI before colon, e.g. "http", "mailto"
"irc" or "magnet".  Following are examples of valid MIME types:

x-scheme-handler/http
x-scheme-handler/irc
x-scheme-handler/magnet
x-scheme-handler/mailto

Find out the name of application .desktop file.

Often it's not the same as the "official" name but rather lowercase
version of it, or a completely different name.  Installed .desktop
files live under /usr/share/applications.  Since they are normal text
files and contain the "official" name, following command can help you:

$ grep "Transmission" -l -r /usr/share/applications
/usr/share/applications/transmission-gtk.desktop
$

The command effectively means "list files under this directory
that contain word 'Transmission'".  Some applications may
be installed only for user, in that case the path would be
~/.local/share/applications.

In case you have "strange" application that may not have the file
at all, you can always create one (and perhaps send it to the app
developers).  Easy way would be to copy an existing one, rewrite
fields you understand and remove those you don't.  Refer to the
specification for details.
Make the assignment using xdg-mime command:

$ xdg-mime default transmission-gtk.desktop x-scheme-handler/magnet
$

Note that no matter where the file actually is
(/usr/share/applications, ~/.local/share/applications...), you always use
only the name, not the full path.

Normally the command will not output anything--that's OK.  If you
want to verify what you just did or see what is currently assigned
to any MIME type without opening it:

$ xdg-mime query default x-scheme-handler/magnet
transmission-gtk.desktop
$

Note 1: If you want to check out other MIME types, you can look
at /etc/mime.types.  It does not contain all types in the world; for
example the URI handlers,  but it could be used for "aggressive" form
of handling the associations.  For example:

grep ^video/ | cut -d\t -f1 | xargs xdg-mime default vlc.desktop

would associate all known video formats to VLC.

Note 2: The .desktop files often contain list of MIME types that
they claim to be able to handle using MimeType field.  xdg-mime
man page says that the .desktop file must claim the MIME type before
the above mentioned command will work, but for me it seems to work even
if the field is missing.  (I mean, the association will be applied and
the application will launch--if it really can handle the type is a
different question).  I'm not sure what is drawback (maybe in future
the xdg-mime will be more restrictive).


Macbook pro keyboard and track pad with Ubuntu 18.04

Assuming you have Gnome installed instead of Unity, I would download Gnome Tweak Tool if you don't already have it using the following commands:

sudo add-apt-repository universe
sudo apt install gnome-tweak-tool

On the right, click on the "Typing" Section. It should be under 'Alt/Win key behavior' or 'Ctrl Key Position'

For the multitouch, it is a little more complicated. If the mouse currently works for the most part but just doesn't have gestures, look into using LibInput-Gestures, found at this link: https://github.com/bulletmark/libinput-gestures
Just follow the directions there to set up your gestures as you please.

Good luck!


I had the same problem for several days after a fresh install, using all the default settings except adding dl.google.com to  mirror-dstdomain.acl. I'd always get TCP_MISS.

The solution (after many many tries) was to add the exact network to allowed-networks-src.acl (don't forget to restart squid3 && restart squid-deb-proxy). Since then I see the beautiful TCP_MEM_HIT on every package.

(My network is 10.10.10.0/24, which is part of the 10.0.0.0/8 allowed in allowed-networks-src.acl. I do think this behaviour is not nice in a system calling itself zero config.)


How do the various APT package removal commands differ?

Quick Answer

remove uninstalls packages named after it.
autoremove uninstalls all automatically installed packages that are no longer needed. It is incorrect to list package names after autoremove; they will be ignored (and all eligible packages will be removed), which is probably not what you intend.
--purge causes systemwide configuration files associated with packages being removed to be removed as well. It must be accompanied by a command, such as remove or autoremove. The --purge flag modifies the action of a command; it does not act on its own.
purge means the same thing as --purge remove (which is the same as remove --purge). It is incorrect to say purge twice; the second purge is interpreted as the name of a package to be purged, which is probably not what you intend.

Full Answer
To understand what those commands do and how they are different, it helps (and is probably even essential) to understand two concepts:

the distinction between manually installed and automatically installed packages
the distinction between a package's package files and its configuration files

Manually Installed vs. Automatically Installed
An installed package is either manually or automatically installed.
When you specify a package for installation, and it is installed, it is manually installed.
But other packages may also be installed. Most packages have dependencies--other packages that must be installed, for those package to work as intended. When you install a package, its dependencies (i.e., the other packages that it depends on) are installed, except for the ones that were installed before.
When a package is not specified by you to be installed, but instead is installed as a dependency of a package you specified to install, the it is automatically installed.
Please note that when you have two packages installed and one of them is a dependency of another, that does not mean the dependency is automatically installed. It's also possible that the dependency was manually installed (i.e., specified by you, for example, installed before or at the same time as the package that depends on it).
Finally:

If you try to manually install a package that is already installed, it remains installed. But if it was automatically installed, a change is made--trying to manually install it will mark it as manually installed.
You can mark any package as manually or automatically installed (with the apt-mark command), no matter how or under what circumstances they were actually installed.
Packages that come preinstalled with your Ubuntu system are not all automatically installed; some of them come marked automatically installed and others come marked manually installed. This is to satisfy the logic behind distinguishing between manually and automatically installed packages--the idea that some packages are only needed in service of others.

Typically, for every automatically installed package you will have at least one manually installed package that depends on it (and which caused it to be automatically installed). However, if you then remove all the manually installed packages that depend on an automatically installed package, the automatically installed package will no longer be necessary, but will still be installed.
apt-get autoremove removes automatically installed packages that no longer have any manually installed packages depending on them.
Package Files and Configuration Files
A package provides files that are intended to be, and to remain, the same on every system where that version of that package is installed. Such files provide executables, resources, documentation, and other "assets" for installed programs. We usually just called these "the files" that a package provides.
But a package provides other files, too, which are intended to (possibly) be changed. These are called global (or systemwide) configuration files. They are almost always installed in the /etc directory, and they can be automatically and manually modified to change the behavior of installed programs. For example, sudo has a configuration file /etc/sudoers, and a directory for more configuration files /etc/sudoers.d. That file, and any files added to that directory, specify who is allowed to use sudo in what ways.
Typically it is desired that uninstalling a package and then installing it back should not change the way it behaves (unless its package files were corrupt and that's why you reinstalled it, of course). Therefore, typically when a package is uninstalled, its package files are deleted but its systemwide configuration files are left untouched.
When you uninstall a package without specifying that its systemwide configuration files are also supposed to be deleted, that is called "removing" the package.
If you also want to delete a package's systemwide configuration files when you uninstall the package, that is called "purging" the package.
apt-get remove will remove a package; that is, it will uninstall the package but leave its systemwide configuration files.
apt-get purge will purge a package; that is, it will uninstall the package and also make sure to delete its systemwide configuration files.
Another way to purge packages is to use the --purge flag. That doesn't tell apt-get what to do; instead, it modifies what terms (or "commands") like remove tell it to do. The --purge flag causes any package uninstallations to be accompanied by the deletion of systemwide configuration files for the package(s) being uninstalled. In other words, the --purge flag turns removals into purges.
Why do we have the --purge flag when we have the purge command? After all, isn't sudo apt-get --purge  remove packagename equivalent to sudo apt-get purge packagename. They are equivalent. Where --purge comes in handy is when you want to modify the behavior of commands other than remove.
For example, suppose you want to uninstall automatically installed packages that are no longer needed (because there are no longer any manually installed packages depending on them), but you don't just want to remove these automatically installed packages, you also want to delete their systemwide configuration files. Then you could run:
sudo apt-get --purge autoremove

Let's consider one more use of --purge. There is a flag called --reinstall, which turns installations into reinstallations. This is to say that, normally, when you try to install a package that is already installed, either nothing will happen, or (if the package is marked automatically installed) the package will be marked manually installed. But with the --reinstall flag, installing a package that is already installed causes it to be removed and then installed back:
sudo apt-get --reinstall install packagename

But suppose you want to delete the systemwide configuration files of the package you're reinstalling. This is somewhat common; when a package is not working and you don't know why, you might try reinstalling it, and also deleting its configuration files so that its configuration is reset to the default. To achieve this, you can run:
sudo apt-get --purge --reinstall install packagename

The --reinstall turns installation into reinstallation (i.e., removal followed by installation), and the --purge turns the removal part of reinstallation into purging.
The Behavior of Your Examples
Now it should be clear exactly what each of your example apt-get commands do:

sudo apt-get autoremove --purge packagenames
This purges automatically installed packages that no longer have any manually installed packages that depend on them. That is, it uninstalls those packages (which entails deleting their package files), and it deletes their systemwide configuration files too.
Here, packagenames does nothing. In particular, if you intended to just remove packages whose names are listed there, then this will not behave as you intend.

sudo apt-get remove --purge packagenames
This purges packagenames; assuming packagenames is a whitespace-separated list of package names, it will purge all of them. That is, it will uninstall them (which entails deleting their package files), and will also delete their systemwide configuration files.
If any of the packages listed in packagenames is not installed, its presence in the list will have no effect (except that you will be informed it was not installed). If you list package names that are not the name of any actual package, the command will fail with an unable to locate packagename error.

sudo apt-get purge purge packagenmaes
If you removed one of the occurrences of purge in that command, it would be equivalent to the previous one. As it stands, it tries to purge a package called purge, and also to purge the packages listed in packagenames. Since purge is not the name of any package, it will fail with an error message.

sudo apt-get remove packagenames
This removes the packages listed in packagenames, which entails deleting their package files. This does not delete their systemwide configuration files (because it is merely a removal, not a purge).

sudo apt-get autoremove
This uninstalls automatically installed packages that no longer have any manually installed packages that depend on them. This entails deleting their package files, but not their systemwide configuration files (that is, it is a removal but not a purge).

For more information about how to use apt-get, I recommend its manual page. For more general information, see this guide.


How to give feedback to the Ubuntu developers

You can do this several ways:

Join the Ubuntu-devel list, and submit your idea:

https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel

Go to Brainstorm and submit it there

http://brainstorm.ubuntu.com/

Go to the website of the application itself and file a feature request

If it's a bug report, submit it in Launchpad:

https://help.launchpad.net/YourAccount/NewAccount

Before submitting a bug you should read

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

This as already beem discused in AU


How to disable snap reserve feature to auto-remove previous snap versions?

Well, its setting refresh.retain does not allow less than 2.
A workaround using script:
snap list --all | while read snapname ver rev trk pub notes; do if [[ $notes = *disabled* ]]; then snap remove "$snapname" --revision="$rev"; fi; done
Source: Similar question on SU - How to remove old version of installed snaps?


This is almost certainly either a bug in the ACPI table of your BIOS, in Ubuntu, or a combination of both (possibly in how Ubuntu handles the APCI table).  Unfortunately, as stated in the FAQ, Ask Ubuntu is not a place to post bugs.  Therefore, you should report it at Ubuntu's Launchpad project page.


Your best bet will be the

Ubuntu Manual

Note though that it deals with 10.10, not 11.04. There's also a version of the book for 10.04. But: it's absolutely excellent, and on the perfect level for your purposes.

If it matters for you: the book, unfortunately, is not available in Swahili.

See also:

List of free Ubuntu books


For very new hardware, you can try to install newer kernels.

For Ubuntu, they can be found here: http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19.6-vivid/

For x64, you need 3 packages:

linux-headers-3.19.6-031906-generic
linux-headers-3.19.6-031906_3.19.6
linux-image-3.19.6-031906-generic_3.19.6

Download them to one folder, and install by:

dpkg -i *.deb


Any device that allows reading or writing data blocks is a "Block Device". In Ubuntu hard drives are represented by their drivers either as /hdX for an IDE drive or /sdX for a SCSI (or SATA in a modern system) drive.

The X stands for an alphabetic letter starting with a for the first device. The first hard drive in your system will therefore be /sda, the second drive /sdb etc.. Partitions on that device are further numbered. The first partition on the first drive is /sda1, the third partition on the third drive /sdc3 etc.

To list the representation, UUID and TYPE of all block devices in our system we may issue:

sudo blkid
sudo lsblk

This, in combination with the following command to give further details on partitions

sudo fdisk -l

should give us enough information to find out the location of our Windows, or Ubuntu installation.

Throughout information on how we boot is given with the Boot Info Script.

To answer your additional question: root can do anything. Therefore it is no way other than unplugging the drive to prevent root from overwriting a Windows partition.


Disk space is lock or not release after moving files

when ever i faced this type of problems..,
1.I tried to repair the disk using tools option.
2.Location of tools option is --> Right click on the disk
                              --> Go to properities-->tools
                              --> click on error checking
                              --> Schedule disk check
3.Finally restart your computer.

I hope this would help you


An easy way would be to use grep:

date +'^%b %d %Y' | grep -f- your_file


So you are using your system with DUAL boot, Winodws+Ubuntu.
It's a pretty common problem with dual boot and seems to be an issue with GRUB boot loader.

You can repair it by going to GRUB boot menu and open the os in recovery mode (check this article about How to repair Ubuntu).
You can also choose to install a fresh copy of your system via keeping your old files.

Better to choose two different partitions, one for windows and another for Ubuntu while you create a dual boot system. and don't forget to turn off UEFI booting.

Thanks


OpenJDK vs. Oracle JDK for Android Studio

I think that it depends on what you are going to be doing. There are probably some compatibility issues for random features. I have not run into any myself, but you may be better off using the JDK from Oracle. Webupd8 does a great job distributing the JDK via a PPA which makes it pretty easy to install on Ubuntu.


Why doesn't Inkscape recognize the Ubuntu color palettes?

The problem is that the color palettes were not saved correctly. I have re-saved them in a proper format and put them on Ubuntu One.

Here are the files. In the archive there is now a readme file explaining the installation process as well.

Update

I've filed a bug against ubuntu-branding and sent a fix to be replaced with the currently available palette on design.canonical.com.


GRUB doesn't give the option to boot into Ubuntu

Here are two references you should look at

https://help.ubuntu.com/community/Grub2#Reinstalling_GRUB2

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

Comments converted to answer Anonymous Oct 28 '11 at 11:14


I've got the same card and the closed-source drivers in ubuntu 13.10 doesn't work at all. No matter if you try the ones from ati website, the ones from ubuntu ppa, or the ones from xorg-edgers ppa...

For  now, the only one that works is the open-source driver. If you want to get them  improved there's a ppa with some fixes for them here:

https://launchpad.net/~oibaf/+archive/graphics-drivers/

First, be sure any fglrx is removed from the system:

If you installed them trough a ppa:

sudo apt-get remove fglrx*

If you installed using the .run package from ati website, you'll have to run the ati-uninstaller manually (not sure where it is, but you can have a look in /usr/share/ati).

And then, add the ppa and install xserver-xorg-video-ati or xserver-xorg-video-all

sudo apt-add-repository  ppa:oibaf/graphics-drivers
sudo apt-get  update
sudo apt-get upgrade
sudo apt-get install xserver-xorg-video-all


As RobinJ said before, you are looking for a Swap-Partition. Linux usually does not make use of virtual memory in a file, like windows does, but needs it on its own partition. Swap is used for suspend to disk, since this command will copy the ram into the swap space.

To find out if you already have a swap partition, type

swapon -s

into a terminal. it will list all swap partitions.

Swap files are also possible but do rarely exist. For a guide, see https://www.linux.com/news/software/applications/8208-all-about-linux-swap-space

For a guide of how to add swap space, please refer to How do I add a swap partition after system installation?
But attention! The mkswap command formats the partition which cannot easily and often not at all be restored.

Generally, swap is less useful (but still used!) since bigger RAM is affordable (except for suspend to disk).
Some sources say the swap space should be as big as the RAM and a maximum of twice as big as RAM. For suspend to disk, swap space should be RAM size plus 30%.


I'm specifying the port when I use scp, but I get an error saying port 22 connection refused. What am I doing wrong?

You don't need the user@host:/path/to/file.name syntax for the local file that you are trying to copy - in fact, doing so is likely causing scp to try to open a connection on port 2222 from your laptop to itself. Try just

scp -P 2222 path/to/file.name user2@[serverIPaddress]:/home/user2/filepath/file.name


The problem could be with the compatibility with the chip of the box of the external HD and ubuntu, because with other external HD (such as samsung 2TB and WD 1TB) everything goes well.

Nevertheless that external HD works well with other notebook which run windows.


Simple Scan not detecting my scanner (Brother DCP-7055W)

I came across the posting Brother MFC-L2700DW printer can print, can’t scan by oscar1919 on Ask Ubuntu.  I have a Brother multi-function printer but a different model than that specified by Oscar.

Oscar indicated that some of the installation files may be copied into the wrong folder. For 64-bit Linux, the instructions were to check that the folder /usr/lib/x86_64-linux-gnu/sane exists.

However, In my case, this folder was indeed present, but it was empty. The subsequent instructions were, essentially to copy the files libsane-brother* from the /usr/lib64/sane/ folder to /usr/lib/x86_64-linux-gnu/sane.

On my system, the three files to be copied were: libsane-brother2.so, libsane-brother2.so.1 and libsane-brother2.so.1.0.7.

Once these files were located in the /usr/lib/x86_64-linux-gnu/sane folder, Simple Scan sprung to life and scanned a test document.


Ubuntu 11.10 x64 and AMD Processor slow performance

I think that You should see Your mainboard manual, and turn on/off something in BIOS. That is my guess. I prefer intel processors, but the truth is that the processor type should not infuence efficiency in the way You described.

Did You try new config with other OS?


There is a thread on ubuntuforums dedicated to resolving this.  Below I've just summarised the thread - note - apparently this 'fix' depends on the theme you are using.  Looking through the thread from back-to-front, there is an alternative suggested answer involving compiling code.  If below doesnt work for you have a look at the thread to see if the compile option works.

gedit ~/.gtkrc-2.0

replace the contents with the following (n.b. if there is a blank file you are probably not using a standard theme so this probably will not work)

style "panel-arrow-remove"
#the following removes the arrows from the panel
{
engine "pixmap"
    {
    image
    {
        function    = ARROW
        recolorable    = TRUE
        overlay_file    = "arrows/arrow-blank.png"
        overlay_border    = {2,2,2,2}
        overlay_stretch    = FALSE
        arrow_direction    = UP
    }
    image
    {
        function    = ARROW
        recolorable    = TRUE
        overlay_file    = "arrows/arrow-blank.png"
        overlay_border    = {2,2,2,2}
        overlay_stretch    = FALSE
        arrow_direction    = DOWN
    }
    image
    {
      function          = HANDLE
      recolorable       = TRUE
      overlay_file      = "arrows/arrow-blank.png"
      overlay_stretch   = FALSE
      orientation       = VERTICAL
    }
    image
    {
      function          = HANDLE
      overlay_file      = "arrows/arrow-blank.png"
      overlay_stretch   = FALSE
      orientation       = HORIZONTAL
    }
    }
}

widget_class "*PanelToplevel*"          style "panel-arrow-remove"

Save, reboot.


Need advice installing Ubuntu on 2nd storage drive for windows 7 computer

There are several different ways to handle bootloaders when dual booting. The steps below show how to install the Ubuntu bootloader (grub2) to the external drive, and alter the bios boot order accordingly. This means when the external drive is connected you can choose between Ubuntu or Windows, but when it's not you will just boot into Windows without seeing any options. This also makes it easier if you decide to delete Ubuntu down the road, because the Windows bootloader hasn't been touched. You can also boot by choosing a boot drive at startup from your BIOS's quickboot menu. I've only included instructions for the important steps, excluding the straight-forward things like picking a username, this way the post isn't filled with thousands of pictures. When you boot into Windows 7 again for the first time it will probably want to run a "diskcheck", don't worry it's just doing this because it's noticed changes to the external hard drive. These instructions are for BIOS/MBR setups not UEFI/GPT!!! It's highly recommended to backup important data before partitioning of any kind.

Step #1 = Boot into your BIOS. They key used to access this varies from computer to computer, but the common keys are F2, F4, F11, F12, and ESC.

https://copy.com/cJqcB0JHkEVj

Step #2 = Change your boot order to "CD/DVD, Removable, and Hard Drive".

[Please note that some systems will allow you to organize the hard drive boot order and may even detect your external drive as a hard drive, if this is the case then set your external to 1st boot of the hard drives. This may also cause problems for you if your bios doesn't remember the drive order after a disconnection. You can test to see if this is a problem for you, by changing the order, shutting down, disconnecting the drive, rebooting, shutting down, connecting the drive, rebooting, and checking the list to see if it puts the drive in the correct order.]

copy.com/WOm678oiXOdA

Step #3 = Save your changes, exit your bios, and boot your Ubuntu installation disc. Choose "Try Ubuntu".

copy.com/RqdXTCCaucj0

Step #4 = In the programs dash, search "gparted", and open it.

copy.com/9rQraOW76bUH

Step #5 = In Gparted, chooose the external drive that you want to install Ubuntu on.

copy.com/UTdPZ3hZ4uKv

Step #6 = copy.com/PQO93zQtsPWf

Step #7 = Right click on the "Data" partition and choose "resize/move".

copy.com/iODPvUPrsVvT

Step #8 = Shrink the data partition to make room for your Ubuntu installation and a swap partition. In my examples I've freed up space on the end of the partition because you mentioned having data written on the drive. You can free up space on the front but it will take longer because the data will actually be moved, this takes longer, and is more dangerous if you haven't backed up your data. However in general I recommend installing Operating Systems to the front of a disk when possible because it gets better performance since it's on the outside edge of the physical spindle, but that's just me being picky.

copy.com/pxQexuip2DiX

Step #9 = Apply the changes

copy.com/seNSCewtrImz

Step #10 = create a new parition

copy.com/bzruAOjIKOvY

Step #11 = This partition will be for Ubuntu. Make sure to leave some free space for swap. Most operating systems recommend having around the same amount of swap as ram. I personally like having around 10gb regardless of ram, but that's overkill and can actually slow your system in some circumstances.

copy.com/e2VTJ20pdc7d

Step #12 = Apply the changes.

copy.com/G6kz94wwFjFe

Step #13 = Create a new partition.

copy.com/uZifMzqIBdLH

Step #14 = This one will be for swap.

copy.com/LLRVUPYW9q7o

Step #15 = Apply the changes. You may wonder why I've said to do the changes all individually. This is because in my experience gparted can fail when applying certain multi-proceedures. Better safe than sorry.

copy.com/gCmUqRIZU3Ae

Step #16 = Launch the Ubuntu installer.

copy.com/IdrhUu0ra6mb

Step #17 = You will probably want the "3rd party software" box checked. I personally don't like to install updates, but that's up to you to decide.

copy.com/i8ng8P2ugrQW

Step #18 = Choose "something else". If you don't see an "install alongside" option then you have a problem, because it means your Windows installation isn't being detected.

copy.com/JQbwzdx6ishL

Step #19 = Locate the partition you are going to use for Ubuntu and configure it for use by the installer.

copy.com/Hk0uRTzAB4Yo

Step #20 = copy.com/NdCBTXh7UM2T

Step #21 = Choose the external drive as the drive the bootloader will be installed to.

copy.com/cFa3cAFf60qV

Step #22 = You will see warning about not having checked the "format" box, dont' worry just proceed, or you can go back and check the box if you like.

copy.com/3aCVvSUYZEsr

Step #23 = If you want to import stuff from Windows you can check the box. I didn't.

copy.com/pXZsNALf3hZJ

Step #24 = Restart the system. You will be given the opportunity to remove the installation disc. If you don't it will just boot into the disc again.

copy.com/pzMC9OJZoLyD

Step #25 = When your computer starts up it will now give you the option to boot Ubuntu or Windows. If the external drive isn't connected, then you won't see this screen, and will automatically boot into Windows.

copy.com/YDoUFJttPbUU

[ All the images from above can also be accessed here = https://copy.com/sXcYEeBm1xtj ]


Make sure keyboard repeat is enabled. You can do with the following command
gsettings set org.gnome.desktop.peripherals.keyboard repeat true


Do I need to / how do I uninstall integrated graphics before installing card drivers?

By default a PCI-E graphics card will be used in preference to an onboard one, older AGP systems sometimes needed this to be manually set in the BIOS but not on newer hardware.

If it is reporting the card in use as the AMD then it is already being used it will be using the open source radeon driver. The AMD proprietary drivers will not work since AMD proprietary drivers have not been updated to support the newer Xorg 1.18.

As for lspci it simply lists devices in the order of their PCI ID numbers so the ordering of that list has nothing to do with which devices are in use or how. Rather it is affected simply by the way the devices are physically connected to the system.


If windows8, I believe the key is stored somewhere in the system BIOS.

As for accessing the NTFS partition. The problem you have is that Windows was not properly shut down so the Windows system is in a hibernate state. You should properly shut down Windows.

Have you tried using the Windows 10 installation USB to boot up? You could probably start the system up using any Windows installation media. Then, once the system is started up you can shut the system down properly.

You can also usually access a command prompt from the Windows installation media. From there you may be able to run the following command to resolve the issue:

powercfg /h off

Again, you run that command using the command prompt (sometimes called CMD) from the Windows installation media.

After you properly shut the system down, you will probably be able to access your files using Ubuntu if there are some files you need to retrieve before beginning the installation again.

Finally, Windows 10 sometimes has a repair mode or something similar to that you can use to try and repair whatever is left. Also, I believe Windows 10 doesn't require a product key as it verifies the legitimacy of the existing Windows media currently on the device and I believe it matches and verifies your unique device rather than requiring a product code entered manually but I'm not sure.


scp requires some special syntax. The IPv6 address must be enclosed in brackets, which must then be escaped. So in your example it would look like this:

scp -6 osis@\[2001:db8:0:1\]:/home/osis/test.file ./test.file

Otherwise the first colon ':' is thought to be the separator between the file and the address parts which would result in

ssh: Could not resolve hostname 2001: Address family for hostname not supported

In your example with the ip ::1 it is interpreted as if you want to ssh to the host '' (blank).


Gnome desktop blacked out after reboot and logon

I confirmed that after the following, the issue is resolved. Not sure why, and not even sure where to report this.

$ sudo apt-get purge virtualbox-guest-utils
$ sudo reboot

Versions

$ apt-cache policy virtualbox-guest-utils
virtualbox-guest-utils:
  Installed: (none)
  Candidate: 5.0.40-dfsg-0ubuntu1.16.04.1
$ uname -a
Linux 130s-p50 4.10.0-40-generic #44~16.04.1-Ubuntu SMP Thu Nov 9 15:37:44 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ gnome-shell --version
GNOME Shell 3.18.5


Error While Loading Shared Libraries (libGLU.so.1)

Actually I couldn't find libglu package itself. What helped is:

sudo apt-get install libglu1-mesa:i386

Ubuntu 14.04 x64


Edit ➜ Preferences ➜ Advanced ➜ Check 'Use autoscrolling'


It is, like Charles suggested a touch screen issue, which seems to be remediable by tapping the screen a few times.


I'm not sure why applications launched through gksudo aren't using your user's theme. It works for me on a full Lubuntu system. (But that uses Openbox, not Blackbox.) Fortunately:

The best solution for a program like the Update Manager is probably to install polkit (which is normally present) and run the Update Manager without gksudo. (See Way 1 below.)
For applications that do have to be started as root, or if you don't want polkit installed, a workaround is to specify the theme you want with GTK_THEME (see Way 2 and Way 3).

Way 1: Install polkit (a.k.a. PolicyKit).
The best solution for utilities like:

Software Updater / Update Manager (update-manager)
Ubuntu Software Center (software-center)
Lubuntu Software Center (lubuntu-software-center)
Software & Updates (software-properties-gtk)

...and many of the other system administration utilities in Ubuntu, is to just not run them as root at all.
Normally you don't need to run these utilities as root because they integrate with polkit and use it (instead of sudo) to perform authentication (just) when neccessary. Since the program showing you the user interface actually runs as you and not as root, it displays in accordance with your user account's configuration.
Typically nothing special must be done to achieve this, even on a Lubuntu system. Ubuntu is designed so that these utilities can just be run as a non-root user, without any special configuration.
But since your system is especially minimal, you probably don't have polkit installed. You can get it by installing the policykit-1  and policykit-1-gnome  packages.
sudo apt-get update
sudo apt-get install policykit-1 policykit1-1-gnome

With polkit installed, these utlities should automatically use it and won't need to be launched as root.
However, this may not be suitable:

if you don't want to install polkit, or
for running GTK+ programs as root that haven't been written to use polkit (such as Leafpad or Gedit).

Way 2: Set the desired GTK+ theme when you run gksudo.
Suppose you wish to run gedit as root. Note that this technique works the same way for other GTK+ programs (such as the Update Manager).
Instead of running gksudo gedit, you can run:
gksudo env GTK_THEME=HighContrast gedit
Replace HighContrast with the name of the desired theme.
(I use env because although sudo supports sudo VARIABLE=name command syntax, gksu/gksudo does not.)
Way 3: Make a launcher that that sets the desired theme.
This is the same as Way 2, just running your program through a launcher rather than typing a command each time.
To make a shortcut to run a program (like gedit) with a particular GTK+ theme (like HighContrast) as root in LXDE, run:
lxshortcut -o ~/Desktop/'gedit (as root)'
In place of gedit (as root), put whatever you want as the launcher's display name.
In the File Properties window that comes up when you run that command, click the Desktop Entry tab. In the text box labeled command, put:
gksudo env GTK_THEME=HighContrast gedit
You can leave everything else blank and just click OK.
If you want, you can use the full paths of the executables being run (/usr/bin/gksudo and, in this example, /usr/bin/gedit.) But this is not generally necessary.

Making a launcher for gksudo env GTK_THEME HighContrast gedit. (The left part of the command is not visible.)


Help with issue installing software package openFOAM

Just redo step 10.2 and continue with the remaining steps should do it.


How do I fix a error on a failed module build for Virtualbox?

1.) sudo apt-get remove virtualbox

2.) reboot

3.) sudo ln -si /usr/bin/gcc-4.6 /usr/bin/gcc

4.) reboot

4.) sudo apt-get install virtualbox

5.) optional reboot. :)

that all kids..!!


Ubuntu 18.04 Wifi slow on HP Laptop with Intel Centrino Wireless-N 2230 & Realtek RTL8111/8168/8411 PCI

From: Ubuntu Forums - Intel Centrino Wireless-N 2230 connection is very slow

Success was found using:

echo "options iwlwifi 11n_disable=8" | sudo tee -a /etc/modprobe.d/iwlwifi.conf

Of course since you've alread setup the iwlwifi option you can simply change the 0 to an 8.

Apparently 0 was old school and 8 is for newer drivers (sometime before September 2014 when OP posted question).


Unable to dual boot windows 8 and Ubuntu 12.10

in that case you need a clean installation of windows 8 and then make a partition for ubuntu i suggest to download and install wubi (wubi can determine if your computer is 32 bit or 64 bit) and then install it to the another partition .


How to use 'rsync' to copy ubuntu system to another disk?

rsync -AVax /source /destination --exclude=lost+found

if you want to boot from it, then fix your fstab in the new root fs, chroot in and fix, or add it to the original system, grub. should be all that's required


you are mixing two topics together:

filesystem/data backup
software and system management

for the first part of your question the most common answer in this case is relatively simple and i can suggest to create one or more mount point in different volumes or filesystem partitions as you like. The standard installation profile for Ubuntu provide only a root partition plus a swap space, so when you follow the standard installation wizard you obtain your operative system that uses a total of 2 partition; a better approach can consist in the creation of a third mount point for /home, so all your personal data are stored in a separate disk or in a separate partition, you can do this for all your mount point and you can connect this mount point as you wish, to every and each one hdd in your system or in a separate portion of your hdd. The basic concepts are fairly simple, take a look at docs like this one https://help.ubuntu.com/community/AutomaticallyMountPartitions about fstab and the various mount options .

the answer to the second part of your question is more complex and involves a deep knowledge about both software and hardware and is pratically impossible to give a specific answer to a question so generic. For example, there is no "standard" approach for a system failure caused by a bad video driver, you have to investigate the failure or you have to know how your software and your hardware works to do the right thing to do.


Creating Ubuntu 18.04 bootable USB...bootloader fails?

When booting the Ubuntu installation ISO, please select the option "Check disc for defects".

If it passes consider installing from a different media, ie: USB instead of DVD.

If it fails then try to create a new installation media.


Raspberry Pi: Filesystem writes files, but after reboot the old data is back

What seemed to help me was using the sync command:

sync

From the help:

  Force changed blocks to disk, update the super block.

It flushes the filesystem buffers in other words.
However I would expect that when you do a proper sudo reboot unlike me, this would be no issue and hence the sync might not work for you..

I was having similar issues with a raspbian wheezy install.
It has an ext4 partition containing the filesystem which is read-only. And a small read-write partition with FAT32 containing some configfiles. When I changed a config file and then pulled the power plug to restart the changes were not persistent. (be advised: without a read-only Pi, pulling the power plug would not be a smart thing to do anyway)


Ok, I had tried to post this earlier, but it did not post and I fixed the problem before it posted.  I figured I would still post it and how it was fixed.

Apparently, some files in the apt cache folder were damaged.
So I followed theses steps:

Clear the apt cache

sudo apt-get clean

Update the list of available software packages

sudo apt-get update

Try to finish all pending installations

sudo apt-get -f install

sudo dpkg --configure -a

Try the upgrade again

sudo apt-get upgrade

Note:
I would proceed with the next step only if the previous step had succeeded.


Why does ssh(d) seems to use OpenSSL heartbleed version?

Heartbleed only affects SSL/TLS connections, not every crypto function in the OpenSSL library, and sshd doesn't use SSL/TLS at all, so it's not affected by Heartbleed even if it's compiled using affected OpenSSL versions. See this question and answer.


You need to add two options in your ~/.Xresources :

URxvt*perl-lib: /your/perl/extensions/location
URxvt*perl-ext: # Comma-seperated list of extensions

You can find more options for customizing your terminal here.


Advice on best remote control solution for Ubuntu from Windows

One option i can recommend is Teamviewer which is free for personal use, easy to set up, avaiable for a lot of platforms.

Link to developer website.


How to reset monitor settings to default through terminal?

Whenever I put my Lubuntu laptop to sleep when it's exclusively displaying on my TV and wake it up after having unplugged it, I end up with a black screen because the wrong resolution is assigned. So same problem as you, I need to set the resolution from the TTY1 virtual terminal I can reach with Ctrl-alt-F1, but xrandr doesn't seem to work. I scoured pages of Google search results before coming upon the solution, so I thought I'd share.

The key thing is that xrandr apparently only works on the currently focused display. So you have to chain a sleep command before your xrandr command to give you time to switch back to the X server with Ctlr-alt-F7 so the command is executed there. Otherwise you get an error like xrandr: Configure crtc 0 failed.

Open virtual terminal with Ctrl-alt-F1 and log in

To get the names of connected screens (and assuming your X server is running on :0 ):

$xrandr -d :0

To modify display settings:

$sleep 5; xrandr --output LVDS1 --auto -d :0

Substitute LVDS1 by the output you want to modify, and --auto by whatever xrandr parameters you wanna use.

Switch to the X server with Ctrl-alt-F7 before the sleep delay you set in the command above elapses.

There HAS to be a better way to do this. But it works.

Original source for the solution: http://www.lgqyc.com/server-14-04-3-lts-display-orientation/

Check out this comment for a possible improvement to my solution (not tested myself).


Boots to a totally blank screen after I installed some ATI Radeon card updates

I got into the same "blank screen on startup" problem on my T400, after installing the suggested ATI driver. This notebook has 2 graphics chips, and the OS can switch / choose between them.
I could resolve the problem by adjusting two BIOS settings (hit F1 after power-on"):

Config > Display > Graphics Device: Discrete Graphics
Config > Display > OS Detection for Switchable Graphics: Disabled


Look at your /etc/apt/sources.list and may be you will find CD-ROM listed there.


Running a simple whois csgosyria.net command reveals that this domain is not currently registered. If you want your domain to be publicly accessed from the Internet, you need to:

Register your domain with a "registrar". You will have to pay for it. (Typically 12 USD / year for some extensions like .com or .net. However, there are some free domain extensions like .tk.)
On your registrar's control panel point your domain's DNS server(s) to your public static Internet IP. Normally at least two different DNS servers (IPs) are needed, but you can go with one IP only.
Make your DNS server's TCP and UDP ports (53) accessible from the Internet.


Ubuntu 16.04 applications freeze randomly, mouse and system shortly after

Updating the kernel from 4.4 to 4.8 seems to have fixed the problem. 3 days without crashes now.


Unable to detect HDD from windows 7 bootable disc

First, what do you mean Ubuntu zip drive?

Second, can you explain in detail what have you done with this hard drive and MBR?

As it seems, it sounds like your boot sector has damaged or you deleted the system reservation partition (the one with the 100MB space).

if the windows installation can discover your partitions you can just install from scratch the windows on the partition in which you had the OS, it won't damage the rest of your partitions.


Gnome Files showing files as folders in a samba share in Ubuntu 20.04

Looks like it's a confirmed bug: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1872476

It's already been fixed, but is not included in the current stable release yet. I you want to apply the patches yourself in the meantime, you can find them here:

https://gitlab.com/samba-team/devel/samba/-/commit/a33656c9df2cde3ff1cfc6b0427c7dfb2b140cae

https://gitlab.com/samba-team/devel/samba/-/commit/a95a8c7eaa46d5c8c485de714f0a97e307e49f7e

https://gitlab.com/samba-team/devel/samba/-/commit/39c910fd9cba3caf7414274b678b9eee33d7e20b


Yes it does.

When you boot the 14.04 installation media, it will give you a number of options including :

Upgrade from 12.04 to 14.04
Install 14.04 alongside 12.04
Erase 12.04 and do a fresh install of 14.04
Something else