In Ubuntu I don't know if this is possible or how it is done.

Yes, it is possible. It used to be custom to do so when you use a server version. Instead of changing the location for MySQL to store its database you can simply mount it elsewhere and share different operating  systems with the same MySQL installation by mounting /var/.

  First let me know if this is possible, easy to do and won't cause the system any malfunction.

Yes, yes and no. Yes, it is easy when you understand how. No it will not break anything.

  And then please, if it meets the criteria above, show me how it is done.

Now for the kicker: software installed in Ubuntu will go to directories like /etc, /var/ and /usr/. If you create a partition on the 1Tb and call it /etc/, /var/,  /usr/ all software in that directory will go to the 1Tb disc.

You can stop reading here if you understood this.

  A bit more ...

Problem you will face is that in Linux software is not installed into 1 directory with the name of that software as the root directory as in Windows. Software will be in directories bases on functionality. So binaries for admin tasks go to a (/usr)/sbin/. Normal binaries go to (/usr)/bin/. Every file has its location.

So if you put directories like ...

/etc/
/var/
/sbin/
/usr/
/run/

onto their own partition on the 1Tb disk you will have almost all software on the 1Tb disk. Now it will depend on how you use your system to make this more suited for you. For instance: if you do not use apache and mysql /var/ is not needed.

Mind you. I would not bother at all with separating the system besides /home and maybe swap if you are worried about the life span of your SSD. I have a 120 SSD like you and put all but /home/ onto the SSD. Now if you need it for some serious server tasks, ok. You could make life easier backup wise to create different mount points. But the general idea for servers nowadays is also to not do this and just create 1 big partition called /.

  My personal setup

The stuff below this is subjective. We can argue about partition methods for years and years. Here is how I did it:

My setup (notebook with 120Gb HDD and 750Gb HDD. I have Ubuntu 14.10, Windows 7 (C: is on the SSD, D: is part of the HDD and Redhat (does not use the ssd) on it. The layout for Ubuntu:

rinzwind@schijfwereld:/$ df -H
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda5        99G  6,7G   87G   8% /
none            4,1k     0  4,1k   0% /sys/fs/cgroup
udev            2,1G  4,1k  2,1G   1% /dev
tmpfs           413M  1,1M  412M   1% /run
none            5,3M  4,1k  5,3M   1% /run/lock
none            2,1G   36M  2,1G   2% /run/shm
none            105M   62k  105M   1% /run/user
/dev/sdb5        25G  2,0G   22G   9% /home
/dev/sdb6       365G  284G   63G  83% /discworld

/discworld is my 2nd disc. As you can see I have a / that is less than 10% full so the space on my SSD is largely not used and my /home/ is almost empty. And I do not even bother with swap anymore.

Even with all the software I install I never get over 15Gb before Ubuntu gets a new release. The SSD has been in use for over a year now and it is still healthy. All the scare about it wearing out to me seems ... well ... stupid. Yes it might break someday but that is why all important stuff are on the HDD. But even that disk might day someday.


How do I shrink a dynamically growing VDI disk from VirtualBox?

A dynamically growing Virtual Box virtual hard drive file is capable of growing on demand of the virtual machine up to the maximum size we defined in setting up this file. It does not however free the space of files we deleted in the guest OS.

In case the disk had grown too much we can compact it again, provided the unused space is filled with zeros, and the drive is in VDI format.

For an ext2 to ext 4 filesystem this can be done from the Ubuntu guest with the command line utility zerofree   * .

zerofree /dev/sdxX

This needs the drive to not be in use, and to be unmounted. We therefore may have to bind it temporarily to another VM we had created for this purpose, or we need to boot an Ubuntu live environment on this VM.

Replace /dev/sdxX with the ext2, ext3 or ext4 formatted partition in question.

On more than one partition we my have to repeat zerofree for each partition. Keep in mind that by filling with zeros the virtual file will temporarily grow up to it's maximum size.

Once all unused drive space is filled with zeros we then shrink the drive with

VBoxManage modifyhd <name>.vdi --compact

This will considerably decrease the file size of our VDI file.

* In a Windows guest we can replace unused space with the utility sdelete.


After  force-installing a 32-bit deb failed, how can I install the 64-bit version?

Couldn't install doesn't mean dpkg didn't try and give up half-way
There's nothing complicated about it. Observe this re-enactment:

$ sudo dpkg -i --force-architecture google-earth-stable_current_i386.deb
...
Errors were encountered while processing:
 google-earth-stable:i386

$ dpkg --list | grep google-earth
iU  google-earth-stable:i386               6.0.3.2197-r0

The iU tells you that you wanted this package i-nstalled, but dpkg couldn't configure it, so it was leaving it U-nconfigured, waiting for you to fix it. The error you got dpkg: error processing google-earth-stable:i386 (--configure): dependency problems - leaving unconfigured tells you as much in simpler language.
dpkg must be explicitly told to remove a failed install
Just tell dpkg to not bother and remove the package:
sudo dpkg --remove google-earth-stable:i386
And then try installing the 64-bit package again.
Synaptic and apt-get don't care about one-off debs
You got nothing out of Synaptic or apt-get because they aren't aware of your problem. They concern themselves primarily with packages available in the repositories, which you manage through them. They are higher level tools which use dpkg under the hood, but don't care about any problems you create with dpkg unless it concerns them. If you tried to install any package, or Google Earth 64-bit if it was in some repository, with Synaptic or apt-get, they would definitely have whined about it.
Other helpful references

The .deb file name and package name are usually different. You need the package name to do any operations with dpkg. Use dpkg --list | grep xxxxx where xxxxx is a small part of the file name sure to be in there, like google or earth.

See this answer for a great explanation of all the two-letter dpkg status flags.


Finger Print Scanner Driver Lenovo V570?

I'm no expert but you might give this a try. https://launchpad.net/~fingerprint/+archive/fingerprint-gui  Seems to be the best bet I've seen around, though I'm no veteran myself.


How can I safetly reduce a partition's size?

Yes, you can use GParted. It will move files. GParted is quite safe but it is always smart to make a backup before proceeding.


Backup a file when edited, and give it a time-stamp?

Im not entirely sure of what the use case is here.
But instead of having "backups" made of files according to a specific time-stamp
isn't it better just to store changes between versions?!

If you'r files are non binary, like text or source code using git

if they are binary i would use rsnapshot, as it will automatically create a parallel folder structure with versions of each file but only keeping a copy of files that actually have changes in them (saving space)

SAVING it in a folder according to the time of the snapshot.
for example day2/hour3

storing the date in the filename itself seems redundant. rsnapshot keeps that info both through the folder structure it creates for backups and you can also see it on the date of the file itself.

GIT will show you the commit date for each change it has commited for each file.


ntfsprogs are the old ntfs tools ( mkfs.ntfs, resizentfs, etc ).  They have been superseded by the ntfs-3g package.  You can not have both versions installed at once; just stick with the ntfs-3g versions.


Ubuntu-Studio 14.04.3 LTS "Trusty Tahr" on an Acer Aspire V5 laptop and won't display anything through HDMI

Assuming you have the Nvidia Geforce GT 750M card, run the following commands and reboot. If you don't have this card, do not run these commands, leave me a comment and provide the proper card instead.

sudo apt-get update
sudo apt-get install nvidia-361

Reboot.

This will install the proprietary drivers for your nvidia card.

If you are not sure, search for "additional drivers" in your dash and then select the tested "proprietary" driver for your card. I believe it is nvidia-361 then reboot. This will install the proprietary drivers for your card. Performance has shown to be much better with the proprietary driver.


Install Ubuntu (MATE) along side pre-installed Windows which was installed with RAID configuration

For Windows 10 (and probably other Win versions), the solution is to boot Windows in safe mode after changing RAID to AHCI in BIOS. The details can be found here.


Using VMWare Shared folders with Open VM Tools

Nobody answered but I found the solution elsewhere this works fine.

Setup the shared folder in VM settings
Reboot might be required
Create a directory you'll use as a mount point in /mnt, I called mine YourMountDriveName
Use this command
sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/YourMountDriveName -o         allow_other

This should mount a shared directory to the directory that was created in step 3.


You actually installed libcap-dev when you wanted

 sudo apt-get install libpcap-dev

Edit: as for libsqlite

 sudo apt-get install libsqlite3-0

Or you can just do

 sudo apt-get install libsqlite3-dev


Choosing windows 7 in OS version didn't work for me, but this does: In VM settings -> System -> Acceleration Tab -> Paravirtualization Interface -> Choose KVM instead of Default.


Package with bad signature got instlaled on second try: how?

apt-key update did not do anything. apt-get update did. Note these lines:

Get:1 http://dl.google.com stable Release.gpg [198 B]
Get:2 http://dl.google.com stable/main i386 Packages [1210 B]

apt has found updated package information, and this information now matched the new version of google-chrome-stable. How apt downloaded the new package without having update run has always been a mystery to me.


Can I sync a Rhythmbox playlist with an mp3 player?

You can get more information on synchronizing a MP3 player using RhythmBox playlists at the location below. There are some useful scripts there as well. The discussion is at

http://ubuntuforums.org/showthread.php?t=1291716


Maximize error with chrome and blender under Gnome 3

You use blender with the open source drivers? Does it even compare in performance?

Anyway, until this is fixed you may open and then close the preferences windows and this will fix it for tha main blender window. The preferences window will also get caught in this this situation if you miximize it but you can live without doing that anyway.


Yes, there is.
You can download an Ubuntu iso from Ubuntu's official Website

Then, you can make a live USB with UNetBootin which is a tool for creating bootable live USB drives.

Here is a screenshot of UNetBootin:


Creating 2 DNS names for 2 domains on one static IP - Ubuntu

SOLUTION WAS: I created new zone file for second domain and also new db file. So both domains have separated files.


bbswitch failing to turn of Nvidia GPU (Refused to change power state, currently in D0)

This looks like BumbleBee bug #664:

  This is harmless and known from the beginning. From what I remember,
  this is due to trying to power OFF the card too fast or something like
  that. I’ll keep this issue opened (but cleaned a bit your messages to
  keep only related content) so that we think about either fixing this
  or properly document it.


How can I get a RSS/ATOM feed for new package releases on launchpad?

Here're its rss feeds:

Back In Time Announcements
Bugs in Back In Time
Branches for Back In Time
Latest Revisions for Back In Time

I guess the last one is what You need.


Atheros AR9285 hard blocked on toshiba nb305

I had the same problem with my Toshiba c600. Installed Windows once and turned on Wi-Fi in there. After that, booted linux and the Fn+F8 key works to swith wifi on and off.

Still can't use the laptop to share the wifi connection, but it connects to other wifi signals.


Thinkpad Hardware problem after 14.04 regular Update

You provide very little information on what exactly went wrong during the upgrade (power loss? Hard shutdown?) so now just reboot into the previous kernel and do another

sudo apt-get dist-upgrade

and let it finish normally...


How to resolve compiler to compile c++ program?

To fix 'held broken packages' error:

sudo apt-get install -f
sudo dpkg --configure -a
sudo apt-get clean
sudo apt-get update


Why won't Ubuntu Software Center install .deb files

The Ubuntu software center has many packaged applications but does have the disadvantage that it cannot install .deb files. However there is another option.
Using GDebi to install packages
GDebi is a simple tool to install .deb files. It has a graphical user interface but can also be used in your terminal. It lets you install local deb packages resolving and installing its dependencies.. It automatically checks packages for their dependencies and will try to download them from the Ubuntu software repositories if possible. You may first need to install GDebi - simply install the gdebi package using one of the package managers listed above, or open a Terminal and type sudo apt-get install gdebi
Once you have installed GDebi, use the File Browser to find the package you wish to install. Package files will look similar to this:

Double-click the package to open it with GDebi. If all dependencies have been met for the selected package, simply click the 'Install package' button to install it. GDebi will warn you if there are unmet dependencies, which means that there's dependencies that aren't resolved in the repositories that you're using - you will have to locate the required packages from some other source.


Ubuntu 16.4 LTS cannot find openjdk-8-jdk

Did you do sudo apt-get update recently?  If not, do that, then try again.

The 404 error is that it's hunting a specific version of the package that is not available on the repos anymore, and this usually happens when your repository 'state' information is out of date.  Usually a call to sudo apt-get update will fix that problem, and then you can retry the sudo apt-get install command you were trying to run again.


How do I get Firefox to open attachments without downloading them?

Go to the Edit menu in Firefox and select Preferences.  Then select the General tab at the top of the Preferences window.  There is a section called Downloads, where you can set Firefox to download files to a specific folder, or have it ask every time where you want the file to download to.  If you set it to ask every time, then when you try to download a file it will give you an option to either download the file or open it, and you can check a box to have Firefox default to whatever behaviour you choose.

Edit: I guess I misunderstood your question.

I guess you saying that xyz is the program that you want to use to open the file that you click on, and you are looking for the location of the executable file for xyz.

There are a few locations to find program files (binary files): /bin, /usr/bin, /usr/local/bin are good places to start.  There may be some other locations also.  If you want to find a particular program you can type whereis programname in a terminal and it will tell you where the binary files are.  These do not have to have an extension as they do in Windows.


I have a .sh that is "Self Extracting" but removes folders upon completion

In this case you need only to do

tail -n +31  spice2_5_1-generic-linux.sh > spice2_5_1-generic-linux.tar

after you can deal with it as a normal tar file.  ( tar -xvf spice2_5_1-generic-linux.tar).

Since this tar has not a main directory I suggest you to do

mkdir TempSpice
cd TempSpice
tar -xvf ../spice2_5_1-generic-linux.tar

Some notes:

Often the self extracting files are a bash script followed by data, just in only one file. In this case the script is in the first 30 lines.

#!/bin/sh
PATH=/bin:/usr/bin
base=sut.$$
outname_tar=$base.tar
tempdir=spottmp.$$
mkdir $tempdir
echo "Unpacking..."
platform=`uname`
if [ $platform = "SunOS" ]; then
    tail +31 $0 > $outname_tar
else
    tail -n+31 $0 > $outname_tar
fi

echo "Extracting..."
(cd $tempdir; tar xvf ../$outname_tar)
  savestatus=$?
  if [ $savestatus != "0" ]; then
    echo status from tar = $savestatus
    echo ABORTING INSTALLATION
    /bin/rm -rf $tempdir
    /bin/rm -f $outname_tar
    exit $savestatus
    fi
echo "cleaning up..."
/bin/rm $outname_tar
echo "installing..."
(cd $tempdir; ./INSTALL)
/bin/rm -rf $tempdir
exit 0

The script inside is a basic one. It was possible to read the file with less and see what it does... and to act in a similar way. With an editor that respects the binary part (the second one) it's possible to modify the script part too.


Your hard drive is failing.

Make a backup ASAP and buy a new hard drive.


How can I best clean nonworking pip from system?

The easiest way to solve your current problem is to do sudo rm /usr/local/bin/pip*.
The use of pip executable files can you get you in a weird state so many people now use the form of python3 -m pip instead of pip3.  The problem crops up when you have multiple versions of Python installed on your system (it looks like you have Python 3.4 and 3.5) as each then has it's own copy of the pip module.  pip also installs itself into /usr/local/bin/ as its specific version (e.g. /usr/local/bin/pip3.5) as well as /usr/local/bin/pip3 + /usr/local/bin/pip.  Depending on which version gets updated, these executables don't get synced.
If you need the newest version of pip, do sudo /path/to/python3 -m pip install --upgrade pip, delete /usr/local/bin/pip + /usr/local/bin/pip3, then create a symlink using sudo ln -s /usr/local/bin/pip3.<VERSION> /usr/local/bin/pip3.


Instructions for 11.10 and 12.04
Install the xubuntu-desktop package - to do that, run the following:
sudo apt-get update && sudo apt-get install xubuntu-desktop

At some point during the install, you will be asked to choose between gdm and lightdm - I prefer lightdm, so thats what the screenshot shows.
Logout, you will be confronted by the LightDM manager.
Then, click the little cog wheel, and select Xubuntu Session.
Then, enter your password, hit Enter and you'll be logged into Xubuntu.


upgrade git on Ubuntu 10.04 (Lucid Lynx)

To install the latest stable from command line...

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git

This should let you install 1.8.2-1~ppa0~lucid2.


Run the dmesg command on the command line to see the kernel log. If it is really a device connecting and disconnecting then it will be logged there.


How to delete multiple lines from txt file, based on a variable in previous column?

Using Perl:

perl -lane 'if($F[5] < 70 || $F[2] == $x) {$x = $F[2]; next} undef $x; print' file

perl -lane '
    if($F[5] < 70 || $F[2] == $x) {
        $x = $F[2];
        next
    }
    undef $x;
    print
' file

-l[octnum]: enables automatic line-ending processing. It has two separate effects. First, it automatically chomps $/ (the input record separator) when used with -n or -p. Second, it assigns $\ (the output record separator) to have the value of octnum so that any print statements will have that separator added back on. If octnum is omitted, sets $\ to the current value of $/.
-a: turns on autosplit mode when used with a -n or -p. An implicit split command to the @F array is done as the first thing inside the implicit while loop produced by the -n or -p.
-n: causes Perl to assume the following loop around your program, which makes it iterate over filename arguments somewhat like sed -n or awk:

LINE:
  while (<>) {
      ...             # your program goes here
  }

-e: may be used to enter one line of program;
if($F[5] < 70 || $F[2] == $x) {$x = $F[2]; next} print: if the sixth field contains a number lower than 70 or the second field contains a number equal to $x, assigns the second fields to $x and skips to the next record; otherwise unsets $x and prints the record.

% cat file
6.15 21.31750 29.11549 -70.2565 28.7203 99.00000
8.15 21.31750 29.11549 -90.3238 35.0326 99.00000
10.15 21.31750 29.11549 -84.9625 43.2992 100.00000
12.15 21.31750 29.11549 -77.0993 44.3515 99.00000
14.15 21.31750 29.11549 -70.9164 49.5554 96.00000
16.15 21.31750 29.11549 -82.2717 38.6834 98.00000
18.15 21.31750 29.11549 -83.7156 35.6462 99.00000
20.15 21.31750 29.11549 -83.9505 35.1276 95.00000
22.15 21.31750 29.11549 -167.575 66.1472 57.00000
24.15 21.31750 29.11549 -94.5072 38.15 98.00000
26.15 21.31750 29.11549 -38.9739 69.8479 71.00000
28.15 21.31750 29.11549 -94.5072 38.15 98.00000
30.15 21.31750 29.11549 -28.6407 51.3899 24.00000
32.15 21.31750 29.11549 -43.7269 119.979 2.00000
34.15 21.31750 29.11549 -69.6645 150 0.00000
36.15 21.31750 29.11549 -103.964 150 1.00000
38.15 21.31750 29.11549 42.6041 142.656 0.00000
40.15 21.31750 29.11549 109.056 150 0.00000
42.15 21.31750 29.11549 -14.6037 150 45.00000
44.15 21.31750 29.11549 -118.694 53.7305 94.00000
46.15 21.31750 29.11549 -167.053 115.74 92.00000
48.15 21.31750 29.11549 -171.917 150 66.00000
6.15 20.38500 29.12283 -87.9018 36.2993 100.00000
8.15 20.38500 29.12283 -98.356 43.8404 100.00000
10.15 20.38500 29.12283 -88.9825 46.6824 100.00000
12.15 20.38500 29.12283 -78.2202 44.7168 97.00000
14.15 20.38500 29.12283 -78.1702 42.5794 97.00000
16.15 20.38500 29.12283 -76.6382 40.3678 98.00000
18.15 20.38500 29.12283 -79.449 49.3087 95.00000
20.15 20.38500 29.12283 -137.565 45.7575 66.00000
22.15 20.38500 29.12283 -112.652 37.5735 100.00000
24.15 20.38500 29.12283 -55.8986 43.9287 54.00000
26.15 20.38500 29.12283 -50.4227 48.2312 70.00000
28.15 20.38500 29.12283 -55.8986 43.9287 54.00000
30.15 20.38500 29.12283 -57.3999 98.6111 8.00000
32.15 20.38500 29.12283 -74.2068 150 6.00000
36.15 20.38500 29.12283 17.7038 117.808 5.00000
38.15 20.38500 29.12283 -5.36164 96.0492 0.00000
40.15 20.38500 29.12283 -98.5051 99.8733 42.00000
42.15 20.38500 29.12283 -149.328 41.7056 96.00000
44.15 20.38500 29.12283 -172.026 126.696 92.00000
46.15 20.38500 29.12283 -174.664 150 76.00000
48.15 20.38500 29.12283 -176.269 139.467 31.00000
user@user-X550CL ~/tmp % perl -lane 'if($F[5] < 70 || $F[2] == $x) {$x = $F[2]; next} undef $x; print' file
6.15 21.31750 29.11549 -70.2565 28.7203 99.00000
8.15 21.31750 29.11549 -90.3238 35.0326 99.00000
10.15 21.31750 29.11549 -84.9625 43.2992 100.00000
12.15 21.31750 29.11549 -77.0993 44.3515 99.00000
14.15 21.31750 29.11549 -70.9164 49.5554 96.00000
16.15 21.31750 29.11549 -82.2717 38.6834 98.00000
18.15 21.31750 29.11549 -83.7156 35.6462 99.00000
20.15 21.31750 29.11549 -83.9505 35.1276 95.00000
6.15 20.38500 29.12283 -87.9018 36.2993 100.00000
8.15 20.38500 29.12283 -98.356 43.8404 100.00000
10.15 20.38500 29.12283 -88.9825 46.6824 100.00000
12.15 20.38500 29.12283 -78.2202 44.7168 97.00000
14.15 20.38500 29.12283 -78.1702 42.5794 97.00000
16.15 20.38500 29.12283 -76.6382 40.3678 98.00000
18.15 20.38500 29.12283 -79.449 49.3087 95.00000


This file is a self explanatory

/etc/gdm3/greeter.dconf-defaults

So add the below content at the end of the above file, Change the values from and to, to your wish..

#NightLight
[org/gnome/settings-daemon/plugins/color]
night-light-enabled=true
night-light-schedule-from=5.0
night-light-schedule-to=10.0


Lenovo T495 - External screen keeps waking up laptop's screen

Workaround : The Workaround provided by this thread Monitors do not turn off (enter powersave mode) after screen blanking does solve the issue.

But ideally IMHO, it would be better not to have to change screen's configuration, I guess...

That will do for now though :)


I used Owais Lone's answer to a similar question to enable automatic resume of wifi after suspension for my laptop (a Dell Precision) on 16.04 LTS.

Like Owais, I created /etc/pm/sleep.d/10_resume_wifi:

#!/bin/sh

case "${1}" in
    resume|thaw)
      nmcli radio wifi off && nmcli radio wifi on;;
esac

followed by a sudo chmod +x /etc/pm/sleep.d/10_resume_wifi.

In case you're wondering about the double semicolons or the solitary close parenthesis like I was, see http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_03.html -- that's just how the case syntax works.


How to edit description of a software using Quickly?

You can edit the desciption about your program at the bottom in setup.py. setup.py is located at the main directory of your Quickly project.


Why am I getting the error "missing terminating ] for character class"?

As the error missing terminating ] for character class already says, the problem here has to do with [, which you need to escape. Otherwise, it is understood as a character class by grep.

Also, you are saying //, while you want to use / instead of \ according to your input.

All together, this prints a set of words after [Om/:

$ echo '[Om/mystring' | \grep -oP '(?<=\[Om\/)\w+'
mystring


How can I make touchpad not change workspace in xubuntu 13.10?

Setting Manager -> Window Manager Tweaks -> Workspaces
and unchecking "User the mouse wheel on the desktop to switch workspaces"


Can't open files created in Ubuntu from Windos

Windows 8 doesn't do a real shutdown, so if you write to the ntfs filesystem while the windows system in fact is only in sleep it can lead to filesystem corruption an errors. You have to look up how you can force windows to do a real shutdown or use ext explorer to access the linux filesystem from windows.


how much space does a given package, and dependencies, cost?

Simplest and bug free way to get the space used by a program and all its dependencies is to use apt itself. Note dependencies that are not used by another program, but installed with a package, is not considered as they are not removed.
Simply

sudo apt-get --assume-no autoremove PACKAGENAME

or

apt-space-used-by() { sudo apt-get --assume-no autoremove $@ | grep freed | cut -d' ' -f4-5 ;}

usage  apt-space-used-by PACKAGENAME

This python script looks promising  (bigpkg - find packages that require a lot of space on your system)


LVM encrypted LUKS on SSD - issue reverting to snapshots

Figured it out. The problem is that while I have TRIM support enabled at the encryption level in the system, I did not have it enabled in the live session.

I was using cryptsetup luksOpen /dev/sda5 sda5_crypt prior to running lvconvert --merge as described in the question. Trim support is not enabled here, thus when BLKDISCARD runs after the snapshot is merged, it fails.

The solution is to use cryptsetup luksOpen --allow-discards /dev/sda5 sda5_crypt. This enables TRIM support at the encryption level. This can be verified with dmsetup table /dev/mapper/sda5_crypt --showkeys - the result should show "allow_discards" at the end.

Executing lvconvert --merge after this works fine:

xubuntu@xubuntu:~$ sudo lvconvert --merge /dev/vg1/lvsnapshot14
Merging of volume lvsnapshot14 started.
lvroot: Merged: 95.6%
lvroot: Merged: 100.0%
Merge of snapshot into logical volume lvroot has finished.
Logical volume "lvsnapshot14" successfully removed
xubuntu@xubuntu:~$


I had exactly the same problem (audio skips and stutters at random, CPU usage low) with Ubuntu 14.04. Upgrading Alsa/DKMS following this procedure solved my issues: https://wiki.ubuntu.com/Audio/UpgradingAlsa/DKMS

make sure dkms is installed: sudo apt-get install dkms
load .deb for your system from
https://code.launchpad.net/~ubuntu-audio-dev/+archive/alsa-daily/+packages
install: sudo dpkg -i <deb file>
reboot


Why can I not connect to my wireless network after I upgraded to 13.04?

Some problem with Broadcom 43142, after up-date from 12.10 to 13.04,

For Broadcom 4313 take a look to this or this


How to recover encrypted Home with only login password?

several system files have been corrupted due to usb problems

This may or may not be a significant problem for you.

To decrypt the contents of an encrypted home, Ubuntu normally needs not only the login password but also a "mount passphrase" - a secret, long secure string that was probably generated automatically for you at the time of setting up your encrypted home.

If your system can boot normally it will already have the mount passphrase in a "wrapped" format stored on the drive, and will only need your login password to complete the decryption.  However if your system becomes corrupted and you need to recover files from another OS (such as a Live CD) then you will need this mount passphrase as well as your login password.  So if this mount passphrase is part of your system that has become corrupt, and you didn't take a backup of it, you may be completely out of luck.

Nonetheless, it's possible that the wrapped version of the passphrase may still be on your drive somewhere an will have survived corruption, in which case you're in luck.

This page details how to recover files on an encrypted home from an Ubuntu Live CD.

http://www.howtogeek.com/116297/how-to-recover-an-encrypted-home-directory-on-ubuntu/

It involves using a helper tool:

sudo ecryptfs-recover-private

This will try to find all the encrypted home directories on the system and their corresponding wrapped mount passphrases.  If it does, all you will need to decrypt them will then be your login password.

If it doesn't find a surviving wrapped mount passphrase, and you don't have a backup of it, you are likely to be out of luck.

It it does work, it will temporarily mount the decrypted contents into a mount point inside /tmp.  Then you should copy the decrypted files from there onto another device.  See the whole article for more information.

Note: to anybody wanting avoid this problem, if you set up an encrypted home directory make sure you save a backup of the mount passphrase somewhere.  You may be prompted to do this when you first set up the encrypted home, but if not you can access it later - after you've successfully logged in - with the command ecryptfs-unwrap-passphrase.  This will only work if you've logged in normally on the system - that is, it won't work when you need to recover as in this OP's situation.


How to enable log in administrator password?

To get started, go to Ubuntu Options at the top right corner and select ‘System Settings..’

Next, click on ‘User Accounts’ to continue.

Then unlock the settings to make changes. Only an administrator or root user can unlock.

After unlocking , change the ‘Automatic Login’ to OFF

Or your can just run the commands below to open lightdm.conf file.

sudo -i gedit /etc/lightdm/lightdm.conf

Then remove the line as highlighted below and save the file.

Source...


Currently, at least on OpenSuse Tumbleweed, you're required to enter the LUKS password twice: once to decrypt /boot and once to decrypt your other partitions (assuming you use the same password for all partitions).

In the early unlock, Grub2 also defaults to a US English keyboard layout, so you can't type in Dvorak or German or whatever your normal layout may be. Customizing that layout seems to involve a bit of work.

With systemd-boot on Pop_OS, you only need to enter the LUKS password once with an encrypted /boot.


Ubuntu on Samsung series 7 Chronos. Advice please?

Because your original plan was to install Ubuntu without Windows, the safest approach is to do that in BIOS/CSM/legacy mode. I recommend:

Boot Windows and create a set of emergency recovery discs, if it's got a program to do this; or create a complete backup of the hard disk using some other tool. This is so you can restore the system to its factory settings in the future, if you decide this is desirable.
Using a Linux live CD, launch GParted and tell it to create a fresh partition table. This will wipe out the GUID Partition Table (GPT) that's currently in use and replace it with an old-style Master Boot Record (MBR; aka "msdos") partition table.
Boot the Linux installer in BIOS mode. The details of how to do this depend on the firmware. You may need to enter the firmware setup utility to enable BIOS/CSM/legacy support or to disable EFI/UEFI support; or you may need to use the firmware's built-in boot manager to tell it explicitly to boot the installer in BIOS/CSM/legacy mode (usually by selecting a boot option for the medium that does not include the acronym "EFI" or "UEFI").
Verify that you've booted the installer in BIOS mode by dropping to a shell and looking for the directory /sys/firmware/efi. If it's not present, you've probably booted in BIOS mode. If that file is present, you should reboot and try again, since you've booted in EFI mode.
Install normally.

Thereafter, you've got a system that you can treat like a normal BIOS-based computer and not worry about the firmware's bricking bug, since that bug can be triggered only from an EFI-booted OS. Note that the bug can be triggered from Windows, so dual-booting with Windows in EFI mode poses at least some risk.


Recovery formatted files files after installing Windows on ubuntu hard drive

Depending on how you installed Windows, the Ubuntu partition may or may not be overwritten. If you allowed Windows to overwrite the disk, the situation will be bad. The directory structures then are overwritten and you can rescue some data only with recovery software. The biggest chance is then relying on an expensive professional data recovery service.
If you installed Windows in a dedicated partition, then the Ubuntu partition will be untouched. Boot a live DVD or USB session, where you can you can access the partition and copy the data elsewhere.
In the latter scenario, you could make the system bootable again by reinstalling grub.


This will reset Nautilus as the default:

xdg-mime default nautilus.desktop inode/directory application/x-gnome-saved-search
gsettings set org.gnome.desktop.background show-desktop-icons true

(the last one is to refresh the desktop)


firefox can't the server at start.unbuntu.com

You've made a typo.
It's Ubuntu not Unbuntu.
 This is the site: http://start.ubuntu.com/


Can I still use Ubuntu after support period expired?

The end of support will also mean and end of (security) updates. It is not recommended to run a computer on the internet without keeping it up to date with security updates. Therefore, my answer would be: yes you can use it, but it is not recommended.

However, this should not be a problem. The function for updating the entire system to a new release of Ubuntu is very stable and reliable1, so when the new version comes out or when the support ends you can simply update. Once you hit a LTS (Long Term Support) release, it will have longer support period and thereby decrease the need for updating the system and will typically also have a updating route to the next LTS.

1 Unless you have heavily modified your system non-standard software and such, but from the sound of your question, that does not seem to be the case.


Did you check if your CPU fan is working?  CPU temperature should not be that high even if the CPU is under heavy load.

lm-sensors is required for Psensor to read the fan speed.  Another easy way is to hear if there is a difference in the noise when the CPU is idle and when File Roller is running.  If you cannot tell a difference, that will be the problem of CPU fan.


How can I upgrade KDE 4.9 in Kubuntu 11.10?

Kubuntu 11.10 support

The Kubuntu 11.10 will get bug fixes and security patches for the KDE 4.7.4: http://www.kubuntuforums.net/showthread.php?59191-Will-there-be-KDE-4-8-4-updates-or-backports-for-oneiric

The Kubuntu 11.10 will be supported to the 2013-04: http://en.wikipedia.org/wiki/Kubuntu

Kubuntu and the KDE 4.9

The KDE SC 4.9.0 is available for the Kubuntu 12.10 (under development) and the Kubuntu 12.04: http://www.kubuntu.org/news/kde-sc-4.9

  Packages for the release of KDE's Plasma and Applications 4.9 are
  available for Kubuntu 12.04. You can get it from the Kubuntu Backports
  PPA. They are also in our development release...


apt-key add ; apt-get ... keyserver timeout on same key

apt-add-repository will always try to get the key - it doesn't check whether it already exists in the keyring. Make a feature request if you need.


You may try reverting the change you did (or keeping it) and installing the gpointing-device-settings package, which will provide more configuration options for your touchpad.

sudo apt-get install gpointing-device-settings

Once installed you find it under System -> Preferences -> Pointing Devices.


You can install Wine (http://www.winehq.org/)

sudo apt-get install wine

This programme allow you to execute Windows software in linux plateforms. Or you can use a virtual machine (with virtualbox for example), and to install on Windows 8 for your games.


Nautilus bookmarks are missing since upgrade to 13.04

Nautilus bookmark settings
To manage bookmarks go to the Files menu in the panel to open the Bookmarks dialog. There we may enter a name and a path of a bookmark to appear in the Nautilus left side panel in the Bookmarks section:

Bookmark an opened directory
Alternatively open the directory you want to bookmark. Then click on the cogwheel top right to select "Bookmark this Location" or press Ctrl + D.

To remove a bookmark select "Remove"" from the right click context menu on the bookmark.
All our bookmarks will also be displayed as a quicklist:

Manual approach and removing default entries
Those bookmarks are stored in an editable file in .config/gtk-3.0/bookmarks where we may manually (or programmatically) add and remove path entries which take effect immediately. The examples above resulted in the following file content:
file:///home/takkat/Documents/test
file:///home/takkat/Music
file:///home/takkat/Pictures
file:///home/takkat/Videos
file:///home/takkat/Downloads
file:///home/takkat/Documents/My%20Bookmark My Bookmark


How can I generate an M3U playlist (http URL format) from the terminal?

This is @chronitis answer with some improvements :

stores the file name on the variable $playlist for later use
will delete the file if exists previously
writes the full path of the file  on the playlist

The command

playlist='play.m3u' ; if [ -f $playlist ]; then rm $playlist ; fi ; for f in *.mp3; do echo "$(pwd)/$f" >> "$playlist"; done

To play it with mplayer on the command line also

mplayer -playlist play.m3u


Cryptsetup failure after interrupted upgrade to 16.04

Not quite a solution to the problem as posed, but I ended up booting from an old kernel where sda5_crypt worked.


There is no difference, really. The second case would also include the file foo in the list and therefore gives you a count of 1 more.


GUI solution:
Use the gnome-disks utility. You start it by opening the Alt+F2-HUD and entering disks.
In the left sidebar you see all available physical disks. Select the one you want to modify here.
In the right part of the window, you'll see some general information about the selected disk and its partition structure. When you now click on the menu symbol in the top right corner, you may chose "Format..." to format the entire disk.

You may chose whether to overwrite the disk with zeros and which partition table (msdos/MBR, GPT or none) to create before starting the procedure.

I guess I don't have to mention that afterwards all data on your disk has vanished forever.


Where is the junk folder that I created in Thunderbird on an ubuntu system?

The most likely place : /var/qmail/mailnames/domain.de/info/Maildir/.Junk/cur
Files/directories with "leading dot" may be not displayed (hidden) in some file managers.

Maildir++


Ubuntu Server 18.04 waiting for Network at startup although the network is ok

What if you add

  optional: yes

to your wifis/wlp58s0 configuration? I had a similar problem, but only when I booted without wired ethernet. The content of my /etc/netplan/01-netcfg.yaml (my only file in that dir) was

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s25:
      dhcp4: yes

When I appended

      optional: yes

the problem went away. The man 5 netplan page states that an optional device is not required for booting, and that the default is false.


By editing clamd.conf as below, the problem solves
# Log additional information about the infected file, such as its
# size and hash, together with the virus name.
#ExtendedDetectionInfo yes

# This option allows you to save a process identifier of the listening
# daemon (main thread).
# Default: disabled
PidFile /var/run/clamd.pid

# Optional path to the global temporary directory.
# Default: system specific (usually /tmp or /var/tmp).
TemporaryDirectory /var/tmp

# Path to the database directory.
# Default: hardcoded (depends on installation options)
DatabaseDirectory /usr/local/share/clamav

# Only load the official signatures published by the ClamAV project.
# Default: no
#OfficialDatabaseOnly no

# The daemon can work in local mode, network mode or both.
# Due to security reasons we recommend the local mode.

# Path to a local socket file the daemon will listen on.
# Default: disabled (must be specified by a user)
LocalSocket /tmp/clamd.socket

Now if i enter 'clamd &' it is showing

[3] 12859

Then 'sudo service clamav-daemon start' shows

[3]   Done                    clamd

Then 'clamdscan -v' shows

/usr/local/etc: OK
----------- SCAN SUMMARY -----------
Infected files: 0
Time: 0.017 sec (0 m 0 s)

Then 'clamdscan -V' shows

ClamAV 0.99.1/21490/Tue Apr 12 08:04:23 2016


Using grep -rin with the string value has underscores

If wp_get_attachment_url is actually an URL that must be interpreted literally, use single quotes to prevent the shell from interpreting characters. Furthermore, use the -F option of grep to avoid it from interpreting the pattern as a regular expression.

http://example.com/?id=1 interpreted as a regular expression would match either http://example.comid=1 or http://example.com/id=1, but not http://example.com/?id=1.

The command becomes:

grep -rinF 'http://example.com/?id=1' *

If the pattern contains a ', use '\'' to escape it:

grep -rinF 'mornin'\'' all' *

A hint: * matches all non-hidden files in the current directory. If you want to match dot-files as well, just grep the current directory recursively (-r):

grep -rinF 'search term' .


Have a look at the gnome extension "gTile".

From the readme:

  Gnome-shell extension that improves window tiling capabilities of stock gnome-shell.
  gTile is used to moves/resize windows on a configurable grid scheme.

When you click on the gTile icon it will open a dialog that lets you draw a region on an e. g. 1x3 grid. Once you have drawn the region gTile will move and resize the currently active windows to match that region on the real screen.

You can configure a hot key (for instance ctrl+alt+1) to send the current window to a specific field in an NxM grid. In your case it could be the first field in a 1x3 grid. Likewise for the other two windows.


Intel(R) Linux(TM) Graphics Driver Error after inserting password

The package is listed here:

https://download.01.org/gfx/ubuntu/13.04/main/dists/Ubuntu/13.04/binary-amd64/Packages

You can try manually installing the package and re-run the installer.

If that fails, post the error message here: https://01.org/linuxgraphics/node/164


Installation of Ubuntu 14.04.1 faild on Dell Inspiron N5040

The partition in which you are trying to install may not have the required space. Please make a new partition with atleast 6.5 GB.


How do I avoid the "S to Skip" message on boot?

You should add the option nobootwait to your /etc/fstab. So that it looks like:

UUID=1234-5678 /osshare vfat utf8,auto,rw,user,nobootwait 0 0

From fstab(5):

  The  mountall(8) program that mounts filesystem during boot also recognises additional options that the  ordinary  mount(8)  tool  does  not.
         These  are:  bootwait  which  can  be applied to remote filesystems
         mounted outside of /usr or /var, without which mountall(8)  would  not
         hold up the boot for these; nobootwait which can be applied to non-remote filesystems to explicitly instruct mountall(8) not  to  hold  up
         the boot for them;


Allow Access to Apache 2 Server on local network

The Solution is to allow traffic on port 80:
sudo ufw allow 'Apache'

You can verify the change by typing:
sudo ufw status


Edit the file

/etc/modprobe.d/blacklist.conf

and add this

blacklist acer-wmi

or you might have to do the following:

sudo modprobe -rfv ath9k
sudo modprobe -v ath9k nohwcrypt=1

If that works you can make it permanent:

/etc/modprobe.d/ath9k.conf

Add the following line:

options ath9k nohwcrypt=1

Reboot.


How to find out the package download count from a PPA?

Check out this script:

#!/usr/bin/python2

# Usage python ppastats.py PPATEAM (ex: webupd8team) PPA (ex: gthumb) DIST (Ubuntu version eg maverick) ARCH (ubuntu arch eg i386 or amd64)
# Example - highest downloaded file: python ppastats.py webupd8team y-ppa-manager maverick amd64 | tr '\t' ',' | cut -d ',' -f3 | sort -gr

import sys
from launchpadlib.launchpad import Launchpad

PPAOWNER = sys.argv[1]
PPA = sys.argv[2]
desired_dist_and_arch = 'https://api.launchpad.net/devel/ubuntu/' + sys.argv[3] + '/' + sys.argv[4]

cachedir = "~/.launchpadlib/cache/"
lp_ = Launchpad.login_anonymously('ppastats', 'production', cachedir)
owner = lp_.people[PPAOWNER]
archive = owner.getPPAByName(name=PPA)

for individualarchive in archive.getPublishedBinaries(status='Published', distro_arch_series=desired_dist_and_arch):
    x = individualarchive.getDownloadCount()
    if x > 0:
        print individualarchive.binary_package_name + "\t" + individualarchive.binary_package_version + "\t" + str(individualarchive.getDownloadCount())
    elif x < 1:
        print '0'

To use it:

python ppastats.py webupd8team themes natty i386


How to automate the pass phrases when GPG signing dpkg-buildpackage?

If your keyring is already unlocked, all you have to do is:

  setup gpg-agent

  So you won't be prompted for your passphrase a whole bunch of times...

  sudo aptitude install gnupg-agent pinentry-gtk2 pinentry-curses
  replace 0xD34DB33F with your GPG Key ID
  export GPGKEY=0xD34DB33F
  killall -q gpg-agent
  eval $(gpg-agent --daemon)

and

  export DEBEMAIL="address@example.com"
  export DEBFULLNAME="Your full name as it appears on the GPG key"

from here

I can attest to the second part.  The first part is a copy-paste, but it seems legitimate.  I would think you would still have to unlock the key once, but it would stay unlocked.


After 1 google search, here is a link that gets exactly what you want. Hope that helps!
Direct quote from the link :

And then I found Syncness. It doesn't require a PC client as it connects straight to network shares over your WiFi. Requires minimal setup (see below), and then you can have a directory of music on your PC automatically syncing to your phone every night (or just manually whenever you want). It costs about £1, but is well worth it.
Put some music in a dir on your PC, and share it: R click > Sharing Options (then it might ask you for permissions to install some sharing libs). Now open Syncness on your phone and create a new profile and give it a name e.g. Music. Click the "Share" folder icon, and let it scan your network for shares, and then select your share from the list. Next click the "Local" folder icon and select your Music dir (if you don't already have one, you may need to connect your phone to your PC and create it first). Set "Sync Type" to "Push To / Pull From Remote", check "Active" (so it appears in your "Active profiles" list), and also check "Allow file deletions", so it can wipe old music you don't want any more. Then enter your Ubuntu name/pass (I left Domain blank), and do Menu > Save. Then you can setup a sync schedule if you want, but I don't change my music that often, so I just do it manually by pressing the big blue SYNCHRONIZE button on the home-screen.


Where is the terminal window in ubuntu 16.04 desktop?

I don't understand the problem !!

the terminal window can open be CTRL + ALT + T

logout / shutdown can be found at right top corner from monitor/shutdown logo drop-down

in other cases you maybe have that issue because you are running a minimal version
hope that helps


Ok, I finally managed to solve it.

Once I checked what file the linker is actually expecting to find, I knew what to do next.

I did it by calling:

ld -L/usr/local/lib -lcustom_program_options --verbose

Where /usr/local/lib is the directory I put the library in, and custom_program_options is the name of the library stripped of the lib- prefix and all prefixes (i.e. extension and version).

As it printed a list of all considered directories along with the exact expected file name, I knew that it was looking for libcustom_program_options.so, whilst calling ldconfig (mentioned in the OP) set a link only between libcustom_program_options.so.1 and libcustom_program_options.so.1.0.1 (note the version number).

The file ld was trying to find indeed never existed.

The solution was to create the link manually:

sudo ln -s /usr/local/lib/libcustom_program_options.so.1 /usr/local/lib/libcustom_program_options.so

So this pretty much solved it. The culprit was me not knowing what was the exact filename sought by the linker.


You are running Ubuntu(?) live booted from /dev/sdd. The iso file was extracted to /dev/sdd1 mounted at /cdrom for historical reasons, and you created /dev/sdd2 for /home. The root partition is in RAM (a ramdrive) in a live system, and the RAM allocated is approximately half of the RAM available (automatically).

If you want a bigger root partition, you can create a new partition and give it the label casper-rw. It would also be possible to reconfigure your system and use /dev/sdd2 for that purpose. But I would suggest that you backup whatever you have saved in your home partition to some other location before you do that.

At boot Ubuntu will select the partition labeled casper-rw and use it for an overlay, so that you can store installed programs and tweaks (and you get a persistent live system).

Another option is to start from the beginning and create a persistent live system with mkusb. It will do the configuring for you automatically. See the following links,

help.ubuntu.com/community/mkusb

mkusb/persistent

A third option is to create a partition labeled casper-rw in another drive, one of the internal drives, or in another USB drive or a memory card.

'Simple persistence'


How do I fix boot problems after installing 12.04 alongside Windows 8?

First, I suggest you look harder for options to disable Secure Boot without activating BIOS/CSM/legacy mode. Such an option should be present. If it's not, the manufacturer is pushing pretty hard at the limits of their contract with Microsoft, and possibly violating it. Personally, I would return any computer that doesn't enable me to disable Secure Boot, and I strongly recommend you do the same, if that's the case for you. (Note that a firmware update might help on this score, although some manufacturers require you to boot Windows to install such updates, which puts you in a bind.)

Trying to manage Ubuntu booting in BIOS mode and Windows booting in EFI mode is a tricky proposition, so your goal should be to get both OSes installed in a single mode. This is usually easier with EFI mode, assuming you're starting with a working pre-installed Windows 8; however, BIOS mode may be easier if you've got a Windows 8 retail disc.

You may want to read my Web site on EFI-mode Linux installations. It's got assorted tips on how to prepare to install, install, and manage Linux on an EFI-based computer. This won't help you directly with your problem, but it's useful background information, and it may be helpful if you decide to start over from scratch.

Which brings me to your current recovery options. Starting from scratch is one of them, and it may be worth considering. Unfortunately, most manufacturers don't provide recovery CDs; instead, they rely on a recovery partition on the hard disk. You may be able to get that started, but you'll have to find your firmware's boot manager to launch it. When you run it, you can restore the computer to its factory defaults and start over from scratch, doing an EFI-based installation. Given your experience, I'd avoid using Boot Repair on your computer.

Another option is to try booting my rEFInd boot manager. Grab the CD-R or USB flash drive image, create a boot medium, and boot with it. Ideally, it will give you options to boot both Linux and Windows, both of which will work. Unfortunately, the images I've provided don't directly support Secure Boot, so you'll need to figure out how to disable it before using them. Alternatively, you could add Secure Boot support to the USB flash drive image by adding the shim program -- you'd need to rename EFI/BOOT/bootx64.efi on the USB flash drive to EFI/BOOT/grubx64.efi and then put shim.efi on it as EFI/BOOT/bootx64.efi. See the rEFInd Secure Boot documentation for more on this topic.

Addition: You may want to file a bug report against Boot Repair, since it actually damaged a working installation.


Primary display won't turn on if second display unplugged

I had the same issue with my GTX 1080. Unplug all displays from the computer and boot it. Then plug in your monitor and adjust settings if needed and then you can plug in whatever else. Hopefully this helps..


Adding hosts to hostfile breaks DNS in 18.04 but didn't in 16.04

Okay, I probably should have thought to do this before asking the question but I realized I should watch my processes while names were not resolving when I try to use the full /etc/hosts file that I want to.

Turns out systemd-resolve was just chugging away on my CPU while nothing was resolving, so I looked into that. This led me to a few sites before I got to another Ask Ubuntu post with an answer posted by a user called sena that helped me resolve the issue (yes, I see what I did there).

It turns out that one of the major changes that happened between 2016 and 2018 for Ubuntu was the move from using dnsmasq for DNS stuff on the system to using systemd-resolve (systemd-resolved?) for this. Now, for a common user who doesn't futz with /etc/hosts, this is perfectly adequate.

The problem is that systemd uses a substantially slower method of parsing /etc/hosts. This is apparently tied to something about how one should just have a local DNS server do the kind of filtering I'm doing instead of doing it per-machine, so the expectation is that the hostsfile is only a dozen lines or so, not the 700,000-ish lines I'm using. While I can absolutely appreciate the rationale here, and I might go to the trouble of using this approach if I used exclusively desktops, my laptop is portable and goes with me all over the place so a home-only filter is dramatically less useful to me than I would like. Therefore, I needed a better fix.

The summary of the answer in that link (it was very helpful to me that the person who answered copied the information because I was mid-DNS-not-working when I scrolled down to find it) is as follows (thank you sena for a thing that fixed my laptop's DNS):

  Here is solution for (X)Ubuntu 18.04 Bionic.

  Install dnsmasq

sudo apt install dnsmasq

  Disable systemd-resolved listener on port 53 (do not touch /etc/systemd/resolved.conf, because it may be overwritten on upgrade):

$ cat /etc/systemd/resolved.conf.d/noresolved.conf
[Resolve]
DNSStubListener=no

  and restart it

$ sudo systemctl restart systemd-resolved

  (alternatively disable it completely by $ sudo systemctl disable systemd-resolved.service
  )

  Delete /etc/resolv.conf and create again. This is important, because resolv.conf is a symbolic link to /run/systemd/resolve/stub-resolv.conf by default. If you will not delete symbolic link, the file will be overwritten by systemd on reboot (even though we disabled systemd-resolved!). Also NetworkManager (NM) checks if it is a symbolic link to detect systemd-resolved configuration.

$ sudo rm /etc/resolv.conf
$ sudo touch /etc/resolv.conf

  Disable overwriting of /etc/resolv.conf by NM (there is also an option rc-manager, but it does not work, despite it is described in the NM manual):

$ cat /etc/NetworkManager/conf.d/disableresolv.conf
[main]
dns=none

  and restart it:

$ sudo systemctl restart NetworkManager

  Tell dnsmasq to use resolv.conf from NM:

$ cat /etc/dnsmasq.d/nmresolv.conf
resolv-file=/var/run/NetworkManager/resolv.conf

  and restart it:

$ sudo systemctl restart dnsmasq

  Use dnsmasq for resolving:

$ cat /etc/resolv.conf
# Use local dnsmasq for resolving
nameserver 127.0.0.1

Doing this on my system seems to have (and I've rebooted, so it appears to be persisting for now) migrated all of the DNS stuff being done locally back to dnsmasq, which appears to experience absolutely no difficulties with hundreds of thousands of entries in /etc/hosts to blacklist known-bad domains while I'm out and about and can't rely on my home DNS solution to protect me.

(I don't know the "proper" way to credit someone in markdown-ish format, but again, want to point out that where I found this seems to be posted by sena, who deserves credit for coming up with this solution that I found.)


Change color of top menu bar in Unity and top menu bar in any window (application and file explorer)

You can use Ubuntu Tweak to change the themes of different elements instead of having a single theme for every thing.

How to install Ubuntu Tweak?

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

For Ubuntu 14.04 onwards, it's available in softxare sources, just type:

sudo apt-get install unity-tweak-tool

For older Ubntu releases:

sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak

How to change the window theme?

Once installed, Hit Super key (Windows key) to open Unity dash and search for "ubuntu tweak" and open it.
Open the "Tweaks" tab and click on "Themes".

Hare you can change the theme of window (title bar). As you can see I've changed the window theme in this screenshot. You can change the theme of Unity panel (menu bar) by changing Gtk theme.

Where can I get themes for Ubuntu?

Hare are two exelent sources for themes.

Gnome-Look

Ubuntu-Art


I had, what seemed to be, the same problem. In my case the headers didn't get installed during the upgrade and thus the video driver never got built.

Here's what I did:

installed linux-headers-lowlatency
ran sudo dpkg-reconfigure nvidia-384
make sure wayland was enabled in /etc/gdm3/custom.conf (I had changed it before)

I may have uninstalled nouveau (xserver-xorg-video-nouveau package) but I think it was getting the driver module built/installed and re-enabling wayland (after I disabled it trying to get things working) that did the trick for me.

FYI, for me everything feels sluggish, and it doesn't take refresh-rate changes.. but that's a problem for another day.


Problem with executing dssp (secondary structure assignment)

I think your problem is that you did not write
 sudo chmod a+x /usr/local/bin/dssp ?
(I just installed and used dssp, with the link that you provided, and it works OK)

(You should make another question for the other problem (with a better explanation and new title))


Ubuntu, then Windows 7 was installed, how to switch them?

Boot to a live cd.  Load up the system under "Try ubuntu".  Open a terminal.  Type sudo install /dev/sd? replacing the ? with the proper letter of the main drive (this will likely be an a, resulting in sudo grub-install /dev/sda).

Afterwards, reboot without the LiveCD and see if Grub shows up.  Lemme know if it doesn't because I have another method that worked for me.


libreoffice set as default but files still opened using WPS office

Right click on the .csv file and see what it set as the default application to open with - presumably it will be WPS.

Select Open with Other Application and if it lists LibreOffice Calc as Recommended application, select it from there after which the default will be set for the future.

If not in the list of recommended than click on View All Applications and select LibreOffice Calc from there.


Use "find" command to find wine folder:

find / -name wine

For me is:

/opt/wine-devel/share/wine


I found the solution myself.  Add the follow two lines in the [Unit] section of /lib/systemd/system/dnsmasq.service

After=network-online.target
Wants=network-online.target

See https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/1531184 for more detail.


Install Java with this commands and you have an entry in Open with:

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

and then

sudo apt-get install oracle-java8-set-default

And in order to do things more easily, use the Minecraft Installer.

sudo add-apt-repository ppa:minecraft-installer-peeps/minecraft-installer
sudo apt-get update
sudo apt-get install minecraft-installer

Then run Minecraft from the Dash.


Clearly, there is an error in line 299 of the generated GRUB config file. Check for errors in the /etc/default/grub, /etc/grub.d/* files related to generated line 299 (of /boot/grub/grub.cfg). Read the error message!


The normal method of adding dictionaries is by editing

/etc/dict/dictd.conf

Example:

database eng-spa {
    data /usr/share/dictd/eng-spa.dict.dz
    index /usr/share/dictd/eng-spa.index
}

... adds the English-Spanish dictionary installed by dict-freedict-eng-spa. For other dictionaries, copy and paste the above database declaration but make sure to change the database name, i.e. eng-spa, and also change the data and index paths above to specify the right files.

From Arch WIKI on dictd.

After changing the configuration the service needs to be reloaded (dictd.service)

  Not sure if dictd support wide ranging dictionary format like goldendict,

The other way round: Goldendict has support for dictd so it will be a matter of adding the correct directories.


After executing these commands, something wrong with "resolv.conf" file

The commands you provided in your question doesn't make much sense, I don't know a command m, also the ln-command is incomplete as it is unclear in which directory the link is created. Without specifying a link-name, the link will be created in the current directory and has the same name as the target.

My guess is you ran rm /etc/resolv.conf which is a link to /run/systemd/resolve/stub-resolv.conf

To restore the deleted link run

ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

as root and you should be able to connect to the internet.


Cannot upgrade AMD 64 bit Ubuntu 13.04 to 13.10?

If you want to try to upgrade via the command line, try the instructions here

In a nutshell, run

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

then

sudo apt-get install update-manager-core
sudo do-release-upgrade


Minipci 34mm Renesas uPD720202 USB3.0 card not working sometimes

My card doesn't working properly becouse it's broken. This is hardware problem. This card has two ports. I bought new card it has one port. This is working properly. I bought this and this is working: https://urun.gittigidiyor.com/bilgisayar-tablet/pcmcia-express-usb-3-0-1-ports-34mm-352673855


Two monitor setup, icons / programs default to left screen all the time

Ubuntu doesn't care what the primary monitor is (xconf "use this as my primary display" means nothing apparently), it uses the left/right arrangement of the screens to decide which is primary.  Whatever screen is 'left' in screen settings is the primary display.

This question has been asked before: Change Primary monitor

This question is being asked again: How to make the right hand monitor the primary monitor

Hopefully someone out there knows how to get fullscreen applications to launch in right hand monitor.


Sfill caused a disk max capacity error to show

The whole point of sfill is to fill your available disk space with patterns that will overwrite any residual data from older files and directories that have been deleted since.

Therefore, you must not be concerned by the size of 'ooooooo.ooo', it will be as large as possible. No need to stop sfill then. You must not enlarge your partition either, as the file will then get larger too.

As for the file being larger than the partition's available space, even if this is technically possible (sparse files), this is probably false in that context. You are probably comparing the file size with the available space as you see it as a regular user, but Linux ext partitions are generally created with 5% more space (this extra-space is only usable by root; you can see it with dumpe2fs -h /dev/your_ext_partition | grep ^Reserved).


If I install Ubuntu to a second hard drive, will it prompt me to select which OS to use on startup?

It will depend on where you put the Ubuntu bootloader, if you install the Ubuntu bootloader to the same hard drive as windows 7 (eg sda) then yes you will be prompted to pick between the 2, however if you install the bootloader to the second hard drive (eg Sdb), then you won't be prompted, your computer will just boot right into windows 7, unless you change the boot order in your bios, in which case it will boot right into Ubuntu.

Sincerely, tapthoseshoesandwish


What was the first Ubuntu release with a live CD feature?

It started with Ubuntu 4.10 (Warty Warthog)

The live CD allows you to try Ubuntu without changing your computer at all.

  The desktop CD allows you to try Ubuntu without changing your computer
  at all, and at your option to install it permanently later. This type
  of CD is what most people will want to use. You will need at least
  256MB of RAM to install from this CD.Ubuntu 4.10

6.06 was the first Ubuntu release whose live CD image would install the OS.

Thanks to Eliah Kagan for the corrected info


Insert your usbmodem.
Click on the network icon on the Right Side > Edit Connection > Select Mobile Broadband > Add
Follow the steps (select country and your service provider as Aircel). complete the steps by saving.
Click on the desktop taskbar network icon and select the connection made.


I am unable to change brightness of my laptop

To I'm just tried out the following command (As mentioned above)

Ctrl+Alt+T: to open command prompt
sudo gedit /etc/default/grub
Find the line

GRUB_CMLINE_LINUX_DEFAULT="quiet splash"

Replaced this line with the following line

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux acpi_backlight=vendor"
sudo update-grub
reboot

It's definitely working on it.


I messed up the update process from 19.10 to 20.04

You have to:

Ensure that you do not have eoan in the sources.lists by something like

grep "^deb.*eoan" -r /etc/apt/ --include="*.list"

Change all eoan to focal by hand or by

cd /etc/apt/sources.list.d
sudo sed -i "s/eoan/focal/" some.list

Get fresh package lists

sudo apt-get update

Get all newest dependencies for current release

sudo apt-get dist-upgrade


If Ubuntu is installed along-side of Windows, can it be deleted later?

The answer is yes. But it is not like the process of uninstalling a software. You have to format the partition on which Ubuntu resides and then update the mbr with Windows boot code. See this question details about uninstalling Ubuntu.

How to remove Ubuntu and put Windows back on?


How to access the USB stick in my router (Huawei B315) that is shared as a samba share

After some helpful suggestions (thanks @mikewhatever) and a bit more investigation I've worked it out.

The way to reference this share is in the location bar of the file manager use:

smb://ip address/username/sharename/

The username and sharename you get from the user settings page of the routers web interface when you set up the share - at that stage you must already know the IP address as it's what you use to access the web interface.  If the user has access to 'All' then leave out the sharename, otherwise use what the router calls it when you select the users folder.

samba then displays this dialog:

I left workgroup in and selected remember until I log out, put in my username and password and then I was able to browse the files.

I had to work most of this out by trial and error.  As @mikewhatever suggested I tried using smb://routers-IP-address as the servername, this got me a little further. I then put the username in, received another error, and so on, and after a bit of experimenting I determined what was required.  What I've shown here has only been shown with this one router (B315) from Huawei but might be more generally applicable.

I'm guessing the Windows Network and Workgroup stuff is a samba thing, but it does seem odd considering there arent any windows computers on the network.

What I'd like to know now is why isn't this info more readily available?


Dropbox often stalls "Saving 1 file", have to restart it

This worked for me, you give it a try:

If unlinking and relinking your account doesn't solve the issue, your settings may be protected or inaccessible due to a permissions problem. If this is the case, you can remove your settings by hand using an administrative account. Here's how:

On Linux

Quit Dropbox by right-clicking on the Dropbox menu from the menu bar and selecting Quit
Open a terminal and copy and paste the following line into the terminal (exactly as written below):

sudo rm -rfI ~/.dropbox
You will be asked for your password to confirm the folder's removal
Restart Dropbox from the Applications > Internet menu

Once Dropbox loads, the application will rebuild your settings files and you will be asked to relink to your account.

Note: We're working on a way to check and fix your Dropbox installation automatically from within the application. Stay tuned...

(From the Dropbox Help Forum Team)


Follow these steps :

1) Boot from the USB Stick.

2) Open a Terminal and type in the following commands, noting that the first command will put you into the grub “prompt”, and the next 3 commands will be executed there. Also note that hd0,0 implies the first hard drive and the first partition on that drive, which is where you probably installed grub to during installation. If not, then adjust accordingly.

sudo grub

root (hd0,5)

setup (hd0)

exit


Something went wrong with driver update and now my screen is half the size

After talking to a friend, I have come to viable solution:

cp /etc/X11/xorg.conf /etc/X11/xorg.conf-20130101
sudo rm xorg.conf

reboot


How is PCManFM being launched at session start?

Following @DK_Bose suggestion, I edited the file ~/.config/lxsession/Lubuntu/desktop.conf, removing the word filemanager from the line desktop_manager/command=filemanager. This stopped PCManFM from launching at session start.


Please make sure that your swap is mounted correctly. Edit the /etc/fstab/ file using the nano editor:

sudo nano /etc/fstab

When the /etc/fstab is opened, go to the line where you can read: ” # swap was on /dev/…..” immediately after this line, I mean the next line, be sure there is no ”#”. If there is a ”#” starting this following line, just delete it. Then press Ctrl+O and after that Enter to save the changes you made to fstab, then Ctrl+X to exit nano. Now your swap space will be active for hibernation after the next reboot.

sudo apt-get install uswsusp

...and restart your computer.


Restricting SSH sessions for accounts on ubuntu server

If you look at man sshd_config, you can see that there is an option for MaxSessions.  Unfortunately, this is the maximum number of sessions per network connection, not the maximum number for a specific user.

One thing you can do is set UsePAM yes in /etc/ssh/sshd_config, then configure PAM to handle the user limits by enabling the PAM module pam_limits.so.  If you only want the limits to apply to ssh sessions, add the following line to /etc/pam.d/sshd:

session required pam_limits.so

I'm pretty sure all of the above stuff is the default configuration, now comes the part that actually sets the limit.  pam_limits.so pulls its limits from /etc/security/limits.conf.  If you want a user to only be able to have one active session at a time, just add the following line to that file:

user    hard    maxlogins    1

Once this is set up, on any log in attempt when there's already an active session, the user will get the error Too many logins for 'user'.  To make this apply to all users, use * for the user.  You can also have it apply to certain groups, for instance, use @users to apply to rule to everyone in the users group.


What keys is GnuPG using for signature verification?

An OpenPGP signature includes a reference to the key used for signing. GnuPG will use this exact key to verify the signature.

An example for some document signed by my own key, analyzed using gpg --list-packets:

:compressed packet: algo=1
:onepass_sig packet: keyid 8E78E44DFB1B55E9
    version 3, sigclass 0x00, digest 2, pubkey 1, last=1
:literal data packet:
    mode b (62), created 1453746673, name="",
    raw data: 4 bytes
:signature packet: algo 1, keyid 8E78E44DFB1B55E9
    version 4, created 1453746673, md5len 0, sigclass 0x00
    digest algo 2, begin of digest fc 6a
    hashed subpkt 2 len 4 (sig created 2016-01-25)
    subpkt 16 len 8 (issuer key ID 8E78E44DFB1B55E9)
    data: [4095 bits]

8E78E44DFB1B55E9 is a signing subkey used for the signature (I enabled long key IDs, in case you wonder about the 16 character hex IDs).

For encryption, it is possible to hide the recipient key. In this case, GnuPG has to try all available encryption keys to decrypt the message.

Further keys might be involved for validating the signature, which means finding trust paths in the web of trust: but this is another, large topic.


Xenial 16.04 xrandr doesn't list HDMI after kernel upgrade

I have solved my problem by following suggestions on other posts. What worked for me I used boot-repair logging from Live CD and repaired Grub. That might be the case because I upgraded from 14.04 and might have done some subtle things during the upgrade?. I had to reboot twice to see the changes effectively, dunno why???

Now I can happily work back again with 3 monitor setup. Although there are still messages annoying me in syslog!


How to integrate Okular with the DE theme in Ubuntu 18.04

For me installing the qt5-style-plugins and adding QT_QPA_PLATFORMTHEME=gtk2 to /etc/environment (rather than ~/.bashrc) did the trick.


Output Device on GNOME settings shows Speakers and Headphone separately

I am not 100% what you mean.but it sounds as if your headset is not the default device....besides. ..are you using a usb-headset or just plug into the Jack of the laptop?

....you could try installing pavucontrol and take a look at your devices:

sudo apt install pavucontrol


Why system keep ask to enter password for the first member of sudo group instead of deny command execution

I have not enough knowledge about polkit, but it seems to be a cause of such behavior.

Line which responsible for that is :

AdminIdentities=unix-group:sudo;unix-group:admin

inside the /etc/polkit-1/localauthority.conf.d/51-ubuntu-admin.conf file

Commenting of the AdminIdentities=... line and restarting polkit daemon returns default behavior where root password is required for service restart.
Not sure if it's safe, or not. Probably some of community members could explain better.

Also it seems that I've found the place where default actions for systemd are described if unprivileged user is trying to perform some action with the systemd service.
It's inside the file: /usr/share/polkit-1/actions/org.freedesktop.systemd1.policy

If I'm setting values like this:

<action id="org.freedesktop.systemd1.manage-units">
        <description gettext-domain="systemd">Manage system services or other units</description>
        <message gettext-domain="systemd">Authentication is required to manage system services or other units.</message>
        <defaults>
                <allow_any>no</allow_any>
                <allow_inactive>no</allow_inactive>
                <allow_active>no</allow_active>
        </defaults>
</action>

i start to get Access denied message on trying to restart service as unprivileged user.


Laptop overheats when running Ubuntu 13.10

How much resources do you use in system-monitor. i think the unity-surface is very high in consumption. perhaps thy same ubuntu with diffrent surface? (e.G. lxde? / Kde?)


I guess you have NTFS file system on your windows partition. If not, please do not try to use the ntfs-3g driver!

Here is a pointer to an excellent document on the configuration of fstab config file:

FSTAB configuration

fstab is a config file in which partitions are named which should be mounted at boot time. In Linux, partitions are mounted into a folder, thus you have to create a line similar to this for your windows partition:

/dev/hda2 /media/windows ntfs-3g defaults,locale=en_US.utf8 0 0

This line makes Linux mount the device /dev/hda2 (replace this with the device of your windows partition) to the folter /media/windows (replace this by the folder where you wish your windows files to appear). I suggest to keep it in /media/... and then create a nautilus bookmark for simple access.

Last point: Warning! Be careful when editing your /etc/fstab file. A corrupt line in there could make your ubuntu unbootable!


Go to System Settings...Brightness and Lock:

The default screensaver idle time is 10 minutes, and the screen is locked once the screensaver activates:

You can adjust the idle time (or disable the screensaver), and also disable the lock:

Simply close Brightness and Lock to apply the new settings.


Looking for Ubuntu 14.04 Photo Viewer just like Eye of MATE

Solved.

It turns out that with a little more exploring the keyboard using the default Ubuntu 14.04 image viewer, Eye of Gnome, I figured out how to move around the photo using the keyboard. I checked the Eye of Gnome app homepage and found no instructions, even after searching their Github page. So, I do not feel so bad about posting such a rudimentary question.

Anyway. again, the problem is viewing a photographed book. Photos of books generally need to be enlarged when viewing on a computer. Eye of MATE operates better in some respects but I am now using Ubuntu 14.04.

Enlarge photo: double finger swipe up:
Reduce photo: double finger swipe down
Maximize window: double-click header bar at top of window
Scoll left/right: Shift-Ctrl-trackpad double swipe up/down (who woulda thunk it, I know, I know - the developers of EOG)
Scroll up/down: Shift-Ctrl-trackpad double swipe left/right
Scroll through previous/next photo: keyboard cursor keys left/right and/or up/down


DNS keeps resetting after reboot. Ubuntu 17.10

[re-written for simplicity - hope it helps]

Can you run systemd-resolve --status ? Does it return DNS info about your network adapters?

If so then run sudo dpkg-reconfigure resolvconf

And make sure /etc/resolv.conf reads:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.

nameserver 127.0.0.53

Then restart Network Manager:
sudo service network-manager restart

The systemd resolver works with the other resolvers and choose what's appropriate.


How do I configure exim4 to send mail through a password protected ssl smtp mail server?

I finally found a detailed set of instructions by Tony Scelfo that actually work.  It appears that you have to use transport layer security (TLS) on port 587.  I have not gotten SSL SMTP to work.

First run sudo dpkg-reconfigure exim4-config and use these config options:

General type of mail configuration: mail sent by smarthost; received via SMTP or fetchmail
System mail name: <your hostname>
IP-address to listen on for incoming SMTP connections: 127.0.0.1
Other destinations for which mail is accepted: <your hostname>
Machines to relay mail for: <leave this blank>
IP address or host name of the outgoing smarthost: mail.example.com::587
Hide local mail name in outgoing mail?

Yes - all outgoing mail will appear to come from your gmail account
No - mail sent with a valid sender name header will keep the sender’s name

Keep number of DNS-queries minimal (Dial-on-Demand)? No
Delivery method for local mail: <choose the one you prefer>
Split configuration file into small files? Yes (you need to edit one of the files next)

Then run sudo vi /etc/exim4/passwd.client and add the following lines for your mail host, and any aliases it has (found through nslookup).  Substitute <email address> and <password> with the account you want to route mail through):

mail.example.com:<email address>:<password>
mail.yourhosting.provider:<email address>:<password>

Once you edit the passwd.client file, run sudo update-exim4.conf which will integrate your changes into your Exim4 config.

Run sudo /etc/init.d/exim4 restart and make sure that the service stops and starts properly. If the service is unable to restart, something probably went wrong when you edited the passwd.client file.

If Exim4 restarted, go ahead and run sudo tail -f /var/log/exim4/mainlog to watch the mail logs. In a different window, send an email from your system and make sure that you see a record go by withR=smarthost T=remote_smtp_smarthost H=gmail-smtp-msa.l.google.com ... X=TLS-1.0:RSA_ARCFOUR_MD5:16 in it. The X=TLS means that the mail is being sent with transport layer security which is what you want.


My Xonar audio card has disappeared upon installing Nvidia card (980 GTX). What can I do to restore it?

Apparently was just a wire making contact to the audio card. Everything is now ok... what a kultz!


How to access a shared folder in VirtualBox?

Access to shared folders in Virtual Box
Command line
By default, VirtualBox shared folders are created with read/write permission for the guest. This can be done from the command line on the host with:
VBoxManage sharedfolder add "VM name" --name sharename --hostpath "C:\test"

By adding the option --readonly we can restrict these for read-only access. Use the --transient option if you only want the shares to appear in the present session but not persistent for following sessions. There are some limitations for shared folders (see this question for details). If prerequisites are met we may mount these shared folders manually by running the following commands in the guest:
mkdir /home/<user>/vboxshare
sudo mount -t vboxsf -o uid=1000,gid=1000 sharename /home/<user>/vboxshare

Of course, we can also use different mount options to mount as read/only or mount with read access only to root.
Auto-Mount through Virtual Box Manager
In case we enabled auto-mounting on creating a shared folder from the Virtual Box Manager those shared folders will automatically be mounted in the guest with mount point /media/sf_<name_of_folder>. To have access to these folders users in the guest need to be a member of the group vboxsf.
sudo usermod -aG vboxsf userName

The guest will need to restart to have the  new group added.
Source and further reading: Virtual Box User Manual


The problem you are having is that grub is still installed in the MBR of the drive. Deleting the partitions does nothing to the MBR as it's in a separate reserved location. You can eliminate it by simply using your Windows installation and recovery disk to re-write the MBR How this works exactly may vary slightly dependant upon the version of Windows you are using. The recovery console commands fixboot and fixmbr come to mind.


how should I repair exFat data if I run ntfsfix on ubuntu?

Why would you even attempt to use a tool for NTFS on a filesystem that is not NTFS?

Exfatfsck should be used to check exFat.  Mind though that this tool can only be used to perform a check. Testdisk can retrieve data from exFat but that also does not fix your filesystem.

But there is no native Linux tool to repair exFat. Use Windows to fix the problem.


Which system files are updated when you install/update/remove a package?

dpkg
dpkg keeps some information in /var/lib/dpkg/:

info/PACKAGENAME.* (where PACKAGENAME is the name of the package): file list and  control files from the DEBIAN/ folder inside the package
diversions: diverted file locations, see dpkg-divert
alternatives: information for the Debian alternatives system, see update-alternatives
triggers: package triggers, see dpkg-trigger

apt

/var/lib/apt/extended_states: package information not used by dpkg, like the auto-installed flags
/var/log/apt/: several log files


GPU, Nvidia GEFORCE GT 1030 by Gigabyte - not booting to log in screen

Have you installed a driver?

If not add the ppa:

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

Then add the driver

sudo apt install nvidia-driver-430 nvidia-settings

Note that if you want a different driver version edit the 430 accordingly


Using fingerprint reader for HP ProBook 138a:003f Validity Sensors

Instead, use the link below because you might have wrong repos.
I tried it and it is working for me.

GUI FINGERPRINT SCANNER

As long as your laptop has a scanner, the above method should work

You can also try this method

Install proprietary Validity driver via terminal as below.

Download the .tar file from here on Google Drive and cd to the directory where it was saved, then run these commands:

tar xf vfs495.tar
cd vfs495
sudo apt-get install alien
sudo alien Validity-Sensor-Setup-4.5-118.00.x86_64.rpm
sudo dpkg -i validity-sensor-setup_4.5-119_amd64.deb
sudo apt-get install libssl1.0.0
sudo ln /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib/libssl.so.0.9.8
sudo apt-get install libcrypto++-dev
sudo ln /usr/lib/libcryptopp.so.9 /usr/lib/libcrypto.so.0.9.8

Compile and install libfprint

mkdir libfprint
cd libfprint
rpm2cpio ../libfprint-0.0.6-18.20.1.src.rpm | cpio -i --make-directories
tar xf libfprint-0.0.6.tar.bz2
cp ../libfprint-validity.patch ./libfprint-validity.patch
cd libfprint-0.0.6/
patch -p1 < ../libfprint-validity.patch
sudo apt-get install libusb-dev libcrypto++-dev libssl-dev libglib2.0-dev libmagickcore-dev checkinstall
./configure --prefix=/usr
make
sudo checkinstall -install=no make install
sudo dpkg -i libfprint_0.0.6-1_amd64.deb

Compile and install fprint_demo

cd ../..
sudo apt-get install libgtk2.0-dev
tar xf fprint_demo-0.4.tar.bz2
cd fprint_demo-0.4
./configure --prefix=/usr
make
sudo checkinstall -install=no make install
sudo dpkg -i fprint-demo_0.4-1_amd64.deb

Finally, enroll a finger

sudo /etc/init.d/vcsFPServiceDaemon start
sudo fprint_demo

This pop-up should appear

Enroll your right index finger.

You should now be good to go


How to set default folder of php in netbeans?

right click on the project in netbeans

go to run configuration and change the project URL so it satisfy your need (without html)


Applications refuse to start; "Could not load QT plugin ubuntumirclient"

You are dealing with a Mir library on Xubuntu.

Mir is a very new technology, and is being developed primarily on Unity7 with the Ubuntu SDK, which means that it is pivotal for Canonical Developers to ensure that Ubuntu 15.10 will not have these issues. If you switch to Ubuntu 15.10, you will have the native and recommended developer environment, and subsequently, this should take care of all these dependency issues.


Bluetooth and WiFi not working on HP PROBOOK 4430s

fine work with me. there try this :D,

sudo apt-get install --reinstall linux-headers-$(uname -r) linux-headers-generic build-essential dkms

wget http://media.cdn.ubuntu-de.org/forum/attachments/44/18/3005217-r8168-dkms-8.029.00.tar.gz

sudo tar xvf 3005217-r8168-dkms-8.029.00.tar.gz -C /usr/src

sudo dkms add -m r8168-dkms -v 8.029.00

sudo dkms build -m r8168-dkms -v 8.029.00

sudo dkms install -m r8168-dkms -v 8.029.00

echo "blacklist r8169" | sudo tee -a /etc/modprobe.d/blacklist.conf

sudo modprobe -rfv r8169

sudo modprobe -v r8168

Hope will this help you :)


make a bootable image on a removable Flash drive of Lenovo's SSD firmware update tool

The problem with the "isohybrid" answer and the many identical suggestions for that command that google will produce is that the file you're talking about has everything in what's called the "El Torito" boot sector of the iso 9660 image.  This is why if you just mount the file, like so

  sudo mount file.iso /cdrom

You'll see that there's nothing there, no space available, and all the space used. This magic is made possible by the mysterious El Torito Boot sector.

So how do you get that?

We'll use yet another tool, in debian it's genisoimage. The program you need in this package is called geteltorito.

Now do something like this:

$ geteltorito XXX.iso > XXX.finally_working_gahhhhhh.img
$ sudo dd if=XXX.finally_working_gahhhhhh.img of=/dev/sdb

And finally, there we go. We can now move on with our lives. Yay!

Note: Thanks to this blog which finally gave me the secret here.


Should I choose Ubuntu Server when installing a custom WM?

I would recommend using the "minimal" or "netinstall" ISO, which will download and install only a core system, plus the packages you select. If I recall correctly, it does not include some of the more "server"-y stuff that Ubuntu Server includes. Since it downloads packages on-the-fly, there won't be a boatload of updates to install once you boot into your new system.

http://archive.ubuntu.com/ubuntu/dists/xenial/main/installer-amd64/current/images/netboot/mini.iso


How I can update gcc from v 4.4.3 to 4.6.1?

The particular PPA you have pointed to in your question will update your GCC compiler from v4.4 to v4.5.

N.B. You need to run sudo apt-get update && sudo apt-get upgrade to uplift to this later version.

On launchpad I have found this PPA which looks promising to uplift lucid to gcc4.6 or this from the linaro maintainers.

Note - I'm not making any claims about the veracity of these PPAs.  Please see possible related questions below.

Related Questions:

 Are "PPA's" safe to add to my system, and what are some "red flags" to watch out for?
 How to install ppa packages in an apt-get style


installing programs without having internet

Package database, this has what .debs you need.  Just download them and install them on your friends computer.


How do I update to Version 4.7 of KMyMoney from Ubuntu 12.04?

Your Ubuntu is too old. Upgrade your system and the PPA (ppa:claydoh/kmymoney2-kde4, described here) will work.

Try the following, but I can not promise that it works with your Ubuntu version.

I quote @terdon:

  If it fails, it will fail before the make install step and so will not
  attempt to install anything. It is perfectly safe to try.

cd
wget http://download.kde.org/stable/kmymoney/4.7.2/src/kmymoney-4.7.2.tar.xz
tar xf kmymoney-4.7.2.tar.xz
sudo apt-get build-dep kmymoney
cd kmymoney-4.7.2
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make

Install with:

the classic way with make install

sudo make install

or with checkinstall for a deb package

sudo apt-get install checkinstall
sudo checkinstall


How to install gitg version 2.7 under 15.04?

Open a terminal and run these commands:

sudo dpkg -i gitg_0.2.7-3_amd64.deb
sudo apt-get remove libgit2-glib-1.0-0

and set on hold with:

sudo apt-mark hold gitg

The whole is reversed with

sudo apt-mark unhold gitg
sudo apt-get upgrade

This package can be obtained from https://packages.debian.org/jessie/amd64/gitg/download. (If you're on a different architecture than amd64, select it here.)


I looked up your laptop, it seems to support the low-power Intel graphics as well as the high-power nvidia graphics.

You can confirm if your laptop has both intel and nvidia by running lspci | grep VGA

Try purging all nvidia stuff and then forcing the intel driver to be used? Afterwards, install nvidia-331 (or latest) and Bumblebee using Xorg-Edgers PPA.

Bumblebee is a program that allows you to invoke the nvidia driver only for applications of your choosing, otherwise the intel driver runs as default.

More info on my answer here: Lenovo Y510P and SLI GT750M not working


How can i install matlab without an install file?

That video demonstrates installing the Linux version of Matlab under Ubuntu. It sounds like you have the Windows version of Matlab, so this leaves you with following options:

Get the Windows version of Matlab.
Try running your copy of Matlab under Wine.

OR

Install linux version of matlab. According to this thread if you have purchased legally  you should get matlab for windows,linux and mac without any extra cost.

OR

Install windows in virtualbox and use matlab in that.

A quick introduction to Wine is available here.


Nautilus context menu for current directory when there's lots of files / "Open in Terminal"

Go to the directory where you want to open in terminal. Make sure your cursor in inside in window (where files are displayed). If a file is selected, press the Ctrl + Space to deselect it. Then press Option key.

Then context menu pops up. Now you can select the open in terminal option.


I wrote up this utility that should work pretty swiftly, here is the output on my home dir for a default run:

??? 3897697700  (717MiB)
.tgz    1550090721  (1478MiB)
.jpg    872736861   (832MiB)
.iso    804329472   (767MiB)
.pack   636183905   (606MiB)
.gch    528345920   (503MiB)
.d  384725346   (366MiB)
.i  354098997   (337MiB)
.sqlite 302110738   (288MiB)
.html   233729943   (222MiB)
.cs 209534627   (199MiB)
.dll    198655123   (189MiB)
.xml    192561101   (183MiB)
.pdf    184729508   (176MiB)
.deb    173972838   (165MiB)

Note the large ??? post is due to the many .hg and .git source repositories that have no extensions.

The code defaults to printing the top-15 largest contributing filetypes, although that could easily be extended.

There is a TODO in the code to use libmagic to get the actual filetypes.

Here is the code:

#define _XOPEN_SOURCE 500
#include <ftw.h>
#include <cstdio>
#include <cstdlib>
#include <stdint.h>

#include <set>
#include <vector>
#include <algorithm>
#include <string>
#include <iostream>

static uintmax_t total        = 0ul;
static uintmax_t files        = 0ul;
static uintmax_t directories  = 0ul;
static uintmax_t symlinks     = 0ul;
static uintmax_t inaccessible = 0ul;
static uintmax_t blocks512    = 0ul;

struct byfiletype {
    std::string filetype;
    mutable uintmax_t total; // non-key

    bool operator<(const byfiletype& other) const { return filetype<other.filetype; }
    static bool largest_first(const byfiletype& a, const byfiletype& b) { return a.total>b.total; }
};

typedef std::set<byfiletype> sizemap;
static sizemap per_filetype;

std::string get_filetype(std::string fname) // TODO use libmagic to do file type detection?
{
    size_t pos = fname.rfind("/");
    if (std::string::npos != pos) fname = fname.substr(pos+1);

    pos = fname.rfind(".");

    return (std::string::npos != pos)
        ? fname.substr(pos)
        : "???";
}

static int
display_info(const char *fpath, const struct stat *sb,
             int tflag, struct FTW *ftwbuf)
{
    switch(tflag)
    {
        case FTW_D:
        case FTW_DP:  directories++;  break;
        case FTW_NS:
        case FTW_SL:
        case FTW_SLN: symlinks++;     break;
        case FTW_DNR: inaccessible++; break;
        case FTW_F:
                      files++;
                      byfiletype entry = { get_filetype(fpath), sb->st_size };
                      sizemap::iterator match = per_filetype.find(entry);

                      if (match != per_filetype.end())
                          match->total += sb->st_size;
                      else
                          per_filetype.insert(entry);

                      break;
    }
    total += sb->st_size;
    blocks512 += sb->st_blocks;
    return 0; /* To tell nftw() to continue */
}

int
main(int argc, char *argv[])
{
    int flags = FTW_DEPTH | FTW_MOUNT | FTW_PHYS;

    if (nftw((argc < 2) ? "." : argv[1], display_info, 20, flags) == -1)
    {
        perror("nftw");
        exit(EXIT_FAILURE);
    }

    printf("Total size: %7jd\n", total);
    printf("In %jd files and %jd directories (%jd symlinks and %jd inaccessible directories)\n", files, directories, symlinks, inaccessible);
    printf("Size on disk %jd * 512b = %jd\n", blocks512, blocks512<<9);

    size_t N = std::min(15ul, per_filetype.size());
    typedef std::vector<byfiletype> topN_t;
    topN_t topN(N);
    std::partial_sort_copy(
            per_filetype.begin(), per_filetype.end(),
            topN.begin(), topN.end(),
            byfiletype::largest_first);

    for (topN_t::const_iterator it=topN.begin(); it!=topN.end(); ++it)
    {
        std::cout << it->filetype << "\t" << it->total << "\t(" << ((it->total)>>20) << "MiB)" << std::endl;
    }

    exit(EXIT_SUCCESS);
}


Command to determine whether a fullscreen application is running?

Kind of extreme overkill as a shell script, but it should do the trick:

#!/bin/bash
WINDOW=$(echo $(xwininfo -id $(xdotool getactivewindow) -stats | \
                egrep '(Width|Height):' | \
                awk '{print $NF}') | \
         sed -e 's/ /x/')
SCREEN=$(xdpyinfo | grep -m1 dimensions | awk '{print $2}')
if [ "$WINDOW" = "$SCREEN" ]; then
    exit 0
else
    exit 1
fi

Then you can check it:

if is-full-screen ; then echo yup, full screen ; fi

As pointed out below, you'll need to install xdotool first:

sudo apt-get install xdotool


How to transfer songs from Ubuntu PC into iPod touch 5g

I advise you to follow this tutorial:

Youtube-Video


Can I set Ubuntu 12.10 to automatically reboot to Windows once only?

First time, edit GRUB configuration:

sudo nano /etc/default/grub

Then find the line:

default=Something goes here

And change to:

default=saved

Next, run

sudo update-grub

Next time, run fgrep menuentry /boot/grub/grub.cfg
Count your Windows menuentry from the list (starting from 0, e.g. first is 0, second is 1...).
Finally run

echo "savedefault --default=<your number> --once | grub --batch


CTRL+SHIFT+??? also changes language, when just CTRL+SHIFT should do it

It is known ugly bug - see launchpad bug 1245473.

I'm writing this from Ubuntu 16.04.3 LTS with MATE DE. It does not have this problem.
I'm using Ctrl+Shift layout switcher for English and Russian languages.
I see no interference here.

But MATE on Ubuntu 17.10 and 18.04 LTS has this problem - see other launchpad bug 1720364.

My complete position is written in comment 528 for bug 1218322 at launchpad.


Software Center keeps asking for a CD/DVD when installing applications

In the Software Center menu, click Edit->Software Sources.

In the Software Sources, uncheck the Cdrom box, then try installing something.


Force killing the container's systemd process worked for me.

In your example,

kill -9 24446