How do I authenticate with ed25519 using the MariaDB client?

The shared library seems to exist within the container (mariadb:10.4), but not in the Ubuntu 18.04 apt package(s) for mariadb-client.

find / -iregex '.*ed25519.so'
/var/lib/docker/overlay2/5607d87792ae2f4989aa5a72188f1c47f86b19ce42a92139b50b697a39ecb798/diff/usr/lib/mysql/plugin/auth_ed25519.so
/var/lib/docker/overlay2/5607d87792ae2f4989aa5a72188f1c47f86b19ce42a92139b50b697a39ecb798/diff/usr/lib/mysql/plugin/client_ed25519.so
/var/lib/docker/overlay2/38451e628c3926f60d07e9852332f751486471b4a008d9a1b1e7f04d30b2eba1/merged/usr/lib/mysql/plugin/auth_ed25519.so
/var/lib/docker/overlay2/38451e628c3926f60d07e9852332f751486471b4a008d9a1b1e7f04d30b2eba1/merged/usr/lib/mysql/plugin/client_ed25519.so

The apt package for mariadb-server does include the auth_ed25519.so, but no sign of its partner in the mariadb-client package (or any of its dependencies).

$ apt-file list mariadb-server-10.1 | grep ed25519.so
mariadb-server-10.1: /usr/lib/x86_64-linux-gnu/mariadb18/plugin/auth_ed25519.so
$ dpkg --listfiles mariadb-client-10.1 mariadb-client-core-10.1 mariadb-common | grep ed25519.so
$

The only place I can locate that file is in a package called libmariadbclient18 which only contains libraries.

$ apt-file find client_ed25519.so
libmariadbclient18: /usr/lib/x86_64-linux-gnu/mariadb18/plugin/client_ed25519.so
$ apt-file list libmariadbclient18
libmariadbclient18: /usr/lib/x86_64-linux-gnu/libmariadbclient.so.18
libmariadbclient18: /usr/lib/x86_64-linux-gnu/libmariadbclient.so.18.0.0
libmariadbclient18: /usr/lib/x86_64-linux-gnu/mariadb18/plugin/client_ed25519.so
libmariadbclient18: /usr/lib/x86_64-linux-gnu/mariadb18/plugin/dialog.so
libmariadbclient18: /usr/lib/x86_64-linux-gnu/mariadb18/plugin/disks.so
libmariadbclient18: /usr/lib/x86_64-linux-gnu/mariadb18/plugin/mysql_clear_password.so
libmariadbclient18: /usr/share/doc/libmariadbclient18/changelog.Debian.gz
libmariadbclient18: /usr/share/doc/libmariadbclient18/copyright

After installing the library, the connection succeeds.

$ apt install libmariadbclient18
$ mysql --protocol=tcp --user=root -psecret
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 17
Server version: 10.4.11-MariaDB-1:10.4.11+maria~bionic mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

I found this not a particularly obvious sequence of problems so thought I would leave this here in case others or my-future-self need it. It probably would be helpful to be named something like mariadb-plugins or at least be Suggested by mariadb-client.


If two systems have the same packages installed, and you make a diff of their /etc directories, you will basically get all the configuration changes between them (maybe not 100% of them but still very accurate). So, what I did to audit my system was this:

Install a minimal system with debootstrap (similar to what is described here:
http://dashohoxha.blogspot.com/2013/02/how-to-set-up-chroot-environment-for.html).
Make sure that I install on the chroot system all the packages that are installed on the main system (as described here: http://www.debianadmin.com/clone-your-ubuntu-installation.html)
Make a diff between the /etc dirs of both systems.

Of course, this diff cannot be readily used to install and configure another system, but knowing where are the differences and what they are, can help to build a tklpatch (like this: https://github.com/dashohoxha/B-Translator/tree/master/tklpatch), which of course is not quite easy to be done and requires some work.

Then, I can distribute/publish this tklpatch and everybody can build easily a system quite similar to mine.


What is recommeded file system for a grub partition?

I'd stick to the defaults, an ext* filesystem. Personally I use ext2 because the journaling function of ext3/ext4 can make mounting the filesystem slower (observed on a flash memory stick). AFAIK journaling can be disabled for ext4, but since I was happy with ext2 I did not consider ext4 for read-only partitions like /boot.

MacFUSE seems to work for accessing ext2/3 partitions (read+write)
Windows supports ext2 (and ext3 without journal) with the driver from http://www.fs-driver.org/ (see also The best choice of linux file system and software that can be accesed from Windows)

Avoid filesystems that do not support Linux file permissions like NTFS and FAT*. Although all files are owned by root and most of them have permissions 644, lack of proper permissions support could set inappropriate default permissions for the files.


How to add a custom launcher in Unity's applications place

The apps place has a ~5s gracetime before it indexes new apps. They are indeed picked up from /usr/share/applications (among other places). I just tested here and it seems to work fine.

Right now you have to do a search or something else to change the result set though - it's only the underlying index which is updated right now. For this Thurday's release I'll land a fix so that we also update any active result sets when we detect changes.


Can I use my Bluetooth headset as a microphone?

From the Sound Preferences menu we select the Input tab to choose our Bluetooth device (here depicted for a Philips headset) for audio input:

In order to use your headset for telephony we will also have to make sure, that the hardware is set to Duplex mode in Hardware -> Settings:

Note: In duplex mode the sound quality may not be very high due to usage of the HSP/HFP codecs.


Installing additional drivers in kubuntu

You have to start System Settings (systemsettings5) and select Kubuntu Driver Manager application from it.
Note: Kubuntu Driver Manager may be launched from the terminal using sudo kubuntu-driver-manager command.


What does the numbers in apt-cache showpkg "packagename"output in Forward Dependencies section?

Apt uses deb packages. Deb packages can depend on other packages with specific versions.

The list is a set of dependence separated by spaces where each dependency follows the format package_name (compare_integer version_range) The compare_integer represents the type of comparison to make in the version specified by the package and the version the package manager can provide. It is nibbled with the lower 4 bits represent the comparison which are 1: =>, 2: <=, 3: >, 4: <, 5: ==, 6: !=, 0: null and the upper 4 bits are flags.


What does "System information disabled due to load higher than 1.0" on boot indicate

This might be informative :

  System load averages is the average number of processes that are
  either
         in a runnable or uninterruptable state.  A process in a runnable  state
         is  either  using the CPU or waiting to use the CPU. A process in unin‐
         terruptable state is waiting for some I/O access, eg waiting for  disk.
         The  averages  are  taken over the three time intervals.  Load averages
         are not normalized for the number of CPUs in a system, so a load  aver‐
         age  of 1 means a single CPU system is loaded all the time while on a 4
         CPU system it means it was idle 75% of the time.

  In a practical sense what the system is telling you is -- wait I'm
  busy right now.

  To see a listing of system load use the commands w or top or (if
  installed) htop. The last two processes are real time so you can
  actually watch the load go up if you are watching a video or other CPU
  intensive activity.


Just updating BIOS Firmware and everything work fine !


Ubuntu 12.04 I removed an add-in video board and now I can't see anything with on-board video card

You need to remount your / partition in read write mode.So try these commands on root shell(recovery mode),

mount -o rw,remount /
mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak


mv file to smb failed, space still used, file missing

Possibly the file is marked as deleted but still held open by the SMB client process - the space won't be reclaimed until all open file handles are closed. You could try unmounting the SMB share to see if that releases the disk space, or restarting the computer for same.


How can I automatically hibernate cloud storage servers?

I put together a little script which you could run in a cronjob every 15 minutes or using systemd timers:

#/bin/bash

NActiveUsers=$(who -q | awk -F'#' '{printf $2}' | awk -F'=' '{printf $2}')
AvgLoad15Min=$(cat /proc/loadavg | awk -F' ' '{print $3}')

ActiveUsersThresh=2
AvgLoadThresh=0.15

if [ "$NActiveUsers" -lt "$ActiveUsersThresh" ]
then
    LoadBelowThresh=$(echo $AvgLoad15Min'<'$AvgLoadThresh | bc -l)
    if [ "$LoadBelowThresh" -eq 1 ]
    then
        systemctl hibernate
    fi
fi

It first gets the number of users which are logged in to the system and the average load during the last 15 minutes. You should be able to find out your idle average system load using cat /proc/loadavg. The third floating point numbers gives the average over the last 15 minutes. This value is helpful to define a threshold set in the variable AvgLoadThresh. This certainly will need tuning.
The other thing that you can define is how much users are allowed to be logged in and the system goes to hibernate anyhow. This is set in ActiveUsersThresh. Just to make sure the system is not always hibernating when you are doing maintenance or something.

I guess one could come up with more intelligent checks, so see it as a first simple-minded approach. For example, i don't know which database or webserver is used in your owncloud installation but you could try to stop them gracefully before the hibernate command, so nobody would suddenly loose connection.


Same here, as far as I know it has a problem showing the menu icons so the page tells you to install some sort of a patch, a file named "fix-menu.sh".

I tried installing the patch from terminal but it seemed not to be working  so I went for the second option, which was re downloading and installing a16 again, didn't worked for me nether.

Final option (this worked for me):

sudo apt-get remove wps-office

sudo apt-get purge wps-office

sudo apt-get update

re downloaded the wps a16 package and reinstalled it.

Even though I used the command purge some configurations seem to have survived the massacre, Custom dictionary and saving format preferences among others.

Good Luck! :D


Issue after pip update to version 9.0.1 (on Ubuntu 10.04)

The issue exists on multiple Ubuntu versions (16.04, 16.10 for certain) as well as yours.

Even a basic pip list -o fails (this will confirm the condition).

It is worth noting that the OS python and self-install modules can be problematic so proceed at your own "risk".

Remove current pip:

sudo su -
pip uninstall pip

Get pip installer:

wget https://bootstrap.pypa.io/get-pip.py

(Re)Install pip:

python get-pip.py

Update all eggs:

for i in `pip list -o --format legacy|awk '{print $1}'` ; do pip install --upgrade $i; done


It should be ext4 for Ubuntu, and ntfs for Windows. ext4 partitions cannot be read on Windows, but both ext4 and ntfs can be read and written from Ubuntu.

My suggestion would be to create native ext4 partition for Ubuntu, and store shared files on Windows ntfs partition.

Current setup for my dual boot laptop:

Partition O/S     Mount point

ext4      Ubuntu  /
ext4      Ubuntu  /home
ntfs      Windows c:
ntfs      Windows d:

As you already realized, drive D (4th partition) is shared between Ubuntu and Windows. I have added it to /etc/fstab so this partition automatically mounts to /windows folder.

NB: Since this question is not about optimal partitioning, let's skip all the talks about how to partition for Linux.

You want to keep your home directory so your ubuntu settings (.bashrc/various configs) are independent of your install, that way, if you bork your ubuntu, or ever just feel the need, you can just re-install ubuntu while keeping your settings. The reason you want another NTFS partition is because, as many people nowadays, you carry around lots of platform non-specific data (i.e.: movies,audio..etc) putting all that sort of data there enables you to get at it from either boot environment.


Is there anyone who has Canon MX435 printer. No driver for Linux

According to that webpage you posted, there is a Linux driver. It's nice to find Linux support from manufacturers. The bad part is there's no easy installer provided.

In case you didn't know already, a .tar.gz file is a compressed directory in a file, somewhat like a .zip.

What you want to do first is extract the .tar.gz file. You can do this by double clicking the downloading cnijfilter-mx430series-3.70-1-deb.tar.gz file and selecting "Extract". After you extract the contents of the archive, navigate to the extracted directory. Inside you will find install.sh. Double click it - Ubuntu will then ask whether you want to run the program or not. Say that you want to run the program in a terminal.

Tell us if it works, or if the terminal says anything unusual. If it says something along the lines of must be run as superuser or need root privileges, then you'll need to run it as root. For that...you'd need to navigate to the directory in a terminal and run sudo install.sh.


You have to use command sub situation:

mpv "$(xclip -o -selection clipboard)"

or for primary x selection:

mpv "$(xclip -o -selection primary)"

Lets say your clipboard contains http://example.foo/video.mp4, the result would be:

mpv "http://example.foo/video.mp4"

What you are doing is piping stdout of your first command which is the url, to the stdin of second command "mpv" which doesn't look for anything from stdin and even if it does (e.g: mpv -) it looks for data to play and not a url or file address.


How to set gedit language to specific files

There is more than one possibility

Change the language spec for CSS

GTK3

sudo nano /usr/share/gtksourceview-3.0/language-specs/css.lang

GTK2

sudo nano /usr/share/gtksourceview-2.0/language-specs/css.lang

and replace the line

<property name="globs">*.css;*.CSSL;</property>

with

<property name="globs">*.css;*.CSSL;*.scss;*.SCSS;</property>

Create a new system wide mime type

Create a new XML file

nano /usr/share/mime/packages/scss.xml

Add the XML code below

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
  <mime-type type="text/css">
    <comment>CSS file</comment>
    <glob pattern="*.SCSS"/>
    <glob pattern="*.scss"/>
  </mime-type>
</mime-info>

Update the database

sudo update-mime-database /usr/share/mime

Create a new mime type only for your user

Create a new XML file

nano ~/.local/share/mime/packages/scss.xml

Add the XML code below

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
  <mime-type type="text/css">
    <comment>CSS file</comment>
    <glob pattern="*.SCSS"/>
    <glob pattern="*.scss"/>
  </mime-type>
</mime-info>

Update the database

update-mime-database ~/.local/share/mime


How to install mate over existing ubuntu desktop?

sudo apt install ubuntu-mate-desktop

which will add the Ubuntu-MATE desktop to your system (including all apps that come with the Ubuntu-MATE had you installed it).

At login time, you can select if you want GNOME, MATE for the current session. If you want to switch, logout and you can switch the other DEsktop.


What does this command mean: awk -F: '{print $4}'?

awk -F: '{print $4}'

awk - this is the interpreter for the AWK Programming Language. The AWK language is useful for manipulation of data files,
   text retrieval and processing
-F <value> - tells awk what field separator to use. In your case, -F: means that the separator is : (colon).
'{print $4}' means  print the fourth field (the fields being separated by :).

Example:

Let's say that there's a file called test, and it contains the following:

Hello:my:name:is:Alaa

If we execute the command awk -F: '{print $4}' test, the output will be:

is

Because is is the fourth field.

      field1   field3  field5
       -----    ----    ----
       |   |    |  |    |  |
       Hello:my:name:is:Alaa
             ||      ||
             --      --
           field2  field4


Black screen is shown instead of GRUB menu on Gigabyte GA-990XA-UD3 with ASUS HD7850-DC2-2GD5-V2 (Radeon HD 7850) graphic card installed

This is a probably the following GRUB bug: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/545103.
To resolve the issue, update the default GRUB configuration:
sudo nano /etc/default/grub

add or update
GRUB_TERMINAL_OUTPUT=gfxterm
GRUB_PRELOAD_MODULES=vbe

then update grub
sudo update-grub

Now reboot.


Can you use a different bootloader rather than GRUB?

According to this post http://www.linux.org/threads/linux-bootloaders.4489/ there are:

LILO

ELILO

GNU GRUB

SYSLINUX / EXTLINUX

PXELINUX

SILO

PALO

Yaboot

Das U-Boot

Barebox

BURG

Most of them should (should!) work on any distribution, including ubuntu, but not all of them support for example UEFI-Systems. I'd suppose you'd set up an ubuntu in a virtual environment (for example VirtualBox) and experiment there with which works where.

To install, I describe here the processes of the most common bootloaders. All others can be found online easily and would go beyond the scope of this answer.

Installing LILO

Installing LILO is very straightforward.

First, you install the package from apt: sudo apt-get install lilo
After that, you can install the bootloader by typing lilo in a root-shell.

Detailed instructions: https://wiki.debian.org/LILO

Installing GRUB

Usually, GRUB is installed by default. If you are however on a running system with another bootloader, you can install GRUB like this:

Install the package (if not yet installed): sudo apt-get install grub2
Use the command sudo grub-install /dev/sdX (where sdX is your system partition, for example /dev/sda)

Detailed instructions: https://help.ubuntu.com/community/Grub2/Installing

Installing EXTLINUX

Install the needed packages: sudo apt-get install extlinux syslinux-common
Install the bootloader: sudo extlinux --install /boot/extlinux
To display a menu, if needed, there are a few additional steps. The exact steps would be too much for this answer, but you can find it in the detailes instructions.

Detailed instructions: http://shallowsky.com/linux/extlinux.html

And, important, if something doesn't work correctly, follow the BootRepair-Steps here: https://help.ubuntu.com/community/Boot-Repair


Before you begin, backup all your files just in case!

First, unplug and plug the card back in. Then, open a terminal and type the following command to list your device names:

df

These next two commands should give you similar results:

sudo blkid

and

lsblk

The device should be listed as /dev/sdb1 or /dev/sdc1. It is important you use the proper device name (/dev/sdb1 or /dev/sdc1) in the following commands or you will format and erase the wrong device!!! Open a terminal and type the following commands (/dev/sdb1 is used here as an example but be aware that your device name may be different!)

example command:

sudo umount /dev/sdb1

then,

sudo mkfs.vfat -I /dev/sdb1

Alternatively, you could use this command instead:

sudo mkdosfs -F 32 -v /dev/sdb1

Both of these commands format the drive to fat32. You will have to unplug and plug the device back in after you format to remount the device.


How to be granted root rights while browsing files/directories with Nautilus

For Ubuntu <= 10.10 , 10.04
nautilus-gksu
Is an extension that grants root privileges using gksu nautilus.
It enables an option when you right-click on a file (also directories and other...) in nautilus: "Open as administrator".
After installing it restart Nautilus (killall nautilus) and it will have the new feature.

Ubuntu 11.04 and 11.10,
install nautilus-gksu and copy and paste the libnautilus-gksu.so file from /usr/lib/nautilus/extensions-2.0/ to /usr/lib/nautilus/extensions-3.0/
Ubuntu 12.04 & 12.10:
The nautilus-gksu package has been dropped in Ubuntu 12.04 and 12.10 since gksu 2.0.2-6ubuntu1 release, so you can not install it easily. Here I’m going to use a nautilus script to add Open As Administrator functionality.
First download the libnautilus-gksu.so file:
Click to Download libnautilus-gksu.so
Then, run gksudo nautilus in terminal Ctrl+Alt+T to open the file browser with root privilege, copy and paste this file to /usr/lib/nautilus/extensions-3.0/. Or do it with this command:
sudo cp ~/Downloads/libnautilus-gksu.so /usr/lib/nautilus/extensions-3.0/

Log out and back in, or run this command to take effect:
nautilus -q

Source


How do I show the date in the clock indicator?

I blogged about this today here.

Basically, this can be adjusted via dconf-editor (under /apps/indicators/datetime) from
 the  dconf-tools package, or by using gsettings in a terminal:

For 11.04:

Click on the Clock and choose "Time and Date Settings":

For 11.04 on the command line:

gsettings set com.canonical.indicator.datetime show-date true
gsettings set com.canonical.indicator.datetime show-day true

For 10.10 (command line only unfortunately):

gsettings set org.ayatana.indicator.datetime show-date true
gsettings set org.ayatana.indicator.datetime show-day true


I'm not a percona expert, but looking over the charm I don't see anything obvious that would restrict it to only a "real" machine, or VM.  Before starting, please be familar with the charm README as you will need to follow it closely, and as it is changing very frequently, I don't feel it would be best to type it all out here:

http://manage.jujucharms.com/~openstack-charmers/precise/percona-cluster

You can target each unit to an LXC in turn with the --to parameter, as follows:

# Instead of deploying to a machine, use --to lxc:0
juju deploy --config percona.yaml percona-cluster --to lxc:0

# wait till new unit is 'started', then:
juju add-unit percona-cluster --to lxc:0

# wait till new unit is 'started', then:
juju add-unit percona-cluster --to lxc:0

Keep in mind that as of this writing, LXCs are not externally network addressable outside their host machine except on the MAAS provider, so you will need to have them all on the same piece of hardware (and whatever is using them on the same hardware as well).  What that implies is that this type of deploy would only make sense for testing purposes.

Once juju supports network addressable LXCs on other providers, you could spread out the LXCs to other machines in the environment using these same primitives combined with juju add-machine first.


Install packages during uck Ubuntu customization

You need to chroot into your remaster-root-system. you forgot to run one command.

sudo uck-remaster-chroot-rootfs


How do I get LibreOffice Extensions to work in 12.04?

To use an extension (example Ooo2gd) with LibreOffice or OpenOffice.org in Ubuntu, follow the steps below:

You need to install Java.

In Ubuntu Software Center search "Java"

Install OpenJDK Java 7 Runtime

2, For LibreOffice, install "libreoffice-java-common":
sudo apt-get install libreoffice-java-common

For OpenOffice.org, run the command below:
sudo apt-get install openoffice.org-java-common

3, Close LibreOffice / OpenOffice, download the latest extension in your home folder (~/) and go to 'Tools' then 'Extension Manager' & then add the extension.


Change default application for a File type

Can't you just right click the file, properties > Open with, and move the mark to the program you wish to be default?


I suggest you build and try the driver referred to in the second link. With a temporary wired ethernet connection, please open a terminal and do:

sudo apt-get install linux-headers-generic build-essential git
git clone http://github.com/lwfinger/rtl8723be
cd rtl8723be
make
sudo make install
sudo modprobe rtl8723be

This is the first of these devices I've come across so we may need to tweak a bit.

Detach the ethernet. Is it now working?

When a newer kernel version, known as linux-image is installed, after you reboot, you will need to recompile the driver:

cd ~/rtl8723be
make clean
make
sudo make install
sudo modprobe rtl8723be

Please retain the files and these instructions for that time.


Is there any way to turn on/off symbolic-links (`ln -s`)?

As far as I know you can't literally turn off a symlink, or at least not in a simple way. The symlinkness of a symlink is metadata stored in its inode, and I'm not aware of a straightforward way to write to the inode to change the file type.

Rather than deleting and recreating each time it might be easier to mv the symlinks to a subdirectory called off in the conf.d directory to break them so they would no longer work (because they use relative paths) and then mv them back into the conf.d directory. You could make this process easier by making functions...

Creating on/off bash functions

For each configuration directory you want to use these functions on, You'll need to create an off directory inside that directory first, for example:

mkdir /mnt/etc/supervisor/conf.d/off

Next, create tiny bash functions to move the symlinks, that would work only in the directory (conf.d here)

Add these lines to the end of your ~/.bashrc then type source ~/.bashrc

linkoff() { mv "$1" off ; }
linkon() { mv off/"$1" . ; }

Now you can type linkoff a.conf to mv a.conf to off and deactivate it, and linkon a.conf to turn a.conf back on, as long as you do this in the conf.d directory

If you have only one conf.d directory where you need to use this, you could make linkoff a.conf work everywhere, by making functions with full paths:

linkoff() { mv /mnt/etc/supervisor/conf.d/"$1" /mnt/etc/supervisor/conf.d/off ; }
linkon() { mv /mnt/etc/supervisor/conf.d/off/"$1" /mnt/etc/supervisor/conf.d ; }


How to unmount camera (or keep it unmounted for gphoto purposes)

What helped me was disabling auto mount in the KDE settings:
I did so by removing the gphoto text, which is selected in the screenshot. I also did so in the Mit Dateiverwaltung öffnen entry.
I know this isn't very elegant, but it works.

On a side note:
Coincidentally I ran into the problem of my camera not being able to be used as a live stream camera again.
I ran sudo modprobe v4l2loopback && gphoto2 --stdout --capture-movie --debug and the output (along many other lines) was:
0.089319 gp_camera_capture_preview [gphoto2-camera.c:1404](0): 'camera->functions->capture_preview ( camera, file, context)' failed: -6
FEHLER: Film Aufnehme Fehler ... Beenden.

I scrolled further up and noticed some other device being listed there as well:
0.062068 gp_camera_set_abilities     (2): Setting abilities ('Samsung Galaxy models (MTP)')...
0.062079 gp_setting_set              (2): Setting key 'model' to value 'Samsung Galaxy models (MTP)' (gphoto2)

Then I realized that this must be a smartphone I also had connected via USB to my pc, which I almost forgot about. I unplugged it and the gphoto2 command worked again as usual.


Creating Virtual Machines using ubuntu-vm-builder

As I understand it, Ubuntu has deprecated vmbuilder.  Long-time vmbuilder users, like myself, are now forced to find other, supported methods for creating virtual machines - like virt-builder and virt-install from the libguestfs project.  Canonical has abandoned both JeOS and vmbuilder as they move their focus onto non-server deployments (e.g. mobile).  As much as it pains me to say it, this may be part of larger Canonical shifts away from server/cloud support (in perennial pursuit of a profitable business model).


Problem downloading or installing anything from Software Center

Maverick is no longer supported, so the packages were moved to old-releases.ubuntu.com. Please upgrade to a newer version or modify your sources.list


Probably your problem is in the configuration of Bumblebee. To configure it you need to edit /etc/bumblebee/bumblebee.conf. To do so, you can run in a terminal, or using Alt+F2

gksu gedit /etc/bumblebee/bumblebee.conf

First, you need to select which driver you want Bumblebee to use: nvidia or nouveau. If you have installed bumblebee-nvidia itś better to use nvidia. Replace Driver= with

Driver=nvidia

Also update the two ocorrences of PMMethod with

PMMethod=none

After rebooting this should make Bumblebee work. If you get a error running optirun regarding permissions you must execute the following command, replacing  with your username:

sudo usermod -a -G bumblebee <username>

This will only let you use your NVidia card (ie it will not make nothing regarding power management). If you want Bumblebee to turn off the NVidia card when it is not used you should check the Wiki link you provided, and the TurnCardOffAtExit value in Bumblebee  configuration.

Also, you should install bbswitch-dkms (it requires linux-headers-generic
)

sudo apt-get install linux-headers-generic
sudo apt-get install bbswitch-dkms


Installation Failed [Errno 30] Read-only file system faulty CD/DVD, drive, hard disk

Try booting again from CD, but this time press any key when the small logo appears at the bottom of your screen, to gain access to the advanced menu screen.  Once you get to it, do Check disk for defect, and Test memory.  That will tell you if there are any problems with hadware.

Also try verifying the ISO file, by running an MD5SUM on it, and try burning another CD/DVD at slower speed.


Best practice for mounting/unmounting loopback devices on a network share?

The mount order will typically be determined by the last integer field in /etc/fstab. For example:

UUID=XXX / ext4    errors=remount-ro,noatime,nodiratime 0 1

Here the last integer field will determine the order (the smaller, the earlier). So you probably want nfs mount to have some order here (e.g. 2) and loopback higher than that (e.g. 3). However, with nfs the complication can be that they are mounted only after network devices are fully up and might not happen as part of regular /etc/init/mountall.conf. So we must have the loopback device instead tied to interface coming up or down.

This is typically done by scripts in /etc/network/if-up.d. But NFS mount will happen in background since it is governed by the upstart job in /etc/init/mountall-net.conf which simply sends a signal to mountall to try and reload all network filesystems whenever a network device comes up. It seems that there will be delay after sending signal so I guess a script which will wait like this should work:

#!/bin/sh

ntries=10
while [ $ntries -gt 0 ]; do
  if findmnt <nfs-mount-point> >/dev/null 2>/dev/null; then
    if findmnt <loop-mount-point> >/dev/null 2>/dev/null; then
      # loop already mounted; nothing to be done
      :
    else
      mount -t loop <loop-file> <loop-mount-point>
    fi
    break
  else
    sleep 1
    ntries="`expr $ntries - 1`"
  fi
done

(replace <nfs-mount-point>, <loop-mount-point>, <loop-file> with actual values)
This waits for 10secs in 1sec interval for NFS to be mounted. As I mentioned the natural place to put it in /etc/network/if-up.d ordered after the upstart script there, but we better launch in background to avoid waiting specially since upstart mount will happen in background via a signal by /etc/init/mountall-net.conf. So put this script in say /usr/local/bin, make it executable (allowing to execute even otherwise) and add /etc/network/if-up.d/zzz-local (you should first check whether the script works as expected by manually running with sudo mountloop.sh):

#!/bin/sh

/usr/local/bin/mountloop.sh &

(make zzz-local as executable)
The umount is done by /etc/init.d/umountnfs.sh sysv task. What we need to do is add a script to umount loop device with an order number less than that. So add /etc/init.d/umountloop.sh like:

#! /bin/sh
### BEGIN INIT INFO
# Provides:          umountloop
# Required-Start:
# Required-Stop:     umountnfs
# Should-Stop:       $network $portmap nfs-common
# Default-Start:
# Default-Stop:      0 6
# Short-Description: Unmount network loop filesystems.
# Description:       Unmount network loop filesystems.
### END INIT INFO

umount <loop-mount-point>

(replace  by the actual value and make the script executable)
The order of umountnfs.sh is 31 in my system (/etc/rc0.d/S31umountnfs.sh, /etc/rc6.d/S31umountnfs.sh), so we will give it a smaller number:

sudo update-rc.d umountloop.sh start 30 0 6 .

Edit: I made a mistake in the mountloop.sh script before. It should have been mount -o loop and not mount -t loop. Also the umountloop.sh should have "Default-Start:" as "0 6" and not in "Default-Stop:" in the comments to be accurate though it will not hurt and I mostly copied from umountnfs.sh which has the same error.


How can I place Gedit's tab close buttons on the left?

During the Ayatana discussion in this bug report, tab placement inconsistency in the design was mentioned 115 times, in over 20 separate posts, throughout the near-800 comments, but the final decision was still to move window buttons to the left.

If you desire consistency, you're far better moving the window buttons back to the right using one of the many methods described in that bug report.  For example, use gconftool-2 --set /apps/metacity/general/button_layout --type string ":minimize,maximize,close" or add the PPA outlined in comment 792.

However, you've already fixed Firefox with a plug-in, and hopefully someone can help you hack Gedit.  That leaves the list of "to-do", for me personally, at :

Nautilus, Pidgin/Empathy, Thunderbird, Chromium and Eclipse

Bottom line, re-designing all these apps will take time.  I doubt the work will be complete for Natty, but perhaps we'll start to see some consistency by Natty+1.

I realise that this "answer" isn't going to help you.  I raise it simply to make you aware of the scope of the task you've undertaken here.


Reinstalling windows while having linux (ubuntu)

You'll have to check how your disk is set up. If you don't have any NTFS primary partitions, you'll have to make one (or resize the one with the most free space). Then you install Windows XP on that NTFS partition. Once you've done that, boot into a live system (live DVD, or USB flash drive), then run grub-install During the install, GRUB will detect your Windows and Ubuntu partitions and create entries for both. Afterwards, you can change the configuration of how you want to boot your system (the length of the auto-boot countdown, and what's the first boot option if countdown is reached).


Install Ubuntu on an MBR disk, with a UEFI system

I've seem to figured it out.
NOTE: This will destroy all data on your disk. If you would like to save data from a partition, you can run:

dd if=/dev/sdxy of=/tmp/sdxy.img bs=512M

where x is the disk value and y is the partition number.

You can then restore data like so:

dd if=/tmp/sdxy.img of=/dev/sdxy bs=512M

This will restore the imaged backup to the partition.

1: Open GParted (You can run gksudo gparted in a terminal. If GParted isn't installed, install it with sudo apt install gparted.
2: Select Devices -> Create Partition Table. Make sure it creates a GPT partition table. (IMPORTANT: This is the step where data is destroyed. If you would like to keep your data, either back it up as mentioned above, or simply convert the disk to GPT.)
3: Create a 300 MB fat32 partition at the start of the disk. Give this partition the boot and esp flags by right-clicking it and hitting Manage Flags. This will be the ESP, or the EFI System Partition. We'll install GRUB here.
4: Create a swap partition after the ESP. Sizes may vary, but the recommendation is to keep your swap partition the same size as your RAM.
5: Create an ext4 root partition after the swap partition. This partition has to be, at minimum, 20 GB.
6: Hit the green checkmark at the top to Apply your changes. (NOTE: This is when your disk will be written to. Before you reach this step, verify your configuration is correct.)
7: Exit GParted.
8: Boot into your Ubuntu installation media (CD, DVD, USB, etc.)
9: When it asks how you want to install Ubuntu, select Something else.
10: Right-click the ESP, and tell Ubuntu to mount it at /boot/efi.
11: Right-click the swap partition, and tell Ubuntu to use it.
12: Right-click the root partition, and tell Ubuntu to mount it at /.
13: Where it says to which device you want to install the bootloader, select /dev/sdb, or the disk you are installing to. (NOTE: Don't select the wrong disk during this. It is not necessarily /dev/sdb. Make sure you've selected the correct disk.)
14: Hit Install Now, and grab a cup of coffee.

And there you go. Ubuntu is now successfully installed onto your external.


Why can't Ubuntu recognize my parititions?

The screen shot you posted shows it recognizes the partitions just fine; what it seems to have trouble with is the filesystem in the 4th partition.  There seems to be something wrong with it, so run chkdsk /f on it from Windows.  Also make sure you have disabled the "fast boot" option in Windows, which hibernates the computer instead of shutting down, and that prevents safely accessing the partition from another OS.

parted's resize command only works on fat and hfs.


How do I measure the total server resource usage for commands?

The time command (/usr/bin/time, not the shell builtin) can report these and a host of other statistics:

$ /usr/bin/time -f "Real time: %E\nCPU Usage: %P\nAverage Memory Usage: %t" some-command
Real time: 0:01.05
CPU Usage: 99%
Average Memory Usage: 0

See the manpage for more.


Installing an application on Ubuntu (new user)

as your administrator have advised,x forwarding means we can get a graphical output through ssh.you can do it simply as,

ssh user@serverIPaddress -X

then you can try

sudo apt-get update
sudo apt-get install yourPackageName


foreach is a construct in the C shell and its variants (csh or Tenex tcsh for example).

Ex.

#!/bin/csh

foreach i (`seq 1 3`)
  echo "$i"
end

The default interactive shell used in Ubuntu is bash, where the equivalent syntax would be

#!/bin/bash

for i in $(seq 1 3); do
  echo "$i"
done

If you have older scripts that rely on csh, you can install the BSD csh package and/or Tenex tcsh package from the Ubuntu repository. However please see Top Ten Reasons not to use the C shell.


Ubuntu works great; can't boot into previously-working Win 10 partition after installing Ubuntu

I would not have chosen gparted from the USB to shrink my NTFS partition. Windows provides a Disk Management tool for this purpose. Also, you can use the diskpart command while booted to the Windows Recovery Environment (WRE). You can enter the WRE by holding down the shift key when restarting Windows.
When both Windows and Ubuntu use the same EFI partition, there will exist a conflict between the duplicate use of some filenames and folder locations. For example, /EFI/BOOT/BOOTX64.EFI.
One solution would be to create a second EFI partition when installing Ubuntu. After the installation is complete, move the Ubuntu Grub boot files to this new EFI partition and restore the overwritten Windows boot files in the original EFI partition. And example of how to do this is given in this answer. In your case, the two EFI partitions will reside on the same drive.


Cannot use psql "sudo: unknown user" "sudo: unable to initialize policy plugin"

I had the same issue on ubuntu 20.04 version running postgresSQL 12 version and this is how is SOLVED:

open the file pg_hba.conf in your favorite editor
Example: sudo nano /etc/postgresql/12/main/pg_hba.conf

then you will see somethin like this:-
#local         DATABASE  USER  ADDRESS  METHOD  [OPTIONS]
#host          DATABASE  USER  ADDRESS  METHOD  [OPTIONS]
#hostssl       DATABASE  USER  ADDRESS  METHOD  [OPTIONS]
#hostnossl     DATABASE  USER  ADDRESS  METHOD  [OPTIONS]
#hostgssenc    DATABASE  USER  ADDRESS  METHOD  [OPTIONS]

remove the # from the first line which un-comments the local, and replace with this below:-
local         all       all            trust

Local is how you manage Unix domain socket connections, now you can connect your database without password prompt and if you want to be asked password when connecting to database change the "trust" method to "md5", and run the following:
psql -U your_username db_name


How to dual-boot Ubuntu and Android on Lenovo s10-3t?

You can change partitions sizesusing GParted for example. This program is in Ubuntu Software Center. After you succeded with creating partition for Android, you can install it. However be aware that changing partition size can lead to some problems when made wrong.


When downloading source packages from ubuntu what is the difference between *orig.tar.bz2 and *6ubuntu2.3.debian.tar.gz

The orig.tar.gz is the original upstream source tarball. The debian.tar.gz contains the contents of the debian/ directory, which describes how to build the packages that are created from the source package (which is all three of those files, together).


You are confusing what Wine is for, you cannot install drivers from Windows in to you Linux system with Wine.

Support for software modems in Linux is a bit limited and it will be hard to make this "just work".

Wimax comes with an incompatible license and the default Network Manager support is disabled.

You can compile your own version of network-manager to enable wimax and hence network-manager will at least have a chance at recognizing your modem.

For more information modems, then have a look at the following threads and read the information available there

Help with Dial Up
What USB Modem to buy?

If compiling Network Manager with wimax support does not work for you, or you don't want to do this, then my suggested solution for your case will be to buy a cheap external modem that you can use for the same effect.


Can't connect to network with TL-WN722N (AR9271) USB adapter

Now I feel like a fool!

After couple days of trying to solve this issue I've found this guide:

WirelessTroubleshootingProcedure

so I used the command from step 2 - the long one.

In the output I've found that TL-WN722N support channels from 1 to 11. Try to guess what is the channel of my network...yes, it is channel 13.

Sollution found, problem solved.

We can close this topic :-D


How do I install Ubuntu without making a CD or flash drive?

Windows installer for ubuntu can be downloaded from http://www.ubuntu.com/desktop/get-ubuntu/windows-installer and what you get is wubi.exe. Else, if you downloaded an ISO image, you can follow Javier's solution to extract wubi.exe. But I never saw a .rar  as Ubuntu installer. (I may be wrong as well). Anyway, please confirm if it is really an ubuntu installer.


Broken ubuntu update on a 20.04 server. Unmet dependencies on linux-generic

Turns out it was a corrupted disk image that was doing the damage.
fsck.ext4 on the image, and all is now well.


Does the apache/php5 package include Zend?

AFAIK zend engine is the core of php and according to wikipedia its vm of php. I think you cannot avoid zend engine if you need to work with php. But if you are talking about Zend-Framework it won't install during LAMP installation.


Instead of turning off your firewall completely, you could instead configure UFW to allow your SSH traffic: sudo ufw allow ssh or if you decide to run SSH on a different port: sudo ufw allow 2222/tcp

UFW by default will deny all incoming connections and allow all outgoing connections. You can find more information on how to configure UFW here: https://help.ubuntu.com/community/UFW


Why is "rm" so much slower than deleting files via the File Manager?

The rm command actually removes the files, File Manager only moves the files to the trash. It is only when you empty the trash that you see the actual time that rm took to delete the files. So put simply, moving files is quicker than deleting. File Manager moves files while rm removes them.


Cannot find the HKCU\Software\Wine\Direct3D\MaxVersionGL for editing

Roseanne from the winehq just replied and give the missing idea: If it doesn't exist....create it!
Here you will find the answer:
https://appdb.winehq.org/objectManager.php?sClass=version&iId=26323
Just add the new key with the value in regedit or in the regedit of playonlinux.


How to find how much RAM does my computer have?

If you click on the gear icon (top right of your screen) then click on About this computer. The RAM is the 2nd entry down, below the computer name.

Edit

if you run sudo lshw -class memory in your terminal, this gives you the details of all available memory.


Installing GNOME desktop in Kubuntu: getting rid of KDE Wallet Service

I have run sudo apt-get remove libkf* and the message disappeared.


How to update the computer bios firmware without using Windows

Notes:

This guide also works with older versions of Ubuntu, like 16.04 (Xenial Xerus).
Although this guide is focused on Dell computers, it should fit other vendors as well.
Should also work fine with other GNU/Linux distributions.

Warning: electrical power outage during bios firmware installation may result in irreversible damage! Be sure to avoid it!

1. Update using Linux Vendor Firmware Service (LVFS) (available for some computers from 2015 onwards)

Go to the LVFS Devices Website and check the computer models available by this service. Until this point, Dell and Lenovo are the two vendors with the largest coverage.
If your computer is on the list, proceed with this section. If not, check the following sections of this guide.

Install fwupd (if not already installed):
  sudo apt install fwupd

Start the daemon service:
  sudo service fwupd start

Refresh the list of available firmware updates:
  sudo fwupdmgr refresh

List devices connected and supported:
  fwupdmgr get-devices

List updates available (for previously listed devices):
  fwupdmgr get-updates

Install the firmware update (if available):
  sudo fwupdmgr update

GUI Alternative: In case you don't want to do the update through the terminal (previous steps), you can try the Software Center, Updates tab (image below):

Reboot the machine to complete the update installation process.

If this section suited, you should be done at this point.

This is the newest and more convenient way to update bios firmware from within a GNU/Linux OS. It's an effort from many hardware vendors to offer the updates right out-of-the-box for Linux users. More information at Linux Vendor Firmware Service (LVFS).
2. Check the installed bios firmware version
  sudo dmidecode -s bios-version

3. Check the installed bios firmware release date
  sudo dmidecode -s bios-release-date

4. Find the latest bios firmware version available for your computer from Dell

Go to the Dell Support Website and find your computer by informing its model, service tag or express service tag.
Click on the Drivers & Downloads tab.
On the Operating System drop-down button, choose BIOS. The system will show the latest version available.
If the version installed on your computer is out-of-date, download the file. It's a Windows executable file (.exe).

Be sure to check the integrity of the downloaded file by running a checksum:
  sha256sum [/path/to/file.exe] | grep [SHA-256 hash informed on webpage]

If the output  hash is printed in a different color (highlighted), like in red, your good to proceed.

5. Update using Flash Boot (available for computers from 2015 onwards)
This section is suitable if your bios offers the option BIOS Flash Update in Boot Menu (image below).

If your system is using the bios in UEFI mode: copy the bios executable file  to the /boot/efi/ directory.
If your system is using the bios in Legacy mode: format a pen drive as bootable and copy the bios executable file to it.
Restart the computer.
As soon as the Dell logo is displayed, type F12 to be redirected to the Boot Menu.
Choose BIOS Flash Update.
Choose the bios executable file and execute it. The new bios firmware is going to be installed and the computer will restart afterward.
You can check the version and date of the new bios firmware installation by repeating sections 2 and 3 of this guide.
If this section suited, you should be done at this point.

6. Update using FreeDOS (bios without Flash Boot feature - older hardware)

Visit the FreeDOS Operating System Website and download the Lite USB version of it.
Write the downloaded FreeDOS image file to the USB drive using software like Startup Disk Creator (usb-creator package).
Copy the bios executable file to the pen drive.
Restart your computer.
As soon as the Dell logo is displayed, type F12 to be redirected to the Boot Menu.
Choose to boot from the USB drive (image below). If this option is not available on the menu, you might need to switch the bios from UEFI mode to Legacy mode.

At the beginning of the FreeDOS boot process, you will be asked to proceed with the installation, or cancel and leave to the DOS terminal. Choose "No - Return to DOS" (image below), otherwise Ubuntu will be overwritten with FreeDOS.

In the DOS terminal, type dir to list the directories and files available from the USB drive. You should see the bios executable file, besides the FreeDOS files.
In order to proceed with the bios firmware installation, you might need at least 15MB of free space on the current USB partition. If you don't have enough free space, you will be warned of so and the process will be automatically aborted. In this case, just delete the FreeDOS Packages folder. You won't need it anyway.
Type the name of the bios file and type enter to execute it. Proceed with the installation. At the end of the process, the computer will restart.
You can check the version and date of the new bios firmware installation by repeating steps 2 and 3 of this guide.
If this section suited, you should be done at this point.


You can't resize while Ubuntu is running.
Here is the easiest solution:

Download GParted.
Make a boot to CD or USB then boot it.
Resize the 1TB swap partition.

Note: swap = RAM + 2.


Add this to your /etc/sources.list file:

deb http://archive.ubuntu.com/ubuntu/ disco main


Installed 14.04 Ubuntu desktop ..want to upgrade kernel

If you are not expert, it is strongly recommended to use standard kernel from system repository.

Newest and/or custom-builded kernels may be unstable.


Is it safe to use the command apt-get autoremove in this particular scenario?

To focus on your past experience, if autoremove is going to remove "more than you intended", it's only doing that because those packages are no longer depended upon. That happens when you accidentally remove something :)

A common example from the good old days would be removing something Compiz-related. apt-get would show you a list of Compiz packages it was going to remove and you'd miss that ubuntu-desktop was also in there. ubuntu-desktop is just a meta-package that depends on all the packages that make up the desktop so removing it doesn't directly remove anything...

... But when you do an subsequent autoremove, all those things that ubuntu-desktop was the sole dependency... They're going bye-bye.

A few lessons:

sudo apt-get remove <package> will warn you what it's going to remove directly. It won't notify you about knock-on effects.
sudo apt-get autoremove should also warn you what it's going to do.
Use apt-get -s autoremove to do a simulated dry run if you're unsure. You can use that  on all apt-get commands.
If you reboot and you're staring at TTY1 wondering what the monkeys you've nuked this time, /var/log/apt/history.log should have you most recent activity.
If in doubt, check ubuntu-desktop is installed.

Is autoremove safe? It's heavy machinery so it's only as safe as the driver... But that said, it's hard to do permanent damage.


Lenovo Y460 Shutdown/Reboot/Logoff doesn't work

Overview:

The concept of switchable Graphics support in Linux - whether ATI & Intel, or NVIDIA & Intel - is currently in development.

Various workarounds are available, but I suspect strongly, these issues will be eventually resolved, but you may have to wait some time for stable solutions.

In the interim, may I suggest you look at the latest graphics drivers and an updated Kernel.

In my experience, if the boot/shutdown issues are not Power Management related, then they are most often Graphics related.

Remember - use a good imaging tool such as Clonezilla so that you can easily rollback if stuff goes wrong.

Updating your intel drivers & mesa stack:

The latest "bleeding edge" intel drivers can be found by adding the Edgers PPA.  These work best with the 2.6.39 kernel.

These drivers can be very unstable - but given your current graphics issues, it is worth a try.

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get upgrade

this should update your graphics including your intel driver.  If it doesnt then

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

Assuming this works - my recommendation would then to be to disable the xorg-edgers ppa from your software sources.  Updates to this PPA are frequent - and there could be a strong possibility that one or more updates could break your system.

Before you upgrade from the PPA again - take a quick image backup just incase the revised updates breaks your system.

By fortunate coincidence, the latest ATI Catalyst driver (11.6) can also work with the same 2.6.39 kernel - see the AU question and answer.

If you couple both the intel and ATI updates with the vgaswitcharoo trick - together with the latest Kernel, hopefully this should resolve both the boot & shutdown issues as well as most of your graphics issues.

Before upgrading to 11.10

Before you upgrade to 11.10 when it is finished in October this year, you should "ppa_purge" the xorg-edgers PPA as well as remove the ATI Catalyst driver.

This should allow you to upgrade successfully.


Samba won't let me view my shared folder (Ubuntu systems only)

I initially solved this by replacing my 16.10 installation with 17.04 Zesty. This worked fine for a while, but then stopped working, so I checked out the /etc/samba/smb.conf file and for some reason something had been added just after WORKGROUP. So I purged/removed samba using sudo apt-get purge samba and then reinstalled sudo apt-get install samba which reset my .conf files and everything worked again. Hence, overall I can't be sure if it was 16.10 or something to do with the .conf file.


Getting windows 7 to boot from external hard drive. Using Ubuntu

Backup your documents onto an external disk (or DVDs)
Via Gparted, make >40Go free space on your external disk (the one containing Ubuntu), and format this free space into NTFS.
Run the Windows installer and select the external disk for installation.


Battery time decreased on an HP ProBook 4530s

I've suggested this before in other posts cpu indicator --- http://www.ubuntugeek.com/indicator-cpufreq-cpu-frequency-indicator-ppa-installation-instructions-included.html --- I use this. I had similar issue with only getting two hours, but this extended it an hour on 11.10. Then with 12.04 jumped to 5 hrs. I think it works great but for some it doesn't work.

ALSO

This is a powertop link --- http://tombuntu.com/index.php/2008/09/09/reduce-power-usage-with-powertop/ --- you can stop different softwares from waking up you computer's cpu, when it is idling. forget the italicized.


Screen going blank after grub launches kernel

Since you can't access the GRUB command line you will have to do the following:

When the GRUB menu appears hit 'E'.

Now it will show the GRUB file which you can edit.

In this file change the default resolution to 640x480px (found on line 25) and make the following changed to the GRUB file:

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=off pci=noacpi"
GRUB_CMDLINE_LINUX=""

If it works with this config, go after your system boots up properly, go to terminal and type:

sudo gedit /etc/default/grub

Make the same changes here that you made previously.
Then type:

sudo update-grub


ProBIND is a Web application for administrating one or more BIND servers
Download at http://probind.sourceforge.net/


Test Sounds Missing After Messing With Pulseaudio and JACK

When you uninstalled pulseaudio, other programs and libraries were removed as dependencies.
To find out what they are (so you can reinstall them) look at the log.

The log is located here:
/var/log/dpkg.log

Look for the line that contains "remove pulseaudio" (without the quotes)
Above that line you will see what was removed as a dependency, here's what I found:

projectm-data
paprefs
libftgl2
libprojectm2
libprojectm-qt1
projectm-pulseaudio
libcanberra-pulse
indicator-sound

You can install these items with the following command:

sudo apt-get install projectm-data paprefs libftgl2 libprojectm2 libprojectm-qt1 projectm-pulseaudio libcanberra-pulse indicator-sound

The one causing your particular issue is libcanberra-pulse

indicator-sound is the one that shows a volume icon at the top in Unity


Regarding the notice: Define a root system as instructed. That is mandatory for any Linux system. It means you need to create a partition named "/".  (in the image you are missing a mount point named "/").

If Oracle is the only thing you need I would install Ubuntu as the only operating system, install virtual box in  Ubuntu, install Windows in virtual box and then Oracle in Windows.

Saves you rebooting from and into one of the operating systems.


How to access the last folder in a directory?

If secret is a directory

ls Trou/zxd/kuq/gsu/plm/secret

from man ls

  NAME
         ls - list directory contents

  SYNOPSIS
         ls [OPTION]... [FILE]...

  DESCRIPTION
         List information about the FILEs (the current directory by default).  Sort entries alphabetically if none of -cftuvSUX nor --sort
  is specified.

If secret is a text file

cat  Trou/zxd/kuq/gsu/plm/secret


Ok I Found the solution my self :)

I went to http://www.acer.de/ac/de/DE/content/drivers

Downloaded the BIOS Update installed it under Windows (I have a dualboot with win7 and Ubuntu)

after updating i could not start the computer Because of this error:

Default Boot Device Missing or Boot Failed

Solution was entering BIOS (F2) and choose legacy instead of UEFI

now my Webcam is listed and is working just fine bluetooth is also working now.

Bus 001 Device 002: ID 8087:8000 Intel Corp.
**Bus 002 Device 002: ID 04f2:b3f6 Chicony Electronics Co., Ltd**
Bus 002 Device 004: ID 0489:e04e Foxconn / Hon Hai
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Solution in German/ Lösung auf deutsch

Habe die Lösung herausgefunden:

einfach ein Bios Update durchführen: http://www.acer.de/ac/de/DE/content/drivers

danch daruaf achten das der richtige modus im bios eingestellt ist (Lagacy oder UEFI) sonst startet der PC nicht.

Danach wurde die Webcam angezeigt und funktionierte automatisch außerdem funktioniert bluetooth jetzt auch.


Difference between Ubuntu Unity 14.04 and Ubuntu 14.04 LTS

Ubuntu 14.04 LTS versus Ubuntu 14.04

Ubuntu 14.04 LTS is the long-term support release, and off-topic due to being EOL (14.04 or 2014.April release with 5 years of support has ended). 14.04 may refer to 14.04 LTS or 14.04 ESM (which is still supported by Canonical receiving updates, but off-topic here though)

Ubuntu 14.04 LTS with/without Unity

Unity is the default desktop for Ubuntu 14.04 LTS desktop version.

Ubuntu 14.04 LTS without any further info, Ubuntu 14.04 LTS may refer to

desktop, or
server, or
another install option (netboot etc)

most of which do not include desktop (ie. no Unity). The release notes refer to desktop, server, touch, and of course flavors (where Unity was replaced by another desktop (Xubuntu had XFCE, Kubuntu had KDE, Lubuntu then had LXDE etc)

https://wiki.ubuntu.com/TrustyTahr/ReleaseNotes


Can I install Ubuntu Server alongside Windows?

Ubuntu Server and Ubuntu Desktop are different just because they have different packages installed by default. See this for explanation.

So, you can turn Desktop to Server or turn Server to Desktop whenever you want.

In your case, you should give one or several partitions for Ubuntu Server installation, and install the Ubuntu Server. The installer will detect other OS's on your computer and add entries for them automatically in GRUB2 boot loader.

Thus, you can boot into Windows or Ubuntu Server every time you power on your machine.


See Windows' files from Ubuntu's default folder?

You can link it with soft link, for example:

ln -sf /media/windows/user/documents ~/Downloads

It will link "document" folder to your "Download" folder. It means you can see and access your document folder inside Downloads, just "soft link", without copying files.


To stop an event from propagating (unless the event has been set up using connect_after), you can run

object.emit_stop_by_name(event_name)

For instance, if I connected the key-press-event like this:

self.textview.connect("key-press-event", self.on_key_press)

I can stop it propagating like this:

def on_key_press(self, widget, event):
    self.textview.emit_stop_by_name("key-press-event")


Take a Screenshot, save it a specified place, with a timestamp based name and copy its filepath plus filename to clipboard

@vanadium suggested me this fine command line tool called scrot and rest was easy to figure out. (Thanks to the example in scrot's online manpage)
Putting it here, just in case someone might need it.
scrot -- is command line tool for taking screenshots. Install it.
sudo apt install scrot

Also, install these if you don't have them --> tr, xclip
sudo apt install tr xclip

Now make a text file. Write the below code into it.
#! /bin/bash

scrot '%s.png' -e 'mv $f </folder/to/save/image/> & echo $f' | tr -d '\n' | xclip -selection clipboard

</folder/to/save/image/> is the location where you want your images to get saved, once you take screenshots. You can change it to whatever you wish, any time.
Name it and save the file. Make it executable,
sudo chmod +x <filename>

Either add the file to your PATH or copy it to some folder on PATH.
After all this, bind this file to a keyboard shortcut.
Every time you launch the short-cut, it will save the Screenshot at the location in the file (you can keep changing the location in file as per your need) and put the fileName at your clipboard. (Super HANDY!!)
Feel free to ask any questions you might have.
P.S. I needed this to work with LaTeX in my own customized way.


MAC addresses are link local, and are part of the medium access control (MAC) sublayer which together with the  logical link control (LLC) data communication protocol layer make up the Data Link layer. IP addresses are routable, addressable via DNS, are usually associated with the Network layer, 1 level up. See Wikipedia.

Additional resources:

https://www.webopedia.com/DidYouKnow/Computer_Science/understanding_layers.asp


How to edit ISO Images (Including Bootable ISOs)

ISO Master
I have used ISO Master to add files to ISOs before. It is suitable for what you require because it retains the state of whether or not the ISO is bootable. I have used it in the past to add other content (like music) to a live disk. Note, however, that after making changes to an ISO file, you can only "Save As", i.e. another ISO file will be created, so make sure you have enough disk space for both.


I know about this problem. I have a Windows laptop bought in Japan and have run into the sticking tilde key issue.

As you know, the tilde key is used in Japanese windows for Japanese-oriented IME switching, and Japanese keyboards contain markings on the key to that effect.

I have drilled into the issue somewhat, but lost motivation. A summary of my meagre findings is basically this:

VirtualBox, in the virtual machine window, does not capture ordinary Windows WM_KEY events. Rather, it registers a low level keyboard hook. Look for occurences of LowLevelKeyboardProc in this VirtualBox source file.
I suspect that in Japanese Windows, due to its special role, the tilde key does not generate an up event when the key is released. Since VirtualBox needs to make a faithful simulation of scan codes to the virtualized system, it looks like tilde is being held down.
Though I've been able to monitor events flowing into VirtualBox windows using Spy++, the low level ones cannot be seen. The VirtualBox configuration UI has normal key events flowing into it, but the machine windows, absolutely nothing. Even the UI hot keys for VirtualBox itself (not destined for the machine) are all handled through that low level hook, it seems.

So testing this hypothesis would require writing a sample program which intercepts the keyboard events in the same way and shows that there is no matching "up" for a "down" for the tilde key.  Though I have Visual Studio kicking around, and it's not complicated, it's just too much effort for this silly problem.

Anyway, in spite of the incomplete investigation, I place a low probability on the notion that this is an Ubuntu issue.


How do I make xinput mouse settings persistent for a USB mouse?

You could cron the command or add it to your startup but neither are particularly elegant. If I were you, I'd add this to my udev rules and let the system detect events and fire off the command when it needs to.

First we need the mouse vendor and product strings. You can find these through lsusb. Look for your mouse. Here's my mouse shows up:

Bus 004 Device 012: ID 1532:000f Razer USA, Ltd

The In the part 1532:000f, 1532 is the vendor and 000f is the product.

So then we add a rule to udev. udev rules are found in /lib/udev/rules.d/. You can write your own or be cheeky and edit another one. There is a helpful little README in there too that I suggest you peruse (cat /lib/udev/rules.d/README).

Whichever you do you want to add a rule like this. Notice I use the IDs from earlier to make this work.

BUS=="usb", SYSFS{idVendor}=="1532", SYSFS{idProduct}=="000f", ACTION=="add",
RUN+="/usr/bin/xinput set-ptr-feedback 'USB Optical Mouse' 4 1 1"

udev should pick that up immediately.

Note udev can do pretty clever things on its own when it comes to configuring devices. You might not need xinput at all. Here's an example of a custom configuration for a mouse.


Problem with MergeList /var/lib/apt/lists/ca.archive.ubuntu.com_ubuntu_dists_precise_multiverse_i18n_Translation-en

Open up your terminal and...

First do the following:

sudo rm /var/lib/apt/lists/* -vf

Then:

sudo apt-get update

sudo apt-get upgrade


This is a bug related with wireless driver. This bug has been reported in launchpad.
Asolution is mentioned in Ubuntuforums post here.


If you have no use for Place Windows simply unticking this compiz plugin from compizconfig-settings-manager will allow you to see flash full screen without the panels for borders.

There is a bug-report for this issue:

https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/977438

The suggestion in the report is to delete the Gnome-Clock applet as this is known to cause this issue.

Alternatively - use gnome-classic (no effects) to display full-screen flash videos.


Boot loading problem after Wubi installation of Ubuntu 12.04 on Windows 7

Run a live Ubuntu CD/USB.Mount the drive where you installed Ubuntu.Run terminal and type sudo update-grub and reboot.If you still stuck with grub issue,come back again to live,type this command sudo install-grub /dev/sda where sda is the drive where Ubuntu lies.Then sudo update-grub and reboot.More info here.


Duplicate mouse pointer on second monitor on Ubuntu 17.10 on wayland

You’re describing a known Wayland bug, which affects me too. It is rergistered on Launchpad as bug 17424977. As of today (April 6th, 2018), a fix has been released upstream. There are therefore three workarounds:

wait until the change propagates to Ubuntu and try to ignore this annoying second cursor on your left screen. Or better, since it’s free software: if you can, help Ubuntu implement the change
switch to  a recent enough (i.e. brand new) branch of Wayland, which has the bugfix
switch to X11


Neither flag is defined in the top-level fsck documentation, so the most general answer is that it depends on the filesystem-specific fsck command you are using.

For many fs-specific commands, in particular e2fsck for ext2/ext3/ext4 file systems, the -f option is used to "Force checking even if the file system seems clean." This can make the command slower but is not expected to cause any harmful side effects in itself.

The -y flag is described in the fsck(8) man page as follows (emphasis mine):

For some filesystem-specific checkers, the -y option  will  cause  the  fs-specific fsck  to  always  attempt  to fix any detected filesystem corruption automatically. Sometimes an expert may be able to do better driving the fsck manually.

This implies that there is some risk involved: in some cases, the command may perform actions that would not be advised by an expert administrator.
The e2fsck command has an alternative, -p, which can be used to "automatically fix any filesystem problems that can be safely fixed  without  human intervention." The command will exit with an error if any issues are detected that require further intervention.


Dual boot with Windows 10 on Lenovo Ideapad 100

Had the same problem when trying to dual boot Ubuntu with my lenovo ideapad 110. I have found the solution finally. I did clean swipe of my HDD on my laptop, its 1TB i partitioned it in half, after installing the win OS, i shrinked a new volume to install Ubuntu on, around 100GB dependig on available space.
I then created bootable usb using rufus, while booting, i selected the UEFI option on the menu containing the flash disk. This time round it wasnt frustrating. I can comfortably switch between the two OS.
Tip: Use rufus to create the bootable usb, in my thinking it did create two types boot order from the flash..All the best.


Can't enable automatic login for the administrator account on server

As @steeldriver said in his comment, click on the unlock button top right, and after that you should be able to change the switch.


Error connecting to Windows Terminal Server VIA network boot

XX in SCREEN_XX is the session number. You switch beetwen sessions with keyboard shortcut: Ctrl+Alt+F01 (or F02 etc). You can have multiple SCREENs configured and switch at client without interrupting other sessions. Usually RDP session is set SCREEN_07, but it's not mandatory.

As of rdesktop. I don't have much experience with it, but I'm more familiar with Freerdp which is in fact a fork of rdesktop. So some troubleshooting steps might apply to both of them.

In Freerdp a blank screen might happen when the security of session is not properly defined.

First: if the RDP server doesn't have it's own certificate issued by Certificate Authority , RDP client should ignore it.

Second: setting authentication type is crucial. Usually disabling Network Level Authentication is the simplest solution.

So your config should look like this:

# xfreerdp's OLD style syntax
[DEFAULT]
SCREEN_07=xfreerdp
RDP_SERVER=192.168.X.X
RDP_OPTIONS="-f --no-nla --ignore-certificate"

OR

# xfreerdp's NEW style syntax
[DEFAULT]
SCREEN_07=xfreerdp
RDP_SERVER=192.168.X.X
RDP_OPTIONS="/f /sec:rdp /cert-ignore"

Check rdesktop manual and use it's options analogously.


Installed via USB with a set amount of system space, want to add more

What do you mean by limiting resources? A Ubuntu installation should utilize all available RAM (unless you're on 32-bit on a 64-bit system).

When it comes to partitions, you deliberately made them smaller, correct?

You cannot change the size of partitions while in Ubuntu- you must use a live cd.

Boot into a live usb/cd, install GParted, and unmount the drive you wish to resize partitions on.
If you are using swap, make sure to right click the swap partition and select "swapoff".

Then you can resize partitions as you wish.

Warning: resizing and shrinking partitions can result in data loss (while minimal). Take care and caution when doing this!


How to submit a feature request for chmod linux command

This answer completely ignores the request in favour of addressing the how you contact the right people to make a feature request in an upstream project.

This request is already been asked and rejected. The behaviour is already possible through existing mechanisms (see the comments on your question).

For the best way to get something like that under the nose of somebody who makes the decisions, you need to find out where a package comes from. Start by tracking down the package for the command:

$ dpkg -S `which chmod`
coreutils: /bin/chmod

Then look at the coreutils package details:

$ apt-cache show coreutils
Package: coreutils
Essential: yes
Priority: required
Section: utils
Installed-Size: 5920
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Michael Stone <mstone@debian.org>
Architecture: amd64
Version: 8.20-3ubuntu5
Replaces: mktemp, timeout
Depends: dpkg (>= 1.15.4) | install-info
Pre-Depends: libacl1 (>= 2.2.51-8), libattr1 (>= 1:2.4.46-8), libc6 (>= 2.15), libselinux1 (>= 1.32)
Conflicts: timeout
Filename: pool/main/c/coreutils/coreutils_8.20-3ubuntu5_amd64.deb
Size: 2477552
MD5sum: 7ebb74af562ad4b6f3c767f9a94e54fc
SHA1: 8afa0e8aff4bf33d946d1c301a2aa4b250e702f9
SHA256: e54ba21d60d20594e33e4fe2569621ed1312198014a81c7592934ed8dbb85ba0
Description-en_GB: GNU core utilities
 This package contains the basic file, shell and text manipulation
 utilities which are expected to exist on every operating system.
 .
 Specifically, this package includes: arch base64 basename cat chcon chgrp
 chmod chown chroot cksum comm cp csplit cut date dd df dir dircolors
 dirname du echo env expand expr factor false flock fmt fold groups head
 hostid id install join link ln logname ls md5sum mkdir mkfifo mknod mktemp
 mv nice nl nohup nproc od paste pathchk pinky pr printenv printf ptx pwd
 readlink rm rmdir runcon sha*sum seq shred sleep sort split stat stty sum
 sync tac tail tee test timeout touch tr true truncate tsort tty uname
 unexpand uniq unlink users vdir wc who whoami yes
Description-md5: ca29325ab0239421f7b6be11369cc121
Multi-Arch: foreign
Homepage: http://gnu.org/software/coreutils
Description-md5: ca29325ab0239421f7b6be11369cc121
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 9m
Task: minimal

Launchpad and Debian are red herrings here. They're very downstream. The project is a GNU one. The Homepage link is a good start here: http://gnu.org/software/coreutils

On there you'll find the various mailing lists you'll need to convince people on, as well as bug trackers (but I'm not sure how they'll take a feature request - check the rules first).


Ubuntu 18.04 is very slow on high end laptop

Your initial problem of video slowness is caused by your Nvidia drivers needing reinstallation, and the removal of nomodeset in your /etc/default/grub.

Now, we clear up your login problem. If you've been starting graphic applications from the terminal using sudo, that's what probably caused your problem. Always use sudo -H.

boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type:

sudo mount -o remount,rw / # remount the disk as rw
cd /home/your_username # change directory
ls -al .*thority* # list some files

You should see something like this...

-rw------- 1 your_username your_username 407910 Nov  2 08:56 .ICEauthority
-rw------- 1 your_username your_username     58 Jun 23  2017 .Xauthority

If it DOES NOT show -rw------- then...

sudo chmod 600 .*thority* # change file protection

If it DOES SHOW root root then...

sudo chown your_username:your_username .*thority* # change file ownership
reboot # reboot the computer

Reboot and see if you can log in.


Dual boot problems after routine upgrade (all the usual solutions tried and failed)

I also have this sort of problem when I upgraded. To solve this you have to boot with help of live CD of ubuntu. Then you have to install boot repair using these commands in terminal

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo sed 's/trusty/saucy/g' -i /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list
sudo apt-get update
sudo apt-get install -y boot-repair && (boot-repair &)

After installing this you can use recommend repair option available in boot repair. If this does not solve you problem then you can further use advanced options available in boot repair. Detailed instructions for boot repair can be found here. Boot-Repair


Annoying find operation running unasked in background

The process seems to be related mlocate, locate or update.db cron tasks.

It seems enough to delete all that jobs in /etc/cron.daily.


Depending on your security with ubuntu you may or may not need sudo you can always force in terminal.

sudo application-fullscreen


Passwordless ssh config gives Server refused our key

Luckily found how to fix it by accident - seems sshd cannot read from ~/.ssh/authorized_keys for unknown reason (have the same installation and configuration on another machine where passwordless ssh works).
I was forced to enter another file location in /etc/ssh/sshd_config:
AuthorizedKeysFile      /home/asdf/authorized_keys/

instead of
AuthorizedKeysFile      .ssh/authorized_keys


How to standby a monitor using xset in multi monitor setup?

Controlling individual monitors is not possible with xset ( and X11 actually)

As the title suggests, it is not possible for reasons of how xset is built and due to the X11 functions it uses. If we look at the source code, xset calls DPMSForceLevel(dpy,DPMSModeSuspend) (line 557), and the display variable dpy comes from XOpenDisplay() function ( line 203 ), and that is by definition:

  A server, together with its screens and input devices, is called a display.

In other words, xset applies settings globally to the whole display, not individual Screens. It'd be necessary to change xset source code in order for that to work. DPMS extensions themselves mostly seem to only call whole display, not individual screens, so it is not possible to even write custom code with X11 library.

Manually controlling that setting via /sys subsystem also doesn't appear to be working

$ sudo bash -c 'echo Off > /sys/class/drm/card0-VGA-1/dpms'
[sudo] password for admin:
bash: /sys/class/drm/card0-VGA-1/dpms: Permission denied

Screens also are taken out of DPMS mode when key or mouse events occur, so considering that you may want to move your mouse or use keyboard, either of those actions would cause the monitor to leave DPMS mode.

Alternative workarounds

Best alternative (and actually physically working solution) is xrandr - it could be used to control the individual "outputs". In particular,

xrandr --output VGA-1 -off

will set that output off. Yes, you've mentioned that you don't want to use this solution since it is not fast enough, however so far it is the best one available. It has couple of advantages:

immune to key and mouse events
independently controls outpus unlike xset

The xrandr --output VGA-1 --brightness 0.1 will colorize the screen in such way that it appears off, even though --brightness is a software solution, so the display is not actually dimmed at hardware level, nor it is off on hardware level. However, it does the job of blanking a screen and is also resistant to key/mouse events.

I've looked source code of Mate and Budgie screensavers, which are both forks of GNOME screensaver, however in either case they seem to be a software solution, since there's no mention of DPMS in the source code.


Relation between the kernel version and the codename

The codename corresponds to the release. So, Ubuntu 14.04 will always be referred to as "trusty".  The fact that you are using kernel 4.4.0-34-generic suggests that you are using the hardware enablement stack (HWE) that came with a later point release of trusty (14.04.5).
The roadmap for kernel releases for each Ubuntu release as well as other information regarding Ubuntu kernels may be found at the Ubuntu wiki site here.
A list of Ubuntu kernels mapped to the mainline linux kernel is tracked here.


B&O Audio Drivers or pin remap for Ubuntu on HP Pavilion 15

There is a kernel bug report on this (and a fix): https://bugzilla.kernel.org/show_bug.cgi?id=195457#c11
The trick is to copy sound card settings from Windows to Linux. Here is the content of the above bug report comment:

I also had the same problem with my ASROCK X370 Gaming K4 (ALC1220):
1st case: Booting FIRST Linux: Sound with noise/crackling.
2nd case: Booting FIRST Windows and SECOND Linux: Sound is perfect.
I succeed in solving the problem by comparing the Coeff values in both cases and assign the values of the second case in a script at boot time. How to:

Install alsa-tools.
In both cases, you have to run: echo 1 > /sys/module/snd_hda_codec/parameters/dump_coefs
Then, in the first case,  alsa-info --no-upload --output infos_bad
Then, in the second case, alsa-info --no-upload --output infos_good
Finally, you compare the coef values: diff infos_bad infos_good | grep Coeff

For changing the value of each different Coeff, you need to proceed as follows: for example, changing Coeff 0x67 to value 0x3000
hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x67
hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x3000

You have to do this in the growing order of Coeff. Remark that hwC0D0 refers to your sound card. In case of HDMI output like me, my sound card if hwC1D0.
Here is a quick script:

#!/bin/bash

coeffs=($(echo 0x{16,43,44,5d,5e,63,67}))
values=($(echo 0x{8020,3405,fa10,0606,0000,e430,3000}))

for i in `seq 0 $(( ${#coeffs[@]} - 1 ))`
do
  hda-verb /dev/snd/hwC1D0 0x20 SET_COEF_INDEX ${coeffs[$i]} && hda-verb /dev/snd/hwC1D0 0x20 SET_PROC_COEF ${values[$i]}
done

Just change the coeffs to change in the array 'coeffs' and the new values in array 'values' and exec this script. A remark, while I do not shutdown the power supply, my audio chipset keeps the values. This is why you need to do the FIRST case (first...) and then the second. Then, you could test if it works only when you shutdown the power supply of your mobo and then booting into Linux directly.
I'm preparing a patch for the kernel but for those who have the problem, could you post your coeff/values which need to be change please.
Hope this helps.


Your CPU integrated card should be enough to run Windows 8 eyecandy.

The fact that you can't check 2d/3d acceleration makes me wonder if you have too little memory allocated to the virtual video card.

Try to increase it in the Display section at the virtual machine preferences menu. Make it at least 256 Mb if possible.


Creating .desktop files for wine applications

You already seem to know that you need to specify the window class in the .desktop file for the program to be grouped correctly. Since it does not get grouped correctly, these probably don't match. To find out the window class of your running application, do the following:
- Start the application
- start a terminal
- run "xprop" in the terminal
- click on the program's window

You now get the window's properties printed in the terminal. Near the bottom should be a line "WM_CLASS". It contains one or more Strings, which are the window classes assigned to your program's window. Try to find one that is unique for your window (Wine applications seem to have "Wine" as one window class, which probably causes your windows to appear with the Wine icon, so take the other one if there is one). Use this String (only one, not both of them) in the StartupWMClass property of your .desktop file.

If you already did exactly that, I'm afraid I can't help you...


How can I record all URL and IP outgoing traffic on my computer so I can see what people are up too

Maybe you want to take a loot at tcpspy (just type "sudo apt-cache search tcpspy" and install it if you like "sudo apt-get install tcpspy"...
ftp://ftp.tu-clausthal.de/pub/mirror/gnu/www/directory/tcpspy.html

This logs your tcp traffic... maybe you need something for udp, too!


Reducing the bit rate will involve re-encoding, which means that you'll have to create separate output files. You could use avconv from the command-line:

avconv -i input.mp3 -c:a libmp3lame -b:a 128k output.mp3

To do a whole directory of .mp3s:

for f in ./*.mp3; do avconv -i "$f" -c:a libmp3lame -b:a 128k "${f%.*}-out.mp3"; done

This will create files with -out.mp3 at the end of their names. If you want to replace your originals, you can then use mv to overwrite them (warning: this should be considered irreversible):

for f in ./*.mp3; do avconv -i "$f" -c:a libmp3lame -b:a 128k "${f%.*}-out.mp3" && mv "${f%.*}-out.mp3" "$f"; done

It might be safer to do this in two steps:

for f in ./*.mp3; do avconv -i "$f" -c:a libmp3lame -b:a 128k "${f%.*}-out.mp3"; done
for f in ./*-out.mp3; do mv "$f" "${f%-out.mp3}.mp3"; done

You can do this to files recursively (every .mp3 in the working directory and all sub-directories):

shopt -s globstar
for f in ./**/*.mp3; do avconv -i "$f" -c:a libmp3lame -b:a 128k "${f%.*}-out.mp3"; done
for f in ./**/*-out.mp3; do mv "$f" "${f%-out.mp3}.mp3"; done


How can I queue failing or missed backup jobs, even if the computer is asleep or off?

Since you specifically asked for it:

Queue failing or missed backup jobs, even if the computer is asleep or off

When running backup jobs on the server, it would be relatively easy to retry (queue) failed jobs, since we may assume the server will be the "stable" factor. Queue -ing missed backups can be done by routing the cronjob to a script, creating a queue whenever the backup fails.

When the jobs run on the client however, the story is slightly different. When we run the job from cron, how do we notice a job failed? Since the job was not initiated if the client computer is sleeping or switched off, things would get far more complicated to set up from cron.

Therefore, if you want to run scheduled backups, making sure failed or missed jobs will run on the first occasion, I would suggest not using cron at all.

Setup scheduled/queued backups in a single file

The solution below is a relatively simple to set up, by the following steps:

Write, and test, an rsync backup command. Use grsyncif you are unsure about how to do that.
Copy the script below into an empty file, give it the name (e.g.) of the backup job, like:

backup1.py

In the head of the script, make appropriate settings:

#--- enter the working rsync command below
rsync = "rsync -r -t --progress -s '/home/jacob/Bureaublad/test2' '/home/jacob/Bureaublad/test1'"
#--- set backup time interval below in hours/minutes
interval = [0, 10]
#--- set message True if you'd like a warning if a job failed (else False)
message = True

Enter the rsync command between double quotes, like in the example.

Save the script with a unique_name.py

That's it. From the start time of the script, the backups will run exactly after each interval. If the job fails, it is queued (retried once per minute) until it can be run succesfully. After that, the new backup is set on the exact scheduled (next) time.

Subsequently, test- run the script with the command:

python3 /path/to/script.py

If all works fine, add it to Startup Applications: Dash > Startup Applications > Add. Add the command:

python3 /path/to/script.py

The script

#!/usr/bin/env python3
import subprocess
import time
import os
import datetime

#--- enter the working rsync command below
rsync = "rsync -r -t -s '/home/jacob/Bureaublad/test2' '/home/jacob/Bureaublad/test1'"
#--- set backup time interval below in hours/minutes
interval = [24, 0]
#--- set message True if you'd like a warning if a job failed (else False)
message = True
#--- set the max- size of the logfile below (n- lines)
maxlog = 100

#--- don't change anything below
backup_id = os.path.basename(__file__).split(".")[0]
home = os.environ["HOME"]
datefile = home+"/next_backup_"+backup_id; logfile = home+"/backup_log_"+backup_id
print(datefile, logfile)
interval = (interval[0]*3600)+(interval[1]*60)
failed = False

def failed_message():
    # shows a zenity message if a backup failed
    subprocess.Popen([
        "zenity",
        "--info",
        "--text="+backup_id+" failed\n"+\
        "See "+logfile])

def readable_t(sec):
    # converts epoch time to readable date & time
    return datetime.datetime.fromtimestamp(sec).strftime('%Y-%m-%d %H:%M:%S')

def currtime():
    # returns current (epoch) time
    return int(time.strftime("%s"))

def sync(failed):
    # performs the rsync command, on errors: writes to log and shows message
    try:
        subprocess.check_call(["/bin/bash", "-c", rsync])
        set_next(planned, interval, currt)
        return False
    except subprocess.CalledProcessError:
        if failed == False:
            open(logfile, "+a").write(readable_t(planned)+" failed\n")
            if message == True:
                failed_message()
        return True

def next_run():
    # reads current queue file, creates it if it doesn't exist
    try:
        return int(open(datefile).read())
    except FileNotFoundError:
        currt = currtime()
        open(datefile, "wt").write(str(currt))
        return currt

def set_next(lastr, interval, currt):
    # creates the next queue, maintains the log file
    nextrun = lastr
    while nextrun <= currt:
        nextrun += interval
    open(datefile, "wt").write(str(nextrun))
    newline = [readable_t(lastr)+" succesfully finished on "+\
                        readable_t(currtime())+"\n"]
    try:
        limited_lines = open(logfile).readlines()[-maxlog+1:]+newline
    except FileNotFoundError:
        limited_lines = newline
    with open(logfile, "wt") as log:
        for l in limited_lines:
            print("4")
            log.write(l)

while True:
    time.sleep(60)
    planned = next_run(); currt = currtime()
    if currt > planned:
        failed = sync(failed)

Furthermore

The script keeps a logfile, named after the backupscript.
The maximum number of lines, to keep in the logfile, can be set in the head of the script:

#--- set the max- size of the logfile below (n- lines)
maxlog = 50

An example

In the example below, the script is set to backup every five minutes, starting from 11:10 a.m.

The first two (11:10, 11:15) run succesfully
The third one (planned 11:20) fails, due to the fact that the laptop sleeps. The job is queued and executed slightly delayed. The job finishes at 11:27, the next scheduled backup runs on 10:30
Then, the job, scheduled at 11:35 fails, due to the fact that the server is not available. If you set message = True:

The job is queued and successfully runs later, at 11:41:44

and so on

How to reset the start time of the backup?

Simply delete the queue file in your home directory of the corresponding backup job (starting with next_backup_) the current time will the be the new start time of the cycle.

How it works under the hood

When the script starts up, the first backup is created (starting within a minute from startup of the script).
When the job is finished, the script creates a queue file, timed at the (start) time of the finished job + the set backup interval.
Once per minute, the script checks if the queue file is "over time", comparing the current time to the queued time. If so, the script runs the backup job, creates the new queue and so on.
What happens if the laptop (client) is switched off?
Then the latest created queue file is not refreshed (overwritten) by the script, so it will run the delayed backup on the first occasion after starting up (or waking up) of the computer.
How is the next backup queue created after that?
The next backup is always calculated in whole steps of the backup interval, and will always be "in phase". In other words; if the first backup was made on 12:00 p.m., and you set the interval to [24, 0], the next backup will always be queued at 12:00 of the next day.

Multiple backup jobs?

The script sleeps most of the time. If not, it only looks into the queue file once per minute. SInce means nothing to your system, it is very well possible to run multiple backup jobs, each with their own log & queue file, at the same time. Since both the log- and queue file are named after the script's name, all you have to to is to give each of the scripts a unique name


Boot from your USB drive and reinstall grub onto your boot device with

grub-install /dev/sda


System loses sound configuration in Ubuntu 20.04

I had a similar problem where my Ubuntu 20.04 kept loosing sound configuration. I had to manually choose the profile
Analog Surround 5.1 Output + Analog Stereo Input (unplugged)(unavailable)

in PulseAudio Volume Control GUI Configuration tab after each reboot and after each plug-unplug of the headset, because it kept falling back to the profile
Digital Stereo (IEC958) Output

which produced no sound. The following workaround stopped this problem.
I added the line
set-card-profile alsa_card.pci-0000_00_1b.0 output:analog-surround-51+input:analog-stereo

to the end of /etc/pulse/default.pa
where the code name of my soundcard alsa_card.pci-0000_00_1b.0 and the preferred profile output:analog-surround-51+input:analog-stereo
were taken from the output of
pactl list cards

in the Name: and Profiles: sections
Now the sound setting is preserved through reboots and switching to the headset and back.


Neverwinter Nights hangs at startup in my Kubuntu 14.10 VMWare Guest

I experienced the same symptoms: no output, no window, no logging, almost no CPU usage and a similar strace when running Neverwinter Nights. This was on Kubuntu 14.04 from a NWN installation that used to work fine with 13.10 and older versions.

Someone clever on the ArchLinux forums (https://bbs.archlinux.org/viewtopic.php?id=155009) traced the problem back to libtxc-dxtn-s2tc0 using gdb debugging. This libtxc-dxtn-s2tc0 is an optional OpenGL extension for texture compression. Optional. :)

I removed it with

apt-get remove libtxc-dxtn-s2tc0:i386

and now NWN starts again and I can load a save game from the official campaign without any noticeable problems.

However, some textures, e.g. from the community expansion project, are missing (white) in game. This is likely due to them being compressed with the s3tc algorithm (which is implemented by above library). The good news is that some (most?) graphic cards can deal with compressed textures directly. To force OpenGL to simply pass the compressed textures to the graphics card, set the environment variable

force_s3tc_enable=true

before starting NWN. That fixed the white textures for me, but might not be a complete substitute for the library, as someone warns here: Is there an easy way to enable S3TC on Intel graphics?

Note, this libtxc-dxtn-s2tc0:i386 library is also supposed to improve graphics performance, but NWN is so old, it should not matter. Since the above command only removes the 32-bit version of the library, 64bit games should not be affected at all.


Can't find Documents folder while uploading in Ubuntu 16.04

Recovering deleted files

Click on the Trash icon in the Ubuntu Launcher.  Select the files/folders and click the Restore Restore Selected Items.

Locate the Documents folder is it's moved.

If you don't find your Documents folder, you may have inadvertently moved it, as to why you can't find it.  You can search your entire drive with this command sequence:

$ sudo updatedb
$ locate /Documents/ | less

Search that screen with the arrow keys for familiar files that you are sure were originally in your Documents folder.  If you find your Documents folder you can move it back to the original location with:

$ mv /[misplaced location]/Documents ~/Documents

Replace [misplaces location] with the full pathname of where you find your Documents folder.  Don't include the brackets in the example.

Locate files that were in the Documents folder.

If you can't find the Documents folder by it's name because the name mayh have inadvertently been changed, use the find command to find a file that you are sure would be in your documents folder.  This command will show you all the *odt files on your system.

$ locate -ir "*.odt" | less

You can use the search option of the less output by hitting the / key and typing in a search string.  Enter a filter that would include part of the name of your saved resume.


the best solution I have found for your exact problem (which is currently my problem, too!) is to use and install eezupnp (http://www.eezupnp.de/) and play through Ubuntu on that.

Eezupnp allows you to search through your music databases (local, or network upnp/dlna based) and play them out to DMRs (media renderers, which your AirCam will assumedly be detected as)

Eezupnp isn't as nice a solution as what you or I want, so it's not my final solution (I'm looking for one to work with Banshee, which seems to be receiving some UPnP work) but if I work something out, I'll let you know!

edit: After using Eezupnp a bit more, it seems very buggy with my device (XW SMA3 Pioneer Wireless Speaker). Songs in my playlist don't auto play all the time. Hopefully you have more luck.