As a quick fix you can simply find another running tor browser process/es (which should be the cause of the problem) and kill it/them. Like:

$ps aux | grep tor
# find the process, it should be distinguishable from
#'monitors', 'grantors' etc, or fine tune the grep command
# above
# then kill the tor browser
$kill 1234

I have the same problem. It, seemingly, occurs, when I try to do some actions (probably restart) with the audit daemon. After them tor refuses to start.

I found this question, and thank you, you pointed to the fact, that the browser has all necessary libs with it. So then I manually fixed the command (i.e. pointed to the libs etc. correctly, tor reported an error that another tor instance is running with the same data directory. So I killed it and it fixed the issue temporarily.


How to determine identity of obscure `nic:br-` devices in powertop?

These are ethernet bridge devices, and you can investigate them with the /sbin/bridge or the older /sbin/brctl utilities. You can bring them down with the traditional ifconfig <dev> down command.

In this case it looks like they are created by Docker. I recently discovered that these devices seem to persist and defy power management even if you're not immediately running Docker.


Linux Kernel current version ahead of Ubuntu

I'm similar to you mate, but I am running 5.2.5 (haven't installed 5.2.6 yet) on Ubuntu.

Ukuu is a great tool for installing up-to-date kernels, can be installed as follows.

sudo add-apt-repository ppa:teejee2008/ppa

sudo apt-get update && sudo apt-get install ukuu


Move file to external hard drive sub-directory

Mount the device as /mnt/usb

Create a folder
mkdir -p  /mnt/usb/Backup/Dec_02_2016

Copy to the recently mounted device
cp -p /home/User_F_Readout/Downloads/Temp_Report_56_09242016.txt /mnt/usb/Backup/Dec_02_2016


After googling many websites with Dell Inspiron USB Boot Error I found a link to these instructions (pendrivelinux.com - BIOS USB booting tips and tricks) which tells us to unplug all other USB devices:

Port 1 had extra power cable for charging USB devices next to laptop.
Port 2 had USB bootable flash drive that didn't work.
Port 3 had Logitech unifying receiver for K800 backlit keyboard and MX Pro mouse
Port 5 had 10 foot USB 3 cable to 7 port powered hub containing printer, UPS (Uninterruptable Power Supply) communications, cell phone and bluetooth headphone charging.

Unplugging everything except the USB Flash drive made USB boot successful:


Upgraded 16.04 to 18.04, won't let me log in

The solution to this question in jolindbe's own words copied from a comment which was posted an hour ago is:

  As for my problem (above), I finally managed to login to the Ubuntu prompt, and from there I could find that some packages were not correctly updated. After updating those, I ended up with a (mostly) perfectly working 18.04 system.


You can use a the ppa-purge utility to remove any packages installed by a ppa and downgrade any packages that were upgraded by the ppa.

$ sudo apt-get install ppa-purge
$ sudo ppa-purge ppa:ubuntu-wine/ppa


Looking for a way to halt background tasks/create a benchmark mode

One of the ways is to switch the system to multi-user target (this means without graphical session) reducing running processes to about 50:
sudo systemctl isolate multi-user.target

or even switch to single user (about 10 processes will run)
sudo systemctl isolate runlevel1.target
# Enter
su -l your-user-name

And then run your application on these runlevels.

When benchmark finished - switch back to graphical session by
sudo systemctl isolate graphical.target


Just one more option with tee:

cat original.txt | tee blah.*

And here's a test case that you can try at home under supervision from a responsible adult:

$ echo "rawr" | tee blah.{1..99}.txt
rawr

$ ls
blah.10.txt  blah.26.txt  blah.41.txt  blah.57.txt  blah.72.txt  blah.88.txt
blah.11.txt  blah.27.txt  blah.42.txt  blah.58.txt  blah.73.txt  blah.89.txt
blah.12.txt  blah.28.txt  blah.43.txt  blah.59.txt  blah.74.txt  blah.8.txt
blah.13.txt  blah.29.txt  blah.44.txt  blah.5.txt   blah.75.txt  blah.90.txt
blah.14.txt  blah.2.txt   blah.45.txt  blah.60.txt  blah.76.txt  blah.91.txt
blah.15.txt  blah.30.txt  blah.46.txt  blah.61.txt  blah.77.txt  blah.92.txt
blah.16.txt  blah.31.txt  blah.47.txt  blah.62.txt  blah.78.txt  blah.93.txt
blah.17.txt  blah.32.txt  blah.48.txt  blah.63.txt  blah.79.txt  blah.94.txt
blah.18.txt  blah.33.txt  blah.49.txt  blah.64.txt  blah.7.txt   blah.95.txt
blah.19.txt  blah.34.txt  blah.4.txt   blah.65.txt  blah.80.txt  blah.96.txt
blah.1.txt   blah.35.txt  blah.50.txt  blah.66.txt  blah.81.txt  blah.97.txt
blah.20.txt  blah.36.txt  blah.51.txt  blah.67.txt  blah.82.txt  blah.98.txt
blah.21.txt  blah.37.txt  blah.52.txt  blah.68.txt  blah.83.txt  blah.99.txt
blah.22.txt  blah.38.txt  blah.53.txt  blah.69.txt  blah.84.txt  blah.9.txt
blah.23.txt  blah.39.txt  blah.54.txt  blah.6.txt   blah.85.txt
blah.24.txt  blah.3.txt   blah.55.txt  blah.70.txt  blah.86.txt
blah.25.txt  blah.40.txt  blah.56.txt  blah.71.txt  blah.87.txt

$ cat blah.67.txt
rawr

$ echo "hooray" > original.txt

$ cat original.txt | tee blah.*.txt
hooray

$ cat blah.67.txt
hooray


How to start and run a command in X server from remote Terminal?

Try starting X server using screen. It will keep it running as a daemon, so that nothing can close/suspend the process.


Step 1: Create the bridge

You probably have bridge-utils installed already, but in case you don't:

sudo apt-get install bridge-utils

In the host and as root, edit /etc/network/interfaces:

auto lo
iface lo inet loopback

auto br0
iface br0 inet static
address 68.168.105.130
netmask 255.255.255.0
network 68.168.105.0
broadcast 68.168.105.255
gateway 68.168.105.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8
dns-search dedicated.codero.net
bridge_ports em2
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off

Now you can either re-boot or:

sudo ifup br0

Reference

Step 2: Modify your VM definition to use the bridge

Note: There is probably a way to do this step using virt-manager, however I do not use it and do not know how.

Use virsh edit and change your interface definition lines to use bridging instead of what is currently being used. Here is an example from one of my VMs. Before:

<interface type='network'>
  <mac address='52:54:00:0d:ed:95'/>
  <source network='default'/>
  <model type='virtio'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>

after:

<interface type='bridge'>
  <mac address='52:54:00:0d:ed:95'/>
  <source bridge='br0'/>
  <model type='virtio'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>

Step 3: Specify the static IP address in the guest VM

Now, while running the guest VM, which might have network issues for the moment, edit /etc/network/interfaces and add the static definition for the interface name. For example, and guessing a little for your setup:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 68.168.105.101
netmask 255.255.255.0
network 68.168.105.0
broadcast 68.168.105.255
gateway 68.168.105.1
dns-nameservers 8.8.8.8
dns-search dedicated.codero.net

Notes:

The default editor used by virsh edit is as defined by the $EDITOR environment variable, or vi if it does not exist. add export EDITOR="/bin/nano" to your ~/.bashrc file to set, for example, nano as your default editor.

You MUST use virsh edit do not edit the XML file directly, as virsh edit will do a bunch of checks upon save and exit. From any directory, and for example, do:

virsh edit desk_tt


How to properly dual boot kubuntu and windows 10

You should check some Windows configurations before proceed to install Kubuntu.

Fast Startup locks down the hard drive so once you power off access to the disk from anothe OS is not posible (http://www.howtogeek.com/243901/the-pros-and-cons-of-windows-10s-fast-startup-mode/).

Also this could be a problem with uefi (Installing Ubuntu Alongside a Pre-Installed Windows with UEFI), make sure your bios is in CSM Boot mode.


Maybe, instead of installing additional software, you can use what the system has to this end:

Create a directory to serve as the mount location:

sudo mkdir /media/iso

Mount the ISO in the target directory:

sudo mount -o loop path/to/iso/file/YOUR_ISO_FILE.ISO /media/iso

Unmount the ISO:

sudo umount /media/iso

On your desktop will appear the mounted ISO.


How to run crobjob to create directory on desktop

The syntax of mkdir is simple. From man mkdir :

   mkdir [OPTION]... DIRECTORY...

Thus the correct use is mkdir /home/subir/Desktop/new, not mkdir directory /path.

When you specify multiple arguments, and none of them are options, mkdir will threat them as seperate directories to make. Thus, it tried to make new and /home/subir/Desktop.

You should probably learn to use man pages to figure out such things quickly yourself.


Here's a list of some of the prominent programs that are expected to have native support for touch:

http://www.ubuntu.com/tablet/features

The input in Ubuntu Touch (15) is enabled by a mix of QT5 for the touch bit and Maliit for the virtual keyboard.  Telephony(cellular) is enabled is inherited via pieces contributed by Nokia to the Maemo and Meego projects.

Basically any app that runs on Linux should be supported... however their desktop GUI may not work well with input stack.

Ubuntu Touch tablets do support microUSB keyboards and microHDMI output to large monitors, turning your tablet into a desktop, though.  This way you can still use programs whose GUIs are well suited for touch at the present.

As it is Linux and has no manufacturer restrictions against the device owner's permissions (jailbroken Android), you can certainly run and install apps in the terminal -- even ones that require root.

BASH scripts will assuredly run, as well!

There's currently no Ubuntu Touch tablets on the market, but that will soonc change, as your comment suggests you may know.  The Aquarius Touch 10 by BQ is currently in preorder... it's somewhat pricey, but I guess that's the price you pay for early adoption:

http://www.webupd8.org/2016/03/aquaris-m10-ubuntu-edition-tablet.html

It ships (supposedly) the second week in April.  Hardware is a solid "meh" but the cool factor of a popular Linux distro on a tablet perhaps makes up for the price and hardware.


Can I use testdisk to recover the Windows partition over which Ubuntu was installed?

No, I doubt testdisk will recover even a partially usable Windows installation after you installed Ubuntu over it twice; a lot of the original data has been overwritten and is now irretrievable.

Your best option is to look at the manual or online on how to use your recovery partition to restore the computer to its "factory" state -- the recovery partition should contain everything necessary to do so. This recovery mode is often triggered by pressing a special key combination at bootup, an option in the BIOS boot menu, etc.


How can I sync 'GNOME To Do' and Google task lists?

When I add/delete tasks on GNOME To Do, they are immediately added/deleted on Google Tasks. However, when I add/delete tasks on Google Tasks, they are added/deleted on GNOME To Do only after I logout from Gnome and log back in. Perhaps it would be good idea to visit the GNOME To Do GitLab (https://gitlab.gnome.org/GNOME/gnome-todo/-/issues) and suggest the inclusion of a "sync" button and/or a periodic auto-sync feature.
Not sure if this will useful to you, but in my case I have two lists in GNOME To Do: a locally-stored list and the list from the Google account. The local list is stored in ~/.local/share/evolution/tasks/system/tasks.ics.
I was able to move tasks from the local list to the Google list using Evolution (simply drag each task from the local list into the Google list). Make sure you back up the 'tasks.ics' file before trying this. I almost lost all of my tasks trying to move tasks from a list to another in Evolution.
The only problem is Google Tasks does not record priority information, so all priority information from the local list is lost when you move it to the Google account list.


Creating a network with 1 windows pc and 1 laptop using ubuntu 14.04

You can try setting up an SSH server on Windows, then use the runas Windows command to run commands as an administrator.


network interface (onboard wired) is showed p5p1 instead eth0

In ubuntu 14.04, all I did was this:

Modify /etc/default/grub and add:

GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=0 biosdevname=0"

Then force the create of a new grub.cfgfile

sudo update-grub

Then reboot the system


Startup Disk Creator wont let me pick my iso file

your usb disk was not mounted at all.Mount your usb drive,format it to fat32 filesystem and then open startup disk creator.

Now your usb drive was automatically detected and you can able to choose the iso.


Samsung Intel Graphis HD 3000 + Nvidia GeForce GT 520MX

You will have to manually download Nvidia drivers for your Graphics Card.

You can get it from here:
http://www.geforce.com/drivers/results/45532

Intel HD Graphics is supported by default in Ubuntu.


How to find out what codec is being used in a video

One way of doing this is by using VLC. Open the file in question, right click on it in the playlist and you'll see something like this:

I'm on OS X but the idea is the same.

Another way is to open a terminal, navigate to the directory containing the file and do:

file foo.avi

This doesn't provide a great deal of information but it is a start.


You do not need to uninstall your Windows XP or extract the files from ISO.
When you burn ISO, burn it with your CD/DVD burning program (Burn image to disc).

Then make sure in BIOS is set the booting sequence: CD booting before the your hard disc.

You can verify the booting sequence with another CD/DVD (e.g. Windows installation disc).


On Linux as well as on Windows we can add a path to the environment variable $PATH and all programs in this path will be available as shell commands. This topic is covered by the questions:

How to add a directory to the PATH?
How to add path of a program to $PATH environment variable?
How to add /home/username/bin to $PATH?

On Linux is also available and different approach. Here are few available standard directories where we can put our executable files or symbolic links to them. This topic is covered by the questions:

Differences between /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, /usr/local/sbin?
How to understand the Ubuntu file system layout?
Where should I put my script so that I can run it by a direct command?


Stuck on "waiting for apt-get to exit" in Software Centre

apt-get is a tool for handling dpkg packages and handles one package at a time. There's may be a case that your previous action is still engaging the apt-get engine. Just like @karel suggested, 'close first and then only try another'

Note: If its not solving the problem and neither rebooting, maybe some old apt-get thread was halted while executing, leaving apt locked.
You'll need to delete the lock file with sudo rm /var/lib/apt/lists/lock and also the lock file in cache directory with sudo rm /var/cache/apt/archives/lock


ModuleNotFoundError: no module named '_mysql' on Python 3.8.2

Install python3-mysqldb
You can intall this package in Ubuntu via this command:
sudo apt install python3-mysqldb


automount ntfs partition read-only if not cleanly unmounted

You can run this script that will try to remount it read-only if a mount like ordered in /etc/fstab fails:

nano /usr/local/bin/mount-c-ro

and enter

#!/bin/bash
# mount this device
DEVICE=/dev/sda5
# any folder that exists on that device
CHECK=/media/Win8/Windows/

echo try to mount $DEVICE...
sudo mount $DEVICE

if [ -d $CHECK ]; then
    echo $DEVICE is mounted by /etc/fstab
    echo occurrences in fstab:
    sudo grep $DEVICE /etc/fstab
else
    echo mounting $DEVICE read-only...
    sudo mount -o ro $DEVICE
    echo done
fi
echo mount status is:
mount |grep $DEVICE

then give it execute right:

chmod +x /usr/local/bin/mount-c-ro

Maybe you can run this automatically at the end of your boot process, but I don't know how and it probably will be a problem that its output is not catched. (maybe it also hat so return 0)


How to make touchpad settings stick on Ubuntu 14.04.1 (Trusty)

Go to the dash
Type gedit and click the icon
Copy-paste the following text into it:

#!/bin/bash
synclient FingerLow = 10
synclient FingerHigh = 20

Save the file in your home directory in the bin directory calling it TouchPadFix.sh
Press Ctrl+Alt+T and type the following command: chmod +x ~/bin/TouchPadFix.sh
Go back to the dash
Type startup
Click Startup Applications
Click Add
Enter in the command field: TouchPadFix.sh and type in Name and Comment whatever you want (Don't leave it empty)
Click Add

That's it! Next time you reboot the settings will be sticky!


UbuntuOne API - Developing a Perl module to use it

After hours fighting with ubuntu one. Here are the answers:

1) 0/20 means 0 valid Tokens. Although the process is correct, UbuntuOne is not able to validate your conection to the API.

2) During the basic authentication, the parameters are:

ws.op=authentication
token_name=Ubuntu One @ something

Caution: The token_name should be exactly (capital letters, spaces, etc).


Although not a clear answer to your problem, after some search i found that ehci_hcd refers to Enhanced Host Controller Interface (EHCI) driver for USB as per this man...
and it is used for USB 2.0 devices.

Such problems can be found in cases of:

Faulty hardware
The hardware cannot work with current kernel
Bugs in kernel
Faulty installation

I would not bet on 3 as it is an LTS version released at 2012 and many bugs should be fixed.

You could retry re-downloading the image and re-installing  with any USB devices unplugged.


What is Ubuntu's status on the Meltdown and Spectre vulnerabilities?

It was discovered that a new class of side channel attacks impact most processors, including processors from Intel, AMD, and ARM. The attack allows malicious userspace processes to read kernel memory and malicious code in guests to read hypervisor memory.

To address the issue, updates to the Ubuntu kernel and processor microcode are needed. Updates are announced in Ubuntu Security Notices. Meltdown/Spectre related updates have now been announced, covering updates to the kernel and to some userspace software.

The following updates have been released:

Ubuntu kernel updates are available in USN 3522-1 (for Ubuntu 16.04 LTS), USN 3523-1 (for Ubuntu 17.10), USN 3522-2 (for Ubuntu 14.04 LTS (HWE)), and USN-3524-1 (for Ubuntu 14.04 LTS).
Further kernel updates (which include mitigations for both Spectre variants and additional mitigations for Meltdown) were made available on January 22 2018 in USN-3541-2 (for Ubuntu 16.04 LTS (HWE)), USN-3540-1 (for Ubuntu 16.04 LTS), USN-3541-1 (for Ubuntu 17.10), USN-3540-2 (for Ubuntu 14.04 LTS (HWE)), USN-3542-1 (for Ubuntu 14.04 LTS), USN-3542-2 (for Ubuntu 12.04 LTS (HWE)).
USN-3516-1 provides Firefox updates.
USN-3521-1 provides NVIDIA driver updates.
USN-3531-1 provides Intel microcode updates. Due to regressions, the microcode updates have been reverted for now (USN-3531-2).

Users should immediately install the updates as they are released in the normal way. A reboot is required for the kernel and microcode updates to take effect.

Users can verify the kernel page table isolation patches are active after the reboot.

Updates for Ubuntu 17.04 (Zesty Zapus) will not be provided as it reached end-of-life on January 13 2018.

In advance of security updates being released, Dustin Kirkland had provided some more details of what updates to expect in a blog post, including mention of kernel updates as well as CPU microcode, gcc and qemu updates.

Kiko Reis from Canonical wrote an accessible description of the impact of these vulnerabilities and their mitigations for Ubuntu users on 24 January 2018.

The Ubuntu Security Team is maintaining their current status on these issues and an official technical FAQ that goes into detail about the specific individual vulnerability variants and their migitations under different use cases.

Note that Linux mainline and stable release updates from v4.15 (28th January 2018) and onwards include the appropriate fixes and Ubuntu kernels are based on those.  As such, any versions of Ubuntu using Linux Kernel versions 4.15.0 and up are patched (including 18.04 and 18.10).


Is there a GTK media player that can synchronize ID3 tags with directory structure?

Don't search for a music player, but for a ID3 tag editor. EasyTag doesn't have the best interface in the world, but is very powerful and solve all of my problems.


How to make iso image of current logged in system to use it as future installation media

I can confirm that remastersys is safe. Just add the line on the site to /etc/apt/sources.list and run sudo apt-get install remastersys-gui; sudo remastersys-gui and follow the on screen wizard.


The way it works is like this:

xinput -set-prop 11 299 3 1

Ignore the 11 and the 299 which are specific to my computer, but in this case it's saying 3 is the lock button for 1.

You can also make a button its own lock button like:

xinput -set-prop 11 299 1 1

For more info check man libinput under the option "DragLockButtons".


sudo netstat -tlnp
# t : Show TCP sockets only
# l : Show LISTENING sockets only
# n : Show numerical addresses
# p : Show the PID and name of the program to which each socket belongs

For more information see the man page
http://manpages.ubuntu.com/manpages/bionic/man8/netstat.8.html


How to take a screenshot of Chromium's search suggestions and instant search results

If you start the Screenshot application manually (search for Screenshot in the Dash), it should show a window that looks like this:

If you select Grab the current window and set an appropriate delay, you should be able to capture pop up menus, the web browser quick search results, etc.  Just hit the Take Screenshot button, perform your quick search and wait until the delay timer completes.


Selected keyboard layout has to be re-selected to work

Assuming your Ubuntu version is above 12.04 you can change the default keyboard layout by editing the keyboard layout file:

sudo vim /etc/default/keyboard

and change the XKBLAYOUT option to "us-intl"

Reboot your system and test the new layout.


Adjusting the background color/picture for each workspace

There is a tool called wallpapoz that will allow you to do many things with wallpapers including per workspace wallpaper.

sudo apt-get install wallpapoz

source

for colors I have no idea.


Where is the laptop brightness script located?

I couldn't find the answer to my question (which would be convenient), but instead coded up a Python GUI with a slider. I made two versions, one with wxPython and one with Tk.

Here's the tk version, which is shorter:

import os
import subprocess
from Tkinter import *

class BrightnessSlider(object):
    find_max_brightness_cmd = ['cat', '/sys/class/backlight/intel_backlight/max_brightness']
    find_brightness_cmd = ['cat', '/sys/class/backlight/intel_backlight/actual_brightness']

    def __init__(self, master):
        min_brightness = 92
        p1 = subprocess.Popen(self.find_brightness_cmd,
                              stdout=subprocess.PIPE)
        p2 = subprocess.Popen(self.find_max_brightness_cmd,
                              stdout=subprocess.PIPE)
        current_brightness, stderr = p1.communicate()
        max_brightness, stderr = p2.communicate()

        self.slider = Scale(master,
                  from_=int(min_brightness),
                  to=int(max_brightness),
                  orient=HORIZONTAL,
                  command=self.on_slide)
        self.slider.set(current_brightness)
        self.slider.pack()
        self.slider.focus_set()

    def on_slide(self, new_value):
        self.set_brightness(new_value)

    def set_brightness(self, new_val):
        with open('/sys/class/backlight/intel_backlight/brightness', 'w') as f:
            f.write(new_val)

if __name__ == "__main__":
    master = Tk()
    b = BrightnessSlider(master)
    mainloop()


How to pass '*' wildcard to path parameter of find command via a variable in script?

The exact same command should work fine in a script:

#!/usr/bin/env bash
find  te*/my\ files/ -print

If you need to have it as a variable, it gets a bit more complex:

#!/usr/bin/env bash
search='te*/my\ files/'
eval find "$search" -print

WARNING:

Using eval like that is not safe and can result in executing arbitrary and possibly harmful code if your file names can contain certain characters. See bash FAQ 48 for details.

It's better to pass the path as an argument:

#!/usr/bin/env bash
find "$@" -name "file*"

Another approach is to avoid find altogether and use bash's extended globbing features and globs:

#!/usr/bin/env bash
shopt -s globstar
for file in te*/my\ files/**; do echo "$file"; done

The globstar bash option lets you use ** to match recursively:

globstar
      If set, the pattern ** used in a pathname expansion con‐
      text will match all files and zero or  more  directories
      and  subdirectories.  If the pattern is followed by a /,
      only directories and subdirectories match.

To make it act 100% like find and include dotfiles (hidden files), use

#!/usr/bin/env bash
shopt -s globstar
shopt -s dotglob
for file in te*/my\ files/**; do echo "$file"; done

You can even echo them directly without the loop:

echo te*/my\ files/**


Using sudo apt-get install, why no source code?

By default apt-get install does not download the source codes of packages. There is a specific apt-get option to do that which is source.

From man apt-get:

  source
             source causes apt-get to fetch source packages. APT will examine the available packages to decide which source package
             to fetch. It will then find and download into the current directory the newest available version of that source package
             while respecting the default release, set with the option APT::Default-Release, the -t option or per package with the
             pkg/release syntax, if possible.

  Source packages are tracked separately from binary packages via deb-src lines in the sources.list(5) file. This means
             that you will need to add such a line for each repository you want to get sources from; otherwise you will probably get
             either the wrong (too old/too new) source versions or none at all.

So the syntax to download the source package of something to the current directory would be (no need to be root):

apt-get source <package_name>

Also note that as the man pages says you need to have the deb-src repositories enabled for all the regular deb repositories you want to keep track of source packages. The simplest way to do that would be to just add -src to the original repo's initial deb string:

deb http://archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted

On a different note, you might have checked the /usr/src directory which is the designated place for all kernel sources.


Doh, turns out at some stage (an update maybe) network manager has stopped using autonegotiate for speed and picked 100Mbit/s - yes although less then the possible 1Gbit/s it is still more than 70Mbit/s I get in Windows so should not be a problem and so I should still get more than 5Mbit/s BUT setting to autonegotiate, removing and replacing the ethernet cable and suddenly, after a couple of weeks slow connection, I am seeing 70Mbit/s again.
So problem solved and something to look out for if another update or something breaks internet speed again.


Automatically eject HDD on suspend and re-mount on resume? (14.04)

Personally, I'd approach this with a simple script:

#!/bin/sh

# find if we have sdb mounted

df | grep -iq /dev/sdb

# if the last command tells us we found
# something, then unmount it and suspend the system
# two seconds later

if [  $? -eq 0 ]; then

  sudo udisks --detach /dev/sdb/
  sleep 2
  sudo pm-suspend
fi

Optionally you can add a line gnome-screensaver-command -l to lock the screen before suspending


Can Ubuntu be installed from a USB memory stick with bad blocks (or clusters) on it?

I think most tools to create a USB drive assume that the USB memory stick is good. At least this is the case with mkusb (and obviously also with the tools that you have been trying to use).

1. Wipe the whole device might help if the memory cells can be re-allocated after wiping.

You could try to 'wipe the whole device' with mkusb, and after that try with your tool(s) to create a USB install system in the memory stick again. (The re-allocation process is nothing that we can manage. There is an internal processor in the USB memory stick, and it would do it automatically, if it can.)

2. ext4

An alternative is to create a partition with the ext4 file system in the memory stick, and to run the following command in linux in order to mark the bad clusters, so that the file system can avoid using them.

sudo e2fsck -cf /dev/sdxy

where x is the drive letter (a or b or c ...) and y is the partition number (1 or 2 or 3 ...). In your case it might be /dev/sdb1, the second drive's first partition. If this operation succeeds, you will get a USB memory stick, that can be used for storage by linux systems. It will also be possible to install Ubuntu into it (installed like into an internal drive). But this is not a USB install drive, that can install Ubuntu into another system.

3. NTFS

Another alternative would be to create a partition with the NTFS file system in the memory stick, and to run the following command in Windows in order to mark the bad clusters, so that the file system can avoid using them.

chkdsk /r X:

where X: is the drive letter (volume letter) for the target partition as seen from Windows. If this operation succeeds, you will get a USB memory stick, that can be used for storage by linux systems and Windows systems, but it does not help installers, that need a FAT32 file system.

4. FAT32 might fix it all the way in this particular case

Finally you can create a partition with the FAT32 file system in the memory stick, and to run the following command in Windows in order to mark the bad clusters, so that the file system can avoid using them.

chkdsk /r X:

where X: is the drive letter (volume letter) for the target partition as seen from Windows. If this operation succeeds, you will get a USB memory stick, that can be used for storage by linux systems and Windows systems, and it would help installers, that use a previously created FAT32 file system, for example Unetbootin. So this might be possible for you, if the problem is 'only' some bad sector in the USB memory stick alias pendrive.

5. See the following link for more details,

Repair the partition table and file system of a pendrive


Ubuntu 14.04 Trusty on Nvidia Titan X Pascal: cannot install

NVIDIA have a 64-bit Linux driver on their site for this card. What you may have to do is install (from the command line) either:

nvidia-367
nvidia-367-updates
the package you download from Nvidia (try wget)

I believe nvidia-current isn't an option, as that seems to be version 304, whereas you need version 367 or better. See this related question, pay special attention about adding a PPA, blacklisting nouveau, and do try ubuntu-drivers.


Does Ubuntu 14.04 have its own 'Task Manager'?

You can use top.
Just open a terminal enter top command and it will show you which process is consuming how much Memory and CPU. Visit the link it will really help you
12-Top-commands


Distribution and sale of modfied ubuntu image

According to Ubuntu ‘Intellectual property rights policy’, you can not do that:

  Any redistribution of modified versions of Ubuntu must be approved, certified or provided by Canonical if you are going to associate it with the Trademarks. Otherwise you must remove and replace the Trademarks and will need to recompile the source code to create your own binaries. This does not affect your rights under any open source licence applicable to any of the components of Ubuntu. If you need us to approve, certify or provide modified versions for redistribution you will require a licence agreement from Canonical, for which you may be required to pay. For further information, please contact us (as set out below).

If you do not want to rebuild Ubuntu, you might consider using a more free operating system, such as Debian GNU/Linux, for example. Its trademark policy does not state clearly how tolerant it is to unofficial images (in particular, ones that contain some non-free software), but it seems to be much more friendly in general; also I did encounter unofficial images that used ‘Debian’ name. Anyway, you’d better ask about it somewhere else. debian-legal@lists.debian.org might be approriate place, I guess.


The default Ubuntu network-manager has two types of connections - system connections and user connections. System connections get saved in /etc/NetworkManager/system-connections with mode 600 (i.e. -rw-------) and do require administrator privileges to create or edit.

Non-privileged users should be able to create new user-connections, however there is a wrinkle in the UI which appears to make it impossible - when the Add dialog is instantiated, it has the Available to all users checkbox pre-checked and grayed-out - this identifies the connection as a system-connection, and the non-privileged user can't save it as such - and apparently can't deselect the box to make it a (saveable) user-connection:

However, once anything is typed into the SSID box (even a space) the 'Available to all users' box becomes editable:

Once that box is unchecked, it should be possible for an unprivileged user to edit and save the connection properties.


Accidentally removed home .config directory recursively and forcefully? Help me

Because files in /home aren't managed by the package manager reinstalling them won't do anything.

.config contains a lot of files related to the users desktop configuration and application configurations.

.config primarily is configuration for applications where data (like for example your emails if you're using evolution) are stored in .local.

Applications rely on config files it created in .config to work as expected. Some applications may recreate the configs in .config if they are missing but others probably won't if they still see files in .local.

While deleting .config shouldn't break anything it appears to with unity. The configurations are likely not in a default state but a zeroed state.

The culprit seems to be that the indicator applets are suppose to be in Startup Applications but no longer are. Search for Startup Applications in settings and add


How do I install VMware Workstation Player 12.11 on Ubuntu 16.04?

Make sure you sudo all these commands, or run these as root.

The missing module is in the file libcanberra-gtk-module.so. It's included in the package libcanberra-gtk-module (source).

So you'll need to:

Install libcanberra-gtk-module:

sudo apt install libcanberra-gtk-module

Create a symlink to the missing library:

sudo ln -sT "../$(uname -m)-linux-gnu/gtk-2.0/modules/libcanberra-gtk-module.so" /usr/lib/libcanberra-gtk-module.so

Make the .bundle file you downloaded from VMware executable and run it:

chmod +x ./VMware-Player-12.1.1-3770994.x86_64.bundle
sudo ./VMware-Player-12.1.1-3770994.x86_64.bundle

Follow the GUI installation that pops up on the screen.


is there a different way to mount drives over ssh then when using putty?

A mounted file system should stay mounted.

If you want to keep your mounted fs after a reboot/power failure, etc, you can make an entry for the fs in /etc/fstab.

https://help.ubuntu.com/community/Fstab

regards


Need help running Ubuntu on Oracle Virtual Box

download a 64bit version of ubuntu and try again


What is the key combination to move an application to a different workspace in Lubuntu?

Setting the shortcut

The command

To move an application (-window) to another workspace from command, you need wmctrl to be installed. The command you need to move the frontmost application (-'s window) to a specific workspace (on Lubuntu) is:

wmctrl -r :ACTIVE: -t 1

where 1 refers to the targeted workspace. The first workspace is 0, so the command above will move the active window to the second workspace.

Shortcuts in Lubuntu

In Lubuntu, to set custom shortcuts, (indeed) you have to manually edit the file ~/.config/openbox/lubuntu-rc.xml.
The easiest way to get the right syntax is to move to the keyboard section of the file, and simply copy an existing shortcut section, like the example below:

   <!-- move window to workspace 2 on Ctrl + Alt + Y-->
    <keybind key="C-A-Y">
      <action name="Execute">
        <command>wmctrl -r :ACTIVE: -t 1</command>
      </action>
    </keybind>

As a test, I added the section, and it worked fine (after log out/in); it moved the active window to the corresponding workspace on the shortcut Control+Alt+Y.

What you should keep in mind:

The command needs wmctrl to be installed:

sudo apt-get install wmctrl

It takes a log out/in to start working
The first workspace has index 0, so the command in the example actually moves the active window to the second workspace.

A more detailed instruction on adding custom shortcut keys and the used syntax, see here, in the section further down; Create New Keyboard shortcuts Also here, you can find a.o. how to "mention" the keys in your shortcut section:

Key combination

KEY-COMBINATION is the key combination which you want to bind to the actions. The format for the KEY-COMBINATION is: Modifier-Modifier-Key. Any number of modifiers (0 or more) can be used together, and they are each separated by a "-". Multiple KEY-COMBINATION can be specified in one keybind by separating them with spaces. This is useful if you use multiple keybinds for a thing that is quite complicated to specify.
Modifiers
Modifier keys
S   Shift key
C   Control key
A   Alt key
W   Super key (Usually bound to the Windows key on keyboards which have one)
M   Meta key
H   Hyper key (If it is bound to something)

You can also use Mod1 through Mod5 as the modifiers to directly select a modifier mask (e.g. Mod1 to select Mod1Mask), but this is for advanced users who have customized their modifier mapping with xmodmap.

More "sophisticated" options

You could create a script to see what is the current workspace, and move the active window to the next/previous one, instead of having to set a key combination for every (targeted) workspace.

That would however be another question :)


Trying to launch from USB - "could not retrieve the required installation files"

PLEASE READ THE LOG CAREFULLY....actually Wubi is trying to locate some particular file in ISO file (or any source like live-usb,etc) and when it could it gives this error...I too had this problem but after reading the log and comparing it with file in the ISO, I found vmlinuz was missing its file extension(in my case it ".efi"). Wubi was trying to locate "vmlinuz.efi" and it could find it as it was named as vmlinuz. I name renamed the file...every went well then suddenly I got another error and then again I studied the log,now it was a different error. Wubi tried to copy vmlinuz in my installation directory, which now was named as vmlinuz.efi, so I made a copied of "vmliunz.efi" file and renamed back to vmlinuz.

Eureka!! It was successful.

Steps to follow(this is strictly base on study of the log. I woould strongly recommend to read the log and verify every file Wubi is searching)

files please go to your casper directory in your installation source
make two copies of vmlinuz
rename one of them to vmlinuz.efi and leave other as it is.

follow these steps and your are good to go.
If you still got issues please post the log-file too.

ivarbhardwaj


You can add an entry to the root crontab, roughly like this (original discussion)
sudo crontab -e

# Shutdown every day at 02:00 am
0 2 * * * /sbin/shutdown -h now


How to extend root partition volume using GParted on 14.04?

In your case, you will have to shift all the partitions that are located to the left of your root partition to the left, to in the end create a 50 GB space at the left of your root partition. You cannot bridge two partitions if you are asking that.

Mind you that this will take a long time, and may result in data loss if the operation is interrupted.

Please backup this data if possible.

Best of Luck to you!!!


How to add items to a listview from the user perspective

you can use ListModel.append()

add two TextField elements (one for nome_evento and the other for tipo_evento) and a Button

So when you click on the button it should append what you wrote on the textfields

Button{
    onClicked :
        if(texField1.text !== "" && texField2.text !== ""){
            nome_eventoModel.append({"nome_evento": texField1.text,
                                     "tipo_evento": texField2.text})
        }
}


Error: Virtualbox unable to insert the virtual optocal disk C:\ Program Files \ Oracle \ Virtualbox \ VBoxguestadditions.iso into the machine Xubuntu

sudo apt install linux-headers-$(uname -r) build-essential dkms
has to be done in a terminal IN THE VM.
The current GuestAdditions.iso contains a set of commands that needs these installed.
If the ISO is already mounted (ticked in the settings), it cannot be inserted, giving the error you have.
Also if the ISO is present DURING BOOT, it will not Autostart.
Remove and Reinsert it using Virtualbox settings  or menus - alternatively start a Terminal/Shell and launch the "autostart" script from there, it is present on the virtual disk created by the ISO.


Sound card shown as Dummy Output in Ubuntu 18.04

Just wanted to add to this, I followed similar instructions to have sound work briefly after a reboot with a dell XPS 13 running Ubuntu cosmic (18.10). Switching between 'auto' and 'generic' didn't change much

sudo alsa force-reload

worked for me.


You don't have a proper EFI installation; there are several things wrong with it. First, though, consider this: It looks as if you're dual-booting with Windows, and Windows is clearly installed in BIOS mode. If you intend to keep booting Windows from this disk, I strongly recommend against attempting an EFI-mode installation of Linux. Instead, I recommend booting a Linux recovery disk in BIOS/legacy mode and re-installing GRUB 2. That should get Linux booting in BIOS mode, and you should be able to dual-boot Windows in BIOS mode.

If you don't care about booting Windows, or if you want to convert it to boot in EFI mode, you'll have to correct some things about your installation:

The partition table uses the Master Boot Record (MBR) rather than the GUID Partition Table (GPT) system. Although some EFI-based computers seem to be able to boot from MBR disks, some have problems with this. I don't know what percentage have problems with this, but the vast majority of EFI installations use GPT. If you intend to convert Windows to boot in EFI mode, converting the disk to GPT is an absolute requirement. You can do an in-place conversion with GPT fdisk, which is available in the Ubuntu repositories as gdisk.
You have no EFI System Partition (ESP). It appears that your /dev/sda8 was intended as an ESP, but it has the wrong type code. On an MBR disk, an ESP has a type code of 0xEF. On a GPT disk, it's identified via a type code of EF00 in gdisk or by a "boot flag" in parted or GParted. (Note that the libparted "boot flag" means something entirely different on GPT disks than on MBR disks. Your /dev/sda8 does have an MBR "boot flag," but that does not identify it as an ESP!)
It's unclear if you've registered your EFI version of GRUB with the EFI. If not, you need to do this with the efibootmgr utility, as in:

efibootmgr -c -p 8 -l \\EFI\\ubuntu\\grubx64.efi -L Ubuntu

The installer should set this up, and you can type efibootmgr -v to see the existing entries to see if you've already got one.
There may be other things you'll need to do to get the system booting in EFI mode, but they're likely to be highly system-specific. The Ubuntu Boot Repair tool can do some of them automatically, but given the mixed nature of your current installation, I'm not sure I'd trust it until you've gotten things more in line with a standard installation.


Tried to recover.  Reinstalling Grub did not resolve.  Ended up moving the application to another machine and shutting down this vm.


Is there any working Whatsapp client for Ubuntu?

You can also just create a Chrome launcher for Whatsapp Web like this:

Use Chrome browser to go to https://web.whatsapp.com and follow the instructions to connect your phone.

Go to Chrome settings ⇒ More tools ⇒ Create shortcut. Check "Open as window" and press "Create". This will create a desktop launcher to Whatsapp web that opens in its own window. Allow desktop notifications (if needed).

And that's it! I assume this workaround works for Chromium as well, but haven't tried it yet.
PS.This method works also for Google Calendar, Google Keep and such tools for which there is no (official) linux client available.


How do I customize the context menu in Nautilus?

Update for Ubuntu 18.04
At the date Ubuntu 18.04 was released Nautilus-Actions was/is no longer available. It also seems to have been superseded by a new program, called Filemanager-Actions, which otherwise looks identical.

To install this program, see this solution.

Nautilus Actions
We may define our own right-click context menu items with nautilus-actions .

Run the Nautilus-Actions Configuration Tool either from the Dash, or from a terminal with
 nautilus-actions-config-tool

In the Action tab give your action a sensible label, e.g. "Open in Terminator" and choose to display this in the selection or the context menu.

Next open the Command tab to enter the commands to run

Give in the full path to your command (/usr/bin/command_to_run) and program options.

After logging out and in again the right click context menu below will be displayed:


I don't think you will find many good free proxies/VPN servers that aren't blocked by Hulu. You may want to consider a paid VPN service. HotSpotShield is also not the best choice espessialy on a non-Windows computer.
You should also consider that you are violating the Hulu TOS.

Thankyou!


How to reduce power consumption in ubuntu?

This article answers you about Ubuntu 10.04 needs more power.

There are many tools that you can use for reducing power consumption like:

powertop

sudo apt-get install powertop

jupiter

Download and install the latest *.deb file. Launch it from the menu. It will create an applet in your tray, when you right click it, you will see what it does for you.
MicroMiser
From Ubuntu software center, search for laptop-mode-tools and install it.


Minify tool that can be executed through terminal

This is not the best option but it's probably the easiest. The YUI compressor was long thought to be the best compressor for Javascript and CSS, offering 20-40% improvements over other minifiers.

It has since been superseded by newer projects like Uglify.JS (which Grunt will probably suggest) but it's still a fairly easy thing to get up and running in Ubuntu.

sudo apt-get install yui-compressor

That's it. Now you can run yui-compressor myfile.js and it'll do its magic, just not as well, or as conveniently as a properly install Node/Grunt/Uglify+YUI stack.


How do I configure the PHP Zend Framework in Netbeans?

First, be sure you have the Plugin installed, ubuntu Netbeans installation is a vanilla one pretty much, you gotta add your plugins manually. once you do so, go to Tools -> Options -> PHP -> Zend and configure it. Then, start a new project :)

The plugin is called "PHP Zend Framework"


Facing problem while running eclipse,is the desktop entry correct?

As the application starts from the desktop entry you created, there is no issue with the desktop entry. This has to do something with the application itself. Try changing the Terminal=false to Terminal=true so that you can see the logs when Eclipse shuts down. You might be able to pinpoint the exact cause there.


Running a script at the begin of the shutdown protocol (not at the end)?

I found the answer on https://unix.stackexchange.com/q/39226/29509.

To sum it up, this solution works for me (on Ubuntu 16.04):

Create a file /etc/systemd/system/my-cleanup.service:

[Unit]
Description=Test cleanup at shutdown

[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/true
ExecStop=/path/to/my-cleanup-script.sh

[Install]
WantedBy=multi-user.target

(Assuming the shutdown script is available under /path/to/my-cleanup-script.sh and is executable.)

Finally, enable the systemd service via:

sudo systemctl enable my-cleanup.service
sudo systemctl start my-cleanup.service


Live USB isn't live, I can only try or install

To run a live session choose "Try Ubuntu".  Once it boots into the trial session, then you can access partitions on your hard drives and repair things.


Why can't a process see environment variables set in /etc/environment?

Read carefully sudoers man page Command environment section.

try -i option: if sudo's -i option (initial login) is specified, sudoers will initialize the environment regardless of the value of env_reset.  The DISPLAY, PATH and TERM variables remain unchanged; HOME, MAIL, SHELL, USER, and LOGNAME are set based on the target user.  On AIX (and Linux systems without PAM), the contents of /etc/environment are also included.  All other environment variables are removed..

    sudo -u administrator -i "~administrator/BuildAgent/bin/agent.sh start"

If you are using PAM authentication, here is a useful link: Difference between /etc/security/pam_env.conf and /etc/environment + making sudo read pam_env.conf


Right click on the file and select Copy.

Now, say you are executing the file using this in the directory with the file in:

java -jar ./settask.jar

Type the beginning of the command (java -jar), and then paste -Ctrl +Shift+V - you should end up with something like this, where is specifies the full path to the file:

java -jar file:///home/wilf/settask/settask.jar

Remove the file:// and press ↵:

java -jar /home/wilf/settask/settask.jar

If it works, then the same command should work in your script.

I hope this answer is OK, I think you are asking about bash scripts.

N.B:

./ tells it the command to search the directory it is currently in.

Havingfile:// at the beginning means it won't work.


Cannot install new omega driver from AMD

I had the same result, but I got it to work. Instead of the Ubuntu packages, get the generic "Linux (32-bit & 64-bit)" which is 148 MB zip file. Unzip and then sudo ./amd-driver-installer-14.501.1003-x86.x86_64.run.  Choose to build packages for Trusty.  It takes several minutes and doesn't seem to be doing anything, but just wait for it.

Then when I tried sudo dpkg -i *.deb with the resulting files it told me there was a conflict so I had to do apt-get remove ocl-icd-libopencl1:amd64 before it would work. But then the 4 .deb files installed without error.

sudo aticonfig --initial and reboot. flgrxinfo now reports:
display: :0  screen: 0
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon HD 7700 Series
OpenGL version string: 4.4.13283 Compatibility Profile Context 14.501.1003

Seems to work but the catalyst control center won't start.

Edit: I tried Counter Strike in Steam and it ran very smooth. Much better than before but I think I had a broken driver install before.

Edit2: My chrome://gpu/ used to show all red / disabled and now only "Multiple Raster Threads" is disabled. Everything else is green. Full screen 60fps youtube is buttery smooth with no tearing.

Edit3: download separate amdcccle.deb package from amd site and reinstall it with Gdebi or Software centre, then Catalyst Control Cetntre will start.


Error trying to run GCCG while loading shared libraries: libjpeg.so.62: cannot open shared object file

Is the executable you are trying to run a 32 bit executable, by any chance?

The locate output shows you have a 64-bit version of libjpeg.so.62 (in /usr/lib/x86_64-linux-gnu), but that can't be used if the executable is 32-bit.

You can determine what architecture a file is compiled for using the file command.  For instance:

$ file /bin/ls
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x214a38d0db472db559f0dabf0ae97f82fea83e03, stripped

If it says you have a 32-bit executable, then that is your problem.

You can install the 32-bit version of the library in question using the following command:

sudo apt-get install libjpeg62:i386


As per comments on the original question, your problem differs from mine, so it's pretty unlikely this will help you, but in case it helps anyone else:

I booted into a linux USB, connected to a secured wifi on there, then simply rebooted into my installed version. (Wifi autoconnected as it had been working for me before.)

I have no idea why or how it worked for me, but I saw someone else report that work for them, though retroactively thought it might've been a kernel upgrade. I figured there was little risk or harm in trying the bootable, though, and it helped me.


how do i send a command to execute on a terminal?

Try system ("echo \"set all evi\" | ./get_emotion.sh");

Or system ("./get_emotion.sh <<< \"set all evi\"");


This may be a transient problem with the Ubuntu mirror which you're using - it has the new libglib2.0 but not the corresponding -dev package yet.  Try switching to different mirror, or manually downloading and installing it:

curl -O http://gb.archive.ubuntu.com/ubuntu/pool/main/g/glib2.0/libglib2.0-dev_2.48.1-1~ubuntu16.04.1_amd64.deb
dpkg -i libglib2.0-dev_2.48.1-1~ubuntu16.04.1_amd64.deb


Unable to set interface up in Ubuntu 18.04

Finally I was able to solve it upgrading the Linux kernel to a newer version, also upgrading ubuntu to 20.04 fixed all this problems and other incompatibilities that I had.


module verification failed signature and/or required key missing

All what you need is described here

KERNEL MODULE SIGNING FACILITY

CONTENTS

Overview.
Configuring module signing.
Generating signing keys.
Public keys in the kernel.
Manually signing modules.
Signed modules and stripping.
Loading signed modules.
Non-valid signatures and unsigned modules.
Administering/protecting the private key.

OVERVIEW

The kernel module signing facility cryptographically signs modules during
installation and then checks the signature upon loading the module.  This
allows increased kernel security by disallowing the loading of unsigned modules
or modules signed with an invalid key.  Module signing increases security by
making it harder to load a malicious module into the kernel.  The module
signature checking is done by the kernel so that it is not necessary to have
trusted userspace bits.

This facility uses X.509 ITU-T standard certificates to encode the public keys
involved.  The signatures are not themselves encoded in any industrial standard
type.  The facility currently only supports the RSA public key encryption
standard (though it is pluggable and permits others to be used).  The possible
hash algorithms that can be used are SHA-1, SHA-224, SHA-256, SHA-384, and
SHA-512 (the algorithm is selected by data in the signature).

CONFIGURING MODULE SIGNING

The module signing facility is enabled by going to the "Enable Loadable Module
Support" section of the kernel configuration and turning on

CONFIG_MODULE_SIG   "Module signature verification"

This has a number of options available:

"Require modules to be validly signed" (CONFIG_MODULE_SIG_FORCE)

This specifies how the kernel should deal with a module that has a signature for which the key is not known or a module that is unsigned.

If this is off (ie. "permissive"), then modules for which the key is not available and modules that are unsigned are permitted, but the kernel will be marked as being tainted, and the concerned modules will be marked as tainted, shown with the character 'E'.

If this is on (ie. "restrictive"), only modules that have a valid signature that can be verified by a public key in the kernel's possession will be loaded.  All other modules will generate an error.

Irrespective of the setting here, if the module has a signature block that cannot be parsed, it will be rejected out of hand.
"Automatically sign all modules" (CONFIG_MODULE_SIG_ALL)

If this is on then modules will be automatically signed during the modules_install phase of a build.  If this is off, then the modules must be signed manually using:

scripts/sign-file

"Which hash algorithm should modules be signed with?"

This presents a choice of which hash algorithm the installation phase will sign the modules with:

CONFIG_MODULE_SIG_SHA1      "Sign modules with SHA-1"
CONFIG_MODULE_SIG_SHA224    "Sign modules with SHA-224"
CONFIG_MODULE_SIG_SHA256    "Sign modules with SHA-256"
CONFIG_MODULE_SIG_SHA384    "Sign modules with SHA-384"
CONFIG_MODULE_SIG_SHA512    "Sign modules with SHA-512"

The algorithm selected here will also be built into the kernel (rather than being a module) so that modules signed with that algorithm can have their signatures checked without causing a dependency loop.
"File name or PKCS#11 URI of module signing key" (CONFIG_MODULE_SIG_KEY)

Setting this option to something other than its default of "certs/signing_key.pem" will disable the autogeneration of signing keys and allow the kernel modules to be signed with a key of your choosing. The string provided should identify a file containing both a private key and its corresponding X.509 certificate in PEM form, or — on systems where the OpenSSL ENGINE_pkcs11 is functional — a PKCS#11 URI as defined by RFC7512. In the latter case, the PKCS#11 URI should reference both a certificate and a private key.

If the PEM file containing the private key is encrypted, or if the PKCS#11 token requries a PIN, this can be provided at build time by means of the KBUILD_SIGN_PIN variable.
"Additional X.509 keys for default system keyring" (CONFIG_SYSTEM_TRUSTED_KEYS)

This option can be set to the filename of a PEM-encoded file containing additional certificates which will be included in the system keyring by default.

Note that enabling module signing adds a dependency on the OpenSSL devel packages to the kernel build processes for the tool that does the signing.

GENERATING SIGNING KEYS

Cryptographic keypairs are required to generate and check signatures.  A
private key is used to generate a signature and the corresponding public key is used to check it.  The private key is only needed during the build, after which it can be deleted or stored securely.  The public key gets built into the kernel so that it can be used to check the signatures as the modules are
loaded.

Under normal conditions, when CONFIG_MODULE_SIG_KEY is unchanged from its default, the kernel build will automatically generate a new keypair using
openssl if one does not exist in the file:

certs/signing_key.pem

during the building of vmlinux (the public part of the key needs to be built
into vmlinux) using parameters in the:

certs/x509.genkey

file (which is also generated if it does not already exist).

It is strongly recommended that you provide your own x509.genkey file.

Most notably, in the x509.genkey file, the req_distinguished_name section
should be altered from the default:

[ req_distinguished_name ]
#O = Unspecified company
CN = Build time autogenerated kernel key
#emailAddress = unspecified.user@unspecified.company

The generated RSA key size can also be set with:

[ req ]
default_bits = 4096

It is also possible to manually generate the key private/public files using the
x509.genkey key generation configuration file in the root node of the Linux
kernel sources tree and the openssl command.  The following is an example to
generate the public/private key files:

openssl req -new -nodes -utf8 -sha256 -days 36500 -batch -x509 \
   -config x509.genkey -outform PEM -out kernel_key.pem \
   -keyout kernel_key.pem

The full pathname for the resulting kernel_key.pem file can then be specified
in the CONFIG_MODULE_SIG_KEY option, and the certificate and key therein will
be used instead of an autogenerated keypair.

PUBLIC KEYS IN THE KERNEL

The kernel contains a ring of public keys that can be viewed by root.  They're
in a keyring called ".system_keyring" that can be seen by:

[root@deneb ~]# cat /proc/keys
...
223c7853 I------     1 perm 1f030000     0     0 keyring   .system_keyring: 1
302d2d52 I------     1 perm 1f010000     0     0 asymmetri Fedora kernel signing key: d69a84e6bce3d216b979e9505b3e3ef9a7118079: X509.RSA a7118079 []
...

Beyond the public key generated specifically for module signing, additional trusted certificates can be provided in a PEM-encoded file referenced by the CONFIG_SYSTEM_TRUSTED_KEYS configuration option.

Further, the architecture code may take public keys from a hardware store and add those in also (e.g. from the UEFI key database).

Finally, it is possible to add additional public keys by doing:

keyctl padd asymmetric "" [.system_keyring-ID] <[key-file]

e.g.:

keyctl padd asymmetric "" 0x223c7853 <my_public_key.x509

Note, however, that the kernel will only permit keys to be added to
.system_keyring if the new key's X.509 wrapper is validly signed by a key
that is already resident in the .system_keyring at the time the key was added.

MANUALLY SIGNING MODULES

To manually sign a module, use the scripts/sign-file tool available in
the Linux kernel source tree.  The script requires 4 arguments:

1.  The hash algorithm (e.g., sha256)
2.  The private key filename or PKCS#11 URI
3.  The public key filename
4.  The kernel module to be signed

The following is an example to sign a kernel module:

scripts/sign-file sha512 kernel-signkey.priv \
    kernel-signkey.x509 module.ko

The hash algorithm used does not have to match the one configured, but if it
doesn't, you should make sure that hash algorithm is either built into the
kernel or can be loaded without requiring itself.

If the private key requires a passphrase or PIN, it can be provided in the
$KBUILD_SIGN_PIN environment variable.

SIGNED MODULES AND STRIPPING

A signed module has a digital signature simply appended at the end.  The string
"~Module signature appended~." at the end of the module's file confirms that a
signature is present but it does not confirm that the signature is valid!

Signed modules are BRITTLE as the signature is outside of the defined ELF
container.  Thus they MAY NOT be stripped once the signature is computed and
attached.  Note the entire module is the signed payload, including any and all
debug information present at the time of signing.

LOADING SIGNED MODULES

Modules are loaded with insmod, modprobe, init_module() or finit_module(),
exactly as for unsigned modules as no processing is done in userspace.  The
signature checking is all done within the kernel.

NON-VALID SIGNATURES AND UNSIGNED MODULES

If CONFIG_MODULE_SIG_FORCE is enabled or enforcemodulesig=1 is supplied on
the kernel command line, the kernel will only load validly signed modules
for which it has a public key.   Otherwise, it will also load modules that are
unsigned.   Any module for which the kernel has a key, but which proves to have
a signature mismatch will not be permitted to load.

Any module that has an unparseable signature will be rejected.

ADMINISTERING/PROTECTING THE PRIVATE KEY

Since the private key is used to sign modules, viruses and malware could use
the private key to sign modules and compromise the operating system.  The
private key must be either destroyed or moved to a secure location and not kept
in the root node of the kernel source tree.


kgpg decrypt files without asking paraphrase

I restarted my computer and, Then first time it asked me to enter password. But second time onwards it didn't ask me. So, I opened /tmp (as normal user) and saw gpg-agetXXXXXXX named folder. (X means don't remember) So, I deleted it. And now it works fine. Everytime it ask me to enter pass. I don't know is this a bug or not. But if this is a but, then kgpg (and or gnupg) has serious bug..


How to search for applications in Unity?

In Unity, you should be able to:

click on the Apps Place (an icon on the launcher which says "Applications")
enter the name of the app in the search field

... and you should see your app listed there, either as installed or available.

You can also use the Ubuntu button, but then you are searching both applications AND files.


Auto dimming laptop keyboard backlit when idle

What you need to do

Install xprintidle, to keep track of the current idle time (defined by lack of keyboard- and mouse events).
Create a small background script (further below); copy the script into an empty file and save it as dim_keyboard.sh. Make the script executable and copy it to a location where unauthorized users cannot alter the script (e.g. /usr/local/bin).
Add the script to the sudoers file, since you run the command with sudo: Add the line:

<username> ALL= NOPASSWD: /path/to/your/script

(where <username> is your username) to the file, as explained e.g. here.

N.B. In the sudoers file, for security reasons always use the full path to the script, also if it is in $PATH. The reason is that else it would be easy to place a similarly named script in ~/bin, which could run with sudo privileges, possibly with malicious code.

Test- run the script with the idle time (in seconds) as an argument:

sudo /path/to/script.sh 60

To dim the backlight after a minute
If all works fine, add it to Startup Applications: Dash > Startup Applications > Add. add the command:

sudo /path/to/script.sh 60

The script:

#!/bin/bash

let "div = 1000"
let "limit = $1"
dimmed=false
cmd=/sys/class/leds/asus::kbd_backlight/brightness

while true
do
  sleep 2
  let "idle = $(xprintidle)"
  if [ $(($idle / $div)) -gt $limit ] && [ $dimmed == false ]; then
    echo 0 | tee $cmd
    dimmed=true
  elif [ $(($idle / $div)) -le $limit ] && [ $dimmed == true ]; then
    echo 3 | tee $cmd
    dimmed=false
  fi
done


write permissions on files and folder outside document root

Yes. I believe it is best to put anything you alter (even the configuration files) on a different partition so you can backup this partition by itself. You can use symlinks and/or "cp" to connect it together. Create a script to do that.
Well that is both simple and difficult to answer: do not add permissions more than you want for that specific file. If it does not need execution permissions don't add it. If a file only needs to be read do not add write permissions. Never ever use chmod 777 as this totally kills any security. That is the simple answer.

A slightly more elaborate answer...

If you use ftp/ssh create a user for each person and add the/those user(s) to the group you set apache to (likely apache) and then focus on setting permissions for the group and not for an individual user. For others I would always disable permissions. Reason: if another person complains something is forbidden that that person should be allowed to do you know it is a problem related to the group setting of that user. And that makes it an easy fix.

If the server is a single user setup you can focus on setting permissions on the user apache uses and you can lower the permissions for the group. You can however also use the group method for 1 user.

A generic 1st approach (f for files, d for directories) setting up for a user:

find /var/www/ -type f -print0 | xargs -0 chmod 640
find /var/www/ -type d -print0 | xargs -0 chmod 750

This disables "others". If you want to use a group change those to 460 or 660 and 570 or 770 (the 2nd pair of those also enables user). If there are any files in /var/www/ that require execution they should not be there so you will catch those with this setup (those should be in a cgi-bin/ directory outside of /var/www/).

If you use groups you can add your normal user to the apache group.

And I would myself not use the admin user but a dedicated user just for maintaining the website. Keep the admin for emergencies and setting up.


If your /boot and / mount points point to the same partition:

sudo apt-get autoremove --purge

will remove all the dependencies not needed anymore.


How to configure Catfish desktop search tool?

Catfish is a GTK+ search utility written in python. It's search is powered by find and locate, with search suggestions provided by zeitgeist.

locate is now the default search engine in Catfish 0.4.0.2 version.

You can also just easily change the default directory where Catfish will search by clicking on the "look-in" drop-down box.

For detailed features, see:

http://twotoasts.de/index.php/category/4-catfish/


On 18.04, installation of ttf fonts fails

howefield on Ubuntu Forums, provided answer:
Create a folder in ~/home called mscorefonts and download the fonts from :
https://sourceforge.net/projects/corefonts/files/the%20fonts/final/
and store them in the /home/$USER/mscorefonts folder that you created earlier, then run..

sudo dpkg-reconfigure ttf-mscorefonts-installer

You should be prompted to give the path for the downloaded files and the rest should be self explanatory.
I then ran

sudo fc-cache -f -v" which worked Ok


Why is Skype Startup sound scratchy/grainy?

The best solution to this problem is to disable the Glitch Free Audio part of Pulse, covered elsewhere

Skype and VLC sounds sizzle/distorted/bad


Cannot install new version of Linux over Ubuntu

Short answer is no Ubuntu does not have any hidden settings which will not allow you to run another OS. More than likely your system is using some type of EFI, or your live disk does not detect the correct settings (either EFI/legacy).

You could need to make a live disk which has an EFI loader. Normally (with newer distros) when making a live disk with distributions, you will have both an EFI settings with loader, and normal/legacy loader on the same disk.

If this is not the case (you can examine disk contents for EFI), you may need to check for a live version which is compatible with EFI.

However if you are using BIOS, you may accidentally be loading the EFI settings, and would need to check to make sure you are loading the correct part of your disk.


First

If you want to have a persistent storage in a USB Flash Drive, I recommend you to do it    from Windows, tutorial here, or if you want to make it from Ubuntu, check my answer here.

Second

If you want to split your USB Flash Drive into partitions, I recommend you to use the Disk Utility or GParted Partition Editor. Tell me if you want a tutorial to do it.


How to make the TTY use my entire screen resolution

If you're using a 4K (3840x2160) monitor:
sudo apt install fbset
sudo fbset -g 3840 2160 3840 2160 32

For Full HD it's fbset 1920 1080 1920 1080 32 and so on.
SEO credit to user karol from ArchLinux forums for this solution


The terminal emulator (often just called terminal) is "just the window", yes. It runs a text based program, which by default is your login shell (which is bash in Ubuntu). When you type characters in the window, the terminal draws these characters in the window in addition to sending it to the shell's (or other program's) stdin. The characters the shell outputs to stdout and stderr get sent to the terminal, which in turn draws these characters in the window.

So yes, the shell and the terminal emulator are completely separate programs, and either can be used without the other.


Sound/Video playing in slow motion on 12.04 with Bluetooth + Chrome, but not Firefox

I'm having the same issue. To add to the problem:

If I'm playing a clip and I switch audio outputs to the BT headset, the continues to play normally, but when I refresh the page or go to a different clip, it goes to slow motion again.


How can I re-enable touchpad after disabling it via touchpad indicator option

Try connecting an external mouse and re-enable the option in the same way in reverse as you disable it.


Check whether driver for your hard disk model is present in the Ubuntu installer.

But since Live DVD is able to see the partition the driver should be there in it. Are you using the same DVD to install the OS or using some other installer?


I use NTFS-config and it mounts all me external and internal drives with write capabilities

just run this in commandline after installing ntfs-config

sudo mkdir -p /etc/hal/fdi/policy

this will make ntfs config run and u can enable read write


Being the user of the same machine with ubuntu 20.04, I tell you the steps which will work out for you.
1. Go to the 'additional drivers' tab in software and updates in ubuntu.
2. Now check for the Nvidia driver there, you must select the version 440 at the first line. Apply that and restart your system once.
3. It would have installed a new software where you can select which GPU driver is to use.
Select the on-demand Nvidia card or intel integrated one. After selecting any one of them, log out from the system and then log in again.
4. It will give you approximately the same battery life as in windows 10 because it is now using the intel integrated graphics as default one. In windows also, if you use the Nvidia graphics It will reduce the battery life significantly as it consumes a lot of energy.

P.S. The problems with ubuntu in this machine are:
1. It would not detect the fingerprint sensor.
2. The microphone issue with any Linux distro i.e., you will not be able to record or communicate using the microphone of your earphones or headphones.

I hope that I am able to answer your query.


This usually happens when you have shut down Windows Fast Startup on or if you have Hibernated Windows. Turn off Fast Startup from the control panel power settings in Windows and make sure that you didn't hibernate Windows. Also, I recommend formatting your shared partition as NTFS as FAT has many limitations. Ubuntu supports NTFS almost perfectly.


Unity freezing after changes icons sets!

I would suggest you to remove Ubuntu Tweak Tool. Ubuntu Tweak tool is a third party software and you should always avoid installing them. They are unverified and can cause severe damage to your system. I would suggest you to take a look at this.

If you really want to change the icons or themes, install MyUnity. It is a third party software too, but more reliable and less buggy. You can install it directly from the Software Center. If you want Faenza icon set, here's how to install it:

Download Faenza icon set from here.
Unzip the folder and double click on file named "INSTALL" and select "Run in terminal"
A terminal will open asking your permission for installing the icons.Type "Y" for yes and enter.
Now open MyUnity and select themes from the top bar.
Select the icon set in the right panel.

Many times you don't have a "INSTALL" script for icon sets. In that case, you have to install the icons manually. Don't worry, it's very easy!
Here's what you have to do:

Unzip the folder containing the icons.
Now you require them to place in /usr/share/icons
To do this you have to log in as root. Open a terminal and type this:

    gksudo nautilus

A window will appear. Navigate to /usr/share/icons and place your icon folder in it.
Now open MyUnity and select themes from the top bar.
Select the icon set in the right panel.

That's all!


What is the use of the various apt commands?

Let's have some basic idea on how repository is maintained in Ubuntu and in general Linux distribution. Ubuntu and Linux distributions uses repository to provide software, which are installed by installing one or more of the packages.

Some terminology

Software: We would say, a software is a program or a set of programs which satisfy a need or goal. Such as "Cheese" is a software, which is used for taking photos, recording videos etc.

Package: A package is the smallest unit of software, which is distributed by the Ubuntu distribution. A package may be a complete software or a part of a software. A software consists of zero or more packages.

Package-list: Ubuntu or in general Linux distributions use package-list, which contains information about available packages. These lists are stored online, which are retrieved by Package management software such as apt-get, aptitude, synaptic or Ubuntu software center in your computer. After these lists are downloaded in your computer, package management software (such as apt-get) know, what packages are available online in the repository.

Repository: A repository is the name of online storage, which contains packages, package list and package verification information. These sometimes are also referred to as package sources.

sources.list: This file stores information about enabled repositories. This is located in /etc/apt directory in Ubuntu system. You can view the content of that file by going to /etc/apt folder and double-clicking the sources.list file there. Also note that, some repository lines are also stored in files in /etc/apt/sources.list.d directory. The files containing repository line in that directory needs to have extensions .list. apt-get and other package management software recognizes repository lines in that directory too.

Repository-line: Repository-line refers to the format of each (non commented) lines in sources.list file. Also called source line or repo line.

Source package: Don't be confused with package source, which refers to a repository containing packages. Source package is the package containing source codes which can be compiled to get actual binary programs, which then can be executed and hence run.

The correct format of repository source line is

<type of repository>  <location i.e URI>  <dist-name> <components>

For example, a repo line can be like this one

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

Here, it means, the repository is for binary packages, which are hosted in http://archive.ubuntu.com/ubuntu and this repository is for Ubuntu precise (12.04) and this repository contains the main (software which are officially supported by Canonical) component.

Type: deb is the type of repository, it indicates it is a binary repository, not a source repository, which has type deb-scr. Binary repository contains compiled packages, as opposed to source repository which contains source packages.
Location: http://archive.ubuntu.com/ubuntu location of the repository.
Dist-name: precise is the distribution name of Ubuntu release. For Ubuntu 12.04 it is precise, 11.10 is oneiric.
Component: main is indicating the component of repository. Ubuntu repository are divided into four parts.

Main - Which contains free and open source software, officially supported
Universe - These softwares are not supported by Canonical, but those are maintained by the community.
Restricted - These softwares are supported by Canonical, but aren't free. These are supported to provide some essential drivers
Multiverse - These are also non-free softwares, and not supported by Canonical.

See this page for more information.

Explanation of the commands

sudo apt-get update

This command checks if your system has up to date package list and if not retrieves the package list files stored in online repository. For example, if your sources.list file contains lines like this deb http://archive.ubuntu.com/ubuntu precise main, it checks your system whether you have the package list (of binary packages) for main component. If it finds that you don't have the list or your list is outdated, it will fetch the list from the repository.

If you are really interested to see the package list stored in your Ubuntu system, go to /var/lib/apt/lists directory to see them. The package list are stored there after fetching.

Note: there can be many method to fetch those list, which are beyond the scope of this answer.
sudo apt-get upgrade

This command downloads and installs the updated version of packages. This command does not download and install the packages if you have already installed them. Also, it does not remove any packages. So, if an upgrade of a package X requires removal of package Y, this command does not upgrade package X at all.
apt-add-repository

This command is used to add a repository in your system. Adding a repository means, adding the ability to install packages from a certain online source, not installing all packages from there.

This command needs the repository source line or PPA links.

To add a regular repository: use sudo apt-add-repository <repo-line>

such as sudo apt-add-repository deb http://archive.ubuntu.com/ubuntu precise universe

To add a PPA repsitory: use sudo apt-add-repository PPA-Name

such as sudo apt-add-repository ppa:gwibber-daily/ppa

Note 1: Bear in mind that you can use both apt-add-repository or add-apt-repository command.

Note 2: Adding PPA with this command actually checks Launchpad.net site for the existence of that PPA and creates a file in /etc/apt/sources.list.d directory with PPA name containing the standard format of repository line.

From Wikipedia:

  Launchpad is a web application and website that allows users to develop and maintain software, particularly free software. Launchpad is developed and maintained by Canonical Ltd.

And it is the same Canonical Ltd, which is official sponsor of the Ubuntu.

Notes on PPA repository: You may have noticed that, if you add a PPA, the repository source line is not copied in /etc/apt/sources.list file. So, where do they go?

Those lines go to a file in /etc/apt/sources.list.d directory and the file is saved with this format: <PPA-name>-<dist-name>.list. (The file name format may not always follow the above rule in that directory for some PPAs)

For example, if you use PPA:gwibber-daily/ppa, a file will be created with the name gwibber-daily-ppa-precise.list which will contain the repository line in standard format.
The content of file in my Ubuntu is --

deb http://ppa.launchpad.net/gwibber-daily/ppa/ubuntu precise main
deb-src http://ppa.launchpad.net/gwibber-daily/ppa/ubuntu precise main

You have noticed that, that command added a repo line in standard format. Also, it automatically enabled the repository for source packages. (Note the line beginning with deb-src indicating a repository of source packages)

These conversion from PPA name to repository line is done by apt-add-repository and it is of no surprise because, Launchpad.net is owned by Canonical Ltd, which is also the sponsor of Ubuntu.

Apt-get manual
What are PPAs and how do I use them?


Why is a blank required between "[[" and "-e xxx" in ksh?

The simplest explanation would be, because in the manual it appears as [[ expression ]] so there has to be space between [[ and expression and closing ]]. But of course we can attempt to look at it more in depth. Shells have somewhat complex grammar and rely heavily on the concept of "word splitting". In particular,  ksh(1) manual states:

  The shell begins parsing its input by breaking it into words. Words, which are sequences of characters, are delimited by unquoted white-space characters (space, tab and newline) or meta-characters (<, >, |, ;, &, ( and )). Aside from delimiting words, spaces and tabs are ignored, while newlines usually delimit commands.

So as stated in the manual, sequence of characters [[-e is considered a shell word. ksh would look for such command in the list of built-ins and special operators ( like for or while ), then look for an external command - and voilà - none found, hence there's an error message about command not found.

In this case [[ are not special meta-characters either. If they were, the -e part in [[-e would be considered a shell word, not an argument to [[ itself.  However, [[ is described as compound command, and the manual says the following:

  Compound commands are created using the following reserved words - these words are only recognized if they are unquoted and if they are used as the first word of a command (i.e., they can't be preceded by parameter assignments or redirections):

So in order for [[ to be recognized as a compound command, it has to be a first word of a command or command list, which by previous definition of a "word" implies it has to be separated by spaces,tabs,or newlines from other words/arguments.

You've asked in the comments: "Why can't the parser stop as soon as it finds "[[" pattern, and treats that as the start of a conditional command?" Short answer is probably because 1) influence of [ syntax since it was originally an external command, and for POSIX standard compliance exists as external command even today, and 2) because the shell parser is built so. Shell parser can recognize other non-space delimited special characters:    echo $((2+2)) and (echo foobar) work perfectly fine. Maybe in future when ksh development resumes or there appears to be a fork or clone (like mksh or pdksh) someone will implement space-less syntax in [[-e.

See also:

In terms of POSIX grammar, [[ is called a "reserved word" (see section 2.9 of Shell Command Language). By POSIX definition, reserved word has to be delimited by spaces. By contrast ( is an operator, and the standard states in section 2.9 "the representations include spacing between tokens in some places where <blank>s would not be necessary (when one of the tokens is an operator)". See related discussion:  POSIX Shell Grammar: Why Brace Group Needs First Space But Subshell Doesn't?


This is probably not the answer you were looking for.

I actually assumed this would be easy to solve. I tried to get it working under Linux; I definitely entered the right paths, but although the application (indeed) does not complain about paths (running it from the terminal), I could not get it working under Linux. Looking at posts on the internet on the subject, I found others with the same problem, but no confirmed solution.

Another thing is that the makers seem not to be very fond of their own Linux version:

"Note that the Linux version of Chemcraft has some significant
disadvantages. We were unable to make it as efficient as the Windows
version."

A solution

Altogether, I would suggest WINE, like the makers of ChemCraft suggest to MAC users.

"If you work under Mac and want to use Chemcraft, you can install Wine."

Wine is a compatibility layer for Linux (also for MAC) you can find WINE in the Software Center.

The good news is that I downloaded it to run under WINE, and it started straight away, it ran fine without any problem as far as I can see.


How do I Replace Mythbuntu with 11.04 w/o Trashing SW Raid

You can install the standard Ubuntu desktop right into your Mythbuntu setup by doing

sudo apt-get install ubuntu-desktop

Then you may even choose to uninstall mythbuntu-related packages if you don't need them.

However, I don't think it'll solve your problems with Samba. For that, checking samba logs may give you some insights.


Why are there multiple (6) swap partitions after Ubuntu clean install?

What a can of worms this was…
First, repeated "hic·coughs" involved with installing Ubuntu 11.10 x86 replacing a 11.04 lead to repeated re-installs, much simpler than trying to "fix" them on my diminutive Lenovo S12 (Intel Atom) laptop.

In summary, the initial install over the pretty much unused 11.04 on the Lenovo S12 11.10 Desktop using the original disk partitions and subsequent re-installs lead to the following result: five new swap partitions, all taken from the original root partition.  This resulted in an extremely long boot (obscured by lengthly non-responsive period after the Desktop presented itself on screen).  No indication was ever given that the installation was not using the original partitions, and were being modified in such an obtrusive manner.  OK, rant over.

As a result, when finally a working Unity system was achieved, I had the original swap partition 4GB, plus 5 new 2.1GB, unwanted and unneeded swap partitions, taking disk space from the already small, root partition ⋯ 20% of the root partition on my laptop.
Note: does not apply to Wubi installations
This is how I fixed it:

Identified the swap partitions using "Disk Utility".
Edited /etc/fstab to ignore these partitions, and rebooted.
Installed and used gparted (Linux disk partition manager) to drop
the 5 superfluous, newly deprecated swap partitions.
Booted from live-CD to run gparted to resize the diminished root
partition back to full size.
Surprise…! ⋯ used grub resume > to get grub2 to properly boot
Ubuntu after a failed boot.
Downloaded, installed and ran grub-repair to fix the emasculated
grub2.
Popped down to the local pub for a few pints of Guinness, and to
complain about the government.

Now I don't recommend doing this, because it's noisome and dangerous.  But if you're willing to try here goes my step·by·step with additional elucidations from one who has gone before.
Identify Disk partitions
Use Disk Utility to discover which partitions do what.  Open Disk Utility (in the usual manner (on Unity left mouse button the dash icon, type in Disk Utility, …)
Here's a screen shot of Disk Utility (after the superfluous swap partitions were removed)⋯

Note: press Ctrl-+ one or more times to make screen·shot readable in your browser, Ctrl-0 or Ctrl-- (minus) to restore to normal
In this view, the "S12 System Disc 106 GB NTFS" IS SELECTED. on my Laptop, the 5 superfluous swap partitions were shown to the left of "50 GB ext4" and beneath the "Extended 50 GB".

To work on a partition, select (highlight) it with the mouse.
Directly beneath the selected partition is "Device: /dev/sd⋯⋯" which identifies the partitions.  Make a note of the ones to be deleted.
To Delete the selected partition, click on the Delete at the bottom of the Window.  You cannot delete them now because the system is using them, more or less.

The original swap partition should be the first (4GB on mine).  The others were added to the extended partition my root was in, as 2GB each; /dev/sda5, /dev/sda6, /dev/sda7 …
If you plan to recover space, as I did for extending the shrunken /root partition, make sure that there is unused space around it.  Usually this means leaving only the first or last swap partition.
If the /root partition is in an extended partition and a to be deleted swap partition is not, this complicated extending the /root partition.  Can be done, though.
You'll need to make a note of the following…

The boot disk (on mine, there was only one disk so no problem here)

The partition the /root partition, and if on a seperate partition, the /boot partition.
Note: a separate /boot partition is not standard on Ubuntu installs, and would have to have been especially set by someone.  So if you don't see one, that's OK.  More common is a separate /home partition, likewise especially set, as is the case on my laptop.  We won't have to concern ourselves with that here.

The next section shows a way to get this information more or easily as a premptive measure.
preemptive boot-repair installation
You will need to be connected to the Internet for this...
Download and install Boot-repair by opening a terminal and typing…
`sudo add-apt-repository ppa:yannubuntu/boot-repair`

and then
`sudo apt-get update && sudo apt-get install -y boot-repair`

Be agreeable and answer all questions affirmatively.
Then start boot-repair in the usual manner (on Unity left mouse button the dash icon, type in boot-repair, …)

Agree to an update, if any
Select "Create a Bootinfo summary..."
Wait until a message box appears and make a note of the URL (http://paste.ubuntu.com/nnnnnn/), where nnnnnn is a big number.  You can read this document anywhere with a browser just by entering the URL.

The first paragraph of this splendid document will tell you what you need to know.  Save a copy where you can access without the computer you are fixing.

Furthermore, in case you run into trouble here, quite likely actually, this information will be invaluable to someone assisting you.

edit fstab to deprecate unneeded swap partitions
Open a terminal in the usual manner
Type in sudo nano -B /etc/fstab, as an example from mine⋯
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda9 during installation
UUID=83ca52f1-0518-4992-95b3-58f1d4f58bc0 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda10 during installation
UUID=d30c8114-cc1a-49d3-8924-be46a64c5be5 none            swap    sw              0       0
# swap was on /dev/sda2 during installation
UUID=39421e04-b191-48a1-bfef-04ad1ad77329 none            swap    sw              0       0
# swap was on /dev/sda5 during installation
UUID=5e047822-53ed-4f2a-bd5a-b25804f41dda none            swap    sw              0       0
# swap was on /dev/sda6 during installation
UUID=e6589d14-fb5f-4e88-89d0-b3117a5382c9 none            swap    sw              0       0
# swap was on /dev/sda7 during installation
#UUID=71519d3c-8d4b-4e1d-a380-9d1f8d38fd04 none            swap    sw              0       0
# swap was on /dev/sda8 during installation
UUID=43bfad50-23f1-4813-b622-fe78558f73a1 none            swap    sw              0

To stop the unwanted swap partitions from being used on your computer, just add a "#" to the front of the line.  Use the notes from "gparted"
So now it should look like this⋯

Save the changes with Ctrl-O and Enter, then close with Ctrl-X
And reboot.
Now the system should be faster to complete booting.
using gparted to free the disk
Now that the deprecated swap partitions are not in use and can be deleted by selecting each one and the the deleting them using the GUI's function.  Open Disk Utility (in the usual manner (on Unity left mouse button the dash icon, type in Disk Utility, …)

To work on a partition, select (highlight) it with the mouse.
To Delete the selected partition, click on the Delete at the bottom of the Window.  You can now delete them now because the system is no longer using them.

using liveCD to restore lost space on root partition
Freeing up the disk space gobbled up by the sublime Ubuntu installation requires booting the system from another operating system, here we choose the Ubuntu LiveCD. Same version as installed, please.

There are other ways of doing this, feel free to use what ever makes your needle read.

Boot from the LiveCD and choose "Try Ubuntu".
gparted is on the LiveCD although not installed in a typical installation with Ubuntu.
Open a terminal and type in gksu garted.  The terminal will throw up a bunch of stuff like…
ubuntu@ubuntu:~$ gksu gparted
(gksu:5791): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(gksu:5791): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(gksu:5791): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(gksu:5791): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
======================
libparted : 2.3
======================

…but then the GParted GUI will open.  Resize the /root partition per GParted.

Do not interrupt the process ⋯ likely consequences will be dire

When finished, close out liveCD and restart.
It's possible it will reboot nicely but mine didn't  ~~ cue somber music
getting grub2 to work after partition resize
First we have to get Ubuntu to boot through grub2 starting at  grub rescue >

first type in ls -l and hit Enter.

You should get a listing like this  (hd0) (hd0,1) … or (hd0) (hd0,msdos1) …
These correspond to the /dev/sda, /dev/sda1 … from the Boot Info Script done earlier.

It can be tricky hd0, hd1, hd2… may not exactly conform to /dev/sda, /dev/sdb/, /dev/sdc ….
Match up the disk and partitions, mine was (hd0) for the disk and (hd9,msdos5) for the root partition. Of course the laptop had only disk so it was easy for me.
Further down in the Bootinfo output (http://paste.ubuntu.com/nnnnnn/) is where the root partition is, under "⋯ /boot/grub/menu.lst" which could be helpful.

Something like:
title       Ubuntu 10.04.2 LTS, kernel 2.6.32-30-generic
root        (hd0,0)

These steps come from here.  Good place to go if these steps don't work.
Once you have identified the grug install disk and the /root partition. the type in…

set prefix=(hdX,Y)/boot/grub  where as above, X=0 and Y=msdos1 (or just 1)
set root=(hdX,Y)   as above
insmod normal  Attempt to load the normal module
normal  Activate the normal module. If successful, the GRUB 2 menu appears.

If the grub boot menu appears, as it did for me, you have beat the odds, point your elbow at the ceiling and pat yourself on the back.  Then do the next step, so you don't have to do this again.
If not, go back to here and, alas, good luck.
repairing grub to to avoid the need for grub rescue > again
Finalizing the grub boot fix…
Run boot-repair again, this time you probably don't have to check for updates, and this time run "recommended repair"
fini
Hope this helps.  Good Luck.


As I tried, that code works just fine.

require "test/unit"

class TestNAME < Test::Unit::TestCase

  def test_sample
    assert_equal(4, 2+2)
  end

end

# Running tests:

Finished tests in 0.007099s, 140.8649 tests/s, 140.8649 assertions/s.
1 tests, 1 assertions, 0 failures, 0 errors, 0 skips

ruby -v: ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin13.1.0]

I guess there is something wrong in ./lib/NAME.rb file.

Can you paste it here?