How can I delete all .LNK files on my Ubuntu machine?

find [path] -iname '*.LNK'

If you run the above and are fine with deleting all of the listed files, then:

find [path] -iname '*.LNK' -print -delete

You can leave out -print if you don't care to see which files are being deleted.

With -iname it's case insensitive.


Why does /var/cache/apt/archives keep deleting files?

Take a look at /etc/apt/apt.conf.d/20archive.

In there there are a few lines used by the daily apt cron job:

APT::Archives::MaxAge "30";
APT::Archives::MinAge "2";
APT::Archives::MaxSize "500";

Those are the defaults.  You should get what you want by setting all three to 0.

You can look at the headers of /etc/cron.daily/apt for more information.


How do I troubleshoot problems with my wireless connection?

To check if the card is recognized, run:

sudo lshw -C network

or

lspci -nnk | grep -iA2 net

The second command is useful, as it shows the vendor and product IDs [8086:4222]:

~$ lspci -nnk | grep -iA2 net
06:00.0 Network controller [0280]: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection [8086:4222] (rev 02)
    Subsystem: Hewlett-Packard Company PRO/Wireless 3945ABG [Golan] Network Connection [103c:135c]
    Kernel driver in use: iwl3945
    Kernel modules: iwl3945

Example - card recognized, brand and model are correctly identified, correct driver is in use (driver=iwl3945), and wireless connection is established (ip=192.168.2.81):

sudo lshw -C network
[sudo] password for hp:
  *-network
       description: Wireless interface
       product: PRO/Wireless 3945ABG [Golan] Network Connection
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:06:00.0
       logical name: wlan0
       version: 02
       serial: 00:13:02:c8:d2:75
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwl3945 driverversion=3.2.0-35-generic firmware=15.32.2.9 ip=192.168.2.81 latency=0 link=yes multicast=yes wireless=IEEE 802.11abg
       resources: irq:45 memory:80000000-80000fff

To make sure you are connected to a wireless, but not an ethernet network, first identify the wireless interface (usually wlan0, eth1 or eth2) by looking at the output of sudo lshw -C network. Then, look for an IP address to tell which interface is connected.


Where, and how, do I install multiple packages stored in a local directory?

To download them all:

Create a text file with their names, one on each line.
Create a folder to store these package files:

mkdir ~/packages_store

Read and download the deb file of each package on that list:

#!/usr/bin/env bash

# Change to the storage folder
# or exit if it doesn't exist
cd ~/packages_store || exit

# Remove blank lines first then read
# from file

sed '/^$/d' "$1" | while read -r line; do
    apt-get download "$line"
done

Usage: chmod +x myscript.sh, then sudo ./myscript.sh /path/to/text_with_packagenames

To install all:

Change into that folder cd ~/packages_store
Run installer:

sudo apt-get install *.deb

Hopefully this is what you’re looking for!


How to run python script installed after converting to .deb?

If you program is supposed to be called as CLI command, you want to make an entry point using setuptools: https://stackoverflow.com/questions/17401381/debianzing-a-python-program-to-get-a-deb

If it's used as a library, you can use the 'import' statement in python to use the code.


Welcome to AskUbuntu! Considering the age of your hardware, I'd recommend staying away from Ubuntu 12.10, which is optimized for newer hardware and typically needs at least 1 GiB of RAM. I'd recommend trying a lighter version of Ubuntu such as Xubuntu, Lubuntu, or Ubuntu 12.04. Lubuntu would probably run best on your computer.

Your problem is most likely a combination of little RAM and a legacy video card.


How do I give root privileges to an app?

You need to use the PolicyKit APIs to request the escalation of privileges. In general, you should only do so when it's absolutely necessary, and not run the application with escalated privileges at all times.

It's worth noting that if you only need root privileges on startup, you can and should start up as root, but then drop to an unprivileged user. If you're operating as a user-facing program, this probably means the user that ran the program; if this means a daemon, like an httpd or sshd, it probably means an incredibly locked-down user that's created specifically for your program to run under.

Also, there are graphical frontends to sudo called gksudo and kdsudo for GNOME and KDE, respectively. If someone recommends that you use these, don't. Be aware that these programs are deprecated in favor of PolicyKit, are not installed by default, and will probably get your app rejected.


Backup Failed: Could not understand duplicity version

Try:

sudo apt-get remove duplicity
sudo apt-get install duplicity

Or run duplicity --version and install the missing packages.


Well, after i removed several services (puppet, virtual box, etc). The solution was to uninstall the metaexploit framework i had installed since a long time ago...


Do Dpkg and apt-get install dependencies?

apt-get or aptitude will install all the dependencies of a package. According to apt-get man page

  All packages required by the
  package(s) specified for installation
  will also be retrieved and installed.

Even if you want to install a package from source you can install its build dependencies using apt-get. Use apt-get build-dep for that purpose. Again from apt-get man page:

  build-dep causes apt-get to
  install/remove packages in an attempt
  to satisfy the build dependencies for
  a source package.

For example if you want to compile gcc you will need all the build dependencies for successfully compiling gcc. So you use sudo apt-get build-dep gcc. This will install  all the packages required to build gcc from source.


Why is the console text sometimes a different color?

When you write something in terminal, it's in white. If you use the ls command for showing the content of a directory, each color represents a specific type of file.

Color of files on 'ls' command:

Executable files: Green
Directory: Blue
Image files(jpg, gif, bmp, png, tif): Magenta
Symbolic links: Cyan
Pipe: Yellow
Socket: Magenta
Orphaned symbolic links: Blinking Bold white with red background
Block device driver: Bold yellow foreground, with black background
Missing links along with files they point to: Blinking Bold white with red background
Archives or compressed files(like tar,gz,zip,rpm): Red

Source


Core 18: NetworkManager definitions do not support name globbbing

This has been answered in the snapcraft forum: https://forum.snapcraft.io/t/core-18-networkmanager-definitions-do-not-support-name-globbbing/18125


Unable to install .net core ubuntu 14.04

I tried to set it up and it looks like they messed up the latest build. The instruction says to install with:

sudo apt-get install dotnet-dev-1.0.0-preview2.1-003177

However the actual package name is dotnet-dev-1.0.0-preview2-1-003177 (somehow '2.1' changed to '2-1'). Previous package was 2.1, guessing next one will get corrected.

Also check if everything from install instructions is in place.

is /etc/apt/sources.list.d/dotnetdev.list present and contains correct entries?
run lsb_release -a just to make sure the vm is 14.04
make sure you've run sudo apt-get update - see if it doesn't complain/ignore dot net repo.

If it's all ok, try searching for .net package, maybe the name got changed, e.g. with: apt-cache search dotnet


Error "failed to mount /etc/fstab" at startup after attempting to add an HDD to fstab

After much help from others and little bit or work, my problem has finally been resolved, no thanks to my limited computer skills.

However, the answer was quite a bit different than I thought it would be.  The root of the error was that my /etc/fstab file was encoded in UTF-8, which is how gedit saved the file, and it needed to be in ASCII.  Although I'm sure more experienced Linux users know a way to convert the one to the other, I couldn't seem to make it work right.
Instead, I took @steeldriver's advice and decided to re-make my fstab file completely.

Fortunately, I had a near-entire back-up of the original file, so the details of writing it were not a problem.  The steps I took were: Booted from live Ubuntu DVD> mounted my original root drive> created a new folder and file in the /etc folder using terminal> pasted fstab entries into the new file using sudo nano to edit in the terminal> moved that file into /etc> deleted original fstab file> and renamed the new file as fstab to replace the original.
I then rebooted without the live DVD and everything started normally, with no errors.
I'm sure there are better ways out there to do this, but this just happened to be what worked in my situation.

Thanks again to everyone who helped me with this problem.  It's so good to be able to use my computer normally again.

-Kaleb


I found the solution here:
How do I fix DNS resolving which doesn't work after upgrading to Ubuntu 13.10 (Saucy)

LAN was back after this:
sudo dpkg-reconfigure resolvconf
In order to get the WiFi back I needed to:
sudo systemctl restart NetworkManager

Thanks for help.


17.10 / 18.04.TLS .desktop files are no longer trusted

I found my desktop files being mentioned in a binary file called ~/.local/share/gvfs-metadata/home which I could not edit. However, after some digging, I found the gio command. Run the following command followed by doing a refresh in nautilus

gio set yourfile.desktop "metadata::trusted" yes


While installing Ubuntu I used replace Windows with Ubuntu option. Did it delete my private data?

I am sorry to say but yes, the D:, E: and any other letter assigned partitions are gone. The option mentions what it will do:

This will delete all of your Windows 7 programs, documents, photos, music and any other files.

And it will leave you with a hard drive partitioned in 2 pieces, the root / partition and the swap.

What you need to do quickly is, without using the partition (Or at least not using it even further) is to burn the Ubuntu image on a pen drive. Preferably do this on an other computer), run it from there on the PC you want to recover those deleted partitions from and install testdisk. After installing, run it from the terminal:

sudo testdisk

Now tell it to try to recover the partitions. If it succeeds, your Ubuntu partitions will be lost and the Windows partitions will be recovered.

Note that after a testdisk recovery you will not be able to boot Windows or Ubuntu from the drive but you may be able to recover most (but probably not all) of your data from successfully recovered partition.


Syncing a folder on computer with external drive

Try luckyBackup from the software center.


How to SCP a file(s) from Ubuntu Virtual Machine to Remote Web host?

The correct syntax would be something like this:

scp -P 234 -r ~/local/directory remoteusername@remotehost.com:/remote/directory

The code you've shown tries to copy files from your local machine accessed via localhost to your local machine accessed directly

UPDATE: If you're trying to issue the scp command from an ssh session on the remote host to copy files back to your virtualbox Ubuntu, then I'm afraid it's not impossible in most cases - i.e. most likely the virtualbox Ubuntu instance can't be connected to from the outside world unless you did some setup (i.e. set up a bridged adapter in your host OS, configured port forwarding on the modem etc.). Moreover, the IP address you're trying to use - 127.0.0.1 - is a "local loopback" address and is only accessible from the same machine. I.e. when you run the command on the server, this IP refers to the server.

So I'm still suggesting you to use the syntax I showed above - just keep in mind that "local" in the command means "the machine on which you have a terminal session open", not the physical machine you're sitting at.

Example: if you wan to copy  a file from one server to another:

# copy a file from local machine to server1.com
user@local-machine# scp ./somefile.txt user1@server1.com:/home/user2

# copy a file from server1.com to server2.com
user@local-machine# ssh user1@server1.com
user1@server1# scp ./somefile.txt user2@server2.com:/home/user2
user@server1# logout

# copy a file from server2.com to server1.com
user@local-machine# ssh user2@server2.com
user2@server2# ls
    somefile.txt    otherfile.txt
user2@server2# scp ./otherfile.txt user1@server1.com:/home/user1
user2@server2# logout

# can't copy a file TO local-machine because it's not accessible from internet


Problem with partitions after reinstallment

I see that there is an NTFS partition. If you see two disks and you have only one disk that means there is a partitioning problem on the OS just sees it like that. Anyway, the NTFS partition means that there is Windows 10 or the partition has at least part of it. Either way, try booting up to Windows 10. Go to the boot menu in your system. If Windows 10 is there, you haven't deleted it. Or else if it's not there, you've deleted the partition (or Windows 10 is corrupt or having a problem.)

From my view, you have a laptop and there is a partitioning error seen by the OS you are using or there is a HDD error in the disk. Little information is found about this problem. /dev/sdb means there is a second disk. If this is an error, I don't think you can fix it unless you reformat the hard disk (or any other storage device) and reinstall Windows 10 and Ubuntu 14.04. (If you decide to do this, make sure to do a complete backup.) Another solution is to get another HDD/SSD and reinstall Windows 10 and Ubuntu.

GParted can help you to reformat the disk. Make sure to burn it to a CD or make a bootable flash drive with it. Some suggested software is Etcher and GNOME disks (Sometimes GNOME disks comes with your Ubuntu installation, or you have to install it via command line.) Then boot it up on your computer.

Alternately (and risky,) if the same error happens, you reinstall Ubuntu (I know you have installed it 2 times,) from CD or USB (Do not use Reset Ubuntu 14.04 to Factory settings in GRUB) and during the installation, choose Something else and select the Linux partition and wipe it out. During the process Windows 10 may become unbootable, but if you want to take the risk, do it.

Make both partitions LVM (Logical Volume Manager) partitions (I mean sda and sdb.) Then they may merge together and make one disk: sda. See this link: How To Merge Multiple Hard Drives- Unix And Linux. Once you've done this, if Windows does not boot up, reinstall Windows. I hope you did a backup before doing all this. If this helped, let me know.

-Linuhackz


Firefox Crashes at launch on 17.10 (Lubuntu and Xubuntu)

Athlon XP doesn't support the SSE2 instruction set.  Firefox made SSE2 mandatory after v48.0.2. You would think the install would detect the processor type and inform the user before aborting and the latest compatible browsers for these older processors would be offered in the repositories, but No. The only Firefox in the repository is a later version that won't run on Pentium III and Athlon XP. You have to download v48.0.2 from somewhere.  Chrome doesn't work, either. So your only clue is a crash during install or 1st run.


To remove the folder, open a terminal and enter the command
sudo rm -rf /path/to/folder

Then type your password, followed by enter
Here path/to/folder may be /home/timeshift or just /timeshift. Correctly check the path before you enter the command.
To find all the timeshift files (which are outside /home/timeshift), enter the command locate timeshift, and it would show the locations of all files/folders having the name timeshift. Then you can remove them (one by one if the number of such folders is not large, or with a bash script, if there are too many folders).


My desktop icons are sorted when i log on

My best guess is, that your ~/.config/nautilus folder and/or some of its content is owned by root, from when you ran sudo nautilus.
If I'm right, you can solve this issue by running in a terminal of some sort:

sudo chown -R yourusername: ~/.config/nautilus


Can't upgrade to latest Ubuntu version due to corruption in Python 3's symlink

Open the terminal and type:
sudo apt-get install --reinstall python3-all
sudo apt purge python3.8
sudo apt-get install --reinstall update-manager
sudo apt update


Remove kubuntu-desktop package and revert associated changes from Ubuntu 17.10

use tasksel to remove kubuntu-desktop and KDE then use tasksel to install your favourite desktop. Install tasksel using sudo apt install tasksel if not already installed.


Is there a command to list all users? Also to add, delete, modify users, in the terminal?

To list

To list all local users you can use:

cut -d: -f1 /etc/passwd

To list all users capable of authenticating (in some way), including non-local, see this reply.

Some more useful user-management commands (also limited to local users):

To add

To add a new user you can use:

sudo adduser new_username

or:

sudo useradd new_username

See also: What is the difference between adduser and useradd?

To remove/delete

To remove/delete a user, first you can use:

sudo userdel username

Then you may want to delete the home directory for the deleted user account :

sudo rm -r /home/username

Please use with caution the above command!

To modify

To modify the username of a user:

usermod -l new_username old_username

To change the password for a user:

sudo passwd username

To change the shell for a user:

sudo chsh username

To change the details for a user (for example real name):

sudo chfn username

To add a user to the sudo group:

adduser username sudo

or

usermod -aG sudo username

And, of course, see also: man adduser, man useradd, man userdel... and so on.


How to take screenshots with shutter while editor is open?

If you want a screenshot of terminal only then you can try this (I am not sure you are looking for this). You can run this command from a separate terminal and get the screenshot of your main terminal.

import -windows    "<title_of_terminal>"     filename.png

Generated image file will be saved under your home as : ~/home/filename.png
PS-You can rename the terminal before using this for easy use. Don't forget the quotes for terminal title.

Also, you can check pre-assigned shortcuts for screenshots here and try:

Settings > Keyboard > 'Shortcut' tab > 'Screenshot' menu item

Good luck.


You cannot convert only a part of the device to GPT because changing to GPT affects the partition table, which is on the very start of the drive.

It is different than MBR, so either you use MBR OR you use GPT, but not both.

Also using GPT you can boot using UEFI, MBR is intended for use with BIOS.

So, best is to directly convert the whole drive to GPT.

Look at this good topic to convert from MBR to GPT: How can I change/convert a Ubuntu MBR drive to a GPT, and make Ubuntu boot from EFI?

EDIT:

Also check if all partitions are umounted, for this, use the command mount on terminal to find out. Everything you find with /dev/sda you should unmount using umount /dev/sdaX (instead of X the desired partition, e. g. /dev/sda2), of course in root mode, either using su or prepended sudo.

For creating partitions etc. use gparted which you can install using sudo apt-get install gparted, and start with gparted or gksu gparted.


"Unable to access "Micro SD Card" - Not authorized to perform this operation

Crouton runs in a Chroot environment as a guest OS to Chrome OS. Because of this, it is not allowed to mount or unmount devices (since it is not the main OS). You need to mount it in Chrome OS, then it will be accessible in your Chroot. I know this because I used to be a Crouton user, though I don't use it anymore since I have moved to a dual-boot (which to be frank is better is every way because you don't experience permission denied errors like this).


What version of ubuntu is to be installed in dell-mini-10?

This has already been answered in the comments by mike:

You can try Xubuntu or Lubuntu, also, 12.04 with unity-2d should run well.


Do I need to create a partition to install Ubuntu inside Windows?

Installing Ubuntu with Wubi, the Windows installer, does not involve creating any partitions or modifying your existing partition layout in any way. This is one of its advantages, though if you want to use Ubuntu a lot or as your primary system, you might consider doing a standard installation alongside your Windows system (which does require repartitioning, though the installer can do it automatically for you).

See the official Wubi installation instructions for more information about how Wubi works, how it gives you an Ubuntu installation without needing repartitioning, and how to install it.


Banshee's option to "Sort an artist's albums by year, not title" currently affects the sort order in only the full track list. This option does not affect the order of albums in the album list (the grid with all the album covers). This has caused quite a bit of confusion -- see Bug 544758 and its 5 duplicates.

If, however, you mean that turning on that option doesn't change the sort order anywhere -- even in the full track list -- then that is definitely a bug, and you should report it.


Will wine get intergration into Unity Dash? And if so, how?

The answer, bluntly, is "No, unless Mark gives me a job."

I've had designs for better integrating Wine with Ubuntu for some time, however progress has been slow as it's an awful lot of time and most of my day is spent doing "real work" and the day to day tasks of package maintenance.  You can see some of this such as integrating Wine into Software Center (might not be finished by Natty), or the better Wine integration specs.

It would be neat to use things like the Unity Places API to make Wine really slick, but at the moment I barely have enough time to make sure things aren't horribly broken.


REMMINA - White screen until I press CTRL+T - Ubuntu 14.04

The latest edition of Remmina fixes this issue (along with many others such as NUM lock not "following" you). Here are the three lines of code to upgrade to Remmina 1.2.0:

sudo apt-add-repository ppa:remmina-ppa-team/remmina-next

sudo apt-get update

sudo apt-get install remmina remmina-plugin-rdp


I get snap error when i try to installl chromium-browser

i'm thinking that you have something in background that is preventing that you install the package

run $ snap changes

you will get something similar to this, you should search on any doing/ongoing process so you can abort it

ID Estate Generated Ready Description
10 Doing  when            installing snap "chromium"

Now you will grab that Doing process ID and you just type this, 10 is my process you will get a different one.
With this command, you will abort the process so you can generate a new one hopefully without any trouble

$ sudo snap abort 10


Pulseaudio/ALSA/Kodi audio passthrough on 20.04

I can't answer your question exactly but I have a similar setup but running Pulseaudio with audio passthrough (DD & DTS) working fine on Kodi 18.6, I did not have to adjust or disable Pulseaudio. This is with 19.10 though as I have not yet upgraded my Kodi server to 20.04

But you could perhaps try this way on 20.04? My settings anyway in case they are of any help:

I installed Pulsaudio volume control GUI then within that:

Configuration Tab: I Chose profile "Digital Stereo (HDMI) Output" NOT any of the surround options.

Output Devices Tab: Click on Advanced and select all the encoding options your receiver supports.

Then in Kodi:

Settings - Player - Videos: Ensure "Sync playback to display" is DISABLED.

Settings - System - Audio:

Audio output device: "Default, Default Output Device (PULSEAUDIO)"

Number of channels: "5.1" (in my case)

Output configuration: "Best match"

Allow passthrough: Enabled
And the relevant "capable reciever" settings enabled too.


is there a way to find out the status of that usb port?
is there a way to enable it through Ubuntu?

This will list usb devices:
for device in $(ls /sys/bus/usb/devices/*/product); do echo $device; cat $device;done

Example:
/sys/bus/usb/devices/1-6/product
HP Wide Vision HD Camera
/sys/bus/usb/devices/usb1/product
xHCI Host Controller
/sys/bus/usb/devices/usb2/product
xHCI Host Controller

If the device is in there take note of the digits and do (assuming 1-6):
sudo -i
echo '1-6' | sudo tee /sys/bus/usb/drivers/usb/bind

and that enables it from inside Ubuntu

Would installing a vm of windows - could i renable the usb port there?

No

or i have to install proper windows on my computer?

That could do it. But before you do that: have a look at your BIOS. That is the only place something you changed from within Windows that can remain active when you remove Windows. Look for "Legacy USB Support". If unsure please edit the question and add bios name and version number.


How to stock all files with the same suffix into a table?

This is fairly straightforward with recent versions of bash by using globbing and arrays, which is what I assume you mean by tables.
First create some test files:
path=/some/where
touch $path/{a,b,c}_suffix.txt

Here is an example that puts all files ending in _suffix.txt into the files array:
files=("$path"/*_suffix.txt)

To iterate over them you can do something like this:
for file in "${files[@]}"; do
  echo "$file"
done

Or:
for i in ${!files[@]}; do
  echo "${files[i]}"
done

Note, filenames with spaces and newlines in them will cause problems with this approach. In that case you are better of with a find  and -print0 loop, see this answer for an example and this write-up for details.
Edit
As noted by muru, the whitespace problem may not be as problematic as it used to be, YMMV.


I am running a handful of Ubuntu 14.10 servers and desktops on ESXi 5.5 with no issues.


The @boot cron job is really hit and miss. Using systemd would be a consistent way to have this task performed. However, I believe “unattended upgrades” are what you’re looking for. This will have security updates automatically installed for you, no reboot required. This will leave your other installed software intact.
sudo apt install unattended-upgrades

Then:
sudo dpkg-reconfigure -plow unattended-upgrades

You can test it afterwards with:
sudo unattended-upgrades --dry-run


Based on this ServerFault answer Send bash -x output to logfile without interupting standard output, modern versions of bash include a BASH_XTRACEFD specifically for specifying an alternate file descriptor for the output of set -x

So for example you can do

#!/bin/bash

exec 19>logfile
BASH_XTRACEFD=19

set -x
command1
command2
...

to send the output of set -x to file logfile while preserving regular standard output and standard error streams for the following commands.

Note the use of fd 19 is arbitrary - it just needs to be an available descriptor (i.e. not 0, 1, 2 or another number that you have already allocated).


PuTTY: unable to load font in ubuntu 20.04

I got the same problem today. So I tried to change the font, which you can see on left middle side of putty. Go to Fonts and change it for  "Font use for ordinary text", set it according to your choice. I set it to "UBUNTU MONO". It worked.


What juju charm hooks are available and what does each one do?

The documentation for all available hooks is available here:

https://jujucharms.com/docs/stable/authors-charm-hooks

The basic lifecycle (install, start, stop) and relation hooks are documented under charms. Relation hooks are defined for every relation a charm defines in its metadata.

Beyond those there are two other hooks of interest, the 'upgrade-charm' hook, which is called when a service's charm is upgraded for each of its service units.

The other is the 'config-changed' hook, called when a charm which defines a service configuration schema has its configuration changed, since services can be deployed with configuration data, the config-changed hook is also invoked upon the initial deploy of a unit prior to starting it.

all hooks are optional.


Would it be safe to install the 11.10 Unity version in 11.04 after adding the GNOME 3 PPA?

While this might be possible, I would suggest that you rather just upgrade to 11.10. It would not be worth the trouble (and risk of breakage) to compile Unity 4.x on 11.04, while also trying to upgrade to GNOME3 (which will itself make your 11.04 system much closer to instability).


I failed to safely eject my USB drive and data became invisible… how do I get it back?

It's probably because the USB's FAT32 filesystem has the "Dirty" bit set.

To check:

Unplug the USB drive.
Wait 15 seconds.
Insert the USB drive.
Wait 15 seconds.
Issue the dmesg command, and read the last several lines. If the "Dirty" bit is set, you'll see a line similar (YMMV) to

FAT-fs (sdc): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

If this is the case, the run fsck step will be:

sudo fsck.vfat -w -y /dev/sdX

(replace /dev/sdX with your disk, and read man fsck.vfat)

When the fsck.vfat has finished, remove and re-insert the USB drive.

If Volume was not properly unmounted. Some data may be corrupt. Please run fsck. is not seen in the dmesg output, but it blathers on about Mount on Windows, run chkdsk then the above answer does not apply, and you must mount it on Windows.


Headset microphone not working, Acer Aspire ES1-572, Ubuntu 20.04

Have you tried putting your code in /alsa-base.conf?
Have you tried checking all your sound card pins viA hdajackretask specifically configuring port 0x19 to microphone?


Problems with Qualcomm Atheros AR9285 Wireless Network Adapter on HP ProBook 4330s on Ubuntu 18.04.3 LTS

Your adapter is blocked by rfkill. On HP laptops this happens. These are the steps to fix it:

Make sure there is no hardware wireless switch on your laptop and turn it on if it exists.
Check BIOS for wireless options and enable it. Try to reset BIOS to defaults if you don't have a wireless option.
If nothing helps, blacklist the HP platform driver by running in a terminal:

sudo tee /etc/modprobe.d/blacklist-hp.conf <<< "blacklist hp_wmi"

and reboot.


Remote control direction keys repeat twice in MythTV

I had a similar problem with a windows media center remote. X was picking up the
remote as well as mythtv.

If you are having the same problem, you have two choices:

1) Tell X to ignore your remote control.

2) Remove the arrow keys from the lirc mapping for mythtv so that X controls the arrow keys and lirc controls the rest.

Unfortunately, I've forgotten the setting to do (1). Hopefully someone else will be able to guide you further.


keybinding issues with xmodmap across synergy

So it seems synergy and xmodmap don't play nice. However, I could accomplish the same goal by using

setxkbmap -option ctrl:swapcaps

Which is now making my control key work across both machines.


Environment variables when run with 'sudo'

Environment variables can be simply passed after sudo in form ENV=VALUE and thay'll be accepted by followed command. It's not known to me if there are restrictions to this usage, so my example problem can be solved with:

sudo LD_LIBRARY_PATH=/opt/intel/mkl/lib/ia32:$LD_LIBRARY_PATH LD_PRELOAD=/opt/intel/mkl/lib/ia32/libmkl_core.so python -c "import numpy"


Comment, Uncomment, change setting based on string, add line from terminal

Making many changes all at once

Take the original file and save it as sshd_config.orig.
Edit sshd_config to your heart's content.
Run

diff sshd_config.orig sshd_config >config.patch

Keep the config.patch file somewhere safe.

Now, anytime that you have a new and unedited version of sshd_config and you want to apply the same edits, run:

patch sshd_config /path/to/config.patch

This will apply the same edits to the new file or warn you if there is some inconsistency that it cannot resolve without your help.

Making individual changes

Unix also has powerful command line tools, no editor required, for making changes to files.

Using sed, for example:

sed -i.bak 's/IgnoreRhosts yes/IgnoreRhosts no/' sshd_config

Or, performing the same change with GNU awk:

gawk -i inplace '$1=="IgnoreRhosts" {$2="no"} 1' sshd_config

The patch approach makes it easy to make many changes at once.  For smaller numbers of changes, sed and awk excel.  To learn more about sed, see, for example, this tutorial.  To learn more about awk, see, for example, this tutorial.


Don't really want a Web Dev version of Ubuntu

Ubuntu Studio is just tuned more for multimedia editing and stuff, if you need a development platform for web dev or similar, you're better off starting from scratch.

Format your Ubuntu partitions, and then install normal Ubuntu, and install web development software, or whatever software you need, as you need it.

(answer shamelessly stolen from @Rinzwind's comments on the question :P)


how to disable wildcard subdomain in ubuntu 18.04 for localhost

.localhost is a Top-level domain - reserved domain, so foo.localhost or bar.localhost, etc. always resolve to the same ip, 127.0.0.1, which in this case is used for Xampp.


How can I move all java source files to their respective package directory?

#Loop through the java files
for f in *.java; do

    # Get the package name (com.pkgX)
    package=$(grep -m 1 -Po "(?<=^package )[^; ]*" "$f")

    # Replace . with / and add src/ at the beginning
    target_folder="src/${package//./\/}"

    # Create the target folder
    mkdir -p "$target_folder"

    # move the file to the target folder
    mv "$f" "$target_folder"

done


How to automatically empty trash periodically?

Looking at the project sources and README.md up on Github, you'll read that in order to run this Python script regularly, you can either:

Create a crontab entry with some regular interval (e.g., @daily /usr/bin/autotrash -d 30)
Add it to the Startup Application program so autotrash can run every time you boot your system.

For additional configuration details, refer to the Ubuntu Manpage for autotrash.


Change between bash and zsh via terminal profiles

Per @steeldriver, "File --> Open Terminal" lets you open a new terminal with the specified profile, which works. Thanks!


Ubuntu 19.10 - Backup doesn't work after upgrade

Same problem here...

Installing the snap instead seems to work: snap install deja-dup --classic


More efficient way to find content of files within millions of files

You can test something like

time head -12 <(yes "1") | xargs -n1 -P4 sleep

This will run 12 sleep 1 commands, 4 parallel. The command will take 3 seconds.
In your case:

find . -type f -name "^FR_ghi*" | xargs -n1 -P4 grep -l TEXT

I do not know how many CPU threads you have, perhaps -P8 is also possible.
When the commands are I/O bounded, this might be of little help. In that case it might be interesting to store all xml files in gzipped format and use zgrep.


How to configure a conceptronic (C100S8) switch for Maas?

I contacted the seller, Conceptronic, and they said this specific device is a dump switch and cannot have the protocol changed or tweaked.


This issue has been answered at: http://ubuntuforums.org/showthread.php?t=2190818
What probably happened is for some reason when you did 'sudo startx' the file owner for the '~/Xauthority' and '~/.ICEauthority' hidden files  changed to root. These files are required as being writable by your login screen program - the display manager - under your user. So its probably that, when you login, your DM is unable to write changes to the files, it therefore does not proceed to the desktop screen.
Here's what you can try:

1. log in to a text console via one of the virtual terminals
   (Ctrl-Alt-F1 thru F6).

2. check the ownership on your ~/.Xauthority and ~/.ICEauthority files
   by running the following command:
    $: ls -l ~/.{ICE,X}authority

3. If the ownership of either one of them is owned by root instead of your user,
   change it back to your_user by running the command:
    $: sudo chown <your_user>:<your_user> ~/.Xauthority
    OR
    $: sudo chown <your_user>:<your_user> ~/.ICEauthority
   where <your_user> is replaced by your actual username.

4. Try, loggin in from (Ctrl+Alt+F7) now, it should work.
   But if it does not still work,
   then go to one of your virtual terminals (Ctrl-Alt-F1 thru F6)
   and delete the files by running:

    $: rm -f ~/.Xauthority
    $: rm -f ~/.ICEauthority

   These files get regenerated as required.

I Hope this Helps.


How do I (manually) install the Java plugin in Firefox 4

If you run the Oracle Java standalone installer (.bin file), it will just extract the java directory from the archive. It will not create the environment variable JAVA_HOME. It is best if you extract the java archive to a folder such as /usr/java.

Next, find the folder where Firefox is installed. It will have a directory named plugins there. In this directory, create a soft link to the file libnpjp2.so.

On my computer, I did with these commands. It will be different in yours.

cd /usr/lib/firefox-3.6.3/plugins
sudo ln -s /usr/java/jre1.6.0_20/lib/i386/libnpjp2.so  .

After doing this, you can type about:plugins in Firefox to check the plugin availability in the browser.


Can "startup applications" be less cumbersome?

First I saw this tip, but sleep 20;xscreensaver -nosplash seems not to work anymore on Ubuntu 14.04.

So I coded this script execLater.sh and put it at a place in my $PATH, chowned it root:root and mode permissions rwxr-xr-x, and put it on a fully root:root folder structure like /usr/local/bin.

sleep $1;shift;"$@"

So it sleeps before executing the command.

Show all hidden startup applications by following this tip

Now for each startup application.

If there is, for example, this:

xscreensaver -nosplash

change to this below, where "20" is the delay; I used up to "60" knowing I dont care much for some applications; and a minimum of "5" for the ones I care most.

execLater.sh 20 xscreensaver -nosplash

The tricky part

each of these below must have an exclusive delay of "1" because everything else depends on them

/usr/bin/gnome-keyring-daemon --start --components=secrets
/usr/bin/gnome-keyring-daemon --start --components=pkcs11
/usr/bin/gnome-keyring-daemon --start --components=gpg
/usr/bin/gnome-keyring-daemon --start --components=ssh
/usr/lib/unity-settings-daemon/unity-fallback-mount-helper
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
gsettings-data-convert
start-pulseaudio-x11
nautilus -n

My guess is, when all 60 apps startup at same time, these above take longer to complete and so the whole desktop stays unavailable...

If you log when each command was executed, you will understand what applications must have delay of "1", because all others are "actually only executed (?)" or "called?" after these; the above list is not fixed, it is just a tip, just logoff and login (no need to reboot to complete this list) so you can make the tests until you are satisfied with the results - now my desktop is available after only 5 seconds :)


If you are using default Ambiance theme you need to edit gtk-widget.css file of your theme. The best way is to copy original theme into your home directory to avoid problems with permissions.

If you don’t have it already create folder .themes in your home directory. Open Files, go to /usr/share/themes and copy folder Ambiance in to ~/.themes folder. Rename the folder eg. Ambiance Modified.
Go to subfolder gtk-3.0 and open the gtk-widget.css file with Gedit. Hit Ctrl+F and enter "tooltip".

You need to replace the code:

background-image: -gtk-gradient (radial, center 0, 0, center 0, 0.8,
from (alpha (mix (@tooltip_bg_color, #ffffff, 0.2), 0.86)),
to (alpha (@tooltip_bg_color, 0.86)));

with the line:

background-color: @tooltip_bg_color;

I’m not very familiar with gtk gradients but something is obviously wrong with them. I replaced the gradients with solid color.

Save the file and apply the modified theme with Unity Tweak Tools.


Help With Dual Boot Ubuntu 14.1 and Windows 8.1

First, the Ubuntu images, when burned to a CD-R, should boot in either BIOS or EFI mode. If by "LiveCD" you actually mean a USB flash drive, you can copy the Ubuntu images directly (as in sudo dd if=imagefile.iso of=/dev/sdc, changing the source and destination as necessary) and it should boot in either BIOS or EFI mode. You can do this from your legacy-mode boot, if necessary. As oldfred says, there are many other Windows and Linux utilities that will help you create a USB flash drive from an Ubuntu image, so even if the "direct" approach doesn't work or is impractical for you, you can try another tool.

Second, you can probably get your existing installation working as follows:

Download the USB flash drive or CD-R version of my rEFInd boot manager.
Prepare a boot medium from said image.
Boot rEFInd. (If you've not already done so, you'll need to disable Secure Boot.) It should show you a menu of boot options, including one or more Linux kernels.
Boot Ubuntu from rEFInd. If you used default Ubuntu options, it should boot right up. If you created a separate /boot partition, though, you'll need to hit F2 or Insert twice and add a root= option pointing to your root filesystem.
In Ubuntu, install any EFI boot loader for Linux that strikes your fancy. Two relatively easy options are:

Install rEFInd by installing the Debian package or using the PPA referred to on the rEFInd downloads page. rEFInd will then become your default boot manager.
Install and run the Boot Repair utility, which should install the EFI version of GRUB over the BIOS version you may already have; or which will (with luck) fix whatever misconfiguration of the EFI version you might be suffering.


How can I downgrade from PHP 7 to PHP 5.6 on Ubuntu 16.04?

Update
Today I got again problem with PHP 7 running despite I have disabled php7.0 apache module: phpinfo was showing php 7 using fastCGI ...
... So if after you follow the below instructions you face this situation, you may need to disable the proxy_fcgi apache module:

sudo a2dismod proxy_fcgi proxy; sudo service apache2 restart

1. Re-Install PHP 5.6

What worked for me was this guide: http://www.lornajane.net/posts/2016/php-7-0-and-5-6-on-ubuntu

Actually is not required to remove php7.0, you can install php5.6 together  ( also because you will have dependency problem with phpmyadmin package that required php7.0)

Assuming libapache2-mod-php is a suitable way to enable PHP in Apache for you, you can proceed in this way:

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-mbstring php7.0-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0

2. Switch PHP version:

From php5.6 to php7.0:

Apache:

sudo a2dismod php5.6 ; sudo a2enmod php7.0 ; sudo service apache2 restart

CLI:

sudo update-alternatives --set php /usr/bin/php7.0

From php7.0 to php5.6:

Apache:

sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart

CLI:

sudo update-alternatives --set php /usr/bin/php5.6


I seem to have deleted all my files while removing the wine from the home directory

rm -rf $HOME/ .wine  I see a space there ... You nuked your home with that.

  Does anyone have a clue how to recover/show my removed/hidden files?

Got a backup? If so use that. Otherwise ...

do NOTHING with that system. N O T H I N G. Any change to that bit of the disk lowers your ability to recover anything from it.
Boot up a Live DVD and install "testdisk" in it.
Run testdisk and have it scan that partition.
Start praying.


You can extract it by running

tar -xvzf ccnx-0.7.0.tar.gzip

in your terminal.

You will find the output in your current directory.

You can type

man tar

for more options and infos about tar


Found some very helpful sites that got me going. The one I found most helpful was on Linux.com (http://archive09.linux.com/feature/128099). I Initially set everything up verbatim as per the example except my system keeps it's config files in /etc/nut (instead of /etc/ups). Also, networkupstools.org (http://www.networkupstools.org/stable-hcl.html) helped me select the correct driver name for my UPS model. After making the necessary changes in the config files I had to use the command service nut start (instead of service ups start) to start the daemon. I found most of the other commands didn't work, however after a restart Nut Monitor now detects the UPS Daemon running and displays it's details!


How do I use tree to show the path to filenames containing a particular string?

Use tree's pattern matching (-P) in combination with --prune:

$ tree
.
├── archlinux-simplyblack
│   ├── angle-down.png
│   ├── archlinux.png
# snip
    ├── reboot.png
    ├── shutdown.png
    └── theme.conf

8 directories, 78 files
$ tree -P 'reboot*' --prune
.
├── maui
│   └── reboot.png
└── maui-dark
    └── reboot.png

2 directories, 2 files

From man tree:

-P pattern
      List  only  those files that match the wild-card pattern.  Note:
      you must  use  the  -a  option  to  also  consider  those  files
      beginning   with  a  dot  `.'   for  matching.   Valid  wildcard
      operators are `*' (any zero or more characters), `?' (any single
      character),   `[...]'   (any  single  character  listed  between
      brackets (optional - (dash) for character range may be used: ex:
      [A-Z]),  and  `[^...]'  (any  single  character  not  listed  in
      brackets) and `|' separates alternate patterns.

--prune
      Makes  tree prune empty directories from the output, useful when
      used in conjunction with -P or -I.  See BUGS AND NOTES below for
      more information on this option.


How to give an applet shutdown privileges?

The easiest way for this without using sudo everytime is giving shutdown command special permissions, so that if the user runs shutdown it will run with root permissions for this do

sudo chmod u+s /sbin/shutdown

now the shutdown command won't need root everytime you issue the command and if you wan't to revert it you can always do

 sudo chmod u-s /sbin/shutdown

and user will need to be root to execute shutdown again.


Question:

Why not use VirtualBox if you want to hold onto Windows? or better yet Why don't you run ESXI inside a Docker container?

Docker would make creation and deletion much faster and there would be less error that might occur.
I would say that this could be a better, safer way to achieve this goal.

You could always go the other route and use Virtualbox and install virtualbox-guest-additions-iso from Oracles website so you could have a more user friendly environment.

Personally I would scrap Windows all together. If I HAD to have windows on my machine I would run ESXI inside of a Docker container. Data backup wouldn't even be necessary(I say that lightly...ALWAYS backup) since you aren't manipulating partitions.


Gconf, Dconf, Gsettings and the relationship between them

Dconf is a data store designed for storing configuration. It is the replacement for Gconf, which was used for the same purpose. Eventually, no programs should depend on Gconf any more.

Gsettings is a development library used to read and write to a configuration store backend. On Linux, it uses Dconf, but on Windows, it uses the registry, and on OS X, it uses a native data store.

Application developers and end-users are recommended to use Gsettings, not Dconf directly.

See also:

What are the differences between gconf and dconf?
Can I use dconf-editor to modify Gconf settings?
GSettingsMigration on gnome.org


Sorry, looks like Banshee can not do this.

I found this topic dated april 9th 2013.


I fear creating a SWAP file is your only option. Your RAM state needs to be held somewhere on the disk while power is off. Maybe you created too small SWAP – it is recommended to have the SWAP space at least as big as your RAM (+ some small reserve). I have Ubuntu 18.10 with 16 GB of RAM and 19 GB of SWAP file and it works well.

Nevertheless, it seems you didn't tell the system it should use SWAP to resume from hibernation. Modify /etc/default/grub (sudoedit /etc/default/grub), edit the line GRUB_CMDLINE_LINUX_DEFAULT and put there parameters resume (with your /dev/ UID of partition having the SWAP file) and resume_offset with the starting value of physical_offset of this swap.

(You'll get this value by checking output of sudo filefrag -v /swapfile | head.)

Finally, reload by sudo update-grub.

For more thorough answer about setting GRUB, see an excellent section Hibernation using a swap file: How can I hibernate on Ubuntu 16.04?

Tell us if you succeeded.


If you just want the script to run as root every 30 minutes, use cron.

Edit the file /etc/crontab to contain the following:

#minute hour    mday    month   wday    user    command
*/30    *       *       *       *       root    some_script.sh


Reverting Sublime Text 2 to a freshly installed state

Try to uninstall and then reinstall it. You may have to purge it to eliminate all config files, but you should be able also to delete them yourself in ~/.config/sublime-text-2/. You can also try to just delete that folder and start sublime again and see what happens.


Note these three lines:

OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.9, 256 bits)
OpenGL version string: 1.4 (2.1 Mesa 17.0.1)

Are you sure you have the proper NVIDIA driver installed? I ask because OpenGL on your system is currently being provided with software fallback. The driver for your GPU and OS is here: http://www.nvidia.com/download/driverResults.aspx/132546/en-us


Press a shortcut again to undo the action?

You may press esc to close the context menu.


How to exchange/remove/overwrite a PDF's background?

To deal with these presentations, I used a few times Sun PDF Import Extension. When installed, you are able to import PDF presentations with OpenOffice.org Impress. Even though the conversion is not 100% smooth, you are able to edit the background and change the color. It may be a bit tedious if you are dealing with lots of slides, but it's the best solution I found for these cases. You should note that everything is converted into Impress' objects.


Why can't I scan from control panel of Canon Pixma TS6220

I don't have that particular model, but for all my Canon printers, that functionality has depended on having Windows software installed "MP Navigator EX".

I just tested this by starting my Windows 7 Virtual Machine which has the software installed. After that, when I pressed the "Scan" button on the printer control panel, a menu came up asking me where I wanted to scan to, USB or PC, and the name of the virtual machine was listed by "PC".  The scan completed normally and was placed into "My Documents" folder in my account on the virtual machine.

When I close the virtual machine and press the "Scan" button, I only get the choice of USB.

Bottom line, it's Windows only.


Order of partitions for root, home and swap with respect to Windows partitions

The only consideration is that the disk tends to be faster near the start, and slower near the end.  The difference isn't likely anything you will notice though.


Strange GTK3 issue with Audacious and Evince (Document Viewer)

I found the problem - it comes from having overlay scrollbars installed. You can remove them through Synaptic or by entering

sudo apt-get remove overlay-scrollbar

EDIT - overlay scrollbars can also be disabled via Unity Tweak Tool. This fixes the GTK3 theme issue without needing to remove the scrollbar package. If you already have removed the scrollbar package, you may need to reinstall it before Unity Tweak Tool will run.


File Permissions on files copied from USB do not match File Permissions of files I create in Ubuntu

Unix-like ownership and permissions are not compatible with fat or ntfs filesytems.  If you need your permissions to stick when copied to another drive, better format it with an ext* type filesystem.  If it's a flash drive, better yet with ext2 to reduce writes to the drive.  The downfall is that it will render the drive unreadable in windows (and unbootable if you use it for instalations).  Another way is to make an archive (.tar.gz) with the file(s) and copy the archive, that way you'll preserve the permissions.


What do I get rid of to install Ubuntu when I have 4 primary partitions?

Disclaimer: always take a current backup of your hard disk prior to playing around with partitions.

  Note1: GParted "records" the actions that we're doing, so it's not actually creating or deleting any partitions until we hit Apply. So, if you mess up before applying, just undo or close and reopen GParted.

  Note2: your screenshot shows a low battery. Ensure that your laptop is plugged into a power source and charging.

Copy all the contents of the Data partition to your C drive, or to an external storage device, because we're going to delete it. You can do this normally in Windows, or you can do this in Live Ubuntu. In Live Ubuntu, if you move your mouse to the bottom of the Launcher on the left, you'll find a couple of hard disk icons. Clicking them will mount and open up the partitions.
In Live Ubuntu, open up GParted. Right click and "Unmount" the partitions if you opened them up (if you followed the previous step).
Right click on sda4 > Delete.
Right click on the now large unallocated > New:

Create as: Extended Partition
Click Add.

Right click on the new unallocated (which is nested under "New Partition") > New:

Create as: Logical Partition (you shouldn't be able to change it anyways.)
File system: ntfs
Label: Data
Free space preceding: 0
New size: 181524

This is 177 GB. You can of course, change it to however big you want your new Data partition to be.

When you click away, the Free space following should fill up automatically.
Click Add.

It should now look like this:

sda1
sda2
sda3
New Partition
      New Partition (Data)       177.27 GB
      unallocated                119 GB

Take a look at your partitions. Cross your fingers. Pray. Take another look. If you're satisfied, click the green check mark in GParted to apply. This shouldn't take too long, maybe 10 minutes maximum...probably take a few seconds =/.
At this point, you can boot back into Windows and copy back your Data stuff, or continue with installing Ubuntu since you're already in Live Ubuntu.

Now, you have an unallocated space that can be used to create new partitions and install Ubuntu.

There are several ways from here to install Ubuntu. I would highly advise this:

Click on the Install Ubuntu to Hard Disk icon in the Launcher on the left (second icon from top).
When presented with options, choose Install Ubuntu alongside Windows 7. This will basically take care of everything. It will detect the free, unallocated space, and install itself there, along with creating an essential partition called swap. It will not touch your other Windows partitions. The only thing that can go wrong here is bootloader stuff, where you might not get a screen to "choose" which OS, and it just boots into Ubuntu or Windows. This can be fixed using Boot-Repair, but I doubt that it'll get to this point.
When it's done, reboot your computer (and don't forget to remove your USB/CD so that you don't boot into Live Ubuntu), and you should be presented with options to choose your OS. At this point, I like to first boot into Windows to make sure that it boots successfully. When it does, shutdown and boot into Ubuntu...and enjoy.


How to write audio track information to the file, using Banshee

In Banshee, choose Edit > Preferences from the menu at the top. In the General tab of the Preferences dialog window, there should be an option named "Sync metadata between library and files".  Make sure this option is checked.

As far as I know, this option won't retroactively update metadata for files that you've previously updated in Banshee, but it will write metadata to the files for any future updates you make.


juju 2.4.1 bootstrap openstack fails : NeutronError unexpected status: 400

Try changing 'domain-name: admin_domain' to 'domain-name: ""' in your ~/.local/share/juju/credentials.yaml file, where the openstack cloud credentials are specified.  This has worked in at least one case.

A bug was created which is specific to this error:
https://bugs.launchpad.net/juju/+bug/1806985


What are Unity's keyboard and mouse shortcuts?

This page will document the keyboard shortcuts and mouse tricks for Unity. Please feel free to add more!
Read this first to get familiar with the UI elements of Unity and to find the right keys on your keyboard:

Unity Terminology
What are the meta, super, and hyper keys?

Keyboard Shortcuts
Holding down the Super key will get you a keyboard overlay that documents most of these.
Launcher

Hold Super - Invoke the Launcher and display the shortcuts

Hold Super, then press 1 or 2 or 3 and so on until 0 to open or focus an application. The number corresponds to the location of the icon on the launcher from top to bottom.

Adding Shift will open a new instance of the application if it's already open.
Holding the key is also useful when you want to get to the Launcher but do not want to invoke the Dash.

Super + T - Open the rubbish bin/trash can.

Alt + F1 - Put keyboard focus on the Launcher, use arrow keys to navigate, Enter launches an application, Right arrow exposes the quicklists if an application has them.

Ctrl + Alt + T - Launch a terminal window.

Dash

Tap Alt - Opens the HUD

Hold Alt - Reveals application menu

Tap Super - Opens the Dash. The open signal is sent when you let go of the key, not when you push it down, so if it feels slow just let go of the key earlier.

Over an item, you can hit the Secondary key (commonly to the left of the right Ctrl) to see a preview of the item, as you can do with a secondary click over it.

Ubuntu 11.10 (Oneiric Ocelot)
 * Tab Move to the next lens (When the dash is open)
 * Shift-Tab Move to the previous lens (when the dash is open)

Ubuntu 12.04+
 * Ctrl-Tab Move to the next lens (When the dash is open)
 * Ctrl-Shift-Tab Move to the previous lens (when the dash is open)

Alt + F2 - Invoke the Dash in a "special mode" to run a command. Typing in a folder name will find that folder in Nautilus, you can also use ~ as a shortcut in the field.
The Dash opens with focus on the search box to find applications and files. Using the arrow keys will navigate the results, use Enter to launch. Hitting Enter twice in rapid succession after a search term will automatically launch the first match in a search, even if it's still ongoing. (Basically a dash version of "I'm feeling lucky").
Super + A - Open Applications lens
Super + F - Open Files & Folders lens
Super + M - Open the music lens
Super + V - Open the video lens

Panel

F10 (11.10 and earlier) / Alt-F10 (12.04 and earlier) - Open the first menu on the panel, use the arrows keys to "scrub" across the menus. (There is no shortcut for the session menu, so hitting F10 and left arrow is a quick way to get there)
Press Esc to close the menus without choosing anything.

Window Management

Ctrl + Super + D - Show desktop; hitting it again restores the windows.
Super + W -  Spread mode, zoom out on all windows in all workspaces, in 12.04 and 12.10 it zooms out on the windows in the current workspace.

In Spread mode of 14.04 ↑ + ↓ + ← + → navigates through windows, Alt + F4 closes selected window, typing any text filters windows (for example typing "terminal" leaves only terminal windows), Enter restores selected window, Esc exits Spread mode

Super-D - Minimize all windows; hitting it again restores them.
Alt + Space - Opens the window's accessibility menu.
Alt + Tab - Switch to other applications, you can hold Alt down and then hit tab to switch to the next application.
Alt + ` - Switch between an application's windows. Hitting this combo when you're already focused on an application will automatically switch only between the windows for that application. The ` key on US layouts, but Unity will use whichever key is above your Tab key. (More information) (Video)
Ctrl + Super + ↑ - Maximize the current window
Ctrl + Super + ↓ - Restore/Minimize the current window (seems to be buggy at the moment)
Ctrl + Super + ← - Maximize current window to the left
Ctrl + Super + → - Maximize current window to the right

Window Placement
If you cycle through the same key Unity will cycle through different placement widths, so experiment by hitting the numkey multiple times, for example Ctrl + Alt + numpad 5 +  5 + 5:

Ctrl-Alt + Numpad 7 - Place window in top left corner of screen.
Ctrl-Alt + Numpad 8 - Place window in top half of screen.
Ctrl-Alt + Numpad 9 - Place window in top right corner of screen.
Ctrl-Alt + Numpad 5 - Center/Maximize the window in the middle of the screen. In 12.04 this toggles between maximize and restore state
Ctrl-Alt + Numpad 1 - Place window in the bottom left corner of the screen.
Ctrl-Alt + Numpad 2 - Place window in the bottom half of the screen.
Ctrl-Alt + Numpad 3 - Place window in the bottom right corner of the screen.
Ctrl-Alt + Numpad 0 - Minimize the current window (Ubuntu 12.04.1).

Workspace Management

Super + S - Expo mode (for everything), zooms out on all the workspaces and lets you manage windows.
Shift + Alt + ↑ - Expo mode for all windows in the current workspace only.
Ctrl + Alt + ← / → / ↑ / ↓ - (11.10+) - Change to a new workspace.
Ctrl + Alt + Shift + ← / → / ↑ / ↓ - Place window to a new workspace.
Ctrl + Alt + L - Lock the screen.

Screenshots

PrtScn - Take a screenshot of the current workspace
Alt + PrtScn - Take a screenshot of the current window
Shift + PrtScn - Take a screenshot of a region traced by the mouse (shows crosshairs)

System

Ctrl + Alt + Del - Logout

Mouse Tricks
Launcher

Clicking and holding an icon and then dragging it around will allow you to reorder it on the launcher. You can also drag it off to the right of the launcher to move it around. Note that you need to make an explicit movement to the right to move the icon off the launcher before you can move it around.
Dragging and dropping an icon into the trash can will remove it from the Launcher. The program itself will remain installed and accessible through the dash.
Scrolling the mouse wheel while over the Launcher scrolls the icons if you have too many and need to move around quickly.

Window Management

Maximizing - Dragging a window to the top panel, or double-clicking a window's titlebar, or Alt + F10 (11.10 and earlier), will maximize it.
Restore - There are two ways to restore, or unmaximize, the topmost maximized window of the current monitor for this workspace (not using the window controls)

Double clicking on the top panel (but not in the application's menu)
Dragging the top panel down.

Middle click on Maximize - Maximize window vertically.
Right click on Maximize - Maximize window horizontally
Focus the topmost maximized window of the current monitor for this workspace: Left click on the top panel (but not in the application's menu)
Tiling - Dragging a window to the left/right border will auto tile it to that side of the screen.
Middle click on an application's launcher icon - Open a new instance of the application in a new window. If the application isn't running it will just open it normally.
Middle click on the top panel or window title bar (but not the menu) - send the current window behind all other windows.
Alt-Left drag inside a window - move the window
Alt-Middle drag inside a window close to its border - resize the window
Alt-Right click inside a window - window accessibility menu


Twitter online accounts, is authorized and then it needs to be authorized again

I have had this happen with other IM accounts including on Ubuntu. Totally delete the account from your Ubuntu IM (Pidgin, whatever) and create a new occurrence of the same account. See if that makes a difference.


You can't get 5.1 surround through SPDIF as its only supported on PCM encoding, and PCM only support stereo up to 24bit/192khz.

AC3 and DTS encoding support surround, this post should solve your problem (theoretically), as in installs an AC3 plugin that should allow you to play 5.1 surround through SPDIF.

https://help.ubuntu.com/community/DigitalAC-3Pulseaudio

In lot of cases your would require to always keep pavucontrol up. That's right - Just don't close it.

Select one of the two Digital Surround 5.1 profile options (one includes Analog input) under the built-in audio section under the configuration tab of pavucontrol then DON'T CLOSE that app, you will get working 5.1 audio in all other programs.

If you close it, you won't get the surround sound.

One last tip, don't use youtube for surround testing, it doesn't support it, use this link, u'll download a test video file that works really well.

http://www.tfm.ro/win32-projects/test-avi-ac3/


I can send files to other users using hexchat (inc myself), I suspect it's possible using any IRC client (which is a chat program), but 'chat' is a very wide area & I think your question is more related to protocols.

Note: sending files in IRC will reveal my real IP address nullifying my Ubuntu cloak, so there are costs to it that may matter

In hexchat I right click the user I want to send a file to, a menu appears and I select "Send file". It's not difficult (as easy as opening a private chat with that person, in fact send file is just below Open dialog.. option).

The md5sum of the file is sent along with meta data of the file... The end-user has to ACCEPT before the file is sent (which I think is good!).  If the other user doesn't accept in a certain time, timeout occurs & send is aborted.

I just sent a file from this my primary workstation to another box using a 'live' Ubuntu system (a QA-test that happened to be nearby; ie. to a system that wasn't even installed).  This is not really a feature of hexchat, but more the protocol used by IRC.

I use hexchat as example as it's my primary client


accidentally I did remove these files (lesspipe and sh) how can re-back them again?

To get lesspipe back you have to reinstall its package:
sudo apt-get install --reinstall less


Unable to delete USB Drive partitions (Block size error)

The problem you are describing was caused by a low-level device tool (like dd) writing blocks at the wrong size directly onto the device.

To fix this, you need to re-write the device blocks to the appropriate size.  This can be done with dd.
Double check your output device before running the command

sudo dd if=/dev/zero of=/dev/sdd bs=2048 count=32

Once the dd command is done, you should be able to access your device through gparted.


Not sure how well-maintained this site is, but you can check out the list of supported UVC devices here. This site was referred by the Ubuntu Community Help Wiki on webcams.


Ubuntu not booting properly after upgrade from 14.04 to 16.04

Having just solved (with the help of this other discussion) what looks like the same issue, here's what I did from the terminal:

wget http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libstdc++6_5.4.0-6ubuntu1~16.04.1_amd64.deb

sudo dpkg -i libstdc++6_5.4.0-6ubuntu1~16.04.1_amd64.deb

then reboot and everything should be fine (at least it was for me so fingers crossed).


I have sucessfully installed, printed and scanned the brother mfc240c since 8.04, I have found it to work perfectly in 12.04...please make sure to install the correct drivers that can be found here ...http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html


Can I connect to running autostart python script?

"Connecting" to a script usually means your program is listening to a socket and you want to connect to that socket.

I guess you mean how to replace the script which is running in the background.

The simplest way is to kill the process and restart the new version to be run in the background from a terminal:

nohup python your_script.py &


xrdp not working on XUBUNTU 18.04, getting VNC error 1 after security negotiation

Since moving my test system to Ubuntu 20.04, I have found there is a change in XRDP or something related.  Through Ubuntu 16, it was possible for multiple systems to be logged into the same Ubuntu user ID at the same time.  That appears no longer to work.  Even if you think you no one else is logged in - remember, the console of the system itself is a GUI session and is logged in on that ID.  I am able to get around the problem by logging off the GUI session of the console.  This work-around was discovered when I had success using xrdp on any ID except the primary ID of the new Ubunto 20.04 system.


How to change the keyboard-layout in the console, with special characters?

Install package console-common, then use commands install-keymap to install a default keymap from a .kmap file, or loadkeys to switch between layouts. Use man on these commands for more info.


After trying many compiz config tweaks found under other answers, I looked at dmesg and found the following:

[ 36.361815] [drm] Wrong MCH_SSKPD value: 0x16040307
[ 36.361818] [drm] This can cause pipe underruns and display issues.
[ 36.361819] [drm] Please upgrade your BIOS to fix this. –

Looking at Lenovo's site: Lenovo support for T420 There was a bios upgrade available for my machine released on the 17th of July, 2013. After running this update, the video works as in 13.04.


See this post which explains how to update 14.04 to latest Cinnamon: http://linuxg.net/cinnamon-2-2-has-been-released-how-to-install-cinnamon-2-2-on-ubuntu-14-04-trusty-tahr/


How can I see a representation of a non-fast-forward Git update?

You can use the following tools to visualize and compare the repos:

git log --graph

You can use the git command line:

git log --graph --oneline --all --decorate

From the man page: "Draw a text-based graphical representation of the commit history on the left hand side of the output. This may cause extra lines to be printed in between commits, in order for the graph history to be drawn properly."

See Viewing the Commit History for an example (you'll have to scroll down quite a bit).

gitk

You can use the gitk GUI:

git fetch origin # make sure you are up-to-date
gitk branchname origin/branchname # launch gitk

Using this command you can see how the local and remote branch have diverged.

Other tools

Other GUI tools may have similar visualization options. See rob mayoff's answer to "What does it mean that a Git push can not be fast foward merged?" for an example of what you might see.

Non-fast-forward

All these tools were mentioned while investigating why git pull says up-to-date but git push rejects non-fast forward on StackOverflow. Answers include tips on resolving the non-fast-forward without forcing. (A common reason is having a local branch with the same name as a remote one - for example, having both a local and remote branch named origin/new-feature instead of having the local branch named just new-feature.)


Can Ubuntu have any labview equivalent open source software?

OpenLab is quite a good option. It is German but you can choose English in the program.

Extract the downloaded file and make the file start_linux executable with chmod +x start_linux.sh.
Run it either by double-clicking the file or through the terminal ./start_linux.sh.

NOTE OpenLab requires java, so make sure you have it installed.


Here's the answer: I had installed Ubuntu on a machine on which I had been running a different distribution (Gentoo) with no systemd or other Ubuntu init stuff. When I installed Ubuntu, I kept the /home partition from before. In the .bashrc file in $HOME, was a line

dbus-launch nm-applet &

That was the cause of all my problems. I got rid of it and everything is fine now.


How to find all the files related to a software?

To list files belonging to a package, run

$ dpkg -L packagename

Note: does not include configuration files, usually.

To find the package a file belongs to, run

$ dpkg -S /path/to/file


I don't Know if there is any simpler way but if you look at /var/log/apt/history.log you can see what was removed. Just reinstall each package that was removed.

Using this may save your time

echo '#!/bin/bash' > restore
echo sudo apt-get install `grep Remove /var/log/apt/history.log | tail -1 | sed -e 's|Remove: ||g' -e 's|([^)]*)||g' -e 's|:[^ ]* ||g' -e 's|,||g'` >> restore
chmod +x restore
./restore


I got this camera to work with a patch i received from the linux-uvc mailing list.
See this thread here:
http://sourceforge.net/p/linux-uvc/mailman/message/34181466/


To add it to your path you can simply create a link in /usr/bin

cd /usr/bin
sudo ln -s /home/vico/eclipse/cpp-oxygen/eclipse eclipse

To add it to the dash you need a .desktop file for eclipse:

gedit ~/.local/share/applications/eclipse.desktop

Paste this content to the file and edit Exec and Icon values:

[Desktop Entry]
Type=Application
Name=Eclipse
Comment=Eclipse Integrated Development Environment
Icon=** probably/home/vico/eclipse/cpp-oxygen/eclipse/icon.xpm **
Exec= ** probably/home/vico/eclipse/eclipse **
Terminal=false
Categories=Development;IDE;Java;
StartupWMClass=Eclipse


What file resets fstab on persistent live environments?

For my LiveUSB install with Ubuntu 11.10 (which has a casper-rw persistence loopback file), the file that worked for me to have drives mounted automatically is:

/usr/share/initramfs-tools/scripts/casper-bottom/12fstab

I added lines into that script which worked to add new drive mounts upon boot-up.  The odd thing is that my /etc/fstab file does NOT reflect the drive mounts.  This would seem to suggest that the /etc/fstab file is just a dummy file or something to the LiveCD setups.  Not sure, but changes added to the 12fstab file DO persist.


How can I automatically add meta-tags to screenshots?

You could map the keyboard shortcut of your choice to a (very) short script that goes something like:

#!/bin/sh
FILENAME=~/screenshot.jpg
TAGSTRING="tag:screenshot"
KW="My keyword"

activeWinLine=$(xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)")
activeWinId=${activeWinLine:40}
import -window "$activeWinId" $FILENAME -comment $TAGSTRING

# More advanced exif info:
exiftool -keywords=$KW $FILENAME

To make this executable, save it as something like myscreenshot and then do

chmod u+x myscreenshot

Placing it in your ~/bin/ directory and making sure that that is in your path means it will be executable from whatever directory it is called from.

Then depending on your desktop environment you need to map whatever keyboard shortcut you like to the command myscreenshot.

for example in Gnome, select keyboard shortcuts from preferences, and assign a custom shortcut (you decide on the key combination) to the command myscreenshot.
If you didn't put the executable in a path on the PATH, then you would have to specify the full path in the command argument, such as '/home/USER/bin/./myscreenshot'

NOTE

This takes a screenshot of the active window but can be easily modified to take a screenshot of the whole window if that's what you want.

exiftool

exiftool may also do what you want - perhaps giving more flexibility over the information to store than the comment string alone.

For example

exiftool -keywords=one -keywords=two -keywords=twentythree FILENAME

will add the keywords one, two, and three to FILENAME.

GUI alternative

Also TAGSTRING can either be set in the script file, or perhaps passed in using a simple zenity dialog, depending on if it will be the same each time or you need to be able to change it.

Alternatively, shutter seems to have a lot of customization options (many more than the stock screen capture tool), including upload! See here for more information.


Device not managed after upgrade to ubuntu 16

Those interfaces you see that are Not Managed come from the Virtual Network connections that have been setup by VMware Player.  Those are not controlled by the network manager that is why they show up as Unmanaged.

I just did a test on my system here, and they were not listed until I installed VMware Player on it.  Unfortunately, the keyboard I am using does not have PrntScrn on it so I cannot get a screenshot of my network connections.  But I can do the output of nmcli

Before installation:

:~$ nmcli d
DEVICE      TYPE      STATE      CONNECTION
virbr0      bridge    connected  virbr0
em1         ethernet  connected  Wired connection 1
lo          loopback  unmanaged  --
virbr0-nic  tun       unmanaged  --

After installation:

:~$ nmcli d
DEVICE      TYPE      STATE      CONNECTION
virbr0      bridge    connected  virbr0
em1         ethernet  connected  Wired connection 1
vmnet1      ethernet  unmanaged  --
vmnet8      ethernet  unmanaged  --
lo          loopback  unmanaged  --
virbr0-nic  tun       unmanaged  --

vmnet1    Link encap:Ethernet  HWaddr 00:50:56:c0:00:01
          inet addr:172.16.106.1  Bcast:172.16.106.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fec0:1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:61 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

vmnet8    Link encap:Ethernet  HWaddr 00:50:56:c0:00:08
          inet addr:192.168.192.1  Bcast:192.168.192.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fec0:8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:61 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

After removal of VMware Player:

:~$ nmcli d
DEVICE      TYPE      STATE      CONNECTION
virbr0      bridge    connected  virbr0
em1         ethernet  connected  Wired connection 1
lo          loopback  unmanaged  --
virbr0-nic  tun       unmanaged  --

Hope this helps!


Application launcher and main menu opens with significant delay

You mention that you started with Ubuntu 16 and upgraded to Ubuntu 18;
from the tag I infer you mean 18.04 (BionicBeaver) from either 16.04 or 16.10.
Have you read the release notes
or change summary
for Ubuntu / Kubuntu
18.04?
Many of them are relevant to blacklisting drivers
for particular hardware, including graphics.

Depending on
how you made the upgrade,
you may have leftover configuration files
that are incompatible with the newer software
or simply lack bug fixes and workarounds.

For example,
if the files in /usr/share/X11/xorg.conf.d/ and /etc/modprobe.d/
are from Ubuntu 16.04 but the kernel and drivers are for Ubuntu 18.04,
this could potentially cause a performance issue,
although I don't know enough about your hardware to look for any known bugs.
On my machine, /usr/share/X11/xorg.conf.d/10-quirks.conf alone
provides workarounds for
four
separate
input
device bugs.

Deciding which configuration files to keep the same
and which to upgrade to a newer version
can be a delicate process,
so some folks just prefer to re-install from scratch
to ensure they are using the recommended configuration from their distribution.
This is the method that I personally find to be the most expedient;
I re-install onto a new disk and then copy my data over.
After that, I mainly migrate configuration for my home directory
and leave global configuration largely the same,
except for things like wifi connections and printers.

This brings up the consideration of configuration files in your home directory,
such as ~/.config/kdeglobals.
The package manager generally leaves these files alone, so to isolate the bug
you may have to start with the default Plasma 5 configuration
and bring in your customizations piece by piece.
(You can also use a binary search strategy,
adding half your configuration settings at a time
and backing up if the half you added re-introduces the bug.)

For example, the configuration for many plasma applets is stored here:

~/.config/plasma-org.kde.plasma.desktop-appletsrc

How an older configuration file will affect performance
depends on a variety of factors, such as
which application launcher
you are using.
For example, are you using
Application Menu (kicker),
Application Dashboard (kickerdash, the full screen launcher),
or
Application Launcher (kickoff)?
You can switch between them with right-click → "Alternatives...".
Are they all equally enslowed? Does this change if you alter the settings?

You can try toggling settings like useExtraRunners
("Expand search to bookmarks, files and emails").
You can change this via right-click →
"Application Menu Settings..." or "Application Launcher Settings...".
Here's what it looks like for Application Launcher (kickoff):

By the way, how do you actually know it is unrelated to animation?

Have you tried disabling animations?

Have you tried disabling compositing?

Have you recorded a screencast demonstrating the problem
with e.g. gtk-recordmydesktop?

It would be helpful to have a screenshot
of your "About System" screen, like this:

This would provide information about the exact version you are using
(useful for other folks who read this question)
and some basic hardware information.

I also use KDE on Ubuntu 18.04,
but I don't experience anything like what you're describing.
Without more information,
I can only speculate as to the cause of the delays you are experiencing.

If you want to dig deeper,
the source code for the kicker and kickoff plugins
is in the plasma-desktop package.
For example, here is the code to generate the action list for kicker:

https://github.com/KDE/plasma-desktop/blob/master/applets/kicker/plugin/actionlist.cpp

and here's the QML code for part of kickoff:

https://github.com/KDE/plasma-desktop/blob/master/applets/kickoff/package/contents/ui/FullRepresentation.qml


Cannot connect to pop3 or imap with Dovecot

The Unable to connect ... Connection refused message strongly suggests that Dovecot is not listening on port 110. Check that dovecot is actually running using

ps -A | grep dovecot

If so, check that it is listening on the POP port:

sudo lsof -i 4 -a -p $(ps -A | grep dovecot | awk '{ print $1 }')

If so, check that no firewall is in the way.

If it turns out that dovecot is not running or not listening on the POP port, then you have probably misconfigured dovecot. Examine the dovecot and system logs for errors. Examine dovecot's configuration as output by dovecot -n.

Most likely, you have misconfigured either the protocols directive or the the listen directive.


What PHP & Xdebug based Editors do people use other than Eclipse, Netbeans (anything java based) or VIM

Aptana Studio 3
Is by far one of the most comprehensive IDEs I've used for PHP development (or Web development for that part).

Here's an additional screenshot of it's on-the-fly debugging, autocomplete, and hinting.


First you have to install properly last version of NetBeans . After go in Nautilus where are your php files, right click on a php file, select Open With > Other application and you should find there NetBeans. Open with it.

If still you have problems, go in /usr/share/applications/ and create with root privileges a .desktop file with next things in:

[Desktop Entry]
Name=<Netbeans>
Exec=<command to run program - something like /opt/netbeans/run.sh> %U
Type=Application

Another way would be if you open a terminal and run:

netbeans [ options ] [ files ]

See man netbeans for more informations.


Getting always - "xmpfilter: command not found"

I have installed tpope/vim-rvm plug-in and it solved my problem.

I just put Bundle 'tpope/vim-rvm' in my .vimrc file. Then ran :BundleInstall to install that plugin.

Then I ran :Rvm use default.

Now I write the below code :

class Foo
  def bar
    self
  end
end

Foo.new.bar

I pressed Alt+c to insert # =>. Then I pressed Alt+z and got the output as I was looking for.


14.04 Shutdown hangs on printing error message

The one reason for my shutdown to hang is because my nVidea video board driver will get blocked, although when that happens I do not see any messages.

In any event, here it says that it has a problem with PCIe Port 0000:00:1c.6 so we would need to know what's connected on that port to get a better feel of what the kernel does not like.

You can see what it is with an lspci command in your console after a reboot. In my case, it is an Intel Bridge:

00:1c.6 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 7 (rev 06)

It seems to say that it is the same on your computer (i.e. it says it is a bus). It could be that you have a video board that it does not like...


How to have a clean *ubuntu and Awesome WM?

I would advise you to go with Xubuntu (last LTS or latest).

Install Xubuntu

Install awesome
sudo apt-get install awesome awesome-extra

If you want the most updated version, run before:
sudo add-apt-repository ppa:klaus-vormweg/awesome
sudo apt-get update

Remove Xubuntu desktop.
If you don't remove these package, it will override the awesome background and can conflict with apps if you don't set specific awesome rules.
sudo apt-get remove  xubuntu-desktop xfdesktop4

Set awesome as the default WM
sudo xfconf-query -c xfce4-session -p /sessions/Failsafe/Client0_Command -t string -s "awesome" -a

Set awesome to autostart
ln -s /usr/share/applications/awesome.desktop ~/.config/autostart/awesome.desktop

Restart lightdm service
sudo service lightdm restart

With this configuration, you have a lightweight, updated and fast Ubuntu Awesome. To help you customize Awesome, I would advise you to look at the awesome-copycats.


Dual booting a new build. Which OS to install first, Windows or Ubuntu?

This is standard practice in many large organisations - you take a "clean" installation with everything set up correctly, then take basically a dump of the entire disk and store that in an image file, then when you deploy a new desktop you deploy from that image file.

You can basically do a dd of the whole drive, including all partitions, with, say

dd if=/dev/sdc of=/media/externalhd/myimage.img

Make sure none of the partitions are mounted, and you don't modify anything on the drive, during this operation (practically this means you should probably boot from a live CD/USB to do this).

  and then save it as it's own bootable reco media

Well one of the limitations of this practice is that you are copying the partition table and everything, so if you just do a straight restore onto another drive it has to be the same size or larger, and the partitions won't be resized - though you can do that later.


How to connect Android over wifi on a virtual usb?

Unfortunately, I can't give you an exact answer especially due to the broken usb port.

But you can try the following. Please note, the developer way of connecting to android devices is through the official adb tool provided by Google. I don't know what this applications your using are nor have I ever used vine.

Normal linux doesn't know android linux and there's no sudo command (besides something like sudo adb which isn't necessary). The Android Debug Bridge (ADB) is what connects to an android device on linux / Windows and is useful for flashing, browsing, installing, etc.

Connect to the device, identifying it by IP address.

$ adb connect <device-ip-address>

Confirm that your host computer is connected to the target device:

$ adb devices

List of devices attached
:5555 device

Unfortunately, the step before than requires the device to be plugged in via usb and I don't know if what you did can sidestep that...

Connect the device to the host computer with a USB cable.
Set the target device to listen for a TCP/IP connection on port 5555.

$ adb tcpip 5555

http://developer.android.com/tools/help/adb.html

There's a lot more answers here where you might find something that works for you and it may be possible to do it without usb connecting first it seems but it looks like the device must be rooted to do so:

https://stackoverflow.com/questions/2604727/how-can-i-connect-to-android-with-adb-over-tcp

https://stackoverflow.com/questions/31327839/adb-over-wireless-without-usb-cable-at-all

Here someone says how to to it without usb for android 4.4 (possibly with a + but I don't see it on 5.1 so YMMV):
https://android.stackexchange.com/questions/67916/is-it-possible-to-adb-connect-android-via-wifi-without-configuring-port-on-andro


Change Docky icons for Wine applications?

What's wrong with creating a new launcher (for example on your desktop), setting the icon to one you like and then dragging that launcher onto Docky?

Just tried it and it works here.

Edit to try and help, here's the source of my modified launcher:

[Desktop Entry]
Name=Darkstar One
Exec=bash -c "cd \\"~/.wine/drive_c/Program Files/GOG.com/Darkstar One\\" & wine explorer /desktop=DarkstarOne,1920x1200 DarkStarOne.exe"
Type=Application
StartupNotify=true
Path=/home/oli/.wine/dosdevices/c:/Program Files/GOG.com/Darkstar One/
Icon=/home/oli/Desktop/darkstar.jpg

/home/oli/Desktop/darkstar.jpg is the location of the new icon. But this does work for me with Docky 2.0.7. I even tried launching it and the icon remained the new one.


Can't get mysql/phpmyadmin to work after updating to 16.04

My machine configuration
- Ubuntu 16.04
- MySql 5.7.13
- PHP 7.0.8
- Apache 2.4.18

Edit the file /etc/dbconfig-common/phpmyadmin.conf, changing

dbc_dbport='' to dbc_dbport='0'

After edit the file and save it, if you are still on the dbconfig-common wizard select retry, if not run sudo dpkg-reconfigure phpmyadmin (choose Yes when ask you if you want to Reinstall database for phpmyadmin), and continue normally without change any value, if you want change some value, do it in the file that you edit before.

When configuration window asks what you want to do with existing configuration file, choose Keep the local version currently installed.

In this point you can check the differences and only must exist the ones that you made in the file.


How do I get OpenCV and Firefly MV working?

May 16, 2011: Problem solved, see update below!

Alright, after much poking and prodding (and a new computer build) I've gotten ROS, OpenCV, and libdc1394 installed and (apparently) functioning correctly.  I wrote a ROS launch file which should start the camera and display the output in a window on my computer.  However, when I run this launch file, I get the following errors from libusb and libdc1394:

libusb couldn't open USB device /dev/bus/usb/002/007: Permission denied.
libusb requires write access to USB device nodes.
libdc1394 warning: usb: Failed to open device for config ROM
libdc1394 warning: Failed to get config ROM from usb device
libusb couldn't open USB device /dev/bus/usb/002/007: Permission denied.
libusb requires write access to USB device nodes.
libdc1394 warning: usb: Failed to open device for config ROM
libdc1394 warning: Failed to get config ROM from usb device
libusb couldn't open USB device /dev/bus/usb/002/007: Permission denied.
libusb requires write access to USB device nodes.
libdc1394 warning: usb: Failed to open device for config ROM
libdc1394 warning: Failed to get config ROM from usb device

Followed by an (expected) error from ROS:

[ERROR] [1305210297.868750292]: [camera] device open failed: [Camera1394::open]: No cameras found

I'm assuming that this has to do with udev rules, but I'm not sure how to fix it (I'm unfamiliar with messing with udev rules in general).

If it helps, here's the permissions for the particular device:

bradpowers@bp-rosdev:~/ros/launch$ ls -la /dev/bus/usb/002/007
crw-rw-r-- 1 root root 189, 134 2011-05-12 08:16 /dev/bus/usb/002/007

================================================================

Ok, problem solved!  The issue was that my device needed a udev rule.  I created one, and the camera works great now.  Here was what I did:

First, I used lsusb with the camera plugged in to determine the USB Vendor and Product IDs for my camera:

bradpowers@bp-rosdev:~$ lsusb
Bus 002 Device 009: ID 1e10:2000 Point Grey Research, Inc.
Bus 002 Device 008: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 002 Device 007: ID 05ac:0220 Apple, Inc. Aluminum Keyboard (ANSI)
Bus 002 Device 006: ID 05ac:1006 Apple, Inc. Hub in Aluminum Keyboard
Bus 002 Device 005: ID 05ac:921c Apple, Inc.
Bus 002 Device 004: ID 0cf3:3002 Atheros Communications, Inc.
Bus 002 Device 003: ID 05ac:911c Apple, Inc.
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The device I'm concerned with is the Point Grey Research device at the top.  I copied down the ID number, 1e10:2000.

From there, I needed to create a udev rule to add the device to the plugdev group when plugged in:

bradpowers@bp-rosdev:~$ sudo gedit /etc/udev/rules.d/10-pointgrey.rules

In this file, I entered the following:

# udev rules file for Point Grey Firefly-MV
BUS=="usb", SYSFS{idVendor}=="1e10", SYSFS{idProduct}=="2000", GROUP="plugdev"

After saving, and a reboot, launching my roslaunch file worked great.  Thanks to Andy Barry for a phone call and solution so quickly.


I'm getting “unusable disk space” error. while creating partition?

MBR partitioning can only have 4 primary partitions.

Delete the swap partition you created, then create an extended partition filling the free space.

Then create logical drives within the extended partition for your linux install


How do I fix a possibly corrupted hard drive and install Ubuntu onto it?

I doubt that there's hardware corruption.  What's happened is that because you've deleted all the partitions, there is no partition to mount.  A partition is kind of like a virtual drive.  It is the interface to the actual ones and zeros, and provides some structure.  It's like you need a body on a car chassis.

So just go ahead and run the installer and select the "Wipe everything and install Ubuntu" option (or equivalent wording).  It should take care of everything for you.  Keep in mind, since you already deleted Windows, you've got nothing to lose by experimenting.  So use this oportunity to have fun and learn something.  Or just go listen to some heavy metal.  Or go eat a sandwich, see if I care.


How can I remove other varieties of English from my installed languages?

This is related to Ubuntu's organisation of translations and language support in language packs. There is one language pack per language, and in a few cases - of which English is one - there are multiple translations into a language.

As regards the prompting for missing language support when you open the Language Support tool, I can just recommend you to accept to make it shut up. Actually I'm guilty of this behaviour, and the purpose is to prevent situations when full language support for the current language is not installed. (Think systems with multiple users and languages.) Anyway, the redundant support files shouldn't hurt.

OTOH you claim they do, and that smells like a bug. Which applications are not able to distinguish between spellcheckers for the various flavours of English?

Edit:

If the confusion happens in Firefox, this answer might apply.


Graphics tablet shows up in evtest, but not in xinput

I had a similar problem, and I solved it without installing any additional drivers, the trick was to update de xinput devices manually.
This is what I did:
Find out what the USB id assigned to the tablet.

Ensure that the tablet is not connected.
Execute a  lsusb
Save the results somewhere.
Connect the tablet
Execute again lsusb
The new value would be the USB id for the tablet.

Edit the X server config file

Change directory to /usr/share/X11/xorg.conf.d
Create a file ( using sudo ) named 50-tablet.conf for example
Fill it with a content similar to Section "InputClass"
Identifier "Tablet"
Driver "wacom"
MatchDevicePath "/dev/input/event*"
MatchUSBID "abcd:zyxw"
EndSection
abcd:zyxw is the USB code that was previously discovered.
Reboot

Error log
You may find an error log on /var/log/Xorg.0.log
Sample Steps
This is an almost actual log from my machine

$ uname -a
Linux fakeLaptop 4.15.0-118-generic #119-Ubuntu SMP Tue Sep 8 12:30:01 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

No tablet connected

$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0bda:57f2 Realtek Semiconductor Corp.
Bus 001 Device 003: ID 04ca:3015 Lite-On Technology Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Connected tablet

$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0bda:57f2 Realtek Semiconductor Corp.
Bus 001 Device 003: ID 04ca:3015 Lite-On Technology Corp.
Bus 001 Device 006: ID 256c:006d
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The id is 256c:006d

$ cd /usr/share/X11/xorg.conf.d
$ cat 50-tablet.conf
Section "InputClass"
    Identifier "Tablet"
    Driver "wacom"
    MatchDevicePath "/dev/input/event*"
     MatchUSBID "256c:006d"
EndSection
$

Hope it helps!


Ubuntu Server 16.04 to Server Ubuntu 18.04 upgrade fail

My Server In Google Cloud

You do not upgrade cloud instances. Cloud instances are as is and you lease them with the operating system they are installed with.  Any other method than the official one is taking a risk that is irrecoverable when there are problems: there is no recovery mode (live session or grub rescue) for cloud instances.

The method you should use:

You create a new instance with 18.04, you disconnect your personal data disk from your old 16.04 instance and attach it to the new instance. After you confirm the new instance works you can burn the old one. Same applies for backups: you create clones of your personal data disk and attach it to a new instance to create a 2nd, 3rd version.


Accidentally removed Spotify folder, now I can't uninstall anything

Since it seems, that the Spotify package is still in the “configured” state, but had some of its files removed, you need to reinstall it first:

sudo apt-get install -f --reinstall spotify-client

Then you should be able to uninstall it normally:

sudo apt-get remove spotify-client


Unable to locate package update-manager-core

Contrary to the experience he got upgrading of Ubuntu is only supported step by step - except with LTS-versions, where you can take the bigger steps LTS -> LTS.

In your case that means you would only be able to upgrade to 11.04 reliably. But all these releases are EOL, they are not supported any more. For this reason I suggest you back up the essential parts of your system and install 12.04 LTS.

What should you back up? The debian project has a very good description. It boils down to:

  /home
  /etc
  /var/lib/dpkg
  /var/lib/apt/extended_states
  the output of dpkg --get-selections "*" (the quotes are important).
  If you use aptitude to manage packages on your system, you will also want to back up /var/lib/aptitude/pkgstates.
  data for any servers you have running