Should I use LUKS1 or LUKS2 for partition encryption?

As per the official draft for the documentation:

  LUKS2 is the second version of the Linux Unified Key Setup for disk
  encryp- tion management. It is the follow-up of the LUKS1 [1, 2]
  format that extends capabilities of the on-disk format and removes
  some known problems and lim- itations. Most of the basic concepts of
  LUKS1 remain in place as designed in New Methods in Hard Disk
  Encryption 2 by Clemens Fruhwirth. LUKS provides a generic key store
  on the dedicated area on a disk, with the ability to use multiple
  passphrases 1 to unlock a stored key. LUKS2 extends this concept for
  more flexible ways of storing metadata, redundant information to
  provide recovery in the case of corruption in a metadata area, and an
  interface to store externally managed metadata for integration with
  other tools. While the implementation of LUKS2 is intended to be used
  with Linux-based dm-crypt 3 disk encryption, it is a generic format

Basically, although it's already available, it's quite a work-in-progress format by user/definition standards. Further citing the cryptsetup official release notes for the 2.0.0 version, barely 6 months ago (emphasis mine):

  Cryptsetup 2.0.0 Release Notes

  Stable release with experimental features.

  This version introduces a new on-disk LUKS2 format.

  The legacy LUKS (referenced as LUKS1) will be fully supported forever
  as well as a traditional and fully backward compatible format.

  NOTE: This version changes soname of libcryptsetup library and
  increases major version for all public symbols. Most of the old
  functions are fully backward compatible, so only recompilation of
  programs should be needed.

  Please note that authenticated disk encryption, non-cryptographic data
  integrity protection (dm-integrity), use of Argon2 Password-Based Key
  Derivation Function and the LUKS2 on-disk format itself are new
  features and can contain some bugs.

  To provide all security features of authenticated encryption we need
  better nonce-reuse resistant algorithm in kernel (see note below). For
  now, please use authenticated encryption as experimental feature.

  Please do not use LUKS2 without properly configured backup or in
  production systems that need to be compatible with older systems.

So, unless you need one of the new features, your best & most secure option would be going with the default/stable LUKS1. On the other hand, if you don't mind a bit of testing or issues with the setup, you can go with the LUKS2 option and report any issues you find to the cryptsetup issue tracker.


Had some kind of the same problem, but I screwed up video drivers. It was exactly the same - nothing shows up, not even action bar at top. In my case I had to reinstall, and I may be afraid that you'll have to do the same. Backup your most careful data somewhere using some live session, so you don't lose anything. I'm sorry for you, I know how it feels.


Hardware Virtualization not possible, virtualbox alternatives?

gnome-boxes is a nice gui, it takes advantage of qemu and it doesn't seem to be as picky as Virtualbox (you can use wifi etc). Open a terminal and type the following command to install it:

sudo apt-get update
sudo apt-get install gnome-boxes

more info: wiki.gnome.org


Why does MAC Address Cloning not allow me to connect to any WiFi networks?

After determining that we could use the computer's original MAC address to spoof itself, and that changing just one character could break it, a Google search for "valid MAC address" turned up a wealth of information.

There are actually 4 sets of Locally Administered Address Ranges that can be used on your network without fear of conflict, assuming no one else has assigned these on your network:

x2-xx-xx-xx-xx-xx
x6-xx-xx-xx-xx-xx
xA-xx-xx-xx-xx-xx
xE-xx-xx-xx-xx-xx

Replacing x with any hex value.

Useful translation of the wikipedia version: "Universally administered and locally administered addresses are distinguished by setting the second least significant bit of the most significant byte of the address. If the bit is 0, the address is universally administered. If it is 1, the address is locally administered. In the example address 02-00-00-00-00-01 the most significant byte is 02h. The binary is 00000010 and the second least significant bit is 1. Therefore, it is a locally administered address.[3] The bit is 0 in all OUIs." – Adam Brand

In universally administered MAC addresses, the three most significant bytes are preassigned to specific companies/vendors.

A MAC address validator can be found at http://sqa.fyicenter.com/Online_Test_Tools/MAC_Address_Format_Validator.php.


According to Leoxsys, your adapter is Linux supported.  What I've found out that they have a different way of supplying drivers.  On their support page for that adapter, they only list Later Windows Driver, when in fact that file includes Linux, Windows, and Mac OS drivers.  So here is where you can download the driver.

Once the download is done, un-zip the file, and inside you will see three folders, just open the Linux folder, and you will see the driver.


How to package kivy application for Ubuntu?

The way to do this is via buildozer

Install and then, in your application directory run:

buildozer debug deploy run

It will then deploy on any attached android devices.


Duplicated icons on the desktop after upgrading to Ubuntu 20.04

As you have mentioned you have 'Xfce' as a third choice while logging into Ubuntu, it is highly likely that you have installed the Xfce desktop environment on top of the default GNOME 3 one.
Thus presumably you also have the xfdesktop4 package installed in your system too (you can check that by running the apt policy xfdesktop4 command in Terminal), which handles the desktop icons in the Xfce desktop. But the desktop icons are handled by a GNOME Shell extension called 'Desktop Icons' (package name: gnome-shell-extension-desktop-icons) in the default GNOME desktop. It seems in your case both are creating desktop icons, that's why all your icons on the desktop have been duplicated.
You can fix this by disabling one of the options. For example, you may launch the 'Extensions' application and turn off the 'Desktop Icons' extension.


If the filesystem were read only the error message would say so.  This seems to be because there is an underlying problem with your disk.  You should investigate the cause of that with dmesg.


"Copying logs to installed system" is the installation already finished?

Actually yes, this means that your installation is already finished. the last step you see in the bottom bar (12/13) is the pending reboot that you need to perform in order to finalize the installation.

You can see more about installation on the official installation document here


Try running systemctl enable mongod.service. That might work.


You can color the individual letters manually by selecting a letter and choosing a color from the on-canvas text tool.

If you want fancy stuff, use the file -> create -> logo items. (I'm not sure about the exact names, my GIMP is translated.) They create new images, but you can merge all the layers (or only some of them) and copy the resulting layer onto the image you are editing.

IDK about command line GIMP usage.


Further question on Intel graphics driver

You will not have to update the Intel Driver, unless you plan on using it again at some point... But the update manager may update it anyways.. if it does don't worry about it..

It shouldn't override your NVidia drivers...

You can blacklist the update though if you don't want to install it... Although I haven't done this in forever (hadn't needed to) but it might make for another good, but separate question...


cscope is an interactive, screen-oriented tool that allows the user to browse through C source files for specified elements of code.

cscope looks for a file that it can open, and if it finds one it creates a new file named cscope.out in the current directory. If cscope can't find a file that it can open, it displays this error message:

cscope: cannot open file cscope.out

Here is an example.

:~$ touch file-that-cscope-cant-open # make a new file that cscope can't open
:~$ cscope -d file-that-cscope-cant-open
cscope: cannot open file cscope.out

The cscope -d chromium-40.0.2214.91/ command fails and outputs the error message cscope: can't open file cscope.out because chromium-40.0.2214.91/ is not a permissible filename, so a file named chromium-40.0.2214.91/ does not exist. Because a file named chromium-40.0.2214.91/ does not exist, cscope can't open that file. Maybe you got confused about the -d option which does not stand for directory.

You can run the ls command to check if there are any source files in the current directory. By  default, cscope examines the C (.c and .h), lex (.l), and yacc (.y) source files in the current directory, and it can also be used for C++ code.


Shotwell, grouping photos by folder possible?

The simplest way to achieve this is with tags, not events. The short answer is to manually import folder-by-folder, and tag each batch of imports.

The first decision you have to make is whether to preserve your directory structure, and keep pictures in folders like you have them now. Shotwell defaults to a date directory structure, you have an event structure.

If you don't care, have all the photos outside /Pictures, and import one folder at a time using File/Import from folder... . Tag each batch as you go. All your photos will be reorganized in /Pictures based on dates.

If you want to keep the event structure, make sure to un-check the 'Watch library directory for new files' in Edit/Preferences/Library. Move all the folders with photos into /Pictures. Then import one at at a time, again tagging each batch of imports as you go. You will have to keep maintaining the library from then on, manually importing photos.


Right-click the file and do not have the “open with sublime Text 3” option ubuntu 16.04

You have to create a desktop launcher file. You can download a sample of the file from this github page.

Create the file named sublime-text-3.desktop, paste the content and update the path beside the line Exec (on both location) and Icon. Replace all Sublime text 2 by Sublime text 3. Move the file into /usr/share/applications/.

Make a right click on your text file, click on Properties, Open with tab and you should able to choose your Sublime text 3 application.


A good way to convert your physical Windows 7 install to a virtual machine would be to use VMWare's free converter tool: http://www.vmware.com/products/converter/

After you've done that, you can wipe Windows off your machine. This describes a way to do it: https://help.ubuntu.com/community/HowToRemoveWindows


Links to Ubuntu PowerPC images can be found on the official wiki.


easy_install is the part of python-setuptools. First install python-setuptools

sudo apt-get install python-setuptools

Then you can use easy_install to install from pypi

You need to use sudo with easy_install i.e.

sudo easy_install module_name

eg: sudo easy_install py2app

Or there is another module python-pip which will also help in installing from pypi with command

sudo pip install module_name

eg: sudo pip install py2app


How do I connect my desktop and my laptop using an ethernet cable to transfer files?

Of course you can! Connect them with the cable, set IP addresses for each machine, for example 192.168.1.1 for your desktop and 192.168.1.2 for your notebook. Don't forget to disable/enable the connection after you set the addresses, as it may be necessary for them to become active.

Then, on one of your machines, possibly the source of the data, right click the folder you want to share, go to "Share" and enable sharing. Samba is required for this and you will be asked whether you want to install it when enabling sharing, otherwise, if it's already installed, it will just work right away. Remember to set an easy sharing name, something short and without spaces.

Now, go to the other machine, open nautilus (or any other file manager thereof) and go to location:

  smb://192.168.1.2/folder/

Where:

192.168.1.2 is the IP of the source machine where the folder is being shared.
folder is the folder name you set when enabling the sharing.

In nautilus, you can go to this location by clicking CTRL + L and writing it to the address bar.


"unlock from launcher" option not working

I was able to figure out the solution based on the logs. Basically I did a search
 sudo grep "/usr/bin/zeitgeist-daemon" -R / -s -n
to find out where the service is being called . Turned out to be two conf files in /usr/share/dbus-1/services/. org.gnome.zeitgeist.fts.conf and org.gnome.zeitgeist.conf.

So I moved them out and did a sudo service dbus restart.
Now I am able to remove and rearrange the launcher

After some time there were crashes and had to restart my system. But after restarting every thing seem to be working. Might have been because of some other reason. But keep an eye out.


Remove one specific app indicator from top panel bar

It looks like Recent Notifications AppIndicator. You can make sure whether it is installed by opening Terminal and running

apt-cache policy indicator-notifications

After confirmation run the following in Terminal to remove it

sudo apt-get remove indicator-notifications


need to load live image without shuting down

If you would like Ubuntu on your Chromebook, you should install Crouton. It allows you to run Ubuntu, Debian, and Kali Linux in parallel with Chrome OS. You can do basic shell tasks and run a full desktop. I've used it, and it's very smooth.

If you need to boot a live image, you should look at this other AskUbuntu question, which shows how to do that. You basically need to ensure the USB drive is made correctly and follow a set of instructions to boot off of it.


Recovering a LUKS Ext4 Partition that was over written

Sorry, but I'm afraid you pretty surely have absolutely no chance to recover even a single bit of your whole partition, unless you have a backup of the encrypted partition's LUKS header.

Why? By creating an Ubuntu install disk on the device, you overwrote the first about 1.4 GB of it. However, the first 2 MB is where the LUKS header and key slots are located. Let's look at what these are:

The LUKS header is about 4 kB in size and contains some important info about the encrypted volume like an UUID, the used encryption and hashing algorithms, etc. After that, there's a section of 8 key slots, each used one of them containing a master key for the data blocks, encrypted with your passphrase.

To decrypt a data block, you need to enter your passphrase to decrypt the corresponding key slot containing the master key, which then again is used to decrypt the actual data.

Now the fastest way to destroy a LUKS encrypted volume is actually to nuke its header and key slots. You may still know your user passphrase, but the master key that encrypts your data is gone irrecoverably.

So no master keys, no chance to recover any data, even although over 99% of your 2 TB partition are untouched. Those crucial 2 MB at the beginning of the volume would be needed to make any sense of the data - and it's gone.

However, if you have a recent backup of at least your LUKS header and key slots (recent means after you modified the encryption configuration last time, e.g. by changing a passphrase), you might try to restore that header backup and use it to decrypt the data parts on your disk that did not get overwritten yet.

Further reads about LUKS header structure:

https://security.stackexchange.com/questions/109223/what-does-luks-header-contain
https://gitlab.com/cryptsetup/cryptsetup/wikis/LUKS-standard/on-disk-format.pdf


Brightness stuck at full after suspend HP Pavilion G6 12.04

As of 14.04 kernel 3.15rc2 I can't reproduce the issue, and as 12.04 is out of support I'm closing this


split string with a certain character to form a path

You can do:

echo "abc_d_e75_f10_xyz_l_11" | sed 's/_/\//' | cut -d "_" -f1-3

This will replace the first _ with / as well as trim the string.

Output:

abc/d_e75_f10


What you want is hidden in the CompizConfig Settings Manager (CCSM) Accessibility settings.
sudo apt install compizconfig-settings-manager

and then:

Open CCSM
Navigate to Accessibility
Click the checkbox before Show mouse
Click on Show mouse
Click on the first button after Initiate
Press a key combination!
(Ctrl by itself will not work: I have it set to  Super+K: the "Windows key" + "K")
Click OK
Now press the key combination you just took

and it'll show you a flaming whirlwind of stars around your cursor impossible to miss:

:-)


Fingerprint driver for Lenovo V330-14IKB in Ubuntu 19.04

The fingerprint device is the Bus 001 Device 005: ID 06cb:0081 Synaptics, Inc. It is not supported by default ubuntu drivers though.


Vidalia gives this error. How to make it connect?

Vidalia has been discontinued for long because it was not keeping up with changes in Tor, and has been replaced with Tor Launcher, which is a Firefox extension that provides similar functionality.

From TBB release-note:

  In terms of user-facing changes from TBB 2.x, the 3.x series primarily
  features the replacement of Vidalia with a Firefox-based Tor
  controller called Tor Launcher. This has resulted in a vast decrease
  in startup times, and a vast increase in usability.

It is discontinued for a reason and it is not recommend to use. If you still want to try hooking Vidalia upto TBB 3.5, follow the guidelines in the FAQ section.


Sound is available from speakers only when headphones are unplugged

Finally something worked: in alsamixer I enabled Loopback and disabled Auto-Mute.
I also manually configured them in alsamixer and pavucontrol:
Go to output devices in pavucontrol, set line-out as port and set the headphones volume to "0", then set headphones as port and set "front" on "0" (without muting: when I mute it, all the sound mutes)
Now the routing is working well but I need to search for how to route a single app because I cannot see the option in pavucontrol or system audio.


Installing samba, smbclient and running

sudo sed -i '/^\[global]/aclient max protocol = SMB3' /etc/samba/smb.conf

did the trick. Not sure if the last part is necessary though.


You can use dd for this.

First list your devices with

lsblk

and find the USB device that you want to write to (for example, /dev/sdb, this might be different for you).

Unmount the device by:

sudo umount /dev/sdb

Then write your file to USB by:

sudo dd if=/path/to/file/downloaded of=/dev/sdb

Make sure you select the correct drive in of=


Installing xubuntu over ubuntu (dual boot with windows)

You just have to install the xfce desktop:

sudo apt-get install xubuntu-desktop

If after installing xfce you want to uninstall Unity, you need to follow the specific instructions for your ubuntu version.

http://www.psychocats.net/ubuntu/purexubuntu


"Remote host identification has changed" warning when connecting over SSH

Did you recently reinstall the OS on your server or anything like that? That would cause this.

To fix this: http://www.cyberciti.biz/faq/warning-remote-host-identification-has-changed-error-and-solution/

Solution #1: Remove keys using ssh-keygen

Use the -R option to removes all keys belonging to hostname from a known_hosts file. This option is useful to delete hashed hosts. If your remote hostname is server.example.com, enter:

$ ssh-keygen -R {server.name.com}
$ ssh-keygen -R {ssh.server.ip.address}
$ ssh-keygen -R {ssh.server.ip.address} -f {/path/to/known_hosts}
$ ssh-keygen -R server.example.com

Now, you can connect to the host without a problem.

Solution #2: Add correct host key in /home/user/.ssh/known_hosts

It is not necessary to delete the entire known_hosts file, just the offending line in that file. For example if you have 3 server as follows.

myserver1.com,64.2.5.111 ssh-rsa
 AAAAB3NzaC1yc2EAAAABIwAAAIEA11FV0EnGahT2EK8qElocjuHTsu1jaCfxkyIgBTlxlrOIRchb2pw8IzJLOs2bcuYYfa8nSXGEcWyaFD1ifUjfHelj94AAAAB3NzaC1yc2EAAAABIwAAAIEA11FV0E
nGahT2EK8qElocjuHTsu1jaCfxkyIgBTlxlrOIRchb2pw8IzJLOs2bcuYYfa8nSXGEcWyaFD1ifUjfHelj94H+uv304/ZDz6xZb9ZWsdm+264qReImZzruAKxnwTo4dcHkgKXKHeefnBKyEvvp/2ExMV9WT5DVe1viVw
    k=
    myserver2.com,125.1.12.5 ssh-rsa
 AAAAB3NzaC1yc2EAAAABIwAAAQEAtDiERucsZzJGx/1kUNIOYhJbczbZHN2Z1gCnTjvO/0mO2R6KiQUP4hOdLppIUc9GNvlp1kGc3w7B9tREH6kghXFiBjrIn6VzUO4uwrnsMbnAnscD5EktgI7fG4ZcNUP 5+J7sa3o+rtmOuiFxCA690DXUJ8nX8yDHaJfzMUTKTGxQz4M/H2P8L2R//qLj5s3ofzNmgSM9lSEhZL/IyI4NxHhhpltYZKW/Qz4M/H2P8L2R//qLj5s3ofzNmgSM9lSEhZL/M7L0vKeTObue1SgAsXADtK3162a/Z6MGnAazIviHBldxtGrFwvEnk82+GznkO3IBZt5vOK2heBnqQBf
    w=
    myserver3.com,125.2.1.15 ssh-rsa
 5+J7sa3o+rtmOuiFxCA690DXUJ8nX8yDHaJfzMUTKTGx0lVkphVsvYD5hJzm0eKHv+oUXRT9v+QMIL+um/IyI4NxHhhpltYZKW
 as3533dka//sd33433////44632Z6MGnAazIviHBldxtGrFwvEnk82/Qz4M/H2P8L2R//qLj5s3ofzNmgSM9lSEhZL/M7L0vKeTObue1SgAsXADtK3162a/Z6MGnAazIviHBldxtGrFwvEnk82+GznkO3IBZt5vOK2heBnqQBfw==

To delete 2nd server (myserver.com), open file:

# vi +2 .ssh/known_hosts

And hit dd command to delete line. Save and close the file. Or use following

$ vi ~/.ssh/known_hosts

Now go to line # 2, type the following command

:2

Now delete line with dd and exit:

dd
:wq

Or you can use the sed command as follows to delete offending key at line # 44:

$ sed -i 44d ~/.ssh/known_hosts

Solution 3: Just delete the known_hosts file If you have only one ssh server

$ cd
$ rm .ssh/known_hosts
$ ssh ras.mydomain.com

Try connecting with ssh again
Now you should be able to connect your server via ssh:

ssh username@server-ip-here
ssh nixcraft@server1.cyberciti.biz

Next, you will get a fresh prompt to add key to ~/.ssh/known_hosts as follows:

The authenticity of host '10.86.115.66 ()' can't be established.
ECDSA key fingerprint is 4e:10:42:39:53:85:7f:89:89:dc:89:84:8d:79:e7:ed.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.86.115.66' (ECDSA) to the list of known hosts.


Samba share doesn't follow link properly on linux

You probably have created an absolute symlink rather than a relative one. Try creating one by passing a relative path to ln when you create the symlink.


Best way to "overlay" Ubuntu over existing Windows OS

If I understand correctly, you need to run Ubuntu and Windows at the same time?

If that's the case, then I would recommend that you install VirtualBox. It is a free software virtualization solution that's available for Windows, Linux, OS X and Solaris. It's quite user friendly and efficient.

Since Virtualbox can run on all those platforms, you can choose which to have as a main operating system. In your case, I think I'd recommend running Ubuntu in the virtual machine, because it's far easier to convert to a "real" install later. It's also usually much faster as a virtualized guest than Windows is. I'd then try to use Ubuntu as much as possible, converting tools as you're able to, and then – when you feel ready – move the Ubuntu system onto the host itself as a normal install. That's very easy, and you'll find many documents describing how.

An advantage of running Ubuntu as the host is that you can run the Windows desktop as a seemless workspace, which means it'll be more comfortable if you need to switch between them frequently. If you decide to convert the Windows install, check your licenses first.

If you use Windows XP, then converting is extremely difficult. Windows 7 is said to be easier, but I haven't tried it myself. After spending three days converting a simple XP system, I've tried very hard to avoid ever having to do it again.


JACK takes exclusive control over your sound card. If you want to use an application that does not support JACK natively, you can use PulseAudio as an intermediate layer. See this guide or the Community Wiki for details.


Ubuntu version for SIS Mirage 3 based laptop

It seems, that the SIS Mirage support in Ubuntu 13.04 should be at least usable out of the box. Anyhow, 3D acceleration is probably not available, so I'd recommend to use a lightweight Ubuntu flavor that works without compositing. By default Xubuntu and Lubuntu don't use compositing, and on Kubuntu it can be disabled in the window manager settings.

Source

If you plan on using an LTS release (what I'd recommend, except if some hardware does not work - what might be the case for you), the following site recommends to use Xubuntu 12.04, but not Ubuntu 12.04, since in Ubuntu 12.04 the kernel and Xorg packages were updated meanwhile to versions that are incompatible with the drivers linked there.


How come my 11.10 3D does not work even though my graphics card is supported?

Just to be sure, verify you have the video driver installed. You need to have the ati proprietary driver for 3d acceleration otherwise it treats it as a standard integrated card without 3D. The reason for that is it doesn't have the ability to access the card entirely.

  sudo apt-get install fglrx


How can I troubleshoot keryx 'UnicodeEncodeError' error?

Not knowing Keryx, from looking at the source it seems that the error occurs here, in an innocuous print statement.

AFAIK the _() function is used in localization to retrieve the translation of a given string based on you current locale. So the problem is most likely related to your non-English language environment. Try running

LANG=C ./keryx

from the terminal window. This runs the program in English. If this is indeed the problem, send a bug report to the developer.


how to Run Linux software in windows (in single boot)?

Yes, there are multiple ways. You can use virtualization (e.g. VirtualBox) which would allow you to use full Linux install but requires more system resources (at least disk space, RAM, and CPU power).
Or you can use some compatibility layer like WSL or Cygwin. This allows running some parts of the GNU/Linux system, especially the command line tools.
See also:

How to install Ubuntu on VirtualBox?
Ubuntu on WSL


How to open files which are located in VirtualBox's Guest Machine from Netbeans of Host Machine

There's a much easier way. Just store your project in a shared folder. Set up shared folders using these instructions and keep your source code there. Now you can access the files in Ubuntu using any method you want.


Install older version of gnu-make in Ubuntu 18.04

This looks to be a problem with gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)

For some reason the compiler's default #defines are not in keeping with what make expected.  I get same problems making make-4.2.1 which is the latest.

I changed glob/glob.c lines 211 onwward to be :

if  1 // !defined __alloca && !defined __GNU_LIBRARY__

if 1  // ifdef        __GNUC__
 undef alloca
 define alloca(n)     __builtin_alloca (n)

To force glob.c to use the builtin.  This works.  And seems to be your issue also with the older make.

I did NOT have this problem making make under Ubuntu 16.04.


Installation problem downloading language package

1.If ur internet connection is not slow enough..... try to disconnect and reconnect ur network from the menu available at top right corner of installer screen

If the internet is slow and there is no option to skip the download. Then abort the installation totally and start a fresh one.

For the next time when u are installing ubuntu....

1.opt for not to connect to any available network

2.opt for not to download updates during installation


ADB Android Studio Ubuntu ERROR : Unable to detect adb version, adb output: /home/hamid/Android/Sdk/platform-tools/

Ubuntu 14.04.3 LTS

Got same error after update Android Studio and then Android SDK.

[SOLUTION : Downgrade /platform-tools folder]

Download this arch. : https://dl-ssl.google.com/android/repository/platform-tools_r23.0.1-linux.zip
Go to your Android SDK folder
Remove old /platform-tools
Insert downloaded from link above

Hope this help you.

[UPDATED]

Forgot specify that Ubuntu is 32 bit


Ubuntu 18.04, held broken packages, install opencl

I am using the nvidia-driver-390 driver version 390.48 in 18.04 which was installed with the following commands:

sudo ubuntu-drivers autoinstall
sudo reboot

The ubuntu-drivers autoinstall command installs drivers that are appropriate for automatic installation including their dependencies, and the Nvidia driver will also be updated automatically when an update is available. This command will not install nvidia-libopencl1-390 or libnvidia-libopencl1-390 which you don't need. Instead if you need opencl, install it separately with the following command:

sudo apt install nvidia-opencl-dev

Before you run ubuntu-drivers autoinstall you must first uninstall all the nvidia-* packages that are currently installed as you did before and then reboot with sudo reboot. After you run sudo ubuntu-drivers autoinstall && sudo apt install nvidia-opencl-dev you must reboot as usual to enable the changes in graphics drivers with sudo reboot


Ubuntu tweak and Mozilla (firefox and thunderbird) cache

As I tested Ubuntu Tweak 0.8.6 in Ubuntu 13.10. It seems that for both, late releases of Mozilla Firefox and Thunderbird moved their cache folders to ~/.cache. Profiles configuration kept in same place ~/.mozilla/firefox/profiles.ini and ~/.thunderbird/profiles.ini.

Firefox: ~/.mozilla/firefox/ → ~/.cache/mozilla/firefox/
Thunderbird: ~/.thunderbird/ → ~/.cache/thunderbird/

Quick patch:

sudo nano /usr/share/pyshared/ubuntutweak/janitor/mozilla_plugin.py

Add/Change all lines I include cache_path in them (3 new lines, 2 modified app_path → cache_path, keep app_path of the profiles.ini):

import os
import logging

from ubuntutweak.janitor import JanitorCachePlugin
from ubuntutweak.settings.configsettings import RawConfigSetting

log = logging.getLogger('MozillaCachePlugin')

class MozillaCachePlugin(JanitorCachePlugin):
    __category__ = 'application'

    targets = ['Cache',
               'OfflineCache']
    app_path = ''
    cache_path = ''

    @classmethod
    def get_path(cls):
        profiles_path = os.path.expanduser('%s/profiles.ini' % cls.app_path)
        if os.path.exists(profiles_path):
            config = RawConfigSetting(profiles_path)
            try:
                profile_id = config.get_value('General', 'StartWithLastProfile')
                for section in config.sections():
                    if section.startswith('Profile'):
                        relative_id = config.get_value(section, 'IsRelative')
                        if relative_id == profile_id:
                            return os.path.expanduser('%s/%s' % (cls.cache_path, config.get_value(section, 'Path')))
            except Exception, e:
                log.error(e)
                path = config.get_value('Profile0', 'Path')
                if path:
                    return os.path.expanduser('%s/%s' % (cls.cache_path, path))
        return cls.root_path

class FirefoxCachePlugin(MozillaCachePlugin):
    __title__ = _('Firefox Cache')

    app_path = '~/.mozilla/firefox'
    cache_path = '~/.cache/mozilla/firefox'

class ThunderbirdCachePlugin(MozillaCachePlugin):
    __title__ = _('Thunderbird Cache')

    cache_path = '~/.cache/thunderbird'
    app_path = '~/.thunderbird'

I filled an upstream bug report for this, See Cache path of Mozilla Firefox and Thunderbird changed to ~/.cache #24


Help me to determine: Does this laptop have wireless?

The lshw command output suggests that there is no wireless card installed....

I checked the spec for HP-Compaq nc8000s...and there Wireless Card is optional...so in my opinion your laptop does NOT have wireless


How do I source a shell script for Node Version Manager?

try this:

Open the file vim /etc/profile
insert the following lines, customize it for your own

$ . ~/nvm/nvm.sh

$ nvm use 0.8.13

Now, the nvm shell script runs through each time you log in.

hope it helps,


What do I do with an upgrade stalled at 15%? And How do I safely recover?

The do-release-upgrade process is running inside Screen session, so you can press R to restart it.
I tried this several times, it ends with normal upgrade.
To be completely sure use normally recommended commands after upgrade:
sudo apt-get update
sudo apt-get install -f
sudo dpkg --configure -a
sudo apt-get dist-upgrade


nouveau driver Horizontal Lines Tearing on nvidia Quadro K600 Ubuntu 18.04.2 LTS

When you say "distorted" do you mean a moire effect, or every n rows/columns a little wider?  It sounds to me like your display may not support that resolution and the driver is performing some interpolation.  More information needed.


CD ROM Drive not detected in Kubuntu 11.10

First you must see which mountpoint has your cdrom. Just insert a cd, have it mount it, and do a sudo fdisk -l.

After that eject the cd to unmount the cdrom drive.

Try and mount the cdrom manually:

mount /dev/CDROM_DRIVE /media/cdrom

Either /media/cdrom or whatever directory you want cdrom mounted.

If it works, put that information on /etc/fstab to make it permanent

/dev/sdc0        /media/cdrom   iso9660 ro,user,noauto  0       0


System directories on separate partitions shown on desktop as #.# GB Volume

Well this is embarrassing, but it helps to make sure you have the right UUID's in the right places in fstab:

I added the UUID from the partition of /usr/share to another partition (near identical size) that I wanted mounted on startup through /media/..., so I had it in there twice, and got no errors or trouble by doing so!  So it seams you can mount partitions twice, at different mount points and with different names, which just may come in handy if needed.

Words of advice:  Use partition labels for clarity.  When copying UUID's, check them, check them again, and check them one more time after pasting into fstab, or you may have a lot of work on your hands if the system doesn't boot.  I got lucky this time, checking twice was insufficient.


Problem with Grub / Can't start Kubuntu 17.04

It looks like at least part of the problem is caused by BIOS/CSM/legacy-mode vs. EFI/UEFI-mode boot conflicts:

Your disk has a BIOS-mode version of GRUB in the MBR. This appears to be valid as far as the Boot Repair analysis is concerned, but this analysis only goes so far.
Your disk uses a GUID Partition Table (GPT), which means that Windows must boot in EFI mode, not in BIOS mode.
You have EFI-mode versions of both GRUB and the Windows boot loader installed on the EFI System Partition (ESP).
Your Boot Repair output indicates that the computer was booted in BIOS mode when you ran Boot Repair. This means it provides no efibootmgr output, which might be helpful in repairing the installation; but there are things you can try even without that....

You should first understand that mixed-mode (EFI/BIOS boot) installations are possible, but add a layer of complexity that's better avoided. See this page of mine for all the gory details.

Given that Windows is installed in EFI mode, your best bet is to first disable your CSM, as described on the page I've just referenced. Details of how to do this vary from one computer to another, so I can't provide step-by-step instructions. Chances are you enabled the CSM either in a semi-random debugging effort or because you followed some bad advice on the Internet, so you may know where the setting is already. (It may have been called "legacy boot support" or something similar.)

Once you disable the CSM, you could try Boot Repair again. If it's launched in EFI mode rather than BIOS mode, it might work. You can check your boot mode by looking for a directory called /sys/firmware/efi. If it's present, you've booted in EFI mode; if it's absent, you've booted in BIOS mode.

If Boot Repair doesn't help, then I recommend you try my rEFInd boot manager. You can download the CD-R or USB flash drive image, prepare it, and boot with it. After testing that it boots Windows, boot into Ubuntu. If this all works, then you can install the refind package (sudo apt-get install refind); or you can download the Debian package or use my PPA to get a slightly more recent version. rEFInd does not need GRUB to boot, so the failure of GRUB's configuration will not affect rEFInd.


Don't restrict the profiles to your user. Basically, clear connection.permissions property.
You can do that with various GUIs or
nmcli connection modify "$PROFILE" connection.permissions ""

Note that your user needs certain PolicyKit permissions to be able to create systemwide profiles.


Add words to a text file using a single terminal command (no editors)

I usually do this way when I am programming my script to do same what you are asking but programmatically.

echo "Hello you!" >> myfile.txt
echo "this is 2nd line text" >> file.txt
echo "last line!" >> file.txt

Voila! You got it.  Important to note >> means adding new line to existing file meanwhile > just simply overwrite everything.


Received "Update standard folders to current language?" message, now Documents folder is empty

Never mind... Turns out I'd somehow managed to move my Documents folder into my Downloads folder without noticing (Probably the late night!)


How do I get Skype for Linux alpha minimized to system tray at autostart

'Minimize to tray on startup' functionality has been integrated in the app and is fully functional from version 5.0.0.5. The app however is Skype for Linux Beta at this point.


What is the purpose of the special parameter "_" (single underscore) in environment?

It's not an "Environment Variable".  It's a special Bash parameter that is handled specially by Bash.

From the Bash Beginners Guide which explains this pretty well for Bash:

  3.2.5. Special parameters

  The shell treats several parameters specially. These parameters may
  only be referenced; assignment to them is not allowed.

  ...

  $_: The underscore variable is set at shell startup and contains the absolute file name of the shell or script being executed as passed
  in the argument list. Subsequently, it expands to the last argument to
  the previous command, after expansion. It is also set to the full
  pathname of each command executed and placed in the environment
  exported to that command. When checking mail, this parameter holds the
  name of the mail file.

(Format of the quote adjusted for Ask Ubuntu, but contains all the information)

They also include a nice example of how $_ expands:

franky ~> grep dictionary /usr/share/dict/words
dictionary

franky ~> echo $_
/usr/share/dict/words


Machine reboots while Installing Ubuntu desktop 12.10 on Windows 7 platform from USB

First when you download .iso file, You should check md5sum.

If md5sum isn't Correct then you have corrupted .iso file and you have to download it again and make USB or burn disk. If md5sum is correct than there are no chances of occuring such problems.


HP slim bluetooth keyboard connection failed

I found one solution to my problem. With the help of the bluetooth manager I could connect my rebellious keyboard. This app is really helpful and easy to use. One can easily get it from repos:

sudo apt-get install blueman-manager

The only downside is that I have to open the tool and reconnect the keyboard after every restart. It would be nice if the setting of the connection would be more stable.

Maybe you have an idea how to get this done.


How to switch between windows and Ubuntu without configuring?

Your grub menu should contain an option to boot Windows. If it doesn't contain that option or that option doesn't work then run boot-repair:

Then check your boot-repair log to see if this is the problem:

After upgrading dual boot system from 19.04 to 19.10, unable to boot into Windows from grub menu


The tool I'd recommend is Get-Shit-Done. It edits your host file so that you cannot access blocked domains using any browser. However, it does not have a scheduler (although you could use cron for that).

Stay Focusd is Chrome Extension that does something similar.

I personally use a secondary profile in Chrome, with the Whitelist extension, so that it blocks all websites, other than absolutely necessary ones


How do I get rid of the "Advanced Options for $OS" GRUB menu items?

You can uninstall all the older kernels from Ubuntu, and the "Advanced Options" for Ubuntu should go away at least. Possibly the same for CentOS. I don't think I've ever seen an "Advanced Options for Windows" selection.

Also, if you've got CentOS and Ubuntu both installed to disk, then there is chance they will fight over the grub install to the MBR (or wherever your grub is installed to), as well.


How can I diagnose what process is using CPU time?

Open up the terminal, do a

sudo apt-get install dstat

and type in:

dstat -c -y -l --proc-count --top-cpu

dstat is a system monitoring tool (like vmstat) and will show you the processes which consume the most CPU resources.


Why don't the %MEM values in top add up to the total used memory?

I'm trying to understand which of the processes eat the most memory.

That's simple: ruby!

  when you add up the %MEM values, it goes to about 50-60% only

Actually, adding up the columns as shown gives 69.2%.

As Samik has noted, that certainly does not include all the processes on your system - try pastebinning the output of top -b -n 1 to get the full output in a file and to share it with us so we can help you better.
Also, the kernel takes up some amount of memory, and some kinds of VPS (e.g. Xen, KVM) will reserve some additional memory upon boot for their internal use. Pastebin the output of dmesg too.

For better metrics and ease-of-use, I recommend you use htop  instead of top, with the "Hide userland threads" option enabled:

Also look at memtop:


Graphical file manager with support for SSH'ing into duo 2FA protected server?

If all else fails, I have helped someone use FileZilla with Duo.

Install it with sudo apt install filezilla

If for some reason apt cannot find it, you can download it here

One complaint I have seen is having to input the password, and DUO code in every single time you go to transfer a file. The key is to go into the settings and change the simultaneous connections to "1".

  File > Site Manager > Transfer Settings set "Limit number of simultaneous connections" to 1

That should keep the connection from automatically disconnecting after each transfer.


WGET image files from source server using CRON to run a SCRIPT using a PHP-mySQL-based generated list

You probably use some SELECT statement in MySQL to determine which images are new. So use the INTO OUTFILE clause in that statement to export the list to a text file. Name it for example /tmp/output1.txt.
Setup a cron job that runs every 10 minutes or so and checks if the file /tmp/output1.txt is there. Once the file is there, rename it to for example /tmp/output2.txt (to avoid triggering the job again) and run wget on that file.
That's of course only a basic idea that needs some improvements - for example, you may need to check the size of file /tmp/output1.txt to avoid picking it up by the script while it is still being exported from MySQL. You can do it for example by checking the file size and storing it in another temporary file. When the file /tmp/output1.txt is there, compare it's size with size stored in the temporary file. If it is different (or if the temporary file does not exist at all), store the size in temporary file and exit - the cron job will be called again after 10 minutes. If the size is equal, remove the temporary file and proceed with wget.


How can I get rid of the grub menu on Ubuntu 12.10?

What you are noticing is broken grub. Grub is a bootloader, essentially what it does is load your operating system after your BIOS/EFI. When you get the

  grub>

it means grub didn't find the configuration file for your OS. You can largely use this answer to fix it:
How can I repair grub? (How to get Ubuntu back after installing Windows?)


Nvidia X Server Settings cannot edit display configuration (screen tearing)

After more digging I assumed the problem was that Nvidia Optimus sync wasn't enabled (didn't know what this meant, but I assume it means that you have a laptop with both nvidia and intel card). A lot of posts suggested to edit/create a file called /etc/modprobe.d/nvidia-drm-nomodeset.conf but that did not work for me.

What did work was to create a file called:

sudo nano /etc/modprobe.d/zz-nvidia-modeset.conf

Add the following line:

options nvidia_drm modeset=1

Then run sudo update-initramfs -u and reboot. After that, running sudo cat /sys/module/nvidia_drm/parameters/modeset finally returned Y for me. At last the screen stopped tearing.


Skype repository not deleted on package purge

I agree with other answers that you are right. When installing the package, the file /etc/apt/sources.list.d/skype-stable.list and a public key are added, but they are not removed when purging.

It would be fully possible to add a maintenance script to the package which removes those things when purging. If you install e.g. Google Chrome, and purge it later, the apt sources entry is automatically removed.

The absence of such a script in the skypeforlinux package is a bug IMO, which someone may want to report to Skype.


I had to force the loging screen to use xorg and not wayland (not yet supported by nvidia drivers).

Edit as root the file /etc/gdm3/custom.conf.

sudo nano /etc/gdm3/custom.conf

Change the line

#WaylandEnable=false

to

WaylandEnable=false


How to enable alternative log in sessions (e.g. Unity 2D or others) in Trusty?

You can try this : http://glx-dock.org/

It allows you to choose your session GUI.


Updated Kubuntu 15.04 today and now no KDE menu, I can start things from terminal if I remember their name

Assuming you are running plasma 5 (check at login if you are running a different environment or window manager) and have your screen resolution correct (i.e. no screen scrolling), right click your desktop and unlock elements.
Right click desktop again and choose add panel -> default panel
You should now have a panel complete with clock, tray, task manager and kickoff (the menu).


Why does (package) nslcd recommend nscd?

nscd and nslcd are not the same and also not similar, read the man pages. nscd isn't neccessary but recommended by the package maintainers and for this reason nslcd recommends nscd.

From man nscd

DESCRIPTION
    Nscd caches libc-issued requests to the Name Service. If retrieving
    NSS data is fairly expensive, nscd is able to speed up consecutive
    access to the same data dramatically and increase overall system
    performance.  Nscd should be run at boot time by /etc/init.d/nscd.

From man nslcd

DESCRIPTION
    nslcd is a daemon that will do LDAP queries for local processes
    that want to do user, group and other naming lookups (NSS) or do user
    authentication, authorisation or password modification (PAM).

Perhaps you have read another description. My description says:

nscd

  Name Service Cache Daemon

nslcd

  daemon for NSS and PAM lookups using LDAP


Pictures explains better than words.

File Type: -: file,  d: directory

Permission: r: read, w: write, x: executable

Rest is self explanatory in above picture.


Can't find my Wifi in the list of available networks

Can you change your channel from 13 or 14 to e.g. 6 or 7?


how should I set automatic launch of xfce4-terminals with 4 tabs with default working directory?

Maybe using a script and inserting a line with CD in it? (I'm just guessing here)
#!/bin/sh
# ... This is a Script, save it with extension .sh
# ... and mark it as executable: chmod +x ./path/script.sh
# ... The advantage of scripts is that you can assign
# ... keyboard hotkeys to initialize them.
YourCommand1
cd /directory/you/want
# ... always empty line at the end

Or maybe trying with cd BEFORE the command.


I think your idea to partition the SSD into a smaller root and larger home and use the HDD for large data files (movies, backups) is perfect. At least that is exactly my setup.

Clearly, /root has to be on the SSD (because this is where the SSD will be most advantageous), and clearly, the root partition does not need much space. Actually, 20 Gb is still an overkill -- I have 15Gb and still over 3Gb free with tons of software installed.

Also, if you plan for a swap partition, put in on the SSD.

/home makes perfect sense on the SSD, as there are tons of user-specific configuration files that need to be accessed quickly.

Finally, if you run any kind of databases you might consider creating a database partition on the SSD. SSD are not much faster than HDD when it comes to data transfer rates, but they beat HDD by order of magnitude in terms of access time -- and this is often the limiting factor in databases.

As for the mount point: you can make your HDD mount for example to /data, and then create symbolic links in your /home that point to a particular directories on the /data:

ln -s /data/Videos ~/Videos/


Package management of installed system from live environment

You'll have to chroot into the system. Assume sda1 is your HDD:

sudo su
mount /dev/sda1 /mnt
for f in proc sys dev ; do mount --rbind /$f /mnt/$f ; done
chroot /mnt/

From then on you are using the root of your HDD as root and you can apt-get update or yum update or whatever the HDD-system demands.

Exit with STRG + D or by typing exit.

EDIT: sometimes you seem to have to copy /etc/resolv.conf to your chroot as pointed out by enzotib in the comments.


Should I enable client_max_body_size, proxy_request_buffering and proxy_buffering?

It depends on what kind of requests you are waiting from clients.

For example, if your application support file uploading, you should increase client_max_body_size to value of max allowed file size + 1Mb

I recommend to set increased client_max_body_size for specified location only.

location /my_upload_location/ {
    client_max_body_size   31m;
}

By default client_max_body_size = 1Mb. This means that any request from client can have Content-Length header with value less or equal 1Mb.

http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size

You should enable proxy_request_buffering only if you have more then 1 application backend and need to resend request to another backend if first one return an error.

In other case enabling proxy_request_buffering just increase response time.

http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_request_buffering

Enabling proxy_buffering allow you to cache backend responses. If proxy_buffering is switched of nginx will not cache anything from your application backend.

http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering


Ubuntu completly ignores my xorg.d settings

I was having the same issue on Linux Mint 15. Try the solution on this link. It worked for me: https://askubuntu.com/a/122589/165847.


Bash will always try to interpret scripts / text files as a sequence of Bash commands, unless the script / text file itself has a shebang at the start of the file describing which executable has to be run in order to interpret it; either add a shebang at the start of the file explicitly telling Bash to run the script using Perl:

#!/usr/bin/env perl

Or run the script using Perl:

perl ../OpenDroneMap/run.pl

To not follow a reverse SCITE approach (i.e. to not edit answers posted earlier based on other users' answers posted later), since this is now the accepted answer I'll edit in part of what OleksDovz said in its answer, which is: if you're running the script using ../OpenDroneMap/run.pl, make sure that the script has both a shebang at the start of the file and the executable flag set for your user; if you're the owner of the file run:

chmod u+x ../OpenDroneMap/run.pl


What happened to apport's "examine locally" button?

I'd seen the same in a fresh Ubuntu 17.04 install; after installing apport-retrace the missing button was seen.

Running the command

apt policy apport-retrace

will tell you  whether the package is installed.

To install, run

sudo apt-get install apport-retrace


Why are certain things able to get through ufw firewall?

Unless you've set up ufw to default-deny outgoing connections (which is not the default), then applications on your system can connect to external hosts. The connections made to external hosts are generally bidirectional - when you run, say, curl or apt-get, the programs make a connection to the remote host and can then both push data out and pull data down that connection.

ufw is set to default-accept outgoing connections because default-deny is basically the same as not being connected to the network. Depending on what you're trying to secure, though, default-deny outgoing might be the right policy.


Ubuntu Installer Freezing Up But Allows Mouse Movement

I've found that when a USB OS doesn't work well, it's usually because it wasn't made well enough. That could either be cause the USB didn't download right, or the graphical USB makers, both Windows, Mac and Linux, didn't write the USB right and this is often the case when USB's fail, and they fail often. You'll probably just have to make another USB until you get a semi-workable USB from a graphical maker in Windows or Mac if you don't have a linux to do it.. What a pain, ehh..

I've found that the best system; if you can get at least a semi-workable USB, is to load the USB and use:

from the terminal:

shred -vfz /dev/sd_ (whatever the last letter of your USB is)
then open Gparted and add a partition table to the USB and
Restart the computer, download the ISO and use the terminal command: sudo dd if=ubuntu_iso of=/dev/sd_ (whatever your usb letter is)

DD has never let me down. Once you get a perfect USB made, then use that to make your new computer.. good luck


Ubuntu 12.04 stopped to lock screen after X minutes

Start the terminal with Ctrl + Alt + T, and then type:

sudo apt-get install dconf-tools
Start dconf-editor
UnCheck(if the option check means) org->gnome->desktop->lockdown-> disable-lock-screen (for verify - goto System settings->Brightness & Lock: check the Lock option enable or not).
Close the editor.
Restart the system & see the changes.


Great question

AMD64 just means 64bit so get that one if you have a 64 bit CPU. Most CPUs are 64bit these days.

Here is a link that might help explain.
https://en.m.wikipedia.org/wiki/X86-64

Ben

Edit:  that chipset does not have support for 64 bit so the alternative would be the 32 bit equivalent iso or also known as i386x in the iso name.


How To Format A Hard Drive To NTFS On Ubuntu 14.04

I see this general question posted here a lot.  Most people who answer insist that windows will happily delete the content of your hard drive without further intervention by linux, and in the past I've known that to be the case, but considering the rate at which people like you seem to be asking, it only makes sense that I at least cater to you with the easiest and fastest solution I've proposed to anyone.  As I'm not certain the question I answered earlier today is going to get deleted, I'm just going to repost my answer here.

The super simple way to wipe your hard drive to like new status (no partitions at all), is to boot your computer to literally any ubuntu Live Boot boot (media) CD/usb-flash. It doesn't have to be remotely up to date, so whatever you installed ubuntu with should be more than adequate.

Once your computer is booted to a live boot CD you merely open one program already on the live boot media. It is called Disk Utility, and it will do exactly what you want to do with absolutely no thinking or grief. You don't even have to open terminal! Detailed step-by-step instructions below for both opening the utility and what to do once you have it open, but my guess is that you could adequately wipe your hard drive with that utility even without the following instructions.

Dumbed down usage instructions:
 1. Open Disk Utility (press the windows key on your keyboard and immediately type DISK and then press enter)
 2. First select your hard drive from the left side menu within that window.
 3. Then maximize the window so you can see all its options.
 4. Choose the lower right option called FORMAT VOLUME.
 5. In the window which appears, change the selection in the drop-down menu next to "TYPE" to EMPTY. (please don't try to give it a name. You cannot since there is no partition there to name)
 6. Press format, and the drive will be completely wiped, devoid of data, partitions or even partition tables.

This type of erasure is not quite the same as SHRED nor is it as time consuming. If you turned your drive over to the CIA they could probably recover all your data before sending you to a secret prison... or perhaps afterwards, I won't speculate. If you want that type of file destruction and have the time, I recommend shred instead. The method I've described is much faster and will ensure that windows will install correctly.

One last item I'd like to mention. When you first open Disk Utility, it will offer you a peek into the "SMART" status of your drive, and can tell you if your hard drive is healthy. All operating systems which install to hard drives rely upon the hard drive working correctly. If you have had an unhappy experience with Ubuntu, there's a good chance the cause was actually that the drive is sick. In which case, Windows won't work right either.


How do I change the copy and paste keyboard shortcuts on Lubuntu 12.10?

Try finding the ~/.config/openbox/lubuntu-rc.xml document. Make a backup, just in case, then edit the file. It is fairly straight forward - you should be able to edit the individual command button functions, as they come with identifiers in the text above. You can map any action to a key, or combination of keys.

For an example of how to adjust the code, for a similar function, see this post:

Bind the windows key to Lubuntu start menu


Bluetooth randomly cutting out in Ubuntu

Update Your Kernel

linux-image-generic version 4.15.0-46.49 and newer contain the fix.  Changelog excerpt:

  * Bionic update: upstream stable patchset 2019-01-17 (LP: #1812229)
    - xhci: Fix perceived dead host due to runtime suspend race with event handler

The linux-image-generic fix was made available for these Ubuntu releases:

18.10 (cosmic) – 28 October 2018 – version 4.17.0-7.8 and newer
18.04 (bionic) – 15 February 2019 – version 4.15.0-46.49 and newer
16.04 (xenial) – 27 September 2018 – version 4.4.0-136.162 and newer

To see what version of linux-image-generic you have and what versions are available to you, run these commands:

sudo apt update
apt-cache policy linux-image-generic

If you have a candidate with the fix to which you can update, just run an upgrade like so:

sudo apt full-upgrade

Install the linux-oem Kernel

Alternatively, you can try switching to the linux-oem kernel, which received the fix months earlier than the linux-image-generic branch did:

sudo apt install -y linux-oem

On 20 July 2018, linux-oem version 4.15.0-1012.15 was published to the bionic-security and bionic-updates repo.  It included these changes from version 4.15.0-1010.13:

  * xhci hangs; reset results in NULL pointer dereference (LP: #1763594)
    - xhci: Create new structures to store xhci port information
    - xhci: set hcd pointers for xhci usb2 and usb3 roothub structures
    - xhci: Add helper to get xhci roothub from hcd
    - xhci: xhci-hub: use new port structures to get port address instead of port
      array
    - xhci: xhci-hub: use new port structures for cas and wake mask functions.
    - xhci: xhci-ring: use port structures for port event handler
    - xhci: rename faked_port_index to hcd_portnum
    - xhci: change xhci_set_link_state() to work with port structures
    - xhci: change xhci_test_and_clear_bit() to use new port structure
    - xhci: use port structures instead of port arrays in xhci.c functions
    - xhci: xhci-hub: use port structure members instead of xhci_get_ports()
    - xhci-mtk: use xhci hub structures to get number of ports in roothubs
    - xhci: xhci-mem: remove port_arrays and the code initializing them
    - xhci: debugfs: add usb ports to xhci debugfs
    - xhci: debugfs: add debugfs interface to enable compliance mode for a port
    - xhci: Fix perceived dead host due to runtime suspend race with event handler

The last patch in that list should fix the problem of Bluetooth randomly cutting out (as well as the camera and fingerprint scanner, if you have those).

The xHCI bugfix hasn't been applied to the main kernel yet at the time of writing, so linux-oem is the only packaged Ubuntu kernel release that has the fix.

For tracking information on this bug, see the "Resources" section at the bottom of this answer.

Hack: Restore Bluetooth without Rebooting

If you would rather wait for a fix to be backported to the generic Ubuntu kernel, you can run this hack whenever Bluetooth cuts out.

Your laptop's camera, fingerprint reader, and Bluetooth controller will quickly reconnect after running this command (both lines):

echo 1 | sudo tee /sys/bus/pci/devices/0000:00:14.0/remove &&
echo 1 | sudo tee /sys/bus/pci/rescan

Note: Make sure that 0000:00:14.0 is actually the xHCI controller before running the first command.  You can find the slot with this command: lspci -k | grep -B2 xhci

Explanation

This is a Band-Aid and does not fix the root cause.  For bug tracking and external discussion, see the "Resources" section at the bottom of this answer.

Here's how the bug runs:

Problem Start

A bug in the xhci_hcd driver convinces it that the xHCI host controller stopped responding.  As a result, it disconnects all the devices connected to the controller:

Jul 25 09:07:31 host kernel: [121258.765591] xhci_hcd 0000:00:14.0: xHC is not running.
Jul 25 09:07:31 host kernel: [121258.772300] xhci_hcd 0000:00:14.0: xHCI host controller not responding, assume dead
Jul 25 09:07:31 host kernel: [121258.772319] xhci_hcd 0000:00:14.0: HC died; cleaning up
Jul 25 09:07:31 host kernel: [121258.806828] usb 1-7: USB disconnect, device number 2
Jul 25 09:07:31 host kernel: [121258.807915] usb 1-8: USB disconnect, device number 3
Jul 25 09:07:31 host kernel: [121258.808717] usb 1-12: USB disconnect, device number 5
Jul 25 09:07:31 host upowerd[6035]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.1
Jul 25 09:07:31 host upowerd[6035]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-8
Jul 25 09:07:31 host upowerd[6035]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0
Jul 25 09:07:31 host upowerd[6035]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-7
Jul 25 09:07:31 host upowerd[6035]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.0/bluetooth/hci0/hci0:256/0005:0A5C:4503.001E
Jul 25 09:07:31 host systemd[1]: bluetooth.target: Unit not needed anymore. Stopping.
Jul 25 09:07:31 host systemd[1]: Stopped target Bluetooth.
Jul 25 09:07:31 host upowerd[6035]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.1
Jul 25 09:07:31 host bluetoothd[12402]: Endpoint unregistered: sender=:1.61 path=/MediaEndpoint/A2DPSource
Jul 25 09:07:31 host bluetoothd[12402]: Endpoint unregistered: sender=:1.61 path=/MediaEndpoint/A2DPSink
Jul 25 09:07:31 host upowerd[6035]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.0
Jul 25 09:07:31 host upowerd[6035]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-12
Jul 25 09:07:31 host NetworkManager[4095]: <info>  [1532527651.6587] bluez5: NAP: removed interface 28:16:AD:2B:5C:40

(From /var/log/syslog)

Removal of xHCI Controller

Running echo 1 | sudo tee /sys/bus/pci/devices/0000:00:14.0/remove hot-removes the xHCI controller PCI device:

Jul 25 09:09:57 host kernel: [121405.007193] xhci_hcd 0000:00:14.0: remove, state 4
Jul 25 09:09:57 host kernel: [121405.007208] usb usb2: USB disconnect, device number 1
Jul 25 09:09:57 host kernel: [121405.008109] xhci_hcd 0000:00:14.0: USB bus 2 deregistered
Jul 25 09:09:57 host kernel: [121405.008215] xhci_hcd 0000:00:14.0: remove, state 4
Jul 25 09:09:57 host kernel: [121405.008226] usb usb1: USB disconnect, device number 1
Jul 25 09:09:57 host kernel: [121405.010736] xhci_hcd 0000:00:14.0: USB bus 1 deregistered
Jul 25 09:09:57 host upowerd[6035]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb2/2-0:1.0
Jul 25 09:09:57 host upowerd[6035]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-0:1.0
Jul 25 09:09:57 host upowerd[6035]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb2
Jul 25 09:09:57 host upowerd[6035]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb1

(From /var/log/syslog)

Restoring the xHCI Controller

Running echo 1 | sudo tee /sys/bus/pci/rescan rediscovers the PCI device we just removed.  The xhci_hcd driver sees the rediscovered PCI device as a new USB bus and sets up the bus and its devices:

Jul 25 09:10:11 host kernel: [121418.409659] pci 0000:00:14.0: [8086:a12f] type 00 class 0x0c0330
Jul 25 09:10:11 host kernel: [121418.409686] pci 0000:00:14.0: reg 0x10: [mem 0x3e820000-0x3e82ffff 64bit]
Jul 25 09:10:11 host kernel: [121418.409773] pci 0000:00:14.0: PME# supported from D3hot D3cold
Jul 25 09:10:11 host kernel: [121418.428182] pci 0000:00:14.0: BAR 0: assigned [mem 0x3e820000-0x3e82ffff 64bit]
Jul 25 09:10:11 host kernel: [121418.428928] xhci_hcd 0000:00:14.0: xHCI Host Controller
Jul 25 09:10:11 host kernel: [121418.428936] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1
Jul 25 09:10:11 host kernel: [121418.430031] xhci_hcd 0000:00:14.0: hcc params 0x200077c1 hci version 0x100 quirks 0x00109810
Jul 25 09:10:11 host kernel: [121418.430037] xhci_hcd 0000:00:14.0: cache line size of 128 is not supported
Jul 25 09:10:11 host kernel: [121418.430401] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
Jul 25 09:10:11 host kernel: [121418.430404] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Jul 25 09:10:11 host kernel: [121418.430407] usb usb1: Product: xHCI Host Controller
Jul 25 09:10:11 host kernel: [121418.430410] usb usb1: Manufacturer: Linux 4.15.0-29-generic xhci-hcd
Jul 25 09:10:11 host kernel: [121418.430412] usb usb1: SerialNumber: 0000:00:14.0
Jul 25 09:10:11 host kernel: [121418.430671] hub 1-0:1.0: USB hub found
Jul 25 09:10:11 host kernel: [121418.430725] hub 1-0:1.0: 16 ports detected
Jul 25 09:10:11 host kernel: [121418.432783] xhci_hcd 0000:00:14.0: xHCI Host Controller
Jul 25 09:10:11 host kernel: [121418.432792] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2
Jul 25 09:10:11 host kernel: [121418.433063] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
Jul 25 09:10:11 host kernel: [121418.433067] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Jul 25 09:10:11 host kernel: [121418.433070] usb usb2: Product: xHCI Host Controller
Jul 25 09:10:11 host kernel: [121418.433076] usb usb2: Manufacturer: Linux 4.15.0-29-generic xhci-hcd
Jul 25 09:10:11 host kernel: [121418.433078] usb usb2: SerialNumber: 0000:00:14.0
Jul 25 09:10:11 host kernel: [121418.436200] hub 2-0:1.0: USB hub found
Jul 25 09:10:11 host kernel: [121418.436223] hub 2-0:1.0: 10 ports detected
Jul 25 09:10:11 host kernel: [121418.771883] usb 1-7: new high-speed USB device number 2 using xhci_hcd
Jul 25 09:10:11 host kernel: [121418.949715] usb 1-7: New USB device found, idVendor=04ca, idProduct=7053
Jul 25 09:10:11 host kernel: [121418.949721] usb 1-7: New USB device strings: Mfr=3, Product=1, SerialNumber=2
Jul 25 09:10:11 host kernel: [121418.949725] usb 1-7: Product: HP HD Camera
Jul 25 09:10:11 host kernel: [121418.949729] usb 1-7: Manufacturer: DETNQ019I53FY0
Jul 25 09:10:11 host kernel: [121418.949732] usb 1-7: SerialNumber: 200901010001
Jul 25 09:10:11 host kernel: [121418.958393] uvcvideo: Found UVC 1.00 device HP HD Camera (04ca:7053)
Jul 25 09:10:11 host kernel: [121418.961311] uvcvideo 1-7:1.0: Entity type for entity Extension 4 was not initialized!
Jul 25 09:10:11 host kernel: [121418.961319] uvcvideo 1-7:1.0: Entity type for entity Processing 2 was not initialized!
Jul 25 09:10:11 host kernel: [121418.961324] uvcvideo 1-7:1.0: Entity type for entity Camera 1 was not initialized!
Jul 25 09:10:11 host kernel: [121418.962085] input: HP HD Camera: HP HD Camera as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/input/input59
Jul 25 09:10:11 host upowerd[6035]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb2/2-0:1.0
Jul 25 09:10:11 host upowerd[6035]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb2
Jul 25 09:10:11 host upowerd[6035]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-0:1.0
Jul 25 09:10:11 host kernel: [121419.091967] usb 1-8: new full-speed USB device number 3 using xhci_hcd
Jul 25 09:10:11 host kernel: [121419.241717] usb 1-8: New USB device found, idVendor=138a, idProduct=003f
Jul 25 09:10:11 host kernel: [121419.241723] usb 1-8: New USB device strings: Mfr=0, Product=0, SerialNumber=1
Jul 25 09:10:11 host kernel: [121419.241727] usb 1-8: SerialNumber: 00b080f6fa9d
Jul 25 09:10:12 host kernel: [121419.371938] usb 1-12: new full-speed USB device number 4 using xhci_hcd
Jul 25 09:10:12 host kernel: [121419.529258] usb 1-12: New USB device found, idVendor=8087, idProduct=0a2b
Jul 25 09:10:12 host kernel: [121419.529263] usb 1-12: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Jul 25 09:10:12 host upowerd[6035]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1
Jul 25 09:10:12 host kernel: [121419.537804] Bluetooth: hci0: Firmware revision 0.0 build 176 week 45 2017
Jul 25 09:10:12 host mtp-probe: checking bus 1, device 2: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7"
Jul 25 09:10:12 host mtp-probe: checking bus 1, device 3: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-8"
Jul 25 09:10:12 host mtp-probe: bus: 1, device: 2 was not an MTP device
Jul 25 09:10:12 host mtp-probe: bus: 1, device: 3 was not an MTP device
Jul 25 09:10:12 host kernel: [121419.589011] Bluetooth: hci0: Hardware error 0x0c
Jul 25 09:10:12 host NetworkManager[4095]: <info>  [1532527812.3141] bluez5: NAP: added interface 28:16:AD:2B:5C:40
Jul 25 09:10:12 host kernel: [121419.598737] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jul 25 09:10:12 host kernel: [121419.598745] Bluetooth: hci0: Retrieving Intel exception info failed (-16)
Jul 25 09:10:12 host bluetoothd[12402]: Endpoint registered: sender=:1.61 path=/MediaEndpoint/A2DPSource
Jul 25 09:10:12 host bluetoothd[12402]: Endpoint registered: sender=:1.61 path=/MediaEndpoint/A2DPSink
Jul 25 09:10:12 host systemd[1]: Reached target Bluetooth.
Jul 25 09:10:12 host upowerd[6035]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-8
Jul 25 09:10:12 host upowerd[6035]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.1
Jul 25 09:10:12 host upowerd[6035]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.1
Jul 25 09:10:12 host upowerd[6035]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.0
Jul 25 09:10:12 host upowerd[6035]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-12
Jul 25 09:10:12 host upowerd[6035]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0
Jul 25 09:10:12 host upowerd[6035]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-7

(From /var/log/syslog)

As a result, the xhci_hcd driver rediscovers the attached camera, fingerprint reader, and Bluetooth controller.

Resources

Kernel upstream

 — Fix released

Kernel 4.17.10 changelog
Ubuntu bug report

 ― Fix released

xhci hangs; reset results in NULL pointer dereference
Debian bug report

 ― Last updated 2016-08-25

Keyboard/Mouse devices are disconnecting after some time or event (capslock, ) - unknown main item tag 0x0
Kernel bug report

 ― Assignee said bug was off-topic

Enabling USB (auto)suspend (power control) for xHCI controllers incurs random device failures since kernel 4.15
Arch Linux Forums discussion

 ― Bug affects forum users

xHCI host controller not responding, assume dead


Wireless connection with an Atheros AR9285 keeps dropping every 20 minutes

Try this command,

sudo dhclient -v

There shouldn't be any errors. My successful output looks like this,

Listening on LPF/eth3/00:e0:52:ce:a0:f6
Sending on   LPF/eth3/00:e0:52:ce:a0:f6
Listening on LPF/eth2/00:50:43:00:f5:c7
Sending on   LPF/eth2/00:50:43:00:f5:c7
Listening on LPF/eth0/20:cf:30:4f:60:43
Sending on   LPF/eth0/20:cf:30:4f:60:43
Sending on   Socket/fallback
DHCPDISCOVER on eth3 to 255.255.255.255 port 67 interval 3
DHCPREQUEST of 192.168.11.100 on eth2 to 255.255.255.255 port 67
DHCPREQUEST of 192.168.1.107 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.107 from 192.168.1.1
RTNETLINK answers: File exists
bound to 192.168.1.107 -- renewal in 40407 seconds.


The w command displays exactly that:

w - Show who is logged on and what they are doing.

Example:

w
 14:20:15 up  5:10,  4 users,  load average: 0,00, 0,04, 0,05
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
user     pts/2    :0.0             09:11    5:07m  1.02s  1.02s ssh somewhere
user     pts/3    :0.0             09:11    5:08m  2.61s  2.61s ssh somewhere
user     pts/5    :0.0             09:12    5:07m  0.41s  0.41s /usr/bin/luit -
user     pts/0    :0.0             12:35    0.00s  0.34s  0.00s w


Uninstall gcc-5.4.0 to run gcc-4.8 as default

Indeed, there is no "uninstall" command when installing from source, unless the developer has decided to put one in.  (i.e., it's not impossible for a developer to create a script that undoes everything)

Your only option is to go into /usr/local/bin/ and remove each file yourself.  But which ones to remove?

One solution is to reinstall 5.4, but specify a new directory that isn't /usr/local/bin/.  This will give you a list of files that 5.4 installed.  Then, using the list of files, go into /usr/local/bin/ and remove them manually.  Note that it probably installed libraries and documentation into other directories, so to remove it completely, you will have to do more than just /usr/local/bin/.

An alternative is to not do an uninstallation and just install gcc 4-8 on top of 5.4.  It's the same program, but just a different version.  So gcc version 4.8 will overwrite 5.4.  The "downside" is that you might have 5.4 files lying around, but they will just occupy (relatively little) space.  It'll solve your problem and you can move ahead with what you want to do.

Of the two options, I'd pick the second one.  The 5.4 files that remain won't affect your system.  Relative to images, video, or almost any type of data, the space they occupy is fairly little (i.e., compiler, libraries, documentation is probably small).  In the future, you should install it in another directory and add symbolic links manually.  update-alternatives would do that for you if it's a package installed compiler; but for a compiler installed from source, that isn't an option.

(Aside:  Ubuntu 14.04 has reached end of life, I think.  You might consider upgrading some day...  If so, then what /usr/local/bin/ looks like won't matter anymore!)


'Connection reset by peer' on lftp while uploading files

Do not use ftp. The problem you are having are likely related to the general confusion of connection direction in FTP. FTP uses two ports: One command connection, and one data connection. Traditionally the command connection was from client to server, and the data connection from server to client!

PASV is the opposite; it instructs the server to listen for the data connection from the client, and tell the client it's port number. It looks like this (unexpected to many) behavior is what's biting you.

However, in my opinion, continuing to use FTP is not an good alternative today. It's simply outdated, security wise and protocol wise.

You have several alternatives to FTP. If you use authentication, scp/sftp is a good alternative. It requires exactly one port, is authenticated and encrypted.

If you require anonymous submissions, http(s) is a good alternative. Either through a POST request, or with WebDAV. Http can also be set up to use authentication, and can be encrypted with TLS (https). It also opens only a single channel for both data and commands.

FTP is a 40 year old protocol. It's falling out of use, and as a consequence the software is not receiving as much attention as more popular webservers and ssh servers, and thus there's a higher chance of serious vulnerabilities surviving in the source code.

In addition the command for SCP'ing would be far simpler: scp * $user@$host:$targetfolder - and you could use key based authentication to avoid passwords in the script!


Problem installing Ubuntu on laptop. Fans go to max rpm and laptop shuts down after about 30 seconds

What version of ubuntu?

32 or 64 bit - I assume 64 bit

What BIOS does the motherboard have & since this sounds like off brand... is the BIOS  the latest ?

What motherboard does it have?

Its pretty rare that the liveCD system would act like this ?


The first tool that comes to mind is digiKam. Here are some features mentioned on their site (link):

import pictures
organize your collection
view items
edit and enhance
create (slideshows, calendar, print, ...)
share your creations (using
social web services, email, your own web allery, ...)

The ony possible issue is that it's part of KDE environment, so it may bring a lot of kde dependencies.

Another good tool is Darktable (link). It's description from their site:

  darktable is an open source photography workflow application and RAW
  developer. A virtual lighttable and darkroom for photographers. It
  manages your digital negatives in a database, lets you view them
  through a zoomable lighttable and enables you to develop raw images
  and enhance them.


WINE discard alsamixer settings, uses screen as speakers

I managed to solve my issue using the following question and changing my "default output sink".


Anyone know any way to update my BIOS on my Dell Inspiron 5458 (without using flash bios update in startup menu)

It is not recommended to update a BIOS without a reason as per this article. If you do need to, and the issue is with the battery, removing the battery entirely might be a workaround? But be careful


Are there any video editors that support WebM?

I am not sure how much editing you will need to do but Openshot Video Editor (package openshot)  supports webm import, editing and export.

Not the most powerful thing in the world but can fit some uses.


What is a command to compile and run C++ programs?

To compile your c++ code, use:
g++ foo.cpp

foo.cpp in the example is the name of the program to be compiled.
This will produce an executable in the same directory called a.out which you can run by typing this in your terminal:
./a.out

g++ should already be in your $PATH, so you don't need to call /usr/bin/g++ explicitly, but you can use the latter in any case.
foo.cpp should be in the same directory you're running the command from.  If there is any doubt, you can make sure you are in the same directory by typing ls foo.cpp or head foo.cpp (if you need to verify you're working with the correct foo.)
As noted by @con-f-use, the compiler will usually make this file executable, but if not, you can do this yourself (so the command to execute, ./a.out or equivalent, will work):
chmod +x ./a.out

To specify the name of the compiled output file, so that it is not named a.out, use -o with your g++ command.
E.g.
g++ -o output foo.cpp

This will compile foo.cpp to the binary file named output, and you can type ./output to run the compiled code.


How do I make a custom Ubuntu cd,using KDE as the desktop interface ?

What about your task makes you need to use an .iso? If you want to install Kde you can install the package:

kubuntu-desktop

This can be done via:

sudo apt-get install kubuntu-desktop

After this has installed logout and select Kubuntu or Kde or something like that from the list of desktop next to your name where you enter your password.


In UNIX conformant echo,  \b is expanded into a backspace character.

sh -c 'echo "a\bc"'

or

echo -e "a\bc" # (bash)

will output

c

Other special characters are (from man echo)

   \\     backslash

   \a     alert (BEL)

   \b     backspace

   \c     produce no further output

   \e     escape

   \f     form feed

   \n     new line

   \r     carriage return

   \t     horizontal tab

   \v     vertical tab

   \0NNN  byte with octal value NNN (1 to 3 digits)

   \xHH   byte with hexadecimal value HH (1 to 2 digits)

Some useful Links:

Shell escape characters for sh -c
The “backspace” escape character '\b': unexpected behavior?
Why is printf better than echo?
Escape sequences with “echo -e” in different shells


12.04 - Steam is running in the system monitor, but will not open


Configuring multiple NIC's via preseeding (Ubuntu Server 16.04)

It seems that once the installer is done the configuration in the file.

/etc/network/interfaces

will overwrite this one

/target/etc/network/interfaces

You might want to replace your late_command line with this instead.

#Execution after installation
d-i late_command string cp /cdrom/preseed/interfaces /etc/network/interfaces

I am using a similar method in my preseed to configure my network. Note that if you will be using a script to configure /etc/network/interfaces, you will need to run it with busybox ex:

d-i late_command string wget http://url/to/script -O ./script.sh; \
ash ./script.sh;

or

./script.sh

if your script has the shebang

#!/bin/ash


QML and HTML5 are the preferred languages for writing new applications that can run across devices and form factors. You can certainly use Python, which is still very well supported, but then your apps will only run on the desktop.

Please let us know in which site and where you found the statement that Python is the preferred language for new Ubuntu applications, and we will update it. Thanks!


apt server certificate verification with a valid certificate

It turns out that I had the intermediate certificates out of order. Web browsers and ssllabs were fine with that but, it appears that apt cares about the ordering of the intermediate certificates.


Alternative to remote desktop, more a remote screen

I would use a vnc-server and vnc-client.

You could use tightvnc or realvnc.

I would prefer tightvnc (sudo apt-get install tightvncserver).

If the vnc-server starts at boot and autologin is configured it should work.


How to configure Microsoft exchange 2007 with evolution

EMAIL: you should consider accessing with IMAP and SMTP protocols, if your server have them enabled. I was an happy Evolution user, but in the last months I had a lot of problems with it, and now I'm switching to Thunderbird, that finally is well integrated with Ubuntu, works well with IMAP and seems also faster.

CONTACTS: in Thunderbird, you can add the Exchange Global Address List as a Remote LDAP Address Book; the port 389 should be opened on Exchange server. In Evolution, I was not able to make this working.

CALENDAR: no way in Evolution. In Thunderbird, you can work with the Exchange calendar with Lightning extension and Exchange 2007/2010 Calendar and Tasks Provider, that uses EWS (Exchange Web Services). I just tried and works very well!

ALTERNATIVE: you can also try DavMail, what access to Exchange Web Services and act as a "proxy" for standard apps (IMAP, SMTP, LDAP, Caldav). But, I tried it some time, and I was not satisfied. Too many problems to solve...


add-apt-repository command is suddenly very slow

I found the issue, it was due to other unsigned repository I added to my system because of this there is a lot of delay in adding PPAs. Simply remove those unsigned PPAs and problem will be solved.


Fresh Ubuntu Install, Purple then black screen. Shift/Space/Esc won't post GRUB

Never found out what was wrong. Swapped to Ubuntu 15 install, everything running fine.


How to view documentation for an installed library?

Finding Documentation on ubuntu

1. Search using nautilus or browser

You can search as mentioned above in the /usr/share/doc directory, but some packages install it in their /usr/share/package_name directories or even other locations. Here you can find the html and pdf docus, best using nautilus (use the search function of nautilus and open your requested docu in your browser). If you often use the docu don't forget to bookmark your link.

2. Using find command

From your command line you can use the find command to search for  your docu:

html-documentation:

find /usr/share -type f -name index.html | grep doxy
pdf-documention:

find /usr/share/ -type f -name *.pdf | grep doxy

Invoke your result with evince or your browser (in my case google-chrome)

html:

google-chrome /usr/share/doc/doxygen/html/index.html
pdf:

google-chrome /usr/share/doc/doxygen_manual.pdf

evince /usr/share/doc/doxygen_manual.pdf

3. Make a list and search and invoke with less

I prefer to automate this task and make a list the following way:

for html:

find /usr/share/ -type f -name index.html | sort -k1 | awk '{ print "file://" $0;}' > ~/DocHtml.txt
for pdf:

find /usr/share/ -type f -name *.pdf | sort -k1 | awk '{ print "file://" $0;}' > ~/DocPdf.txt

This will create 2 files in your home-directory (DocPdf.txt and DocHtml.txt). Simply open this with less

less ~/DocPdf.txt

or

less ~/DocHtml.txt

and press & followed with your searching string, e.g. doxygen.
Now simple move your mouse over the requested document and press ctrl and left-mouse-click will open the file.

You can also make a bash script and invoke it via a chron job. This will automate the task.

Here is a simple bash script which can be modified. Put additional directories as desscribed in the script. Save the below bash script as makeDoc, change chmod +x makeDoc and invoke it with ./makeDoc. Rest as above:

#!/bin/bash
# Author: abu
# Description: script creates two files, DocPdf.txt and DocHtml.txt,
#   which lists all pdf/html documents found by the find function.
#
#   You can include other search directories, e.g. Anaconda,

declare -a DocDirs=(
    "/usr/share/"
    "/opt/anaconda3/"       # you can put here additional  directories
#   "/path/to/other/dirs/"  # -""-     -""-    -""-
)

echo "DocHtml automatic generated!" > DocHtml.txt
echo "   File generated with" $0 >> DocHtml.txt
echo -e "   Date: " `date` "\n\n" >> DocHtml.txt

echo "DocPdf automatic generated!" > DocPdf.txt
echo "   File generated with" $0 >> DocPdf.txt
echo -e "   Date: " `date` "\n\n" >> DocPdf.txt

for i in "${DocDirs[@]}"
do
    find $i -type f -name index.html | sort -k1 | awk '{ print "file://" $0;}' >> ~/DocHtml.txt
    find $i -type f -name *.pdf | sort -k1 | awk '{ print "file://" $0;}' >> ~/DocPdf.txt
done

4. APT Package Solution

The package doc-base helps developers to install it in the correct way. To view this I know dhelp and doc-central.

4.1 dhelp: web base documentation reader.

Install it with

sudo apt-get install dhelp

and open in your browser the file:

file:///usr/share/doc/HTML/Programming/Awk/index.html

documentation are well indexed
documentation is available through a web browser
indexes documentation (in the background)
not so convenient command line interface
.

4.2 doc-central: web base documentation reader.

Install it with:

sudo apt-get install doc-central

documentation are well indexed
documentation is available through a web browser
indexes documentation (in the background)
not so convenient command line interface


Your problem is the wav file format, which is essentially limited to a 2GB file size.  See https://en.wikipedia.org/wiki/WAV and https://hydrogenaud.io/index.php/topic,32422.0.html

Some programs will let you record to 4GB (I use Ardour, and Audacity also does this I believe) to record to alternate formats when I need longer recording times.


How to find a specific text in files with specific extension?

TL;DR

Add -iname "*.log" after / to your find command. Refer to man page for more info

A more detailed answer

The task at hand is the following:

List files that match pattern *.log
Execute grep per each file to find whether or not it contains a specific string.
List the filename that has a match on the stdout

The example of how that can be accomplished can be seen bellow:

$ find /var/log -iname "*.log" -exec grep -l 'wlan' {} \+

Essentially there's 3 things at play:

find does the job of finding files AND calling grep per list of filenames in the -exec ...{} \+  structure, where {} will be substituted with all the filenames found.
-iname "*.log" can provide case-insensetive matching of the filenames
-exec . . .{} \+ calls the low-level execve function that will spawn grep -l with the list of all the files found in front of it ( in the place of {} ).
The \+ is the option that specifies for execve to pack as any files as possible in front of grep (the limit is set by ARG_MAX variable, is specific to exec, and for Ubuntu is at 2097152 as can be shown by getconf ARG_MAX command ). Once the limit is reached, exec will repeat the call to grep with more files packed as arguments. The \ is necessary to ensure + is interpreted as argument to find and not as another shell command.
the -l option or grep shows files with matched string. -L would match files without the string.


How to fix Ubuntu server 13.04 slower boot when network cable is unplugged

Do you have eth0 set up to be automatic by DHCP?  Look at /etc/network/interfaces (it's a file, not a folder)

If your entry looks something like this:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

then that large delay is because your system is trying to run DHCP, even though the network cable is unplugged, which means it runs through all of the channels until it gets a response, which it never will because it's not plugged in, so it takes a while.  If it's plugged in, this is much faster because it should get a DHCP offer fairly quickly.

That would be the best explanation I can think of.


Upgrade to 13.04 was not successful. Gstreamer not working. What do?

Please post your sources.list file which is located in /etc/apt. And try apt-get -f install.


Got some more juicy troubleshooting info on this problem. I installed Ubuntu 10.04.3 LTS on another system and configured the OpenPGP smartcard settings. It is working properly for my non-root user account. Naturally I wanted to check out the permissions on the usb device.

Under my normal account I first ran a gpg --card-edit to tie up the usb card reader device, then I ran sudo lsof -c gpg | grep usb to find the device file. This yielded noting so I ran sudo gpg --card-edit and got an error message!

seth@swk:~$ sudo gpg --card-edit
[sudo] password for seth:
gpg: WARNING: unsafe ownership on configuration file `/home/seth/.gnupg/gpg.conf'

gpg: detected reader `SCM SCR 3310 00 00'
gpg: pcsc_connect failed: sharing violation (0x8010000b)
gpg: apdu_send_simple(0) failed: locking failed
Please insert the card and hit return or enter 'c' to cancel: c
gpg: selecting openpgp failed: general error
gpg: OpenPGP card not available: general error

Something else was tying up the usb card reader. Let's find out what:

sudo lsof | grep usb

This yielded the nugget I was looking for.

pcscd     2362       root    5u      CHR              189,4      0t0       2194 /dev/bus/usb/001/005

So apparently the pcscd service grabs the card reader device on behalf of the non-root user and relays gpg read/write requests to the card on a properly configured OpenPGP setup.

Let's take a look at the permissions of the device file.

seth@swk:~$ ls -l /dev/bus/usb/001/005
crw-rw-r-- 1 root root 189, 4 2011-10-18 11:49 /dev/bus/usb/001/005

OK, now I think I'm getting closer. On the 11.10 system I remember the group was set to pcscd and not root. It looks like the problem might be with the pcscd package. I'll try configuring an 11.10 system with the same permissions and report back.

UPDATE: So I set the user and group permissions on the usb device of a fresh 11.10 Ocelot install to root and root. The command gpg --card-status still fails as non-root user. I'm guessing that this is a bug in the pcscd package for now.


To summarize from this original post:

sudo add-apt-repository ppa:n-muench/burg
sudo apt-get update
sudo apt-get install burg burg-themes
sudo burg-install "(hd0)"
sudo update-burg
sudo burg-emu

To add grub-customizer:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer


grub2 loopback booting ubuntu alternate iso

Burce!
I haven't tried this option of grub2 recently enough,so perhaps things have changed now that I have grub2-2.0-0.39 (I run Fedora, but don't mind that)...

However, I gave it a try and (avoiding now numerous interesting issues encountered) must report, that although you will succeed in booting the kernel and initrd from your ISO, there may be no way provided in that initrd&kernel to be aware of being booted from a loopback device. Nor may it be possible to pass on to that kernel a loopback root device as an argument. Actually, I have no idea what happens to that device once kernel + initrd are loaded and booted -- that would be VERY interesting to know.

I remember having succeeded, though, in booting a kfreebsd install DVD using that feature. But at some point it hanged because of not being able to "find the installation media". So I had to go to the console, manually use losetup to loopback-mount the ISO and link it to /dev/dvd or something, for the install scripts to notice it, then go back to the installation "wizard" and tell him where the media was...
And even this completely manual boot from the ISO was not always possible for the reasons mentioned above.

This is my view on the problem, but it may be incomplete and grub2 itself may have evolved. So would be interesting to hear more comments on this. Or perhaps, give it a try again when I have time for't.

Kostya Berger


Ubuntu 16.04 boot freezes intermittently at boot

If its happening after the loading of grub, its unlikely to be a hardware issue so much as a driver issue. If the freezes are causing corruption you can use something like http://www.supergrubdisk.org/ to scan and fix boot partitions.

If its a driver issue I would highly recommend using the open source Radeon driver NOT the AMD Catalyst driver if you can support it. https://help.ubuntu.com/community/RadeonDriver

Outside of this the only real way to test graphic card failures, is try the system with a different card and see if the problem goes away, but if its happening intermittently that may not be easy to check unless you have another graphics card laying around.


Why is my Caps Lock not working as Ctrl?

You can get all three keys to behave as Ctrl by only checking the Caps Lock as Ctrl checkbox. The At bottom left option seems to not work as expected and should be left unchecked.


What is the difference between security, updates, proposed and backports in /etc/apt/apt.conf.d/50unattended-upgrades?

Warning, this isn't the "detailed documentation" you wanted, just a simple answer.

To quote ubuntu.com:

Security:

The security updates are holes in software that need to be patched for, obviously,
security reasons.

  Important security updates

  These are obviously the only ones you will have to enable if your
  computer is connected to the Internet, in order to keep you secure.

  Enabling this is smart. Even if you don't connect to the Internet, it
  won't hurt.

Updates (Recommended Updates):

The Recommended Updates are just software changes, but not updates that will affect the security of your system, just the apps installed and stuff like that. They tend to fix bugs and annoying problems as well as add features.

  Recommended updates

  These updates contain non-critical updates which can remove major
  annoyances and broken packages, but which do not affect your security.
  Other than fixing some, they do not enable any features.

  Enabling this is generally a good idea. The amount to download as well
  as the changes are not too big, but it improves your system stability
  in various ways.

Proposed: (For getting married with :D Just kidding)

The Proposed updates are updates that have to be tested before they can be officially put into the Recommended updates repository. They may have issues that could break your system, and quite often do. You get Beta features, but often a broken system. I managed to nuke an installation by enabling this. Unless you like testing and fixing issues, I don't recommended this one.
There is a question regarding this here: What is the "proposed" repository?

  Proposed updates

     Enabling the proposed updates repository can break your
    system. It is not recommended for inexperienced users.

  The proposed updates are updates which are waiting to be moved into
  the recommended updates queue after some testing. They may never reach
  recommended or they may be replaced with a more recent update.

  Enabling this is reasonable if you want to participate in testing
  minor updates, or know that your specific problem has been solved here
  but the package hasn't reached recommended yet.

Backports:

  Backported updates

  Backported updates are pieces of software which come from a newer
  major release. Thus, they can contain new features, but may also break
  compatibility with their older version. However, they are compiled
  specifically for your version of Ubuntu. In effect it saves you the
  hassle of broken dependencies and major downloads.

  Enabling this is reasonable if you want new features but don't want
  your system to be unstable.

  Read more in UbuntuBackports.


sed replace only first and last space in lines

This will replace the first and last spaces with tabs:

sed -E 's/^([^ ]*) /\1\t/; s/ ([^ ]*)$/\t\1/' pwmap

For example:

$ sed -E 's/^([^ ]*) /\1\t/; s/ ([^ ]*)$/\t\1/' pwmap
01200   Carbon metabolism       (1)
01210   2-Oxocarboxylic acid metabolism (1)
01212   Fatty acid metabolism   (2)
01230   Biosynthesis of amino acids     (1)
00020   Citrate cycle (TCA cycle)       (1)

How it works

s/^([^ ]*) /\1\t/

The regex ^([^ ]*) matches all nonblanks from the beginning of the line up to the first blank and puts them in group 1. This is replaced with group 1 followed by a tab.
s/ ([^ ]*)$/\t\1/

The regex ([^ ]*)$ matches from the last blank to up to the end of the line with all the non-blanks stored in group 1.  This is replace with a tab followed by group 1.


How do I get more up to date Silverlight/Moonlight?

The Moonlight-project is dead for more than a year sadly.
The famous plugin in Chrome-webbrowser seems to be also dead.

For Silverlight and using this awfull software it is better to run Windows in a Virtual Box and thus using this for your needs.

I know this isn't the answer you wanted to hear, but for using Silverlight it's better to run a Virtual Machine with Windows inside it.