Screen tearing while browsing the internet (chrome+firefox) in ubuntu 12.04 intel 4000 graphics

I'm using 12.04 with Intel HD 4000 graphics and a stock kernel (3.2.0-29-generic) and have not noticed these problems.  I also have another partition that is Xubuntu 12.04 and has a custom compiled 3.4.x family kernel, which also does not see this problem.

The 3.5.x and 3.6.x kernels are known to be introducing a number of more experimental and untested capabilities for the new Intel HD 4000 chipsets.  As such it would not surprise me if your problem is related to a bug in one of these introductions.

I would suggest testing out a more stable kernel (3.2.x or 3.4.x family) and see if the problem disappears. If it does you can file a bug against the 3.5.0-10 kernel on launchpad (and potentially upstream as well).


Duplicate icons names on desktop ubuntu/

This is because of a bug in gtk2-engines-murrine. It has been reported here.

Use:

sudo apt-get install gtk2-engines-murrine=0.98.2-0ubuntu2

To roll back version if you don't want to upgrade this package automatically use:

sudo echo "gtk2-engines-murrine hold" | sudo dpkg --set-selections


How to make windows from an application start with "Always on Visible Workspace"

The Window Rules method will work, but seems to require a restart to take effect; or at least for Pidgin conversation windows that appears to be the case.

  I've tried installing compiz settings manager,

sudo apt-get install compizconfig-settings-manager
sudo apt-get install compiz-plugins

  Then setting Window Rules to Sticky for class=Pidgin


Any good painting/drawing software for Ubuntu?

I use KolourPaint for its resemblence to Paintbrush in Windows. I would rather call it the Paintbrush counterpart for Ubuntu!

Hope you like it too! It's gettable from the Ubuntu Software Centre


Sound jumping between speakers and headphones when volume is high

Try plugging in headphones and turning the volume down, then unplug them and re test. I had a similar problem and that did it for me.


Reduce Ubuntu Server size removing all packages excepting very basic ones (16.04 or 18.04)

You are likely aware of the tools "debfoster" and "deborphan". With these, you can remove whatever you do not need in a rather easy way.

Once you have a set of packages you are happy for your servers to work with, you can set these as a set as described on https://unix.stackexchange.com/questions/176134/installing-packages-by-importing-the-list-with-dpkg-set-selections


Take a look at this answer. It seems that this guy find a way to install Acestream.


If Windows 10 "upgrade" affects GRUB2 and screws up my dual boot with Ubuntu will I have to completely wipe my computer and start from scratch?

Who knows? It's the best part of a year away.

The reason I'm answering this rather than voting to close is because even though we don't know yet, it doesn't really matter. Even if Windows Calculator deep-fries GRUB every time you use it, the answer is the same: just restore GRUB.

If you're going to use Windows, the most important thing you can know is to keep a LiveCD around and know how to look for one of the GRUB reinstallation pages or  or a Boot Repair CD.

Windows will always do what Windows wants to do, just learn how to cope with it.


Try running

export LD_LIBRARY_PATH=/usr/lib32:$LD_LIBRARY_PATH

If you're running 64-bit Ubuntu it searches the 64 libraries first, then fails and closes. This will instruct it to search the 32 library first. This is how I solved the issue with Civilization 4.


Automount NTFS drives before startup applications

You could try it without mounting your NTFS drive earlier, just starting Dropbox later.

#!/bin/bash
#insert seconds to wait before dropbox start
wait 15
dropbox

And add that script to your Startup Applications.

Allthough I am not sure why you have that issue, I myself never had that issue and I always had the Dropbox Directory on an NTFS drive.


i3-wm switching from dual do single screen - unplugging hdmi

Use:

xrandr --query

to confirm which port you want to change. Assuming it's HDMI1:

xrandr --output HDMI1 --off

might do the trick, setting:

bindsym $mod+m         exec xrandr --output HDMI1 --off

for easier usage.


Why is the fingerprint daemon started when there is no fingerprint reader?

Because it is a daemon that is started by default independent of there being actual hardware to support it.
You could consider that a bug. Or someone decided it was not worth adding support to start or not start it when installing Ubuntu.

Whenever I sign onto a recently installed 20.04 system, /var/log/syslog reports that it is starting the fingerprint authentication daemon:

is a different issue. I would consider that a different bug:
Error messages from fprintd service are logged even when USEFPRINTD=no has been configured into /etc/sysconfig/authconfig.
Even after authconfig --disablefingerprint --update.

To remove it:
sudo apt purge fprintd


I Googled and found a workaround. This enables speaker output, but still I get no sound from the headphone jack.

Intel_iMac - Community Help Wiki

Sound

If you have an aluminum iMac and you do not have sound :

Open /etc/modprobe.d/options:

sudo nano /etc/modprobe.d/options

Add options snd-hda-intel model=imac24 to the file and save changes with CTRL + O and exit with CTRL + X.
Reboot.


Razer Deathadder Elite: configure central buttons

RazerGenie  does not have mouse button reassignment, nor is it on their ToDo list. razerCommander had something close, but it was generally problematic and therefore dropped.

Therefore, I regret there is no simple and permanent reassignment of those two ('Sensitivity') buttons for Linux I could find.  You might look at their support forums to ask if any user there has a solution for you.


Blank screen when trying to install from USB

It seemed to be a problem with the usb port or the pendrive. I finally burned the iso image on a dvd and made the install from there without problems.


How to access Ubuntu 11.04 files in Windows 7?

You can use Ext2Fsd to access an Ext4 (default Ubuntu partition format) partition in Windows.

A Ext4 partition will be mounted in read-only mode by default even do you could mount it in read-and-write mode if you really need to (not recommended).

You can find more information on how to run and install it here.


Break output of command at full page or per line

Please try:

    apt-cache search java | less

Use the arrow keys to scroll forward and backwards. Get out of less with q.


There is FontForge, it's in the repos.

sudo apt-get install fontforge

It comes with an online book about font design: Design with FontForge.


Faint clicking sound as console text is scrolled

This is likely interference from the CPU power supply traces.

I particularly notice this in cases where there is a CPU governor that changes it's clock speed depending on load. The buzz you hear is actually the frequency at which the governor is changing CPU speed.

I recall an old laptop where the sound was not just audible in the 'phones, it actually manifested as a buzzing noise from the motherboard. For a while it was possible to suppress it by disabling SpeedStep and running the CPU at full clock speed all of the time, but eventually it was near constant, and I had to get the motherboard replaced for fear of losing my sanity.

These days I notice interference in my 'phones when the CPU load changes dynamically - when loading games in particular (bursts of CPU activity as it processes resources, followed by pauses as it waits for buffers to fill from the disk). It's more obvious when the headphones are plugged into the front panel of my desktop than the rear, which reinforces the idea that it's electrical interference ; the traces for the front panel are closer to the CPU, possibly. I plug my phones into the rear sockets which seem to be better shielded.

You might find that you get some relief by enabling the "spread spectrum" controls in your BIOS - these controls adjust the timings of internal system clocks to make the square edged waves less harsh and are designed to generate less interference. As noted in the article, spread spectrum is often disabled in overclocked systems to help prevent clock skew, but these features are usually enabled by default. You probably won't find these settings on a laptop BIOS though.

The other technique I use for combating this is to reduce amplifier levels. The alsamixer terminal application is useful here for finding all the relevant levels, some of which can be hidden in the GUI mixers. Dropping them all out of the red zone to about 80% means that the initial interference is amplified less and becomes inaudible. This also makes listening to music on my Windows laptop bearable - reduce the master volume to about 30%, rather than the Wave volume, and the interference disappears. This also reduces clipping on some hardware.


this was not a case of memory card wearing out.  i think that when i purchased the pc and the fact that the previous owner had used an upgrade edition of windows 10 vs a full install stuff was not 100% functional.  i did find that the default windows 10 settings of turning off the power to the usb and sdxc controller may have caused the corruption.  i did notice that when i formatted it as ntfs under ubuntu i had to assign a letter to it under windows 10 as it did not auto mount as it does in ubuntu


canon lide 110 scanner not working after upgrading to ubuntu 16.04 LTS

Click on ubuntu software then click on installed, now remove simple scan then restart . Click on ubuntu software then type simple scan in search box, now click on install, after install simple scan, restart .
Now open terminal type the command below & press enter -

sudo apt-get update

then type the command below & press enter-

sudo apt-get upgrade

it will take few minutes to upgrade every things. Please wait with patient.
Then restart .
Now attach scanner & open simple scan .
It will work .


How do I change software center email address?

You will need to visit https://login.ubuntu.com/ to manage your account, including your e-mail addresses.


Can't add torrent file to uTorrent server

Alright so I managed to fix it! It's actually a very easy fix: download Deluge and uninstall uTorrent and that's it! Hope it helped someone!


I have version 14.10 at the office and version 14.04.2 at home and I see no difference whatsoever. However, version 14.10 does have a different kernel, which might prove useful if you have some hardware problems in version 14.04. Other changes, from what I read, are minor.

If you are not having hardware problems, I'd say that the reason why you shouldn't upgrade are: (i) 14.04 is LTS (but you said it already) and (ii) generally I find it better (from personal experience) to stay one release behind. The reason for that is that this way you give some time for bugs to be fixed and you avoid some headaches that are related to these bugs. Other than those reasons, I can see no good reason to support (or not) this decision.


slow speed of ubuntu 12.04 in virtualbox 4.2.6

To speed up any VM, you can:

Enable Hardware virtualization and Nested Paging: VM settings -> System -> Acceleration tab. For this to work you have to make sure that your CPU supports Intel VT-x for Intel processors or AMD-v for AMD processors and that it is turned on in BIOS;
Enable 3d Acceleration: VM Settings -> Display -> Video tab;
Allocate to the VM that much memory and run that many programs on Host together with VM, that your Host OS has enough free RAM left;
The above were primary recommendations that really make a difference and are easily achievable, however there are a lot of other ways to improve performance of virtual machines to a different extent. Here are some examples:

put your VM on a separate hard drive to improve I/O (can be a major performance gain, but requires a separate hard drive);
disable all the unneeded services/programs/visual effects on Guest;
if your Host/Guest filesystem supports defragmentation - use it. There are also tools that can try to defragment a specific file (virtual disk image in our case);
install Guest Additions;
if you have enough RAM you can disable swap file/partition on Host completely or tune it in a way that it is used only when a large portion of RAM (like 90%) is used.
exclude virtual disk images of your virtual machines from Antivirus checklist
and so on.

For a comprehensive list of approaches to increase VM performance, have a look at this article http://www.hanselman.com/blog/VMPerformanceChecklistBeforeYouComplainThatYourVirtualMachineIsSlow.aspx


Run dnscrypt-proxy automatically at startup on Ubuntu 14.04

May be you should use the Ubuntu packages from my PPA as I usually provide the latest available version :

https://launchpad.net/~anton+/+archive/ubuntu/dnscrypt

Explanations on how to use it are within a webupd8 article :

Encrypt DNS Traffic In Ubuntu With DNSCrypt [Ubuntu PPA]


Install the device driver:

sudo apt-get install xserver-xorg-video-ati

Then reboot.


Ubuntu 16.04 installation using serial console - unreadable characters

I solved this by using minicom. See, http://pbxbook.com/other/mac-tty.html#minicom

I had the same issue installing ubuntu on my pandaboard ES. I was not able to get the mac terminal nor screen to talk to the ncurses installer.

I'd love a solution that does not require me to install more software on my mac. But for now minicom works.


HP zbook 15 G3 does not support Ubuntu 14.04 but it supports Ubuntu 16.04 in UEFI Mode

I also need Ubuntu 14.04 LTS on my zbook. Could not install it with desktop live CD. Then I succeed using the server image!

BIOS in legacy, graphic in Discrete mode.
Install Ubuntu server 14.04.5 LTS AMD64.
Once booted:

sudo apt-get install ubuntu-desktop
sudo service lightdm start

Then I install nvidia driver.

Works for me.


You should be good with sshpass tool:

sshpass -p passphrase hg pull ssh://hg@bitbucket.org/repo

Or with storing the key into your ssh-agent before (note, that if the agent is not running, you need to start it using eval $(ssh-agent)):

ssh-add /home/droplet/.ssh/id_rsa

then the hg pull should not ask for the passphrase for this key.


First create a "Kconfig" file in the same directory and edit the file as follows:

ex:

 menu "Networking"
 config NET
 tristate "my network driver" # --> this line gives the desc of the ko.
 depends on <ARCH>
 default y if <ARCH>
 help
   <Text displayed when help is selected for your driver>.

You can also create multi level menus, for more details refer to Kconfig


I can't rename a file using the terminal if it came from a parameter

You can use :

read -p "Enter Filename :- " finalFinalName
remove_extention='-1.0-SNAPSHOT.war'
addExtention='.war'

[[ -f "${finalFinalName}" ]] && # if file exists then rename
mv -v $finalFinalName   ${finalFinalName%$remove_extention}${addExtention}

If there is white space in file then then double quotes the variable eg. "${var}"

${finalFinalName%.*} this will remove extension


Is Ubuntu wrong for an HTPC or is it just wrong altogether?

What is going on? Most of your problems can be summed up with one statement:
AMD's closed source driver is awful.
And the open source one isn't very much better. It's probably better than the Nvidia open driver but it still has plenty of flaws and spotty hardware support. Often finding an acceptable outcome means manually balancing driver and kernel versions against versions of X and even applications.
You could try upgrading to the 14.10's kernel+driver+X with the HWE stack:
sudo apt-get install --install-recommends linux-generic-lts-utopic

You'll be able to do something similar when 15.04 and 15.10 are released.
But in the future note the hardware support before you buy things. At the moment,
if you want a frictionless experience, you don't buy an AMD GPU.


By installing the Generic driver rather than the one from Brother, this issue seems to have been solved for me.


Domain resolution - local first then external

For /etc/hosts on the local machine not to be used first is very strange. Are you sure this is happening? (You say it "seems" not to be used.)

Perhaps you no longer have the correct entries in it, or perhaps they are commented out with #.

On the other hand, if what you mean is that you have an Ubuntu host system virtualizing a guest system, and you want /etc/hosts file on the virtualization host to dictate how the virtualization guest resolves DNS queries, then that's a totally different situation. That would require that you do one of these things:

Run a DNS server on the virtualization host and configure the virtualizationg guest to use it.
Run a transparent proxy on the host that acts transparently to cache DNS. This is probably more complicated a solution than you're after.
Make the virtualization guest's hosts file (assuming it's the same style and syntax) a symbolic link, via a VM or network share, to the virtualization host's hosts file. (If you share /etc/hosts with a VM, you should generally make it so that the VM can only read this file, even as root or the equivalent on the VM, unless the VM is fully trusted and you really need to be able to write to it.)
Make the virtualization guest's hosts file track /etc/hosts on the virtualization host, using some automated mechanism (e.g., scripting).

If this is what you need, I recommend editing your question to make that more clear.


Unable to connect to wifi or bluetooth on 14.04

The only way to fix my situation I found after reading a lot of threads in different forums:

Reinstallation.

It worked, and it seems there is no other way (since trying to repair all drivers won't work).

Thanks you all guys for your answers.


How do I create a bootable USB when my packages are broken?

I suggest that you download UbuntuStudio 20.04.1 LTS (or some other flavour of 20.04.1 LTS).

Then you can use dd, but it is not 'idiotproof'. Even several linux gurus have destroyed data using dd. So if you want to use it, check and double-check that you will be writing to the correct target drive, the USB pendrive.

A safer alternative is to use mkusb. Instead of installing it via PPA (that might fail because apt is not working for you, you can download a tarball and extract it from the tarball.
There are tarballs for two parts of mkusb

dus: See this link

mkusb-plug: See this link

If your current system is too damaged to make dus or mkusb-plug work, you can try with the very simple shellscript

mkusb-min: See this link
It is not as user-friendly (as dus and mkusb-plug), but there are checkpoints for you where you get help to identify the target drive, so that you can avoid mistakes.


netplan configuration on Ubuntu 17.04 virtual machine

For me removing gateway4 from configuration did the trick. With it configured I was also not able to ping internet.

Here is my netPlan config if it can help others.

Note: enp0s3 is for ssh via port forwarding and enp0s8 for static ip

network:
    ethernets:
        enp0s3:
            addresses: []
            dhcp4: true
            optional: true
        enp0s8:
            addresses: [192.168.10.20/24]
            dhcp4: no
            dhcp6: no
            nameservers:
              addresses: [8.8.8.8, 8.8.4.4]
    version: 2


Deployment of Rails Application using Passenger and Apache2

I figured this out myself; turned out it was not the apache configuration file, but rather that the application was not being registered with passenger.

To bypass this, I simply set the virtualhost to listen to a specific port (say, 123), and then updated the apache conf to listen on that port.  At that point, passenger-status reported the application in the pool.


Ubuntu suddenly not booting anymore, stuck at boot logo

Press Esc whenever you have the chance while there's animation on that screen, it'll go in text boot mode where you might be able to catch what's causing the issue.

maybe there's a hanging job or something.


Wifi disconnecting frequently (16.04 - Ralink RT5392)

I ran into similar problems after a recent update to 16.04 with a Ralink corp. RT2561/RT61.

For me the solution was to edit default-wifi-powersave-on.conf with

sudo gedit /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

and change wifi.powersave = 3 to wifi.powersave = 0

I've had no issues since. Perhaps this will work as well for you as it did for me.

Source: https://ubuntuforums.org/showthread.php?t=2333291


How do I make Home and End work in PuTTY SSH with fish shell?

Try something like this:

bind \e\[1~ beginning-of-line
bind \e\[3~ delete-char
bind \e\[4~ end-of-line

You can preserve this setting by append this option at fish_default_key_bindings:

/usr/share/fish/functions/fish_default_key_bindings.fish

Caution! If you have a typing error with the setting file, some keys doesn't work :)

See also Home/End keys broken in screen when term is set to xterm


After making partition, I couldn't see device (/dev/sda3)

The linux kernel has not been informed you've created the partition.

Your can reboot, or use the partprobe command:

sudo partprobe

You don't even need to specify the disk argument. It will test all your drives for new partitions. See man partprobe

The partprobe command is in the parted package.


Insert the SD card into your card reader and allow it to be recognized and mounted by Ubuntu.

Click the "Applications" menu at the top of the screen, then click "Accessories" and "Terminal" to open the command prompt.

Type df and press Enter. This displays a list of every storage device currently in use by the computer. Locate the device name of your SD card. It might be something like /dev/mmcblk0, or, if you're using a USB card reader, /dev/sdxN (with x being a letter, and N a number; for instance: /dev/sdb1(.

Type umount followed by the device name that you found in Step 1. For example, the completed command might be umount /dev/sdb1. Press Enter after typing the command. This command unmounts the SD card from the system.

Type mkdosfs -F 32 -v <device name as explained above> and press Enter. For example, the completed command might be mkdosfs -F 32 -v /dev/sdb1. The -F 32 portion of the command formats the SD card using the FAT32 file system. Leave this part out if you would rather format the card using FAT16. The -v portion of the command gives a verbose (full) summary of the operation.

Remove and reconnect the SD card to remount it when the operation is complete.


If you want to update the package lists and update all packages from the terminal, you can run this command:

sudo apt-get update && sudo apt-get upgrade

If this still doesn't give you the newest version of libreoffice, the repositories probably have not been updated with the newest version yet.

You may want to add the repository for LibreOffice to get the latest versions as quickly as possible. Instructions for this taken from Ubuntu Wiki:

Open a terminal. Run:

sudo add-apt-repository ppa:libreoffice/ppa

This will add the LibreOffice repository permanently to your list of repositories to check for new versions. Run this to update the repo lists and upgrade all new packages:

sudo apt-get update && sudo apt-get upgrade


Move problematic file out the way with

sudo mv /etc/apt/apt.conf.d/50unattended-upgrades.ucf-dist ~/
sudo mv /etc/apt/sources.list.d/getdeb.list.bck ~/

clear APT lists with

sudo rm /var/lib/apt/lists/* /var/lib/apt/lists/partial/*

and retry to get new package lists with

sudo apt-get update

Then finally remove unneeded package(s) with

sudo apt-get remove virtualbox-5.1


KMail Without Akonadi or Kontact in Kubuntu 18.04?

Akonadi is an implementation detail of KMail, without it KMail will not work.
Kontact is an app that groups KMail and other PIM applications (like KAddressBook and KOrganizer) into a single application. It is not needed to run KMail, but removing it will not give you any significant benefit


Where should I put my photos so that they are visible in Unity's photo lens?

Edit ~/.config/user-dirs.dirs to include:

XDG_PICTURES_DIR="$HOME/Pictures"

OR

XDG_PICTURES_DIR="$HOME/Dropbox/Photos"

Or add in the Pictures folder, and run:

xdg-user-dirs-gtk-update

The photo scope may need some extra packages - so run:

sudo add-apt-repository ppa:scopes-packagers/ppa && sudo apt-get update
sudo apt-get install unity-lens-photo unity-scope-shotwell unity-scope-flick

Unity-lens-photo is also available here, but it sounds like you have it installed anyway.


Docky: crash when plug/unplug power cable

Unfortunately this is a known bug in Docky - see here.

That said, there is a fix if you're willing to delve into the Docky source code. Otherwise just sit tight until it's fixed on the master branch.


You should require to format your system by some other operating system.
such as Windows or any other Linux. That is the only way to remove any operating system


I've had this problem too dual booting between linux and windows because windows likes to override the time with the time it thinks it should be. You need to disable UTC time in linux, which it looks like you tried, but you need to do so as root, because this is in the /etc directory which is owned by root. Just put sudo in front of whatever command you were using to do this


Seahorse does not provide passwords anymore

I have found the solution, the question is related to this bug: bugs.launchpad.net/ubuntu/+source/gnome-keyring/+bug/1689825.

The fix is to execute sudo apt autoremove --purge dbus-user-session.

dbus-user-session is installed automatically with flatpak.


Ubuntu 17.04 won't start after login and password immission

I managed to install both of the operative systems. That's what I did:

restored the laptop I'm on (Inspiron 7559) to factory conditions;
installed Windows on HDD;
cleaned the SSD on Windows with diskpart (from command prompt: diskpart/list disk/select disk/clean) without initializing it;
disconnected the Windows HDD and plugged in the SSD;
installed Ubuntu on SSD;
plugged in Windows HDD;
booted from BIOS the SSD with grub;
updated grub (from bash: sudo update-grub);

Now the system boots into grub and it lets me choose what operative system to boot: I tested it yesterday (booting and rebooting with both operative systems) and it worked.

ATTENTION

Even thought yesterday it worked, now I have another problem. When I tried this morning to boot Ubuntu grub didn't work anymore: the system boots directly into the Windows boot loader and, when I try to boot into grub selecting a UEFI booting method from BIOS, I have the "secure boot violation" problem.


Linux driver for tplink-wn725n nano wireless adapter

Install common wifi drivers and wicd network manager.

sudo apt-get install linux-firmware-nonfree wicd wicd-gtk wicd-daemon

Then try to connect with wicd network manager.


How can I send VBoxHeadless to the background so I can close the Terminal?

Just found a solution here: Starting the the virtual machine with VBoxManage instead of VBoxHeadless solves my problem:

VBoxManage startvm <uuid|vmname> --type headless

For example, if your VM's name was Ubuntu and it had a UUID of 865b2700-471a-11e4-916c-0800200c9a66, you can run:

VBoxManage startvm Ubuntu --type headless

or

VBoxManage startvm 865b2700-471a-11e4-916c-0800200c9a66 --type headless

Note: If the name of your VM contains spaces, wrap the name in quotes (e.g. "My Ubuntu").

The machine goes nicely into the background. Now I can control the virtual machine with VBoxManage controlvm poweroff/pause/reset (section 3.3).


Impossible to rewrite my Partitions Table with my two Linux partitions although there is no ovelap

TestDisk is a tool of last resort. The sorts of problems that Windows partitioning tools create can often be fixed with less drastic measures. For experts, wonders can be worked with fdisk or sfdisk. For those of intermediate skill, my own FixParts (part of the gdisk package in Ubuntu) can fix many problems. See the FixParts documentation for information on how to use it. This Ubuntu forums thread has some basic information on using sfdisk to fix problems. That said, unless I've misread your output, I don't think FixParts will be able to recover all your partitions -- at least, not by itself. sfdisk could probably do it, but that will take more expertise.

Unfortunately, since you presented no information on what your partition table currently looks like, I'm working blind on some critical details. I recommend you read the links I've provided (and especially my FixParts page), compare it to what you've got, and perhaps see what these tools make of your disk. If you want more help, edit your question to include the output of sudo fdisk -l /dev/sda and add a comment to this answer to flag my attention.

As to the problem you're facing, my suspicion is that the cause is that you're trying to recover two partitions as being logical when there are no free sectors between them. The usual structure of an MBR disk requires at least one free sector in-between any two logical partitions, so what you're trying to do won't work. (Some tools, such as sfdisk, have ways around this limitation, but most will choke on it.) Given your disk layout, it may not be possible to include all your partitions in an MBR setup except by first resizing one or two partitions. Depending on the current partition state, that may be an extremely dangerous proposition.

Another possibility might be to convert to GPT. (Or perhaps the disk was originally -- and perhaps still is -- in GPT form, and you just told TestDisk you wanted to use MBR?) GPT doesn't have the gap-between-partitions issue of MBR, so you should be able to include all your partitions in this form. The downside is that if the disk currently uses MBR and successfully boots Windows, you'll have to jump through some hoops to get Windows booting in EFI mode. (You'll also need a computer with EFI/UEFI firmware.) Even if the disk currently uses MBR, converting to GPT might enable you to resize partitions. You could then convert back to MBR to get Windows booting again. Any such conversion -- even a temporary one -- would be likely to require you to re-install boot loaders.

Whatever you do, do not make changes to your partition table until you fully understand what's going on. Many people in situations similar to yours have done irreparable harm to their data by rushing in with an inadequate understanding of the problem. Also, if you don't already have good backups, make them. Even a competent person could easily end up losing data trying to fix your problem.

EDIT:

Given the new information you've presented, it appears that Windows has completely erased two partitions from your partition table. The good news is that you've got excellent data on the start and end points of the filesystems, so you should be able to recover. (The fact that TestDisk found filesystems means that your data are probably intact, just inaccessible.)

No matter how you do this, I strongly recommend that you begin by making a complete low-level backup of the disk. If my calculations are correct, your disk is 700GiB in size, so you should be able to do a backup onto a disk with at least that much free space with a command like this:

sudo dd if=/dev/sda of=/path/to/lots/of/space/backup-sda.img bs=4096

This operation is likely to take a few hours to complete. Be very careful with this command, and in particular with the if= and of= options, which specify the input and output files, respectively. With that done....

IIRC, sfdisk can create an extended partition with logical partitions that have no space between them, so you can try recovering by first creating an sfdisk text file with the following command:

sfdisk -d /dev/sda > partitions-sda.txt

The contents of partitions-sda.txt should be similar to the first block of output on your spreadsheet. You can then load that file into a text editor and add information on your two missing partitions. The tricky parts are the start and size values, but you seem to have already computed them, so you just need to create appropriate lines for them with the right values specified. You'll also need to adjust the start point for the extended partition so that it contains your two "new" (recovered) partitions. When you're done, you can write the result back out to disk:

sfdisk -f /dev/sda < partitions-sda.txt

This should work. If it doesn't, though, then you may have made a mistake, or perhaps I'm mistaken about sfdisk's capabilities, or maybe sfdisk has changed.

Once this is done, I recommend checking your filesystems. You may also want to shrink the end of the first Ubuntu partition so that there's a small gap between it and the next one. You can probably do this with GParted -- although it's possible that GParted will refuse to work on the disk because of this issue. In this case, you may need to back up the partition, delete it, create a new one in its place, and restore the data.

An alternative to this procedure is to buy a new disk and copy the partitions over one at a time. You can even use dd with the skip option to read the "lost" filesystems from the disk without re-creating partitions around them -- but you must be very precise when specifying the start points.

Yet another alternative is to use TestDisk to recover the first Linux partition, shrink it slightly with GParted, and then run TestDisk again to recover the second Linux partition. This should work, but there's a small chance that TestDisk or GParted with write something to the area occupied by the second filesystem while it's officially unallocated, thus damaging it.

Telling TestDisk to recover the disk as GPT is yet another option, but that will render Windows unbootable, at least until you jump through more hoops. If your computer is BIOS-based (rather than EFI-based, as most post-2011 computers are), you won't be able to boot Windows at all from GPT. If you go with this option, you'll need to write a new boot loader to the disk.

EDIT 2:

In response to your latest questions:

Yes, you'd reverse the dd command to restore the backup.
Note that the first sfdisk command I presented used a -d option and the second used a -f option.
The whole point of using sfdisk is that, IIRC, it's one of the rare programs that can create two logical partitions with no space between them. It does this by writing EBRs consecutively on the disk, before either logical partition. Although EBRs are important disk data structures, you shouldn't normally be trying to modify them by hand; just let sfdisk (or GParted or whatever) handle them.
My guess is that your Linux partitions were originally primaries and Windows deleted them; but maybe they were logicals that were created by sfdisk or something else that can create two logical partitions next to each other, and when the Windows partitioner saw that it choked and deleted them rather than try to create something it couldn't.


Facing problems while installing Visual Studio Code on Ubuntu 18.04

From the comments:

sudo mkdir /etc/apt/sources.list.d && sudo touch /etc/apt/sources.list.d/vscode.list
sudo dpkg -i "code_1.24.1-1528912196_amd64(1).deb"


How to run Diogenes app on modern Ubuntu?

As mentioned in some of the comments on previously posted answers, and on the question above, the version of Diogenes that exists will not work on modern perl, and as you've noted, the 32-bit x86 only binary front-end based on xulrunner is problematic. So, to be helpful, I've went and created a slight fork of the code, and tweaked it slightly to run on modern perl, and use some more modern conventions (XDG config/runtime directories), as well as implemented a simple front-end based on QtWebEngine, that can run on any architecture.

You can grab a tarball from https://github.com/dobey/diogenes-ng/releases/tag/0.3.2.0.2 and install it, to see if it works for your needs. I'd suggest keeping the VM on hand, just in case something goes wrong, as I don't really know the code well, or how it's supposed to be used, so I haven't really tested it too extensively. If you find an issue, feel free to open one at https://github.com/dobey/diogenes-ng/issues and explain what went wrong.


Ubuntu 18.x fixing nvidia screentearing results in custom cursor error


Please use the official supported method (I copied only the relevant parts regarding Linux and systemd):

  Sample init scripts and service configuration for bitcoind

  Sample scripts and configuration files for systemd, Upstart and OpenRC can be found in the contrib/init folder.

contrib/init/bitcoind.service:    systemd service unit configuration

  4a) systemd

  Installing this .service file consists of just copying it to /usr/lib/systemd/system directory, followed by the command systemctl daemon-reload in order to update running systemd configuration.

  To test, run systemctl start zcoind and to enable for system startup run systemctl enable zcoind

The service itself has a Restart=always.


What probably happend is this:

The user used vim on the file, as given by the fact that VimCrypt is shown in the text. When running vim, you can exit vim with :x - or encrypt with :X. Note that the former is lower case, the latter is upper case.

This would have encrypted the file upon save, rendering it as a garbled binary mess.

The easiest way out is to simply replace it by the standard Ubuntu .bashrc

mv ~/.bashrc ~/.bashrc.old ; cp /etc/skel/.bashrc ~/

This will backup your current .bashrc as .bashrc.old

If you remember the encryption key used you can upen it in vim again. Enter the correct passphrase, and type :X and press enter twice (giving a blank pass phrase) and save with :wq - this will restore the file if you do remember the passphrase.


Failed commissioning because of false power on error

Try powering down ALL hardware, and retrying. If it still fails, try reloading MAAS on both sides.


Why upgrading Tomcat to version 7.0.52-1ubuntu0.6 breaks session persistence?

I think this might be working in Tomcat 7.0.52-1ubuntu0.7 now. I don't see anything relevant to the issue in the changelog (unless it has something to do with https://bugs.launchpad.net/ubuntu/+source/tomcat7/+bug/1609819). But this new version is working for me. Give it a try.


Installing poppler-0.62.0 on ubuntu 16.04

For installation of Poppler on 16.04 LTS do the following:

Enable source packages from Software & Updates.
Install build dependencies with sudo apt-get build-dep libpoppler58
Install cmake with sudo apt-get install cmake
Install development package for libopenjp2 with sudo apt-get install libopenjp2-7-dev
Install Gdk-PixBuf with sudo apt-get install libgdk-pixbuf2.0-dev
Install checkinstall to make deb-package sudo apt-get install checkinstall
Download and run the compilation:

cd /tmp
wget https://poppler.freedesktop.org/poppler-0.62.0.tar.xz
tar -xf poppler-0.62.0.tar.xz
cd poppler-0.62.0

mkdir build
cd build
cmake ..
sudo checkinstall make install

In checkinstall session do the following:

for Should I create a default set of package docs? answer n.
enter libpoppler-0.62.0 as package description and press Ctrl+D;
enter 2 and enter libpoppler as package Name, press Enter;
enter 3 and enter 0.62.0-local as package Version, press Enter;
press Enter to continue (start compilation and deb-package building)

You can verify installation of your package with
apt-cache policy libpoppler:

libpoppler:
  Installed: 0.62.0-local-1
  Candidate: 0.62.0-local-1
  Version table:
 *** 0.62.0-local-1 100
        100 /var/lib/dpkg/status

Binaries will be install into /usr/local/bin (you can check this with dpkg -L libpoppler).


UbuntuOne: sync to server without storing on disk first

Duplicity uses the REST API to talk to the Ubuntu One server directly. You must do the same in any program where you wish to store the content directly on the server.

However, if the Ubuntu One client is configured to automatically subscribe to any folders on the server, then the data will be automatically synchronized back down to the local machine. Ubuntu One file sync is a synchronization service, not a remote file store.


Audio/video won't play on 14.04 after power-on but works after restart

Well, I haven't found the exact cause, but I've narrowed it down to something simply taking longer to initialize at system startup than it used to; something that's needed to get my sound card in working order. So all I have to do is wait 1-2 minutes after logon (still need to test this more to find the real minimum) before I try playing any videos. Then it will work normally and not require a restart.


Ubuntu update manager error & Ubuntu internal error

sudo add-apt-repository ppa:jd-team/jdownloader && sudo apt-get update && sudo apt-get install jdownloader && sudo apt-get upgrade


When and will it be another ubuntu version soon?

Generally each April and October there will be a new version. See the list of releases here.

Of course the upcomming version, Ubuntu 14.04 Trusty Tahr, will have lots of new features, but maybe a little less than you expect: Ubuntu 14.04 will be a so called LTS version, so the focus lays rather on stability than on new features.


Install Ubuntu Desktop on Software RAID 1 (mirror) with encryption

I think I figured out a solution. The trick here is to use the textbased installer in a Virtualbox to circumvent setting up wifi. The installation takes a lot of time (+2h) but it's intended to be easy.

Use Virtualbox as a DHCP server and install to rawdisks via the textbased installer

Boot from live Desktop, choose "Try Ubuntu", setup your wifi and download Minimal iso (server should work too and maybe speed up the installation.)
In Software Center select VirtualBox -> more info -> add multiverse as source -> install
Create raw disks via:

sudo VBoxManage internalcommands createrawvmdk -filename sda.vmdk -rawdisk /dev/sda
sudo VBoxManage internalcommands createrawvmdk -filename sdb.vmdk -rawdisk /dev/sdb

start Virtualbox as root sudo virtualbox, add the newly created raw disks and the netboot iso
Boot and choose expert install, go through the first install steps...
Add parted as installer package
Create the partitions (note that Virtualbox may choose different names for devices!)

sda1: 0.5GB, ext2, use as software RAID
sda2: remaining space, use as software RAID
sdb1: 0.5GB, ext2, use as software RAID
sdb2: remaining space, use as software RAID
create software RAID -> installer should offer an option to write to disk
md0: use as ext2 /boot
md1: use as "LVM"
add a LVM group and add a logical partition
lvm: use as "encrypted"
add encrypted partition -> finish -> installer should ask for passphrase

add user! (I forgot this at the first attempt, OMG)
the following only applies to Minimal iso I think: install base system, in tasksel add  "ubuntu-desktop" and as kernel select "linux-generic-lts-trusty"
add the bootloader to /dev/sda
finish it

As of 2014-04-19 I got an error during bootup Error: diskfilter writes are not supported.
Press any key to continue...
See this post for a solution.


Can't upgrade ubuntu 12.04.2(i'm on 12.04.x lts)

Just install updates from the Update Manager, there isn't any other way.

If you need the newer 3.5 kernel, manually install linux-image-generic-lts-quantal and xserver-xorg-lts-quantal, otherwise, you remain with the original 3.2 kernel and xserver.

PS: cat /etc/issue says Ubuntu 12.04.2 LTS \n \l here.


Can I replace windows HD for new HD, install Ubuntu and then switch back to old Windows HD?

You're talking about 2 separate Hard drives.  By unplugging the old drive, and replacing with a new one, installing Ubuntu and windows on it, as dual boot should be OK.  Now going back to the old Hard drive will work, since both drives have nothing to do with each other.  Grub2 resides on the hard drive, and not in the BIOS.

For help on installing Ubuntu and Windows on the same drive, take a look at Windows Dual Boot.

Now if you can't boot from either USB or CD, you may want to consider Network Install, for that check out Ubuntu Installation


Unity Tweak Tool is giving an error: com.canonical.notify-osd

Go to a terminal by pressing Ctrl+Alt+T and type the following commands:

sudo apt-get install --reinstall notify-osd
sudo apt-get install --reinstall overlay-scrollbar

This will install 2 packages if you don't have them or re-install them if already present and broken.


No internet connectivity in virtual-box with both Host and Virtual OS being 12.04

The NAT connection needed to be selected with the hardware being:

AMD PCNet FAST III (Am79C973, the default)

This works with almost any OS (as mentioned on the Virtualbox help  page). The Intel setting for some reason did not work.

For Network setups with heavy router settings, you may have to use Bridged option with "PCNet FAST III" as the default.


Please read carefully all this answer before attempting to reproduce the steps.

You can suspend or cancel the install process, after which you can enter a TTY Terminal by hitting the CtrlAltF1 key combo which will send you to a black screen with white text, in which you can login via your username and password, then you'll be presented with a normal terminal where you can run your commands.

There you can run -again- the command in order to install phpmyadmin, what will result in a full control process in which you can use all your keyboard keys to finish the process.

By the way, the normal process to install phpmyadmin is by using this command: sudo apt-get install phpmyadmin, I can't say how did you manage to get that screen after running sudo dpkg-configure phpmyadmin but if that's the process you're running with success, then go for that.

In the other hand, if you already have installed phpmyadmin and need to reconfigure, please run sudo dpkg-reconfigure phpmyadmin which will result in such process.

This should work for you, next, if you wish to go back to your graphic environment simply hit CtrlAltF7, screen may flicker and you'll have your Software installed.

Let us know if this does the work for you and Good luck!


sudo apt-get upgrade (E : unmet dependencies error)

You can try fixing the broken dependencies using the following command:

sudo apt-get -f install

sudo dpkg --configure -a

Then run this again:

sudo apt-get -f install

You can find in details how to fix the dependency error in this thread.


I believe you've created a private VPN on your local IP. You can use this VPN when you are at Starbucks or Mc Donald's and you won't have to worry as much about MITM attacks because you will be able to connect to your own private encrypted VPN linked to your home network IP.

If you want to use a public VPN in some other country or IP, I suggest using openvpn. To install run the following commands ain a terminal:

sudo apt-get update
sudo apt-get install openvpn

To connect to a vpn, download an .ovpn file from a VPN provider such as vpnate.net. Locate an "Open VPN Config File" and download this file (.ovpn). You can use TCP or UDP. UDP is faster but TCP is available for compatibility.

First download the .opvn file from this address:

http://www.vpngate.net/en/do_openvpn.aspx?fqdn=vpn956716021.opengw.net&ip=113.151.69.81&tcp=1703&udp=1468&sid=1416531490220&hid=558684

Then, run the following command to start the vpn:

sudo openvpn --config /path/to/file.opvn

Your IP should now be from Japan.

The basic command is

sudo openvpn --config

then, enter the path to the file or drag and drop the .ovpn file into the terminal, press enter and enter your password.

Another example with the file downloaded to your downloads folder:

sudo openvpn --config ~/Downloads/vpngate_vpn956716021.opengw.net_tcp_1703.ovpn

Some VPN servers will require a password and a username, however, VPNs on this website do not.

The UDP version can be downloaded from here.

A world wide selection of "Open VPN Config Files" for free VPN servers can be found here.


Very slow booting in Ubuntu 16.04 (with some `systemd-analyze` output attachment)

One of your docs you posted indicated that your system might be an ASUS X550LD notebook. All of these come with spinning disk drives, so they will be slower than SSDs.

Just to compare your result with another system, I generated the SVG for my own system, which indicates that my boot time is about 10 seconds on my SSD.

You mentioned that you were using Boxes just before this happened. So trying to "undo" whatever you were doing in Boxes might help.

Disks also slow down when they get closer to getting full. If your HDD is close to being full, that could be part of the issue.

You also didn't mention which file system(s) you were using. File system choice could also be a factor.

You also didn't mention if the Virtual Machines were set to start at boot, which could contribute.

I reviewed the files you posted and there wasn't obvious cause for the slow down, which is why I suspect it may be hardware related.

You can also try using a hard disk benchmarking to confirm the throughput that is capable of.  For comparison, here's the result of testing the SSD in my laptop:

$ sudo hdparm -Tt /dev/sda

/dev/sda:
 Timing cached reads:   11776 MB in  2.00 seconds = 5892.27 MB/sec
 Timing buffered disk reads: 216 MB in  3.01 seconds =  71.77 MB/sec

Looking at your follow-up hdparm output, your basic disk performance for buffered disk reads is lousy-- only about 5 MB/sec.

This post says "A modern 2.5" 5400 RPM drive should be able to hit 100 MB/s."

There may be more than one factor at play, but having a relatively slow 5,400 RPM HDD is definitely part of your slow performance issue.


You can use sudo -H gedit instead. From man sudo:

 -H, --set-home
             Request that the security policy set the HOME environment
             variable to the home directory specified by the target user's
             password database entry.  Depending on the policy, this may
             be the default behavior.

AFAIK this request is honored on modern Ubuntu systems, and should have the same effect as gksudo or gksu.


Ubuntu slow after installing application on disk

This is the way your SS-HD works.

There is a really small SSD as "Cache", attached to a usual HDD.

So if you install a game, your SS-HD moves the game Data to the SSD Cache, and if you run the apps in Ubuntu, it copies the app data back to the ssd cache.

If you want real SSD performance, you will need to buy a real ssd.


Boot mode (legacy vs EFI) matters. Grub is not able to chainload a bootloader in a different boot mode, so to achieve a proper multi-boot, all OS's must be installed in the same boot mode. It seems to be a common mistake to install in the wrong boot mode.

From the little information in the question I couldn't be 100% sure, but it looked like your Windows is installed in legacy mode, while Ubuntu appeared to be installed in EFI mode.

You can solve this in different ways, one way is to reinstall Ubuntu in legacy mode. You have to make sure to boot the installer in legacy mode, that's all.

Another way is to reinstall only the bootloader (Grub). Just boot into your installed Ubuntu (in EFI-mode) and run

sudo apt update
sudo apt install grub-pc

This will remove grub-efi (the EFI version of Grub) and install grub-pc (the BIOS version of Grub). During installation you will be asked where to place the bootloader. This is interesting as you have  multiple disks and you don't need to overwrite Windows bootloader which should reside in sda. So you should place Grub on sdb. In BIOS you will have to check the boot order then. Additional clean-up is not absolutely necessary but removing the line regarding /boot/efi from /etc/fstab makes sense, it's not needed anymore.

Another thing you should know:

If the disk where you want to place Grub uses GPT you need to create a small (2MB) partition with bios-boot flag and leave it unformatted (no file system). Grub's core.img will be placed there.


There are a number of delete options with rsync. They are and perform as follows:

            --delete                delete extraneous files from dest dirs
            --delete-before         receiver deletes before xfer, not during
            --delete-during         receiver deletes during the transfer
            --delete-delay          find deletions during, delete after
            --delete-after          receiver deletes after transfer, not during
            --delete-excluded       also delete excluded files from dest dirs

Based on this my best guess is that you are looking for the --delete-excluded switch

Note: If the target drive is already full it will likely be required to free up some space before starting rsync again otherwise it might still fail with insufficient disk space.

You can avoid this problem entirely by choosing a target of sufficient size to contain everything you wish to copy.

Source: man rsync


What does the black arrow under the bin GUI icon represent?

No. They are Link to Executables. In fact, they are symbolic links.


As explained by @steeldriver, the option needs to be an uppercase O for the output file. As a general rule when dealing with file names, and other strings, in a script, it's better to be safe and place them within quotes. That avoids some things the shell can do unexpectedly. The modified version of your script is:

#!/bin/bash

while true; do
      date=`date +%s`
      ext=".jpg"
      fname="$date$ext"
      wget http://rawcam.ele.uri.edu/tmpfs/image.jpg -O "$fname"
      sleep 100
done

What was happening was that the epoch with .jpg was used to create the filename which was used as the log file for that run of the wget command. wget itself was downloading the image.jpg file, and to prevent "clobbering"* the previous download, added the incremented numbers, stating at .1, to each name.

*clobbering is when a new file overwrites an existing file with the same name.


No, not a HP500Slate, but I have had ubuntu installed on a device with the same graphic chip (GMA500):
Don't bother unless you are ready to jump through hoops or ready to be content with 2D-only

The GMA 500 has been a black page on the history of Intel.
It is not-quite-up-to-par on windows but it is worse in linux because of the very closed-spec/closed-source nature of it together with the reasonably buggy proprietary Intel drivers, both Linux and Windows.

There have been several reasonable working (out-of-tree) drivers from intel but they were made to work with certain kernel versions so they went out of date very quickly when intel stopped supporting them.

There is one open-source driver which works reasonably well but only 2D graphics are supported and almost no video acceleration, so this makes it unsuitable for the standard Ubuntu install (Unity desktop needs 3D-acceleration otherwise it eats your CPU for lunch).

If you really want to test it on another os than Windows7 then your only chance is, indeed, linux. There have been no drivers for other operating systems

Try a light version of ubuntu (without Unity 3D desktop) like Lubuntu and see how far it gets you, but there is very little chance that it will be better than Windows 7 (except, maybe, for OS speed).

If you want to fiddle with it, check out this page and this page for some info.
More descriptional info here


See the following Ubuntu One FAQ: https://one.ubuntu.com/help/faq/why-am-i-getting-an-the-authentication-failed-error-on-windows-225/


what do you mean by graphics card is unknown. where did you check it? did you apply any incomplete custom theme?

the generic answer would be that search in dash for details. and tell me what you see in graphics. then go to software and updates and look at the tab additional drivers. your graphics card must be shown there. install it.

there is a second alternative. i have an old nvidia graphics card on my pc at home and gnome or gnome based environments(unity which you are using, cinnamon) don't work properly on that. so i use linux mint mate edition. you may try that.


You can use firefox instead of chrome. Interestingly, you don't even need to use firefox as long as you open it. (Would be interested to know why this could be.) My default browser is chrome and webhtttrack won't open there unless firefox is open as well.


Sometimes clicking inside the hovering pop-up will make it disappear. Be careful to click on the background area inside the pop-up, not on a hyperlink.


Are disk labels sda/sdb/sdc/... tied to physical ports?

No.

udev drive identifiers are done in multiple ways, but they are allocated dynamically on bootup and therefore they will change if you unplug devices (or even if one just happens to spin up slower one day).  Slightly more consistent than this is /dev/by-path which will give you a path by connection to the machine, e.g. PCI bus -> Card 0 -> Port 2 (so long as the chip maintains consistent numbering, which isn't guaranteed in all cases).

However, if you want almost perfectly consistent devices*, use their UUID by calling blkid on the partition (like blkid /dev/sda1) and then use that in your mount options or /etc/fstab with UUID=

If you did this as a recent installation, then you should already see an example of this in your /etc/fstab.

*Consistency is not guaranteed if you bitwise-copy (e.g. dd) an entire device or partition because it copies the UUID as well.  You'll have to change the UUID if you want to use both copies in the same machine.  Use the applicable partition or file system management tool for such a change.


How can I get wireless working on an HP-Mini 110-3150?

According to the wiki page for 10.04 you need to install the wireless drivers separately.

We need more information about your system, if you can add some log information to your question it would help determine exactly what (and wouldn't break anything more).

  Everything works out of the box but the recommended Broadcom STA driver does not appear to activate in live mode. Furthermore, on booting after installation a blank screen appears with a flashing cursor due to this issue. The workaround for this is to press Shift on reboot until the GRUB menu appears and select the recovery mode, followed by the fail safe graphics mode. Once booted into this low resolution mode, a standard restart should allow the computer to boot normally, but it many not boot properly on further attempts which is why it's imperative to immediately plug in an ethernet cable and enter the following two terminal commands to install the STA driver:

sudo apt-get update
sudo apt-get --reinstall install bcmwl-kernel-source

and then reboot.


Copy files from one folder to another but have an interval between each file

Single command solutions

Among many options, including loops that make use of cp and sleep, we could opt for find with two -exec flags to run those exact commands.

find ~/dir_1/ -type f -maxdepth 1  -exec cp {} ~/dir_2 \;  -exec sleep 1   \;

Here the options are:

~/dir_1 , the origin directory, through which find works.
-type f get only files
-maxdepth 1 descend down 1 level maximum in the directory tree; prevents descending into subdirectories
-exec cp {} ~/dir_2 \; copy the currently processed file designated by {} parameter to ~/dir_2. The \; designates for cp to process single file at a time instead of tacking as many files as possible into {}. The backslash in \; is necessary to prevent shell from misinterpreting that as command terminator.
exec sleep 1 \; executes sleep 1 per each current file.

If you have a list of files in a file, you can do:

xargs -I % --arg-file=input.txt sh -c 'cp % ~/dir_2/ ;sleep 1'

Options here are:

-I % designates the symbol which refers to file within the command
--arg-file=input.txt read arguments to command from specific file
sh -c 'cp % ~/dir_2/ ;sleep 1' execute /bin/sh with provided commands by -c '...' flag; % will be substituted with filename.

Loop solutions

You could use a for loop for instance

for f in "/path/to/folder_1"/*; do
    cp "$f"  "/path/to/folder_2/"
    sleep 1
done

For clarity, this is formatted on multiple lines, but this works as a single line just as well. You could also turn this into a function:

delaycp(){
    for f in "$1"/*; do
        cp "$f"  "$2"/
        sleep 1
    done
}

And use it as

delaycp "/path/to/folder1" "/path/to/folder2"

Alternatively, if you want to copy only certain files, not everyting that * glob captures in the directory, you could always make use of pathname expansion, something like file{1..25}, or have an input text file, something like this input.txt:

/path/to/folder_1/file1
/path/to/folder_1/file2
/path/to/folder_1/file3

And from there make use of while IFS= read -r line structure to read the file:

while IFS= read -r line || [ -n "$line" ]; do
    cp "$line" "/path/to/folder_2/${line##*/}"
    sleep 1
done < input.txt


How to set IPV4 address disabled in Ubuntu 20.04 using netplan?

Rather than mess around with .yaml files, you could just disable the method.

Open Terminal
Get a list of active connections:

$ nmcli connection show --active

The output will look something like:
NAME                UUID                                  TYPE      DEVICE
Wired connection 1  f885be93-d87f-3c28-ab66-4f49b8ba2408  ethernet  enp0s31f6
docker0             9985de00-2ab1-4dc2-930c-bca3a93d1f25  bridge    docker0

Take the UUID of the connection you want to be IPv6 only and disable the unnecessary method:

$ nmcli connection modify f885be93-d87f-3c28-ab66-4f49b8ba2408 ipv4.method disabled

Restart networking:

$ nmcli networking off
$ nmcli networking on

That connection will always use IPv6 until told otherwise.


How do I easily switch between windows rather than applications in GNOME Shell?

You can use Alt+` (the key above Tab) to cycle between windows of the same application.

You can even mix Alt+Tab to cycle between application and  Alt+` to cycle between windows of the selected application.

There is an exposition of the rationale in  this blog post from Canonical's Didier Roche. It's part of a series discussing the development of gnome integration in Ubuntu 17.10.


How to make a computer running on runlevel 3 ask for password when waking up from suspend in X?

Changing runlevels is an excellent method to do a Root Cause Analysis, but hardly a solution!
At best, it's a workaround and as you noticed, it creates a sleuth of other problems, so if you need to disable X, just do so and:
Please!
Please!
Please!
Please!
Set your runlevel back to 5!

Alternatively,
sudo nano /etc/default/grub

and:

Change GRUB_CMDLINE_LINUX=”" to GRUB_CMDLINE_LINUX=”text” which will force Ubuntu to boot directly into Text Mode.
Uncomment #GRUB_TERMINAL=console by removing the #which will force the grub menu into B&W Text Mode

(credit for the alternative method goes to @Serg!


The system is not designed to run without a swap partition. You could reduce system swappiness by adding vm.swappiness = 10 to /etc/sysctl.conf but you should enable at least as much swap as you have physical memory. See here.


How to find out which targets are supported by a ppa?

Afaik Launchpad PPAs only include binary packages for the architectures listed on the web page of their respective source package (like in the screenshot in your question).

If you want to investigate further you can download and inspect the relevant Packages index file:

$ wget -O - 'http://ppa.launchpad.net/seafile/seafile-client/ubuntu/dists/vivid/main/binary-armhf/Packages.gz' | zcat | grep -Ee '^(Package|Architecture): '
Package: python-searpc
Architecture: all

For this PPA it will list only architecture-independent packages, i. e. those with the architecture all that contain no hardware-specific machine code instructions.


External monitor not detected in 18.10 and 18.04.5

I had the same issue with my laptop with ubuntu 18.04.

The problem first occured when i switched from GNOME desktop environment to GNOME wayland.

I restarted my laptop several times, and i also tried to just simply switching it off. I was so desperate that i even reinstalled the system but my monitor and TV was still not detected.

What worked for me is switching off my laptop through terminal with:

poweroff

When i turned on my computer again my external monitor and TV was detected.

I hope this helps.


Could not get lock /var/lib/dpkg/lock-frontend - specific to one single .deb package

Finally solved this problem.

One of the install scripts was corrupted into MyPackage.deb (the package I was trying to install). As a result, the install was exiting creating this confusing message.

Thanks for your help


I have used Acer Predator Helios 300 (2018 version, PH315-51 and also 2019 version, PH315-52), hence I think I can answer them satisfactorily. Let us start with the good news.
There is no modern laptop on which Linux cannot be installed, i.e., yes, you can easily install any Linux distro on this laptop. I have personally installed around 7-8 distros, and all run fine.
And now comes the bad part.
Fan speed - no, I have not yet found any software which would let me control fan speed. Believe me I have spent the first 2 months daily searching for any software which would let me control the fan speed, but all in vain. Hence I would conclude that it is not possible to control fan speed. Believe me, I have tried a lot. A LOT.
Battery life - Battery life is pretty much poor on helios 300 itself (whether on Windows or Linux), due to the power hungry hardware. On windows I get around 3-4 hours and on Ubuntu I get around 2.5 hours of screen time. However, under very low usage, windows can get upto 5 hours, but on Linux it doesn't matter whether the laptop is in idle mode.
Overheating - It does not overheat, but still it is a bit warmer on Ubuntu (Ubuntu - 60 normally and Windows - 50 degrees normally), than on Windows. But undervolting will help to reduce the temps significantly. Check this answer I posted in the past, to successfully undervolt your laptop.
Summary - since you bought a gaming laptop, hence you shouldn't think about the battery life, as it will suck eventually. About heating, not a huge deal. Regarding fan speed, always game on Windows, as games are more optimised on Windows, hence don't worry about fans.
My advice - go for it. In the end, if you don't like it, you can always remove it, without any hassel.
Also I would suggest you to reinstall Windows 10 on your PC (as preinstalled Windows is very bloated). Download the Media Creation Tool from Microsoft's official website. After reinstalling download the softwares like Predator Sense from acer's official website. Don't need to download drivers, as windows will automatically download them for you.
Happy gaming.


What happens to the file system when you "install alongside" during install,

The "Install alongside Mac OS X" option installs Ubuntu on the free (With free I mean 'not occupied by a partition') space on your hard drive.

You can create 'free' space using Disk Utility under Mac OS X.

Ubuntu will partition the free space to have a partition for Ubuntu, and a 'swap' partition that Ubuntu sometimes needs to work correctly. (The swap partition will probably never be more than 4GB)


Pass a copy of array by call by value to a function?

A quick google would have worked but here you go
   #include <stdio.h>
   void printArray(int array[], int size) {
     for(int i=0; i<size; i++) {
       printf("%d",array[i]);
     }
   }
   int main() {
      int array[] = {1,2,3,4};
      printArray(array, 4);
      return 0;
    }

You can mark this as an answer if this helped you understand the concept.


How can I change my command line (bash) prompt?

Narashima is the hostname of the machine, you can alter is by issuing the command:

sudo hostname reddy

If you open a new shell it will read narasimha@reddy:-$


How to reference Controller / Bootstrap node in a bundle

Use juju quickstart to deploy the bundle and use the format shown in the code block below in your bundle.yaml.

machines:
  '0':
    constraints: tags=bootstrap
    series: trusty
  '1':
    constraints: tags=anytag
    series: trusty
  '2':
    constraints: tags=anytag
    series: trusty
  '3':
    constraints: tags=anytag
    series: trusty
relations:
- - mysql
  - keystone
- - keystone
  - glance
- - cinder
  - mysql
- - glance
  - cinder
series: trusty
services:
  mysql:
    charm: cs:trusty/percona-cluster
    num_units: 1
    options:
      max-connections: 20000
      source: cloud:trusty-mitaka
    to:
    - '0'
  keystone:
    charm: cs:trusty/keystone
    num_units: 1
    options:
      admin-password: plumgrid
      admin-token: ubuntutesting
      openstack-origin: cloud:trusty-mitaka
    to:
    - '1'
  cinder:
    charm: cs:trusty/cinder
    num_units: 1
    options:
      block-device: None
      glance-api-version: 2
      openstack-origin: cloud:trusty-mitaka
      overwrite: 'true'
      remove-missing-force: true
    to:
    - '2'
  glance:
    charm: cs:trusty/glance
    num_units: 1
    options:
      debug: true
      openstack-origin: cloud:trusty-mitaka
      verbose: true
    to:
    - '3'

See also:

https://jujucharms.com/docs/stable/charms-bundles#machine-specifications-and-bundle-placement-directives


The driver rtl8192ce in Ubuntu 14.04 covers your device. If it is not working as expected, something else is wrong. Is the wireless switch or key combination set to enable wireless? Check:

$ rfkill list all
0: hp-wifi: Wireless LAN
           Soft blocked: yes
           Hard blocked: yes

The wireless switch or key combination is set to disable wireless. Please find it and switch on the wireless.

Your wireless switch, F12, doesn't seem to respond to unblock the wireless. I suggest you try resetting the BIOS to 'Default.' Please see:wireless hardware switch disabled in a compaq presario CQ57-339WM notebook pc

Once we have more information, I will edit my answer to propose a solution.


how to use gtk2.0 2.24.6-0ubuntu5 on Ubuntu 12.04 running gtk2.0 2.24.10-0ubuntu6?

You need to recompile your old app for the new lib.


/etc/sudoers file does not have ANY effect

I finally got around this by putting rules inside /etc/sudoers.d/ files.


Can master pdf editor or some other software allow me edit pdf bookmarks arbitrarily?

There are two very good alternatives to Master PDF editor as far as PDF bookmarks are concerned, jPdf Tweak and JPdfBookmarks. Both are open-source and require Java. I suggest you give them a try and see which one suits your needs.


You can definitely upgrade to 16.04 as described ahead, but it's advisable to disable any 3rd party repository while upgrading to a new version of OS. Also to upgrade a version, the command is 'sudo do-release-upgrade -d' where -d is used as it's still under development, to be used only after update and dist-upgrade commands. Hope it helps.


How to bridge two interfaces with netplan

https://netplan.io/examples

Sample of two interfaces :

            ethernets:
            eth0:
            addresses:
                - 192.168.2.2/24
            routes:
            - to: 0.0.0.0/0
                via: 192.168.2.1
                metric: 100
                table: 101
            routing-policy:
            - from: 192.168.2.0/24
                table: 101
            eth1:
            addresses:
                - 192.168.22.2/24
            gateway4: 192.168.22.1
            nameservers:
                addresses: [192.168.22.1]


iBus-Unikey, I cant transfor between English and Vietnamese on Ubuntu 14.04

Go to System Settings → Language Support, click on "Install/Removes Languagues...", make sure Vietnamese is installed, if not then check it and click OK. Also, make sure IBus is selected in the "Keyboard input method system" part.

Go back to System Settings and click "Text Entry". Click on "+" and add "Vietnamese (Unikey)". Now can change between Vietnamese and English using Super+Space


Can I Replace New PC HD With My Old PC's Ubuntu 12.04 HD

Yes, it should work, but with a couple of caveats:

Your new computer will probably be configured to boot with UEFI and with Secure Boot active. To get your old (presumably BIOS-based) installation working, you'll probably have to adjust your firmware settings to disable Secure Boot and perhaps to enable BIOS/legacy/CSM support. Precisely how you do this varies greatly from one computer to another, so you'll have to dig into your firmware settings and figure it out for yourself, or locate model-specific documentation.
A new computer might have hardware that's newer than the drivers available in Ubuntu 12.04. Thus, you may need to upgrade your kernel or add new kernel modules. This could be tricky, particularly if one of the drivers you need to upgrade provides very basic services, such as a driver for a hard disk controller. It's probably best to just try it and hope for the best. If you can't get it to boot, swap the disk back to the old machine and do research on the new computer's hardware and how to get Ubuntu 12.04's kernel to work with it.


How to copy the name of file or folder in the current directory in terminal?

There is no way to do that with standard software, but there are other simple and helpful tricks.

If you start typing a file name, you can press tab and the file name will be autocompleted.
If you drop a file into a terminal window, its path will be entered.
You can also quickly arrive in your destination folder by right-click → Open in Terminal in Nautilus. If you're using an older version of Ubuntu than 15.04, you'll need to install nautilus-open-terminal via sudo apt-get install nautilus-open-terminal first. The other 2 shortcuts should work on any current version of Ubuntu.


failed installing driver, Black screen on login

At the time of login,press ctrl+Alt+F1,a virtual terminal will open and login it with your username and password.Then run the below commands,

sudo rm /etc/X11/xorg.conf
sudo shutdown -h now

Poweron your pc,and i am sure you will get back to your os.


You can downgrade only the kernel. Run

sudo apt-get install linux-generic-lts-utopic

Then start synaptic and remove 3.19 kernel image and headers. Then reboot.
This is probably the kernel issue.

If this does not help, then downgrade xorg by

sudo apt-get install xserver-xorg-lts-utopic libqt5gui5 libgles1-mesa-lts-utopic libgles2-mesa-lts-utopic libgl1-mesa-glx-lts-utopic libgl1-mesa-glx-lts-utopic:i386 libglapi-mesa-lts-utopic:i386 libegl1-mesa-drivers-lts-utopic


How to calibrate the monitor on an Ubuntu system?

You can use GNOME Color Manager to install color profiles, perform calibration and adjust color settings. For full functionality, you'll need ICC profiles that provide the required information for your devices.


Ubuntu 20.04 Sennheisser Momentum TW 2 bluetooth connection

The solution is posted in this post. It says:
As a work around you disable AVRCP entirely. The earbuds should work fine just without touch controls. Edit the file /lib/systemd/system/bluetooth.service and add --noplugin=avrcp to the end of line 9.
E.g.
[Unit]
Description=Bluetooth service
Documentation=man:bluetoothd(8)
ConditionPathIsDirectory=/sys/class/bluetooth

[Service]
Type=dbus
BusName=org.bluez
ExecStart=/usr/local/libexec/bluetooth/bluetoothd --noplugin=avrcp
NotifyAccess=main
#WatchdogSec=10
#Restart=on-failure
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
LimitNPROC=1
ProtectHome=true
ProtectSystem=full

[Install]
WantedBy=bluetooth.target
Alias=dbus-org.bluez.service


Is there any difference between LiveCD Upgrade and Update Manage
  Upgrade?

Yes,When you upgrade from update manager all the apps including third party apps will be upgraded, If you upgraded using live cd, most of the additionally installed packages will  be removed, you have to install all the packages again


How to install VLC 2.2.1 in Ubuntu 15.04

You can achive this with n-muench vlc ppa but do read all the warnings and notations from the PPA, as you'll be taking any risk for any damages at your own risk.

sudo add-apt-repository ppa:n-muench/vlc
sudo apt-get update
sudo apt-get dist-upgrade

This will upgrade your installed vlc version to 2.2.1 if you don't have any installed then after the above commands run:

sudo apt-get install vlc


It might be a (U)EFI problem. Do you know if your computer boots in UEFI (needs an EFI partition) or CSM (needs an MBR)? If the former, you could have a look at my question here (How to install Ubuntu 14.04 64-bit with a dual-boot RAID 1 partition on an UEFI/GPT system?) and ignore the RAID parts. Good luck!


when install software, how to find out what is in the addon ?

The package name, which can be found between the brackets, will tell you more about the add-on. Search for this package name in the Software Center. Below the package details are a list of add-ons. The one you mention (Libsvg-perl) is visible in the screenshot below:

For any add-ons you want info on, just re-do your search for that package name.


This is caused by a bug in the installer where it removes certain packages from the target system that are installed in the live environment, but does so only by deleting the files rather than removing the package.  Run sudo apt-get install --reinstall gparted to force the package to be reinstalled even though the system thinks it already is.  IIRC, you will need to do the same for the libgtkmm-2.4-1c2a package that gparted depends on.


Can two different firmware files have same md5 sum?

Of course. MD5's collision vulnerability is well known (see Crypto.SE, Wikipedia). Though it is still a low-probability event, it can be done. However, in your case, I'd suspect a mistake in copying the files.


You have to add Third-Party Repository for installing  UbuntuOne-Indicator, by following these commands

sudo add-apt-repository ppa:rye/ubuntuone-extras
sudo apt-get update && sudo apt-get install indicator-ubuntuone

Logout and login to see the Indicator.

EDIT : If you have already added the Repository then try changing your mirror from software sources (refer image) and do sudo apt-get update && sudo apt-get upgrade in terminal , then try installing again


Well I guess it depends on what you need to change, i3wm comes with a config file located at ~/.config/i3/config (or ~/.i3/config with a copy located at /etc/i3/config). Changing this file will allow you to modify the colors of i3wm itself and the i3wm-bar, any per app theme changes I believe must be done with the apps specific config or through a DE running with i3wm. For example I use bspwm running on kde without the kwin window manager.
So if you need to change the colors of i3 get the hex codes for whatever colros you want and adjust the config as necessary, more information can be forund here: https://i3wm.org/docs/userguide.html#configuring
If you need to change the overall theme of GTK and QT apps I would recommend running LXDE with i3 as the window manager instead, here is an archwiki article that goes over the process  https://wiki.archlinux.org/index.php/LXDE#Use_a_different_window_manager


Trouble with 11.10 looking to do a fresh reinstall wondering about losing programs

No, the programs are not installed in /home - they're usually installed in /usr and they will be removed by the re-install (which totally makes sense in your case since you're having problems with package manager).

Program's user settings, however, are stored somewhere in your home directory, so if you did some configuration it should be preserved if you restore your home directory.


The Unity panel cannot be hidden because the code doesn't currently allow it. Why it doesn't allow it is because nobody has added the code to allow it. Is it written in stone that it has to be that way? I don't know. I doubt it. If you can come up with good solutions to the problems that arise when the panel is hidden, I'm very confident they will be considered. But it is important to not think about these things too subjectively. We can't consider one part of the puzzle at a time. We have to consider all of it simultaneously. For instance, we don't want the desktop to feel completely different if a window is maximized or not. That would be inconsistent and confusing.

The top panel is used for indications, and these are important. Because unlike other operating systems and desktops, notifications doesn't stay open. So you need a way to see that something has happened if you haven't been looking at the screen. This could be done differently, but then other issues tend to pop up.

The panel itself doesn't actually consume much extra space. Because it also saves space that was previously used by the window menu bars. So the screen real estate is just used somewhere else. If you have more than one window open, then it will often consume much less space than was previously used. In any case, on a large screen, the panel doesn't consume much space.

The smaller a screen becomes, the more likely it is that you'll maximize your windows and use one at a time. In that case, the panel doesn't consume any space at all. The window decorator will be merged into it, so even if it is still visible, it doesn't consume any extra space! Neat trick, that one.

In multiple screen scenarios, however, the discussion about whether it should be visible on all screens is valid and interesting. I don't know if any conclusions have been drawn in that regard. It might be that it should be configurable. But that's not an easy discussion either. There are so many possibilities, but we probably wouldn't want to have all those options in code and in config GUIs. Perhaps one good option would be to use the same choice as for the launcher? But some might not like that. My guess is that this will become configurable in some way in the future, but that it won't happen in 12.04. But that's just a guess.

I hope this at least helps explain why it isn't obvious that it should be possible to hide the panel. Or at least not obvious enough that it should take precedence over other tasks. And like everything else, you know, development resources are limited.


How do I change display settings like brightness, contrast, etc. on my notebook?

Open in System Settings → Brightness and Lock

Otherwise, play with xgamma. For instance, type in terminal

 xgamma -gamma 1.3

Read the manpage to see how to change only blue, red or green. Once you set the best gamma that fits your needs, you can write a bash script: create a file xgamma.sh in your /home directory. Paste the content of your gamma settings. For example:

#! /bin/bash
xgamma -gamma 1.3

Save it and make it executable. Finally add it to the Startup Applications.


I don’t have enough reputation to comment on Brandon’s own answer, so here as an answer:
It is most likely the line
-A INPUT -i lo -j ACCEPT

that fixed it for you. If you are on e.g. a modern Ubuntu version, it uses systemd-resolved which listens on 127.0.0.53:53 - when you perform a DNS lookup, the request is sent to systemd-resolved via the loopback interface (lo).


Ubuntu login screen, ctrl+alt+f1 incorrect password

If nothing else works, try entering your username login in ALL LOWERCASE. I pulled my hair out before finally coming to this solution!


Well, pepperflashplugin-nonfree is not sufficient for Firefox. The recommended way for Ubuntu users to install Flash is to enable Canonical Partners and install the adobe-flashplugin package. That way you get Flash for both Firefox and Chromium, and Flash will be updated via the regular package updates (which is not the case with pepperflashplugin-nonfree).

https://help.ubuntu.com/stable/ubuntu-help/net-install-flash.html

Possibly (since I'm not in Russia I can't test) it makes a difference in Firefox to also install the browser-plugin-freshplayer-pepperflash package.


What would be the differences between a persistent USB Live Session and a installed Ubuntu in a USB drive?

If I understand you, you want to know the differences between persistent USB and a full install USB.
Persistent Live USB: 4GB or more
First, Persistent Live USB takes less space.
One can create a non-persistent Live USB with a 2GB USB drive. To create a persistent Live USB you would need a slightly bigger one, say 4GB.
Second, Persistent Live USB can be used for installation.
A persistent Live USB is essentially a copy of the installation DVD. The files in the original ISO remains as is. Updates and future installations are saved in the space designated for keeping the changes. Say, you update Firefox. in a normal installation the old one is replaced. In persistent installation the old one stays as is, the newer version is located in the persistent virtual disk (within the USB) taking up extra space  and sometimes creating problems, for example for kernel updates. Now if you install Ubuntu from this persistent copy into another hard drive the original version of Firefox in the DVD image will get installed.
Booting a persistent Live USB gives the students access to the "Install Ubuntu" icon on the desktop. Students can "accidentally" start the install process and delete the contents of the hard drive.
Third, Persistent Live USB is less secure.
There is no login process in the Persistent Live USB. The default user has admin rights and does not need a sudo password to exercise it. This means, a malicious studnet can boot a persistent USB of another student and easily access stored documents, uninstall or reconfigure applications etc.
Fully installed Ubuntu in an USB: 8GB or more
First, Installation takes more space than keeping the image of the installation DVD, about 5GB.
Once installed, the system can be updated, and customized. Uninstalling unneeded software will free up space.
Second, Hardware on which the full install is created is important.
The Live DVD image in the persistent USB is created with compatibility with most computers in mind. However, once installed on a specific hardware, the installation gets a bit customized for the specific components. This is important particularly if the computer has some parts that require proprietary drivers. Once these drivers are installed, the USB may not work on computers that do not have those specific hardware. Conversely, if the installation is done on a computer that does not need any proprietary drivers, that specific installation may not work on the machines that do need them.
Therefore, if the goal is to use the USB in different computers, a persistent Live USB may be a better choice than a full installation.
Third, Full installation is more secure.
Creation of an user ID and a password is required during installation. This password is needed for any administrative action. One can also set it up to require the password at login.
Also see Difference between LiveCD, LiveUSB, full-install, and persistence?
Hope this helps


System bar not showing when using the macbuntu theme

Macbuntu, according to its own site, is not compatible with Unity.  After you downloaded it, you extracted it into a directory. If you've deleted that directory, re-download and re-extract.

Open a terminal, run cd
/path/to/the/macbuntu/folder/
In that same terminal, run
./uninstall.sh

This should remove Macbuntu.  If it does not, please read its README and/or contact the developer for support.

Now we need to fix Unity.

Go to the terminal and type gksu
synaptic. You will be prompted for your password.
Type Unity in the quick filter bar.

Right click on the Unity package
(in the list in the middle of the
window), and choose Mark for
Reinstallation.

Click the apply button, and wait for
the changes to finish.

Close Synaptic, and the terminal.
You may need to log out and back in
to see the changes.


Lenovo ideapad 320 15IKB Intel i5-8250U consumes more battery on Linux

I've found a Plasmoid for distros having KDE.
Intel P-State. It have many power and performance profiles. Saves battery a lot but the fan is still spinning a bit fast.


How to install nvidia geforce gtx1050 driver in ubuntu 18.04

No.
You can't really use it "REAL GPU" in Virtualbox for any operation system. Virtualbox is using Virtual GPU (Processor).


Ubuntu 15.10 + Dell XPS 13 2015 + Enlarging \boot partition

This problem started with the need to increase my /boot partition to make way for a rather large Ubuntu security update (4.2.0-25, meant to address the key ring exploit) which called for 183 MB free space.

This was inordinately large, as far as software updates go, especially for users that have /boot separately partitioned (where 250 MB is historically regarded as more than enough space).  Beyond removing old kernel images (as is the first step when it comes to cleaning /boot out) I had to also remove a .old-dkms-backup file (which a first made sure to backup), which thankfully freed up enough space.  However, the fact that these newer kernel images (for 4.2. at least) are nearly twice the size (35 MB compared to 20 MB) of their 3.13 counterparts means that for those installing newer Linux kernels (4.2 and onward) may want to set aside ~ 500 MB for their /boot partitions to avoid this problem.


Change Ubuntu screen size with virtualbox

You need to install guest additions and extension pack first

Second select 'view' then select 'resize to match' option

this will make full screen a true full screen.

If you need help locating any of the files let me know.


Escape timeout for, or cancel sudo fingerprint authentication and revert to password

I have the same problem, the only ""solution"" I've found is the following:

run a sudo command
when prompted for fingerprint, stop the fingerprint foreground check with ctrl+z
rerun the sudo command (arrow up and enter works fine)
it should now be "hanging" without any output
immediately cancel with ctrl+c
the command should now skip directly at the password input

Here is a screenshot of what it looks like:

It's still a bit annoying but at least you don't have to wait for anything to happen on its own. Hopefully, somebody will come out with a more elegant solution.


I used "Citadel" a lot a few years ago (but we switched to Flowmailer (online mailer) since out customers wanted that). Should take you less than 30 minutes to set up (they provide an fairly easy installer).

Install instructions for Ubuntu.


You can try this even in Yahoo prompt bash ... you will get a login accepted

curl --user name:password http://mail.yahoo.com -v

curl is the way to do it in bash.


How do I set refresh rate on each monitor invidually?

xrandr has --output option. You supply the screen's XID. Then it affects only the screen with the given XID instead of all of them.


How to black out a region of one virtual desktop?

You can use the feh image viewer to diplay a transparent image on black or white background in your defined size and position and without window decorations. And then use the wmctrl command to make it stay on top of all other windows, as shown in this answer.

So an example command (here to hide Spotify visual ads on a 1280x800 screen) looks like this:

sh -c "feh --borderless --title hidemyads --geometry 980x95+302+643 \
    --image-bg black /path/to/transparent.png & \
  sleep 0.3 && \
  wmctrl -r hidemyads -b add,above"

Annotations and explanations:

To find out the geometry to use, position and resize any window where you want it, and find out its geometry from wmctrl -lG output.
wmctrl -r selects the window where the title matches the supplied string, so we make that string unique by setting the window title in feh before.
We need to sleep a bit after feh, as there seems to be a short delay until the window manager knows about the new window. Usually 0.1 s is enough, but depending on system load etc. more might be required, so we triple it.
feh does not yet support configuring the image background color beyond --image-bg black and --image-bg white, but if you really want, a patch is available.
To configure the color, you can of course use an image in that color. But it's not flexible: feh always shows the image in original aspect ratio, so you would have to adapt the image aspect ratio to what you want to use in --geometry.
The wrapping in sh -c "…" follows this technique to make the command also execute in the Alt+F2 launcher (which would otherwise only execute one, at least in LXDE). Also, the wrapping detaches the command from a terminal (so that the feh window stays open when closing the terminal window).


My Numerical keyboard is not working 18.04

Make sure to check that the numlock state is showing as 'on'

You can do this by pressing Ctrl+Alt+T and then running:

gsettings get org.gnome.settings-daemon.peripherals.keyboard numlock-state

There should be a return 'on'

If it is not, then run:

gsettings set org.gnome.settings-daemon.peripherals.keyboard numlock-state 'on'

Check again and confirm that it is showing as 'on'.

Also make sure to log out and log back in or just do a full reboot to make sure that gnome has taken the new settings.


Fastest way to convert videos (batch or single)?

If you prefer command-line you can use ffmpeg (or handbrake-cli).
MP4
Assuming you're using a recent version of ffmpeg:
ffmpeg -i input -c:v libx264 -crf 23 -preset medium -c:a aac -b:a 128k \
-movflags +faststart -vf scale=-2:720,format=yuv420p output.mp4

-crf: Quality. Range is logarithmic 0 (lossless) to 51 (worst quality). Default is 23. Subjective sane range is ~18-28 or so. Use the highest value that still gives you an acceptable quality. If you are re-encoding impractically large inputs to upload to YouTube or similar then try a value of 17 or 18 since these video services will re-encode anyway.

-preset: Encoding speed. A slower preset provides better compression (quality per file size) but is slower. Use the slowest that you have patience for: ultrafast, superfast, veryfast, faster, fast, medium (the default), slow, slower, veryslow.

-movflags +faststart: Allows video to playback before it is completely downloaded in the case of progressive download viewing. Useful if you are hosting the video, otherwise superfluous if uploading to a video service like YouTube.

-vf scale=-2:720,format=yuv420p: A filtergraph using scale and format video filters. Scale to 720 pixels in height, and automatically choose width that will preserve aspect, and then make sure the pixel format is compatible with dumb players.

-b:a 128k: Audio bitrate. If your ffmpeg is outdated then you'll need to add -strict experimental to use -c:a aac.

MOV
Since your MOV and MP4 files probably contain the same video and audio formats you can encode the MP4 and make the MOV by re-muxing (with stream copy mode) instead of re-encoding:
ffmpeg -i input.mp4 -codec copy output.mov

WMV
FFmpeg only supports WMV 7 and 8. I am unaware of an open source encoder for version 9.
$ ffmpeg -encoders | grep -i windows
[...]
 V..... = Video
 A..... = Audio
 ------
 V..... wmv1                 Windows Media Video 7
 V..... wmv2                 Windows Media Video 8
 A..... wmav1                Windows Media Audio 1
 A..... wmav2                Windows Media Audio 2

As I am unfamiliar with these encoders I can only give an untested example:
ffmpeg -i input -c:v wmv2 -b:v 1024k -c:a wmav2 -b:a 192k output.wmv

Getting ffmpeg
You can download a Linux build of ffmpeg or follow a step-by-step ffmpeg compilation guide to customize your build.
Using a bash "for loop" to perform a batch encode
To encode all videos in a directory:
$ mkdir encoded
$ for f in *.avi; do ffmpeg -i "$f" -c:v libx264 -crf 23 -preset medium \
  -c:a aac -b:a 128k -movflags +faststart -vf scale=-2:720,format=yuv420p \
  "encoded/${f%.avi}.mp4"; done

Also see

Who can tell me the difference and relation between ffmpeg, libav, and avconv?
FFmpeg H.264 Video Encoding Guide
FFmpeg AAC Audio Encoding Guide
Using HandBrakeCLI


How do I install "wine-staging" on Ubuntu 18.04?

I think you should see https://wiki.winehq.org/Wine-Staging
and the https://www.maketecheasier.com/install-wine-staging-ubuntu/
It's available https://wiki.winehq.org/Ubuntu also. It shows the way to install the staging package. You can go to #ubuntu in freenode also for futher help

TL;DR

wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo apt install --install-recommends winehq-staging
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ disco main' # 19.04, see other version


This turned out to be a mixed shell problem.  The prompt constant was set to something that the ansible default shell (dash?) couldn't parse.  To solve it, I just specified bash as the default shell.

  user:
    name: "{{ project_name }}"
    create_home: yes
    shell: /bin/bash


ubuntu version shows 14.04.1 but I installed 14.04.3

This is not a correct way to check the version.

uname -a gave you the kernel build information and it is correct for 14.04.3.

To see the Ubuntu version run

cat /etc/lsb-release


According to the file /etc/apt/apt.conf.d/50unattended-upgrades
You should be able to blacklist packages from being unattended-upgraded as so. (this does not effect manual apt updates)
add firefox to the Package-Blacklist portion of the file.
sudo vi /etc/apt/apt.conf.d/50unattended-upgrades
 Unattended-Upgrade::Package-Blacklist {
      "firefox";
};

save and exit
not 100% sure which, if any, services need to be restarted... So I rebooted just to be sure.
Testing:
It will most likely be a while before you can test this configuration depending on whether or not a firefox update is currently available... which can be verified by listing the current upgradable packages:
sudo update
sudo apt list --upgradable
and looking for firefox in the output.
If it is there you can run the following test run to verify the configuration change made to 50unattended-upgrades.
unattended-upgrade -d --dry-run will run the unattended upgrades but not make any changes.
It should list any package beginning with "firefox" as blacklisted and the "Packages that will be upgraded" should not contain any package beginning with "firefox".
If you do not use the debug flag -d , you will have to look in /var/log/unattended-upgrades/unattended-upgrades.log to verify the output.