Are there any power consumption indicators?

Note: As of right now it is not possible to measure power consumption of laptop on AC adapter or a desktop computer via software means. Even other OS such as windows requires having external hardware sensors to provide that information. If you want indicator for desktop computer , this answer won't work for you

I have written an indicator that monitors energy consumption in both Watts and milli - Amps. The usage if very simple :

 python /path/to/power-flow-indicator

or  from the same directory as the script:

 ./power-flow-indicator

By default output is shown in Watts, but --amps option allows showing the output in milli-amps:

python power-flow-indicator --amps

The -h will show this same information :

usage: power-flow-indicator [-h] [--amps]

optional arguments:
  -h, --help  show this help message and exit
  --amps      display output in milliamps

Obtaining the Indicator

The indicator source code is located on GitHub. If you have git installed , you can clone the repository via:

git clone https://github.com/SergKolo/power-flow-indicator.git

Alternatively , one can obtain zip file via

 wget https://github.com/SergKolo/power-flow-indicator/archive/master.zip

Source Code

NOTE: the indicator needs an icon. It is preferable that you clone the git repository or obtain the zip package rather than just copying the source code alone.

#!/usr/bin/env python
# -*- coding: utf-8 -*-

#
# Author: Serg Kolo , contact: 1047481448@qq.com
# Date: July 21, 2012
# Purpose: Indicator that displays power
#          consumption of  laptop battery
#
# Written for: http://askubuntu.com/q/801003/295286
# Tested on: Ubuntu 16.04 LTS
#
#
#
# Licensed under The MIT License (MIT).
# See included LICENSE file or the notice below.
#
# Copyright © 2016 Sergiy Kolodyazhnyy
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
import gi
gi.require_version('AppIndicator3', '0.1')
from gi.repository import GLib as glib
from gi.repository import AppIndicator3 as appindicator
from gi.repository import Gtk as gtk
import os
import dbus
import subprocess
import argparse

class LockKeyStatusIndicator(object):

    def __init__(self, show_amps):
        self.show_amps = show_amps
        self.app = appindicator.Indicator.new(
            'power-flow-indicator', "",
            appindicator.IndicatorCategory.APPLICATION_STATUS)

        self.app.set_status(appindicator.IndicatorStatus.ACTIVE)
        self.icon_path = os.path.dirname( os.path.realpath(__file__) )
        self.app.set_icon( os.path.join(self.icon_path,"pwi_icon.png"  ))

        self.update_label()
        self.app_menu = gtk.Menu()
        self.quit_app = gtk.MenuItem('Quit')
        self.quit_app.connect('activate', self.quit)
        self.quit_app.show()
        self.app_menu.append(self.quit_app)

        self.app.set_menu(self.app_menu)

    def run(self):

        try:
            gtk.main()
        except KeyboardInterrupt:
            pass

    def quit(self, data=None):

        gtk.main_quit()

    def run_cmd(self, cmdlist):

        new_env = dict( os.environ )
        new_env['LC_ALL'] = 'C'
        try:
            stdout = subprocess.check_output(cmdlist,env=new_env)
        except subprocess.CalledProcessError:
            pass
        else:
            if stdout:
                return stdout

    def run_dbus_method(self, bus_type, obj, path, interface, method, arg):

        if bus_type == "session":

            bus = dbus.SessionBus()

        if bus_type == "system":

            bus = dbus.SystemBus()

        proxy = bus.get_object(obj, path)
        method = proxy.get_dbus_method(method, interface)

        if arg:

            return method(arg)

        else:

            return method()

    def get_power_info(self):

        battery_path = None
        battery_info = []
        energy_rate = None
        voltage = None
        current = None
        on_battery = None

        for line in self.run_cmd(['upower', '-e']).decode().split('\n'):
            if 'battery_BAT' in line:
                battery_path = line
                break
        self.run_dbus_method('system', 'org.freedesktop.UPower',
                             battery_path, 'org.freedesktop.UPower.Device',
                             'Refresh', 'None')

        for entry in self.run_cmd(
                ['upower', '-i', battery_path]).decode().split('\n'):
            if 'state' in entry:
                if entry.replace(" ", "").split(':')[1] == 'discharging':
                    on_battery = True
            if 'energy-rate' in entry:
                energy_rate = entry.replace(" ", "").split(':')[1][:-1]
                print energy_rate
            if 'voltage' in entry:
                voltage = entry.replace(" ", "").split(':')[1]

        current = round(
            1000 * float(energy_rate[:-1]) / float(voltage[:-1]), 4)

        if on_battery:
            return str(round(float(energy_rate),2)) + 'W', str(int(current)) + 'mA'
        else:
            return 'on ac', 'on ac'

    def update_label(self):

        cwd = os.getcwd()
        red_icon = os.path.join(cwd, 'red.png')
        green_icon = os.path.join(cwd, 'green.png')
        if self.show_amps:
            label_text = self.get_power_info()[1]
        else:
            label_text = self.get_power_info()[0]

        self.app.set_label(label_text, "")
        glib.timeout_add_seconds(1, self.set_app_label)

    def set_app_label(self):

        self.update_label()

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument(
        "--amps", help="display output in milliamps", action="store_true")
    args = parser.parse_args()
    indicator = LockKeyStatusIndicator(args.amps)
    indicator.run()

if __name__ == '__main__':
    main()


Ubuntu 14.04 crouton Chrome OS wifi and network issue

Seems https://github.com/dnschneid/crouton/issues/611 has some direction.

It is not a very optimistic chance though:

  you'll probably first need to stop Chromium OS's shill service (sudo
  stop shill). Remember that initctl (upstart) always controls Chromium
  OS's services, since Chromium OS owns the init process, so you may
  need to launch whatever networking system daemon manually. There's no
  known procedure for getting NM working inside a chroot (and again, I
  don't recommend it), but have fun paving the way.


Trying to install ubuntu from usb on gateway with win 8.1

When you are going to install from usb, first boot to live mode and use gparted to shrink your windows partition. Then run the install and when it wants to use all your disk, it should let you install it to the empty space.


Windows entry(UEFI) deleted, after installing ubuntu in legacy mode

Boot Repair has renamed the Windows boot loader file and put a copy of GRUB in its place. The Windows boot loader file should be EFI/Microsoft/Boot/bootmgfw.efi on the EFI System Partition (ESP), but Boot Repair has renamed it to bkpbootmgfw.efi and put GRUB in its place. You need to undo this damage. There's an option to do this on the Boot Repair Advanced menu page, or you can do it manually by renaming the file.

Incidentally, you may want to check out my rEFInd boot manager. It starts up in EFI mode and can pass control to the Windows EFI boot loader. It can also pass control to a BIOS-mode boot loader such as GRUB, although you'll need to uncomment the scanfor line in refind.conf and ensure that hdbios is among the options. rEFInd can also boot Linux in EFI mode. It's not clear why you want to do a BIOS-mode boot of Linux, but IMHO it's usually better to do an EFI-mode boot unless you've got some specific problem with that (like a video card that's not working well in EFI mode).


run php file from cron and start browser through exec on ubuntu

You can try using watch. watch -10 <YOUR COMMAND>
This will try executing your command every 10 second in terminal.


12.10 Ubuntu will not boot due to no space left on device

Select recovery mode in Grub Menu and later choose "Root Shell". Run mount -o remount,rw / to remount the root partition as read/write, then you should be able to delete files.


Chrome running slow in fullscreen mode (not Flash related)

First of all, go to the url chrome://gpu.

It should look something like this:

If so, go to the url chrome://flags.

Go to Override software rendering list and click enable.
Go to Enable experimental canvas features and click enable.

Then, press CTRL + F and search for the word raster.

Change Enable display list 2D canvas to Enabled.
Change Enable GPU rasterization to Force Enabled for all
layers.
Change Enable zero-copy rasterizer to Enabled.

When you are done, click Reload and go to the URL chrome://gpu and it should look like this:

Hopefully, this should make a difference.

Partially adapted from this article on Webupd8.


Ok .. I see a problem

You have two lines that say /mnt/Memory

I believe the one that starts with 5D is wrong .. you can try putting an # at the beginning of that line and save that file

Then type

sudo umount /mnt/Memory

it should unmount it if its mounted...
then type

sudo mount -a

and see if you get any errors or if everything goes fine and /mnt/Memory is mounted

Also .. are you trying to mount something at /mnt/c7e.... or is that also linked to the same mount  point .. if so .. you would want to put an # before that too

What you should try now is to make a copy of fstab either with gedit or type

sudo cp /etc/fstab /etc/fstab.bak

now type in terminal

blkid

it will print out a bunch of stuff..

look for /dev/sda4 and make sure the UUID is 89655141-7e36-4393-8ffa-099cff1a0b16

if not and its c7e33283-12f0-4e00-98d5-9a930a7738da then what I will do is print out two lines ... you will select one to put into your fstab .. use only one and use the one that matches the UUID for /dev/sda4

Delete all or # before all the lines that say /dev/disk/by-uuid/

Use one of these lines that match your UUID for /dev/sda4

#/dev/sda4
UUID=89655141-7E36-4393-8FFA-099CFF1A0B16 /mnt/Memory auto nosuid,nodev,nofail 0 0

or

#/dev/sda4
UUID=C7E33283-12F0-4E00-98D5-9A930A7738DA /mnt/Memory auto nosuid,nodev,nofail 0 0

once you have removed or commented out the old entries and added the proper  new lines .. save  the file and again try sudo umount /mnt/Memory then sudo mount -a also be aware that this is mounting the partition to /mnt/Memory not /mnt/memory. it is case sensitive so the capital and non capital directories are considered two different directories


uninstall windows server 2008 and add disk space to ubuntu 12.04

The first rule of making alterations to the primary hard drive is "Make a backup".

The Second rule of making alterations to the primary hard drive is "Make a backup".

There are three ways to do this, you can delete the windows drive using Gparted then expand the Ubuntu partition to include to resulting empty space.  I'm not sure how well this will work as I have never done it that way round. (I have moved Ubuntu and expanded windows and Ubuntu partitions to fill the drive).  Give it a try, if it all goes wrong you can go back to your backup.

Or, you can delete the windows partition and reformat the space as ext4 and mount it for use in your Ubuntu file system.

Finally, re-install with the latest version and copy the settings from your backup.

Did I mention that you should do a backup?


How to make a .sh file that installs something?

Most packages can be installed using a script like yours.  You do need to answer the question "install (Y/n)" that apt-get asks:

sudo apt-get install -y <packagename>

will work for all but a few packages that open up a terminal during configuration, such as the ttf-mscorefonts-installer

Look through the link sent in the comment by @bodhi.zazen, particularly the first chapter.  There are some basic bits about script files you are missing.


how can I hide files in Nautilus permanently?

This key is outdated an will be ignored. Use key »show-hidden« in category »org.gtk.Settings.FileChooser« instead!


Name of extension that shows app icons on windows in overview

I think you mean the WindowOverlay Icons GNOME Shell extension.
Here is a screenshot of the GNOME Shell overview on my computer with the extension in use and a few programs running:


Uninstall Ubuntu 14.04 x64 that runs with Win8 and Ubuntux86

First create a ubuntu x86 live usb
You can use OS-uninstaller to uninstall Ubuntu x64 (or boot from usb and simply delete the ubuntu x64 partition) and repir grub with boot-repair using ubuntu x86 live usb.

Use the graphical method in this link to repair grub.
http://www.howtogeek.com/114884/how-to-repair-grub2-when-ubuntu-wont-boot/

@Jye Ramirez: Boot partition is a separate partition ( small size like 300MB like that) to install boot loader. Eg: SYSTEM partition is created if windows is installed. windows stores its boot loader in system partition. If that system partition is deleted windows cant boot. Generally no need to create a separate boot partition you can install boot-loader to OS partition


Quicklist for Google Chrome (for bookmarks, new windows, etc) not working properly

Chrome seems to have a bug that causes this kind of behavior - one that is fixed in Chromium (at least on the daily version - 13.0.750.0 (83280) - that i tested) .
The fix will , eventually, come to Chrome as well.

(when an update bring the fixed Chrome, i will post here a comment here - unless i have moved away to Chromium permanently)


There used to be p2v and v2p tools for VBox images from Redhat, but they pulled support for them and the source disappeared from the interwebs.  I can't find a reference, but I assure you I found a project page with redacted/dead download areas at one point.

Evidently they decided to endorse Acronis instead.

There is also vboot referenced here which could do what you want sort of...in an easy way.

It's not a point-click process, but you can always:

uninstall guest additions
switch from a virt kernel to a generic kernel
dd guest partition to host partition
reconfigure grub
reconfigure graphics configs and other driver/interface naming
related issues


How to boot to ubuntu not windows after instal?

This Question has already been answered e.g. here asuming you are using windows 8 or 10
How can I dual-boot Windows 10 and Ubuntu on a UEFI HP notebook?
The Post is too long to repeat a short answer here but usually the problem is in the windows boot setups


Not so much an answer as a quick workaround.  By switching to a tty and back, X seems to reinitialise cleanly.  That is

  Ctrl+Alt+F1-6

followed by a

  Ctrl+Alt+F7.

Not a cure, but a very quick remedy.


Nvidia 361.28 and Intel graphic instaler 1.4.0 return login loop

I am referring to this answer from my other answers.
I had a login loop issue as mentioned here

First uninstall the currently installed NVIDIA drivers.Boot the computer, when the GRUB menu appears ...

Highlight the Ubuntu menu entry and press the E key.Add nouveau.modeset=0 to the end of the linux line. Press F10 to boot the Ubuntu operating system.

When the login screen appears press Ctrl+Alt+F1.Enter your user name and the password, then execute :

sudo apt-get purge nvidia*
sudo reboot

Now install the latest official stable NVIDIA drivers.Boot the computer, when the GRUB menu appears ...

Highlight the Ubuntu menu entry and press the E key.Add nouveau.modeset=0 to the end of the linux line. Press F10 to boot the Ubuntu operating system.

When the login screen appears press Ctrl+Alt+F1. Enter your user name and the password, then execute :

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-361 nvidia-prime
sudo reboot

Note : Maybe it is explicitly necessary to select the NVIDIA adapter in BIOS. When you want to use drivers 361, adding the PPA is not necessary. In this case the terminal commands you have to perform are these :

sudo apt-get update
sudo apt-get install nvidia-361
sudo reboot

In case you have installed the nvidia driver from their site then uninstall it as per that instructions.Uninstall that driver by running, as root, sh ./NVIDIA-Linux-x86_64-361.28.run and follow the on screen instructions.

Note : The solution I have provide has been tested on Ubuntu 14.04 LTS and Ubuntu 15.10 for two GPUs.


I just figured out how to solve the problem in my case. I don't know if this is best practice or not, but I basically kept trying to run sudo apt-get remove codeblocks to get an error code and see which components of codeblocks were installed and had dependency errors. I then used sudo dpkg -r --force-depends <package name> where I replaced  with whatever package that seemed to be causing an issue. I ended up having to do this to codeblocks-dev, codeblocks-contrib, and codeblocks-dbg which was from the first set of error codes I have.

Again, I'm not sure if this is the proper way to do this, but after doing this, I was then able to install non-codeblocks packages again, which works for me.


How can I tell if my hard drive is encrypted?

The directory /home/cii is encrypted.

This is indicated by this mount line in your question:

/home/cii/.Private on /home/cii type ecryptfs (ecryptfs_check_dev_ruid,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs,ecryptfs_sig=18df82f57f616955,ecryptfs_fnek_sig=18e7fb71def9e5b5)

In particular, this line shows that there is a mount of type ecryptfs mounted at /home/cii.  Ecryptfs is a system of filesystem-level encryption.

The line also shows that the drive is stored on disk as an encrypted container file called /home/cii/.Private.  This is encrypted data that cannot be read or written to unless you decrypt it.  You won't see it, unless your home directory has not been mounted yet, in which case it will appear and just look like jibberish.

When you enter your password, the encrypted data is being mounted at /home/cii.  That is, while this mount exists, your /home/cii is being replaced with a mounted version of your encrypted container.  Your home directory is encrypted as you write to it.  When you log out, this will be unmounted and other people will be unable to read its contents even with root access: they will only see a file called .Private which is indistinguishable from random data.


Do I need to add a boot parameter to work around this kernel power bug on a Sony Vaio VPC-EH1S0E?

Ok, i've add "pcie_aspm=force" and i've gained 20 minutes :)
So if someone have a Sony Vaio VPC-EH1S0E can easily add the parameter to the grub line in this way:

sudo nano -w /etc/default/grub

and where there is this line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

change it into:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=force"

You can also check the power consumption with powertop:

sudo apt-get install powertop

and then:
    sudo powertop
My battery consumption was decreased from 20.1W to 15.3W :)


You seem to have empty /etc/apt/sources.list. That happens if you do some unusual installation. Check that it contains both restricted and universe lines.


The Rhythmbox Plugins Writing Guide has several examples of commands you can use in the Python console to control playback and modify Rhythmbox:

Play/Pause

shell.props.shell_player.playpause()

Stop

shell.props.shell_player.stop()

Next track

shell.props.shell_player.do_next()

Add a song to the Play Queue

shell.add_to_queue("file://awsome_song.ogg")

Display a visualization

import gst
goom = gst.element_factory_make ("goom")
sink = gst.element_factory_make ("ximagesink")
colour = gst.element_factory_make ("ffmpegcolorspace")
b = gst.Bin()
b.add (goom, colour, sink)
b.add_pad(gst.GhostPad("sink", goom.get_pad("sink")))
goom.link(colour)
colour.link(sink)
shell.get_player().props.player.add_tee(b)


Ubuntu 12.04 stuck on loading screen. How can I save my data?

Wubi indeed does not create a partition but creates a file in your Windows partition and mounts it as a loopback device (a way for Linux to access a file as if it was a partition).

The file should be under program files, under wubi or ubuntu folder (depends on the version of wubi, it's been a while since I used it).

You can boot the system with an Ubuntu live CD/USB, access the windows partition from the Ubuntu live system, it should be one of the accessible filesystems on the launcher.

In the Windows filesystem find the Ubuntu "drive" file under program files, and then do the following in the terminal (ctrl+alt+t launches a terminal):

sudo mkdir /media/wubi
sudo mount -o loop,ro /path/to/ubuntu/file /media/wubi

Replace the "/path/to/ubuntu/file" with the location of the "drive" file.

Now you should be able to see a filesystem that is your Ubuntu drive and can copy/upload/email whatever you want from it.

Keep in mind, that your Windows filesystem may be read only on a 12.04 live system, and that by following my instructions, the Ubuntu filesystem is also read-only.


How to truncate unallocated parts from an image with multiple partitions

you can't edit the image. you will have to restore each partition one at a time, shrink it, then make a new image. once you have the size needed, yo can restore them all to the new drive.

PS be sure you are making partition images not drive images.


It's a short way of executing a script without having to save the file and then execute it. When you save the file and then execute it, a number of things can go wrong:

User didn't type the filename correctly
User didn't use the correct shell (maybe ran sh foo.sh instead of bash foo.sh)
User tried to execute the file instead of setting bash on it (./foo.sh), and forgot to set execute permissions
User forgot to use sudo

By providing a single command line to execute, the developers can decrease the number of places where things can go wrong due to luser error.

Personally, I despise piping curl to bash. It's not safe.


Freezing at login on Dell XPS 15 9560 with Ubuntu 18.04

The Dell XPS 15 9560 has an Nvidia GTX 1050 GPU with 4GB RAM dedicated memory, but maybe the GTX 1050 doesn't have a proprietary driver installed for it. If you can't login to the desktop environment to install the proprietary Nvidia graphics driver, you can access a virtual console and install the graphics driver from there.

From the login screen before entering your password logging press the keyboard combination Ctrl+Alt+F3 to access a text-only virtual console.

To login from a virtual console:

At the login: prompt type your username and press Enter.
At the Password: prompt type your user password and press Enter. After you have logged in, you can run commands from the virtual console.

The proprietary Nvidia graphics driver can be installed in Ubuntu 18.04 from the terminal/console with the following commands:

sudo ubuntu-drivers autoinstall
sudo reboot

When installing a proprietary graphics driver, it is not necessary to uninstall the built-in open source graphics driver. The two graphics drivers can be installed alongside each other allowing the  open source graphics driver to be used as a fallback alternative in case there is a problem using the proprietary graphics driver.

The ubuntu-drivers autoinstall command installs drivers that are appropriate for automatic installation including their dependencies, and the Nvidia driver will also be updated automatically when an update is available.


I do not believe it is possible to make a LiveDVD on its own persistent without a USB to hold the persistence, and I also believe that the reason you can't comes down to the medium and why you can't sanely/safely write/erase/rewrite on CDs/DVDs so much compared to SSD/HDD/USB drives.

USB sticks are inherently reusable.  That is to say, data is written, erased, and rewritten on the drive until the memory chips wear out (there is a point where the equipment does just wear out and stop working either due to hardware fatigue and the chips stop working, or part breakage at the USB connector, or any other problem)

DVDs are different.  Data is written to the disk by lasers and physically carved into the metal layer of the disk.  Persistence would need to be able to write to the disk, erase from the disk, and rewrite, which is only able to be one on DVD-RW, and even then it can only be done so many times (far less than USB) before the disk is no longer usable.  To do persistence you would need a USB to still hold the persistence.

Also, given the difference in read/write IO speed between DVD and USB (substantially different!) you may prefer to just use a LiveUSB to expedite boot, read/write, and execution times.


If /sbin a system (root) directory, why is a normal user(without super user privileges) able to execute ifconfig command?

The above statement can only be fully answered by the creators of the OS that ifconfig command is found on. But let share this, there are certain tools that need to do tasks that normally only the root user should do but every normal user aught to be able based on the fact that these tasks are needed by every user. An example would be the passwd tool, it is found on my system in the /usr/bin/ directory but users would normally need to run sudo to use any tool in that location but here I can use just passwd to change my password and only my password. So that tool is designed to be used by anyone but when run it runs with what is called the privileges of the effective user which is root.

Now that's the theory behind such tools, which ones get to be designed this way is up to the creators of Ubuntu or any other linux OS for that matter, any tool can be made to behave like this and in this case ifconfig is falls into this category.

Simpy put I don't have to be root to use the passwd to change my own password but will have to be to change the password of every other user of the system. So Ubuntu developers can later decide that you need to be root to use ifconfig and that will change the way it is used or accessed.

And for the fact that it is located in that location simply means it is a tool that the system requires access to and that's the normal location for such tools.


Not at the moment (as far as I know).

The PPA contains only 2 integration plugins: UbuntuOne and Dropbox. Those are created and maintained at the moment by the developers of Marlin.

Marlin is still under (heavy) development and one would expect some plugins to show up in the future but not at the same level as Nautilus. The plugins from Nautilus will not (as you might know) work with Marlin.

Marlin is a very recent project if you compare it with Nautilus, I am guessing it is just a mater of time and future support. I really love Marlin and hope the developers keep up the great work. Maybe (one can only hope that) we will see more plugins incoming soon.


Turn ON the printer and connect to the HP printers server:

hp-doctor


Can't print on Ubuntu 16.04 with Epson L210

I believe this to be related to https://bugs.launchpad.net/ubuntu/+source/lsb/+bug/1536353

I had a similar problem with my Brother DCP-J152W printer. Basically install the LSB printer package. While the launchpad item indicates it is fixed it is still not installed in my 16.04LTS updated daily, as of today 10/08/16 (UK/rest of world date format.)
I chose the easier way, if you are not happy with using the terminal, it is easy to use the Synaptic Package Manager. If you do not have this already you can install it from the Ubuntu Software Centre (the orange suitcase with "A" on it.
Once you have Synaptic open it and click the spyglass "search" icon and type lsb. Scroll down to lsb-printing and click then select "Mark for Installation" then click "Apply" at the top and then "Apply" again in the lower right of the box. Then close Snaptic.
Then re-install your printer driver. Or check, it may even work without re-installing.
I had been searching for several days for the answer to this and ended up transferring the document on a SD card to my netbook which still has 14.04LTS on it which did include the LSB package as standard.

UPDATE:
While adding LSB seemed to fix the problem initially it has only lasted until I have re-booted. However I have also changer routers and re-set the wlan setup on the printer accordingly.

So problem still exists with all listed LSB (in Synaptic) modules installed.
Printer "name of printer queue" may not be connected. Though it is shown connected and active in my router listings.


How to replace tray icons for applications in cinnamon

Where to search for icons
You can look for icons at http://www.iconfinder.com:

for Pidgin: http://www.iconfinder.com/search/?q=pidgin
for Skype: http://www.iconfinder.com/search/?q=skype
for Dropbox: http://www.iconfinder.com/search/?q=dropbox

Add an application to cinnamon panel
Next I will explain how to add Pidgin to the cinnamon panel bar and how to change its icon.
Let say that your cinnamon panel bar looks something like in the following image in this moment:

To add Pidgin in the panel par, go to Menu and search for "Pidgin". When it found, right click on it and select Add to panel:

So now your panel bar it looks like this:

Change the icon for an application
Let say that you want to change the default icon for Pidgin to the following:

To change the icon for Pidgin, go to Menu search for "Main menu" and open it. When it open, search for "Pidgin" application, click Properties and change the icon by clicking on it:

So, finally, your panel bar it looks like this:

Moreover, you can move an application anywhere you want on the panel by right clicking on the panel and selecting Panel Edit mode. Now you can drag and drop your application anywhere you want on the panel:


Is there any way to see which applications are the most downloaded from the Software Center?

No, back in 2005 'most downloaded' was suppose to be part of USC but I doubt it will ever be added again.

Anyone that installed the popularity-contest package does get their downloads shown on the Ubuntu Popularity Contest website.

Example from the website:

packages from main
packages from restricted
packages from main, games


How to create own commands for the terminal?

The answer to your wider question:

Create a new file in ~/bin/ (create it if it doesn't exist).
Write your script:

#!/bin/bash

# do something here.

Give that file executable permissions:

chmod +x ~/bin/filename

In your particular case you could:

Symlink the executable into /usr/bin/:

sudo ln -s /opt/teamspeak3/teamspeak3 /usr/bin/

This won't always work. Some things behave strangely when symlinked and some things need to be run from the right path... But it's simple and it might work.
Or, you could write a little script (as above) but in /usr/bin/ instead of ~/bin/ (you'll need to prepend the commands with sudo)


Can I Mount ENCFS container from Ubuntu live usb?

Yes, man encfs should tell you all you need to know. I think the command is essentially

encfs /the/encrypted-dir /the/empty/mountpoint-dir

replacing directories with your real ones. If there are any errors I think there's a -v option for more info, and check logs, and update your Q if it doesn't work. All the needed info should be in a config file in the encrypted dir + your passphrase.

FYI, encfs is probably not installed on a default live iso, so you'll first need the internet, and

sudo apt-get update
sudo apt-get encfs


This script is based on your answer, but it uses find instead of going through the filesystem manually.

#!/bin/bash

unrar_if_needed()(
    file="$1"
    dir="$(dirname "$file")" # Extract dir name from file path.
    echo "Found: $file"
    if [[ -f "$file".processed ]]; then # Double brackets are better.
        echo "    Already unrared."
    else
        echo -n "    Unraring... "
        if unrar -inul e "$file" "$dir"; then # This if-statement is not necessary, but a nice touch.
            touch "$file".processed
            echo "Done."
        fi
    fi
)

export -f unrar_if_needed

if [[ "$1" ]]; then
    dir="$1"
else
    dir=.
fi

echo "Looking in: $dir"
find "$dir" -iname "*.rar" -exec bash -c 'unrar_if_needed {}' \; # find runs the custom function.

Output should look like this:

$ script.sh somedir
Looking in: somedir
Found: ./somedir/file1.rar
    Unraring... Done.
Found: ./somedir/file2.rar
    Already unrared.


Does changing in `lsb-release` file affects upgrades?

It seems this file doesn't affect the upgrade. I saw the same string DISTRIB_ID=Ubuntu in Kubuntu, Xubuntu, Ubuntu and Edubuntu installation. So, this file really doesn't play any role in the upgrade process in deciding the flavor of Ubuntu. But of course, it decide the versions of (X)Ubuntu


Have you attempted re-downloading the .iso file from Ubuntu's website? That's what I had to do to fix certain issues.

What I would do is redownload the file and transfer it to a DVD or flash drive. MAKE SURE THAT WINDOWS (or whatever OS you're using) VERIFIES THE TRANSFER. OTHERWISE, IT MAY NOT WORK. Then, you should be good to go.


Ubuntu can't shutdown and the log-out screen just freezes

The answer for this one was:
After I have clicked on a button shutdown and the log-out screen has shown, I pressed the esc key and I could see the error text messages, and I have found the message:

  Waiting for Redis to shutdown ...

After finding out what script is used to shutdown Redis, I have found out it is:

/etc/init.d/redis_6379

When I tried manually to shutdown manually from console running a command:

sudo /etc/init.d/redis_6379 stop

I got the same error message. I was one step closer to the solution.
Even though maybe the solution was not as perfect as it could be, but I managed to solve my problem. I have edited the file:

sudo gedit /etc/init.d/redis_6379

And found the:

echo "Waiting for Redis to shutdown ..."

Edited the surrounding code (commented out some lines and added one other command to shutdown the Redis server)

/etc/init.d/redis-server stop
#while [ -x /proc/${PID} ]
#do
  echo "Waiting for Redis to shutdown ..."
  #sleep 1
#done

And whola! The Ubuntu now will not stuck in an infinite loop, and now I could shutdown, suspend and restart again! :)


How do I start the postgreSQL service upon boot?

You should edit the file postgresql.conf. Where to find this file and a lot of other information can be found in postgresql's manual (18.1 and 18.2).

On my system (natty) this file is in /etc/postgresql/8.4/main. The variable you have to change is data_directory.


Dell Inspiron 20 Touch Screen Right Click Ubuntu 14.04 64

You may try upgrading your linux kernel:

Follow my video: https://www.youtube.com/watch?v=7kFRtJiwCRI

Be aware that upgrade kernel sometimes causes problem, in my case, if i upgrade to 3.18 RC8)newest to date) it shutdowns the entire system.

So, i've made a tutorial with the 3.18 RC3, not RC8, that works on 14.04.1 (official download) ubuntu.

hope it helps

I also have a touchscreen ultrabook and upgrading kernel makes working many things


Difference between Ubuntu and Debian command line use

Ubuntu is a Debian derivative and I haven't come across situations where a command exists both in Debian and Ubuntu but their accepted syntax is different.


How do I remove Nvidia drivers and revert to nouveau (12.04)?

OP probably solved his problem but for future reference.

If you have tested various versions of nvidia drivers using jockey, it will just revert to whatever version of nvidia you have on your computer. You must continuously remove drivers on jockey until all versions are grayed out.

If you're stuck on command line, there is a command line jockey that can be started by jockey-text. Type jockey-text --help to see the list of options. You need to work with it as su (sudo) in order to disable/enable drivers.

Finally, you must remove xorg config file i.e. sudo rm /etc/X11/xorg.conf since nvidia settings in it will most likely clash with nouveau and can prevent X from starting.


The path is likely incorrect. You can obtain the correct path by opening a terminal (Ctrl Alt T often does the trick) and issuing the command which blender the result will be the path you need. You can confirm that you have a supported version of blender with the command blender --version The version currently in the repositories is Blender 2.69 (at least for "Trusty" Ubuntu 14.04) you can properly install it easily with the command sudo apt-get install blender


uudecode is in the package sharutils

Install it with the package manager or
start a terminal and type this command

sudo apt-get install sharutils


According to the OP Panel OSD doesn't work on Ubuntu 18.04.
Use Notification Position Gnome Tweak instead.


I can't turn on extensions ubuntu 21.04 gnome 40

Gnome 40 is still in development and is not yet fully functional. If you want a stable interface, I recommend downgrading to Gnome 3.38


From terminal

sudo dpkg --add-architecture i386

sudo apt-get install ia32-libs

once done should work if you get a library error

sudo nano /etc/ld.so.conf.d/steam.conf

/usr/lib32

(you may need never had to use this line)
/usr/lib/i386-linux-gnu/mesa

Ctrl+X save

sudo ldconfig

Steam should now work properly from this point on..


ecrypte-recover-private not unencrypting with mount passphrase

Karl,

I did go back and look at syslog a little more carefully. I was taking it at face value that when ecryptfs-recover-private actually came back and stated it mounted successfully, that it actually did mount and unencrypt. While it is true that it mounted the directory, it was not unencrypted. Once I understood this, I checked my password a realized I was leaving off the last two characters and only putting in 30 instead of the 32. Once I added this, my directory was mounted and the files are unencrypted. Thanks for making me get in there and take a closer look!

I think that the ecryptfs-recover-pivate command should state if it does not unencrypt even if it does mount successfully.

Thanks,

Greg


Where does Unity store the chameleonic launcher/dash color?

As I was digging around the Dconf settings , I found this setting.

You can use this command to obtain the average background colour:

$ dconf read /desktop/unity/average-bg-color
'#23d621a3050e'


How can i fix port conflicts between apache tomcat (8080) and default http (8080)?

You may already to be running a tomcat instance already.

ps aux | grep tomcat

Check what appears. If there is nothing then it must be another service you will need to netstat to check what services are running on port 8080

netstat -an

This command will show you the service. Look for anything on 8080 already.

The last option is the one given above. Jump into either the http or tomcat configs and switch the ports to stop any problems when launching. the server.xml file contains the config that needs changed.

<!-- Normal HTTP -->
 <Connector className="org.apache.tomcat.service.PoolTcpConnector">
    <Parameter name="handler"
         value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
     <Parameter name="port"
         value="8080"/>
 </Connector>

8081 is my suggestion for changing the ports keep it simple.

Thanks

William


Why does redirection to the same file truncate the file?

When you use I/O redirection like that, both the "input" & "output" file are opened by the shell before the command is executed.  And opening a file for overwriting is the same as truncating it before writing.  The result: cat sees an empty file on input...


How to get back Launcher icon for emacs in 16.04?

Seems like the problem was not using an absolute path name for the Exec key. Here is a modified /usr/share/applications/emacs.desktop file:

[Desktop Entry]
Name=Emacs
GenericName=Text Editor
Comment=Edit text
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Exec=/opt/emacs-24.5/bin/emacs %F
Icon=/opt/emacs-24.5/share/icons/hicolor/scalable/apps/emacs.svg
Type=Application
Terminal=false
Categories=Development;TextEditor;
StartupWMClass=Emacs
Keywords=Text;Editor;
X-Desktop-File-Install-Version=0.22

This seems to work fine now.


Ubuntu linux 16.04 LTS localhost/phpmyadmin empty

You need to configure your apache2.conf to make phpMyAdmin work. For more detail  Please read this section in Ubuntu wiki.

open a termianl and run

gksu gedit /etc/apache2/apache2.conf

Then add the following line to the end of the file.

Include /etc/phpmyadmin/apache.conf

Then restart apache

/etc/init.d/apache2 restart

`


Show desktop grid not working anymore (Ubuntu 20.04 KDE Plasma)

Most probable reasons:

Disabled compositing - Shift+Alt+F12 (if shortcut not working, you should find this option in System Settings -> Display and monitor -> Compositor. Shortcut may be disabled by system, more in @svenevs )
Disabled Desktop Grid (I learnt it hard way, that it's something different than Dekstop Cube and have different shortcut - that was answer to my problem). This option is in System Settings -> Workspace ->  Workspace Behavior -> Window Management -> Desktop Grid


How do I make a smart playlist of my purchased music?

Both 7digital and Amazon tag their songs in the comment field. Create a new smart playlist and match any of the following, and add Amazon.com and 7digital.com.


Missing menu in LibreOffice 5.1.2 on Ubuntu 16.04

Just type unity in the terminal which will restart the UI and add the menu to the LibreOffice components.


Permanent mouse freeze in ubuntu 18.04.01

It seems to be a bug with your specific mouse or Ubuntu version.

If you search about this, you will see the same as you say and it happens with a few many of random mouses, computers and versions.

I Recommend you to try with another version of Ubuntu or another distribution to find out if the problem isn't your mouse.

Do all options you have in your hard even if it is obvius, because you can discard what is working for sure.

It can be very basic, but hardware somethings work wrong. If you have another mouse or you just change the port witch you have the mouse plugged, you know, give a chance to it.

If everything fails, you can open the terminal with your working keyboard, pressing CTRL + ALT + T to fix it with some way.

Apologizes for not answer at 100% but it can be everything.

Regards


How to increase bass *solely* using terminal commands (*no* installation of any software) (Ubuntu 18.04)

Yes, you can! Cryptopat wrote in https://unix.stackexchange.com/questions/164476/how-to-control-equalizer-within-command-line

The pulseaudio equalizer included in the packages for 18.04 and some other earlier versions has settings in the user file ~/.config/pulse/equalizerrc

To install it, please execute this command:

sudo apt-get install pulseaudio-equalizer

To display it:

cat ~/.config/pulse/equalizerrc

Increasing the 5th band of the equalizer by 10DB, and immediately hear the change, is accomplished from a shell prompt with:

sed -i '19s/.*/10.0/' ~/.config/pulse/equalizerrc | pulseaudio-equalizer toggle

The editor sed will replace line numbered 19, with a 10 db bump in the config file; then the equalizer is restarted to hear the result.


Ubuntu 16.04: Not opening in dual boot with windows 8.1

Something very similar happened to me about 6 months ago while I was using 15.02. Grub for me seemed to stop working completely and starting always just booting into windows. Which was quite annoying, because I mainly work in ubuntu. So I found this cool tool (Link to where I found it: http://www.howtogeek.com/114884/how-to-repair-grub2-when-ubuntu-wont-boot/). Which is a boot-repair, which will give you some options on automatic fixes and grub re-installs.

Another thing I would try if your grub menu isn't appearing is to see if holding SHIFT down while you are booting will bring up grub. If it still doesn't show up, then maybe in some update your grub timeout somehow switched to 0. Try locating the /etc/default/grub file and editing it (root needed). Then change what ever value that's in there like this:

GRUB_HIDDEN_TIMEOUT=X
GRUB_TIMEOUT=X
GRUB_DEFAULT=X

Replace the X's with these values (Or whatever you want)

GRUB_HIDDEN_TIMEOUT=3
GRUB_TIMEOUT=15
GRUB_DEFAULT=0

Save and exit the file and run

sudo update-grub

If after all of that it doesn't work, I looked around google some more and maybe it's not all Ubuntu's fault... Here is a link to something that looks like windows UEFI hogging all of the fun. http://www.linuxubuntu.org/fix-grub-not-showing-for-windows-10-linux-dual-boot/


Marathi localization does not activate at start-up for libre office

Marathi should work in LibreOffice. Possibly, based on your description, you haven't installed the required language support packages. The easiest way to check it out is to open System Settings -> Language Support. Then, if there are missing language support packages, you'll be prompted to install them. Just accept that.

In particular I think it's the libreoffice-l10n-mr package which needs to be installed.


Minecraft crashing everytime I try to launch Ubuntu 16.04 LTS

It looks like Minecraft 1.13 doesn't support 32-bit machines any more; since your machine is 32-bit (i386), you can't run Minecraft 1.13.

If your computer is actually 64-bit capable, but it's just running a 32-bit operating system, you could reinstall a 64-bit operating system. Otherwise, there's no way you can run Minecraft 1.13+, unfortunately.


Make application automatically detect system language

I know that application development with Quickly and Launchpad support Translations to do this. I'm no expert so check out these links in addition to my answer:

http://www.gnu.org/software/gettext/

https://help.launchpad.net/Translations

My application imports the gettext module which then allows me to mark strings that will be displayed to the user in the program. When my program is submitted to Launchpad via Quickly, Launchpad is set up to automatically scan through the source code and generate special translation template files for the marked strings.  Kind Launchpad users (or the developer), can then use the template to generate translations for each string and language they'd like.  These translation files can then be sync'd to your source branch and merged before release.  On runtime the gettext module then replaces marked strings with the appropriate translation based on your system locale.

To summarize, here's a list of the process:

import gettext into your program
Mark strings that need to be translated
Setup translations in Launchpad
Translate templates and sync to source

Here's the header of my program where I import gettext through locale (note that Quickly adds all this for me! locale and bindtextdomain are added because it's being put in /opt/extras.ubuntu.com I think):

import locale
from locale import gettext as _
locale.bindtextdomain('drawers', '/opt/extras.ubuntu.com/drawers/share/locale')
locale.textdomain('drawers')

Now I just mark text to be translated with _("text to be translated") throughout my program.


Is it possible to copy ebooks from a kindle to my desktop?

The Kindle Fire does not automount in Ubuntu 12.04. The dmesg tail does not show any usb storage when Kindle is plugged in.  Install package mtp-tools and mtpfs

sudo apt-get install mtp-tools mtpfs

Make a directory under /mnt named mtp

sudo mkdir /mnt/mtp

Plug in the kindle and mount it

mtpfs /mnt/mtp

Your kindle files should now appear under /mnt/mtp
Browse for your books and just copy them off. I forget exactly where they were, maybe under /mnt/mtp/kindle
Unmount the kindle (or command fusermount -u /mnt/mtp )

sudo umount /mnt/mtp


Use gtf to create a mode line

gtf 1804 1014 59.9

Add new mode using xrandr

 xrandr --newmode "1804x1014_59.90"  151.95  1808 1920 2112 2416  1014 1015 1018 1050  -HSync +Vsync

Add this newly added mode

 xrandr --addmode VGA 1804x1014_59.90

Choose the new mode

xrandr --output VGA --mode 1804x1014_59.90

TO MAKE THE CHANGES PERSISTENT

sudo gedit /etc/X11/xorg.conf

MAKE SURE YOU ADD YOUR NEW RESOLUTION TO THE MODES LINE

Modes "..." "1804x1014" "...."


l[a,l,s,h,] * does not match l because [] is not a comma-separated list of things to expand to - that's the syntax for brace expansion. With [...], [a,l,s,h,] is the same as [alsh,] and does not mean any of alsh or nothing. You need l[alsh]#.

For ls, the space seems to be breaking this match, even though everything after that is optional. So in practice, this seems to ignore ls only if it has an argument:

~ ls foo
ls: cannot access 'foo': No such file or directory
~ tail ~/.histfile
HISTORY_IGNORE='([bf]g *|cd ..|l[a,l,s,h,]*|less *|vi[m,] *)'
l
tail ~/.histfile
l
tail ~/.histfile

It seems you need to make the * optional as well:

HISTORY_IGNORE='([bf]g *|cd ..|l[alsh]#( *)#|less *|vim# *)'


You can add the --option parts without = to the file:

Acquire::Check-Valid-Until "false";
Dpkg::Options:: "--force-confdef";
Dpkg::Options:: "--force-confold";

As for --yes and --force-yes, the apt-get manpage says:

-y, --yes, --assume-yes
   Automatic yes to prompts; assume "yes" as answer to all prompts and
   run non-interactively. If an undesirable situation, such as
   changing a held package, trying to install a unauthenticated
   package or removing an essential package occurs then apt-get will
   abort. Configuration Item: APT::Get::Assume-Yes.

--force-yes
   Force yes; this is a dangerous option that will cause apt to
   continue without prompting if it is doing something potentially
   harmful. It should not be used except in very special situations.
   Using force-yes can potentially destroy your system! Configuration
   Item: APT::Get::force-yes. This is deprecated and replaced by
   --allow-downgrades, --allow-remove-essential,
   --allow-change-held-packages in 1.1.

So:

APT::Get::Assume-Yes "true";
APT::Get::force-yes "true";

The second line you should replace with lines setting one or more of APT::Get::allow-downgrades, APT::Get::allow-remove-essential, APT::Get::allow-change-held-packages to true.

DEBIAN_FRONTEND=noninteractive is a debconf setting and should be set in debconf.conf. The manpage has examples.

I strongly suggest you write a script instead of setting these in configuration files. Also, there's no point to running an upgrade before the dist-upgrade - the dist-upgrade alone is enough.


Increasing the DPI from 300 to 600 helped - it's comparable to printing from my MacBook. Using Brother HL-2170W. I need to change my toner...
Ubuntu 20.04 300DPI

Ubuntu 20.04 600DPI (default)

MacBook - 600DPI (default)


Sounds suspiciously like you're on an Intel graphics chipset. The open source driver doesn't include S3 Texture Compression for patent reasons. S3TC is used in almost all serious 3D applications, including games. Not having it tends to result in a lot of fail.

I asked about this a while back and got an answer that worked for me:

Is there an easy way to enable S3TC on Intel graphics?


Bluez Installation - configuration error for DBUS 1.6

Installing libdbus-1-dev fixed it for me.


If you can't upgrade to a newer Ubuntu (e.g. 10.10), you can grab an older version of mysql-workbench. It looks like http://download.softagency.net/mysql/Downloads/MySQLGUITools/ has a listing of older versions. This suggests that mysql-workbench-oss-5.1.18a-1ubu904-i386.deb may work.


How to correctly install libpng12-0 on the Ubuntu 19.10?

There is a PPA that has libpng12-0 for Ubuntu 21.04, 20.10, 20.04 LTS, 19.10 and 19.04: https://launchpad.net/~linuxuprising/+archive/ubuntu/libpng12.
You can either download the libpng12-0 deb from here or add the PPA:
sudo add-apt-repository ppa:linuxuprising/libpng12
sudo apt update
sudo apt install libpng12-0

The reason the old libpng12-0 doesn't work in Ubuntu 19.04 (and newer) is that with Ubuntu 19.04, the /lib directory is a symlink to /usr/lib (this was not the case with Ubuntu 18.04 and older), and this causes the libpng12-0 installation to fail, since this package tries to create a link from /lib/x86_64-linux-gnu/libpng12.so.0 to /usr/lib, which is already a symlink. So the libpng12-0 DEB had to be repacked to fix this issue and get it to install.
Source: Linux Uprising.


How to know what snapd is downloading and when will it finish?

To see the list of transactions:

snap changes

To check the progress of a running transaction (number 240 for example):

snap watch 240

seeing via: https://tutorials.ubuntu.com/tutorial/advanced-snap-usage#1


Try setting a custom resolution in xorg.conf. You should have one already, and if not, use this. Make sure your SubSection: Display has the right resolution. I had a problem with monitor resolution when I used a DVI to VGA adapter, these adapters can strip out EDID data. The monitor sends the EDID data to the computer to tell it what resolutions it can support.

Section "Screen"
    Identifier    "Default Screen"
    Device        "NVIDIA Corporation NV34 [GeForce FX 5200]"
    Monitor        "CM752ET"
    DefaultDepth    16
    SubSection "Display":
        Depth        16
        Modes      "1280x1024" "1024x768"
    EndSubSection
EndSection


For starters make sure that a mount helper binary is installed for the desired file system type. It'd be mount.ntfs-3g in your case. If that's not the case, install it first.
If that is the case, fix your /etc/fstab next:
UUID=B8FCAECDFCAE84EA /media/nftsdrive ntfs-3g defaults,permissions 0 0

The  0 0 at the end is optional (it governs the order of mounting and file system checks). Otherwise the form is:

source
target (mount point)
file system type
options

Check out fstab(5).
Also, I have only used ntfs (as opposed to ntfs-3g in the recent few years, perhaps there's a subtle difference? But at least on my 20.04 mount.ntfs is a symlink to mount.ntfs-3g).
Last but not least you tried ls on ntfsdrive but your fstab stanza says nftsdrive ... and we don't know which exists as a folder and which doesn't


Ubuntu 16.04 freezes while suspended and in hibernation. It also freezes while in use

The first thing is to perform a file system check...

boot to the GRUB menu (where you select which OS to start)
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type sudo fsck -f /
you can ignore errors about the time/date/superblock
repeat the fsck command if there were other errors
type reboot

The second thing to do is to use the SMART internal disk monitoring tools to see if it detects a pending hard disk failure...

start the Disks application from the Unity dash
select the hard disk in the left pane
click on the "hamburger" icon in the top-right of the Disks window
select SMART Data & Tests
view the data, and run the tests


I accidentally made my file system read only. How can I change it back?

It sounds like you've accidentally changed the permissions of /etc/fstab. You should be able to use sudo because /var/run/sudo is mounted on the /var/run filesystem (or /run for Oneiric and up).

First, make the root partition writable again:

sudo mount -o remount,rw /

Next, restore the permissions:

sudo chown root: /etc/fstab

After that, future boots should not make everything read-only.


Script to sort contents of multiple files in a directory

This works, at least for the example you gave:

for i in *.txt; do
  sed '/=/d;s/URL *: //' "$i" |
  sort -u > "${i%%.txt}".doc
done

Explanations

for i in *.txt; do … done – loop over every .txt file in the current directory
sed '/=/d;s/URL *: //' – remove every line beginning with =, delete the stuff before the URL in every line
sort -u – sort and output only the first of an equal run
> "${i%%.txt}".doc – redirect output to e.g. bob.doc for an input file bob.txt (using Parameter expansion)


You want a persistent terminal multiplexer, such as tmux or GNU screen.

These allow you to open one or more shell sessions within a single connection; detach from them (either deliberately, say at the end of your workday, or unintentionally, as due to network problems) and later reconnect to the same shell session(s).

There are many subcommands and possible customizations, but a typical use would be as

$ tmux      /* starts new shell, with tmux status bar at the bottom of terminal window */
$           /* do stuff */
$ Ctrl-b d  /* key escape sequence to detach from tmux session */
$ exit

            /* ... time passes; much later you ssh back in ... */

$ tmux attach

            /* and you're back on the session you detached from */

As an additional note, while I provided links to the project webpages, both options are packaged for ubuntu and can be installed via sudo apt install, if not already installed on whichever OS version you are running.


There are a few ways you can try to speed it up. The one I would most recommend is to replace the Unity environment with GNOME. To do this:

Install MATE desktop by running this in Terminal: sudo apt-get install mate-desktop-environment.
Once it's done installing, log out. There should now be a gear icon in the top right corner of the password area.
Click this gear and select the MATE desktop environment before logging in.


File size is different in Windows and Ubuntu

I think what you are confuse about is the different between MB and MiB.

Run the below command and pay attention to its output

dd if=/dev/zero of=file bs=1M count=100

Out: 100 MB, 95 MiB

It says 100 times read from /dev/zero each time 1,000,000 Bytes.

Now run this one:

dd if=/dev/zero of=file bs=1MiB count=100

Out: 105 MB, 100 MiB

This one says that read 100 times from /dev/zero each time 1,048,576 bytes.

You can use ls to get more familar with this concept:

ls -lh --block-size=MiB file

Or:

ls -lh --block-size=MB file

See the different?

1 MB  is equal to 0.953674 MiB, it's just how your file managers are using different units.

SI standard units says that mega is equal to 10^6 = (1000000), however in computers we almost do everything in base of 2 (e.g 2^20 = 1048576); what should we call it? simply we can't call it mega cause it's close to that number; it's against the standard.

So to follow the standard we use another unit called mebibyte instead of megabyte, and 1 MiB is equal to 2^20 or 1,048,576 Byte.

Further reading:

https://en.wikipedia.org/wiki/Mebibyte
http://physics.nist.gov/cuu/Units/binary.html
https://tech.slashdot.org/story/01/12/23/1421225/megabytes-mb-or-mebibytes-mib


I note this bug report on the insync forums which pertains to your case:

Insync stopped working on Ubuntu Xenial Xerus 16.04 LTS

And I can certainly duplicate your experience on my Xenial setup. Current best advice as per this bug report is:

Wait for a Xenial package
Use the commandline version, which seems to be working despite the shortcomings of the gui:

andrew@athens:~$ insync-headless --help
insync - command line interface for the Insync process

available commands

accept_all_new_shares
accept_share
add_account
force_sync
get_account_information
get_actions_required
get_domain_link
get_errors
get_file_status
get_new_shares
get_private_link
get_proxy
get_public_link
get_recent_changes
get_root_drive_files
get_status
get_sync_progress
manage_ignore_list
manage_selective_sync
move_folder
open_in_gdrive
pause_syncing
quit
reject_all_new_shares
reject_share
remove_account
remove_from_insync
resume_syncing
retry_errors
set_autostart
set_export_option
set_proxy
set_selective_sync
share
start

Run insync help <command> for help with a specific command


Both paths should have /usr/bin which is where apt-get normally lives in Ubuntu 14.04.
You can check where it is in your filesystem: locate apt-get, or you can go there and make sure it is actually where you expect it to be: ls -l /usr/bin/apt*

If that checks out, double check what your path is actually set to: echo $PATH and set it again if somehow /usr/bin was lost from that string.


I ran into this exact problem.  Ubuntu, by default, no longer supports preprocessor directives in .Xresources, yet xresources\solarized depends on these directives.

I found two solutions (either one alone works for me).

Rename ~/.Xresources to ~/.Xdefaults and log in again (this is kind of funny because .Xdefaults is deprecated).
Create .xprofile with the following content and log in again:

SYSRESOURCES=/etc/X11/Xresources
USRRESOURCES=$HOME/.Xresources

You don't have to login again if you just xrdb -merge ~/.Xresources


I believe you are trying to access the AdminUser account in a wrong way, or perhaps entering the wrong password. From a session with the HatcheryUser try to launch a new session with AdminUser:

sudo su AdminUser

This will prompt you for a password, the one from HatcheryUser. If the latter is in the sudoers list you will then enter an admin session from where you'll be able to run all the dangerous stuff.


Recovering Encrypted Home Directory With Ecryptfs - Passphrase not working

First of all, if I remember correctly you have to check a box to install Ubuntu with an encrypted home directory, but I could be wrong. It certainly looks like it's encrypted.

Secondly, the bad news: if you encrypted the home directory at boot, it doesn't use your account password, but a separate pass phrase. After you first booted a pop up comes up with the question if you want to backup your encryption pass phrase for the home directory, recommending you get save it somewhere safe. There is a way to get the password at a later stage, but only if you can access it, so before anything goes wrong with your system. If you don't have the pass phrase, the only possible way to get it back is by brute forcing it, which, at the moment, is practically impossible.

Now that I think of it, after writing the previous text, if you made regular backups, you should be able get the key back. Did you make backups?

Edit:

Just test this answer and it works to get the pass phrase on a still working system, but you should save it somewhere safe, of course. :D

Edit2:

So I just looked further into it and if:

you have a backup of your old home files AND;
it included the ~/.ecryptfs folder with the wrapped-passphrase file

you can unlock it with the command:

  ecryptfs-unwrap-passphrase /path/to/wrapped-passphrase

It will ask for a password. This is the account password you said you remember correctly. It should give you a output of seemingly random characters: this is the pass phrase to unlock the home partition.

I hope you still have that file backed up. Let me know if you run into any problems.


Dual displays not working - NVidia - Ubuntu 12.04 - Second Monitor - Two Screens

Get the stable driver by opening a terminal and typing sudo nvidia-setting

Here you can configure multiple displays and your gpu

Note: If you do not sudo into it you settings will be lost when you leave the gui


Go and download a live boot-able ISO of "Gparted" and delete all of your partitions on your hard drive, then try to run the installer for Chromium.


What I ended up doing was installing the free Version of NoMachine NX Server, located hefer http://www.nomachine.com/select-package-server.php?id=1&ids=2

The free version is limited to 2 sessions but I figured that should be enough to cover my needs right now. Thanks for your input.


service apache2 start => /etc/init.d/apache2: 64: .: Can't open /etc/apache2/envvars

I'm not sure but it can happen due to permission issue , try giving

sudo service apache2 start


Probably best not to install any proprietary drivers but other wise should not be any issue as long as the PC you are moving the hard drive to is also capable of running a 64bit OS


Steam LAN "In-home steaming" not working on Chrome OS (via crouton)

If people are still having problems, the following commands worked well for me:

sudo iptables -I INPUT -p udp --dport 27031 -j ACCEPT
sudo iptables -I INPUT -p udp --dport 27036 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 27036 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 27037 -j ACCEPT

as well as the later suggested

sudo iptables -I INPUT -p tcp --dport 37804 -j ACCEPT

I input all of them into the Chrome shell (I mean crosh, NOT inside the chroot or the host computer), and got both Steam to recognize other computers on the LAN, and game streaming to work. Tested video, and mouse keyboard input, all of which work without any problems. Did not test sound however, but I'm sure it works as well.

To find this I had to navigate through one post referring to the other, and in the end I found it on reddit.


grub drops to rescue unless external disk is accessible

Oops, you put grub (legacy) onto the wrong disk (MBR), now it needs its files on the external disk to even show a menu.

While you can run Ubuntu, intall grub onto your external disk (sdb?), and check that you can successfully boot from it and also boot windows.

OK, the boot fails.  Is the external disk using MSDOS partitioning?  If it GPT, you will need to add a small (1-2M) partition (no formatting) with the grub-bios flag.  Then reinstall grub and try again.
 OK It's MSDOS.

Logical partition, boot flag, makes no difference to Ubuntu.  Is that the grub prompt you are seeing?  Lots of answers like Boot error > no such device: grub rescue but your case is simpler -- You can boot grub from sda, and run Ubuntu on sdb.  From there, you should be able to simply install grub to sdb.  Just to check, you are not running in UEFI mode are you?  Maybe a more recent release like 16.04 would be better, and drop back to lubuntu if full ubuntu is too much for you machine.

Then you will need to restore the old Windows boot MBR onto your internal disk, so it only boots Windows.
In the BIOS, select to boot the external disk first in the bootorder, and put the internal disk second (or both after CDROM if you prefer).

Booting should offer grub when the USB disk is present, and when not, the internal disk should boot Windows.


Try clearing your cookies/cache and try again.


window-switching keyboard shortcuts interfere with emacs and cannot be changed in the main keyboard system preferences

Update: much simpler answer courtesy of another thread:

gsettings set org.gnome.desktop.wm.keybindings switch-group "['disabled']"

original answer:

the obvious workaround involves CompizConfig Settings Manager, which can be installed easily as explained in many, many places. However, the steps necessary to remap some keys like Alt-` are completely non-obvious, due to a possible bug in Compiz.

First, in CCSM, go to Ubuntu Unity Plugin. Then go to the last tab, which is labelled Switcher, and examine the Key to flip through windows in the Switcher (without "backwards") item. It is already disabled, but this is actually what is performed by Alt-`. To really disable it, enable this feature (with some garbage random key combination).

Note that if you disable it again, then it really is disabled, but after a reboot the bug will return. Hence, to really get rid of Alt-`, you need to assign it some random garbage key combination, like Shift-Alt-Ctrl-Pause/Break or something.

There are also some other key shortcuts in Compiz, like ones involving Super (Mac/Windows icon key on keyboard) that has this bug in Compiz, e.g. it says disabled but is actually enabled.

Also, in CCSM, there is an Application Switcher category, as well as a "static" version of it. Those should be disabled if Ubuntu Unity Plugin category is enabled, since there are a few conflicting shortcut keys. However, most of the shortcut keys not found in the original Ubuntu System settings -> Keyboard page can be found and modified here.


You are missing the mate-power-manager package. Otherwise none of the power functions will work correctly.


Video lens missing after upgrade to 12.04

The issue is that you do not have the unity-lens-video package installed. Get it either from the Ubuntu Software Center or by running sudo apt-get install unity-lens-video in a terminal.


To fix the error SECUR32_initNTLMSP ntlm_auth was not found or is outdated you need to install winbind:
Type the following as root user

# apt-get install winbind


This post was a lot of help!  I just needed to modify a couple of things to bring the answer up to date.

In Step 2 I needed to add the following to the last line of the /etc/apt/sources.list,

deb http://qgis.org/debian trusty main
deb-src http://qgis.org/debian trusty main

Then execute the following two commands to add the public key for QGIS,

gpg --keyserver keyserver.ubuntu.com --recv DD45F6C3
gpg --export --armor DD45F6C3 | sudo apt-key add -

Update repository,

sudo apt-get update

Simply follow the rest of the post and it should work, at least it worked for me!


If I download Steam on Ubuntu, does that mean I can play any game I get on steam ON ubuntu?

Any game? No.

From the native Linux client you can only play the games that have Linux releases. In my case this is 86/182 games. Those that are there work well but if you're curious about any one game, go to its Steam page and that should tell you if it has a Linux release or not.

For the others you can install the Windows version of Steam under Wine. This is a compatibility layer which will allow you to play most things. Sometimes with some kicking and screaming, sometimes not at all.

Edit: Linux games in my library has gone from 86/182 to 129/230 in the 6 months since I wrote this. There are many more out there that I don't yet own.


If you want another sound during login you can do it this way from a terminal sesson:

cd /usr/share/sounds/ubuntu/stereo

replace the file

desktop-login.ogg

with the soundfile you want. You can do it like this (including backup):

sudo cp desktop-login.ogg desktop-login.ogg.old
sudo cp ~/Downloads/dekstop-login.ogg .

if your new file is inside your home's Download directory.
I have not seen a default application where you can do this.

And yes, you can create a custom sound from for instance a music clip with audacity. Just make sure you save it as ogg and do not make it too long.

You can also do it like this. From commandline

gksu nautilus

This will open Nautilus as root. Now navigate to your new file, rightclick and copy it. Navigate to /usr/share/sounds/ubuntu/stereo and click on desktop-login.ogg, press F2, and add .old to the name. Then click on some free space, rightclick and choose paste


what does Package has no installation candidate mean?

In terminal run software-properties-gtk See if you have selected the options seen in the picture below.


How do I package my application for the Ubuntu Software Centre?

On the page you link to it says:

  Canonical provides this packaging service to you free of charge.

and goes on to explain how to lay out the tarball containing your binaries.

If you create such a tarball and submit it via MyApps then all the packaging will be done for you. As it says at the bottom you can provide a source package if you like, but it's not required. Note that this is specific to closed-source or for-pay apps, anything that is libre and gratis has a different process currently.

As for your other questions:

  How is the 32-vs-64 bit thing handled?

You can just upload 32-bit if you like as that works on 64-bit too. If you want to upload 32-bit and 64-bit then build it twice and put the results in "i386" and "amd64" subdirectories.

  How is supporting different versions of Ubuntu handled -- 10.04, 10.10, 11.04, 11.10, etc?

You can specify which versions of Ubuntu your uploaded binaries work for as part of the submission process.

  How are dependencies handled. If, for instance, my app depends on SDL, how do I specify that?

That will be added as part of the packaging process. If you want to add a comment specifying the dependencies then it will likely speed things up.

  If I don't want to distribute source code for my application (which is a proprietary license), is there a clean way to indicate that source shouldn't go with the app?

As stated you don't have to provide the source at all.

  If I'm not using autoconf/automake, does my Makefile need to be set up in a particular way, or are the autotools required?

Any build system supported in Ubuntu is allowed. If you are using plain Makefiles then that's fine. However, if you're only uploading binaries that's not an issue.


COBOL is not particularly popular on Linux but there are compilers available.  One of these is open-cobol.

First step is to check if it's installed on your system: it probably isn't.

whereis cobc; which cobc
cobc:

If like my system it is not installed you can install it with

sudo apt-get install open-cobol

And to check its installed whereis cobc; which cobc

cobc: /usr/bin/cobc /usr/bin/X11/cobc /usr/share/man/man1/cobc.1.gz
/usr/bin/cobc

Now lets write our first program with any text editor.

IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
*> simple hello world program
PROCEDURE DIVISION.
    DISPLAY 'Hello world!'.
    STOP RUN.

save this as "helloworld.cbl"

We can now compile it with cobc -free -x -o helloworld helloworld.cbl

On my system I see this

$ cobc -free -x -o helloworld helloworld.cbl
/tmp/cob3837_0.c: In function ‘HELLO_2DWORLD_’:
/tmp/cob3837_0.c:75:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/tmp/cob3837_0.c:76:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/tmp/cob3837_0.c:77:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/tmp/cob3837_0.c:88:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/tmp/cob3837_0.c:107:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/tmp/cob3837_0.c:111:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

A few warnings -- but no errors test with ./helloworld

Hello World!

It works.

Alternative (fixed format):

       IDENTIFICATION DIVISION.
       PROGRAM-ID. HELLO-WORLD.
      * simple hello world program
       PROCEDURE DIVISION.
           DISPLAY 'Hello world!'.
           STOP RUN.

save this as "helloworld.cob" and compile it with cobc helloworld.cob (run with cobcrun helloworld.

If you want to remove the warnings from the C compiler: download a current GnuCOBOL 2.x snapshot (which has no updated package yet) and build it yourself (needs an additional apt-get bison flex libdb-dev curses-dev).

Taken from:

Cobol Hello World Example: How To Write, Compile and Execute Cobol Program on Linux OS
on thegeekstuff.com

Tested on Ubuntu 12.04.2


Why does Ubuntu Server installer create separate /boot and /boot/efi partitions? Is /boot on a separate partition optional?

Let's turn the wayback machine to about five or six years ago....
Back then a stock install of Ubuntu using the default settings did NOT use LVM, and /boot was simply a directory on the root drive. (You can have this simpler legacy behavior by un-selecting LVM during install).
Most folks who chose LVM did so because they wanted to encrypt their system. They didn't know what other uses LVM is good for (most folks still don't know). Ubuntu could not read the encrypted partition until after boot, so selecting LVM triggered creation of an unencrypted /boot partition.
About five-or-so years ago, changes in the boot (like EFI and SecureBoot) led to the creation of the EFI partition.
Starting in 20.04, the default setting of the installer switched from non-LVM to LVM, leading to the default creation of separate /boot partitions (in addition to EFI). Recall that you can un-select LVM to use the legacy /boot directory instead of creating a new partition.
Keep in mind that the software environment continues to evolve. EFI and LVM and separate /boot partitions might be replaced or subsumed by newer or better ideas in the future. It's happened before. More than once.

In your particular case ("working with VM's on a machine that has a low amounts of storage"), I'm not seeing a benefit to using LVM (nor EFI), so consider simplifying. If your host can run Snaps, you can run LXD containers which feel like VMs but are even leaner on resource requirements.


wlan0 not showing up.... MEDIATEK Corp. MT7630e 802.11bgn Wireless

It is a known issue and there are instructions to install manually a driver at
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1220146/comments/125


How to exactly install pyvoice changer in Ubuntu 18.10

Requisites

Python 3.6+
PyQt 5.10+
Sox (Linux package).
Working Microphone, Speakers and Sound System.
Working Sound Loopback Kernel Module

 From https://github.com/juancarlospaco/pyvoicechanger#requisites
Make sure you have Python version 3.6 and later.
:~$ /usr/bin/python3 --version
Python 3.6.7

Python came preinstalled so no need to install, your 18.10 should have fulfill this requirement automatically.
Install the requisites.
sudo apt-get install sox python3-pyqt5 python3-pip

Install pyvoicechanger through pip then.
sudo pip3 install pyvoicechanger

Finally, you can launch voice changer by entering.
pyvoicechanger.py


I installed conky and I have few questions

Using more then one conky config same time
You can use more than one  conky configuration at the same time. For this create a script.
For example using gedit ~/.conky/startconky.sh  create script file in ~/.conky directory.
Now add following content in it
       #!/bin/sh

        sleep 5

        conky -c <path_of_1st_conky_config_file> &
        conky -c <path_of_2nd_conky_config_file> &
        conky -c <path_of_3rd_conky_config_file> &

        exit

Make it ececutable using chmod +x ~/.conky/startconky.sh and add this script to your   Startup Applications.
Now How conky update weather?
Conky have weather object to get weather data.
From man conky
  weather URI locID data_type (interval_in_minutes)
          Download, parse and display METAR data.

          For the 'URI', there are two possibilities:

          http://weather.noaa.gov/pub/data/observations/metar/stations/
          http://xoap.weather.com/weather/local/

It also  depends upon your configuration file how you are manipulating   weather data from the website. form more see man conky or visit conky docs page .
Conky-Manager
Conky manager is a GUI tool which is used to manage conky config file. It actually change various parameter available in the config file according to the option you have selected, like gap_x, gap_y, alignment etc.
If you want to change your conky configuration, open it with gedit and make changes whatever you need.


I would recomend following the guide here

The guide tells you to add a ppa as this driver does not appear to have the best version in the kernel or something.

sudo add-apt-repository ppa:mpodroid/mactel

sudo apt-get update

sudo apt-get install b43-fwcutter firmware-b43-instal

After you have installed these you need to install the linux-backports-modules-cw-3.2-oneiric-generic via

sudo apt-get install linux-backports-modules-cw-3.2-oneiric-generic

Unless, if you have the pae kernel installed (you would know if you do), the linux-backports-modules-cw-3.2-oneiric-generic-pae package. (as the guide says)

sudo apt-get install linux-backports-modules-cw-3.2-oneiric-generic-pae

Next you should edit a couple files

gksudo gedit /etc/modprobe.d/blacklist.conf

Once that is open add the line

blacklist ndiswrapper

next edit one more file with

gksudo /etc/pm/config.d/modules

make sure the wireless modules (b43 and bcma) are blacklisted (takin from guide)

SUSPEND_MODULES="b43 bcma"

After you install the drivers as discribed in the steps above and edit some files,you can reboot by rebooting your normal way, or simply keeping your terminal session open and typing:

sudo reboot

Again, this is all taken from the guide I linked in the first sentence, so if this does not make sense, feel free to look there as well.


Are these processes basically the same " sudo mount -o loop imagefile mntpoint" vs " sudo losetup /dev/loop2 imagefile"

Yes, both are essentially doing the same thing. Refer to man page of mount:
https://linux.die.net/man/8/mount

  The Loop Device

  One further possible type is a mount via the loop device. For example,
  the command

  mount /tmp/fdimage /mnt -t vfat -o loop=/dev/loop3

  will set up the loop device /dev/loop3 to correspond to the file
  /tmp/fdimage, and then mount this device on /mnt.

  This type of mount knows about four options, namely loop, offset,
  sizelimit and encryption, that are really options to losetup(8).
  (These options can be used in addition to those specific to the
  filesystem type.)

  If no explicit loop device is mentioned (but just an option '-o loop'
  is given), then mount will try to find some unused loop device and use
  that.

  Since Linux 2.6.25 is supported auto-destruction of loop devices and
  then any loop device allocated by mount will be freed by umount
  independently on /etc/mtab.

  You can also free a loop device by hand, using 'losetup -d' or 'umount
  -d'.

Bonus: sudo mount /file_to_use /mntpoint will work too. mount will automatically setup a loop device for you!


How do I get the Ubuntu Unity Launcher to work on a Bootable USB?

Note: In order to install ubuntu-unity-desktop package, you need to have an active internet connection.

The package is under "universe" repository

Exact hits
Package ubuntu-unity-desktop

    bionic (18.04LTS) (metapackages): The Ubuntu Unity desktop system [universe]

Run the below command to add the universe repository.

sudo add-apt-repository universe

Then install the package

sudo apt install ubuntu-unity-desktop

Once the package is Installed, you can't choose the unity session from the login screen. The ⚙ icon which is used to change desktop environment only appears at password screen in GDM.

To add password for live user:

Run:

gnome-control-center user-accounts

Add new password after clicking on "None".

Then logout using the drop down menu in the upper right corner

Click on the gear icon (⚙) to Desktop Environment

You'll see Unity Desktop after logging in


How to clear my USB memory if it is partitioned on 2 parts?

You can use gparted, but remember to umount the disk before formatting. To completely "clear" the usb, you could:

Insert the USB media in your Ubuntu PC.
If it was automatically mounted, unmount it (You can also unmount it from gParted by doing right click on the device, and then unmount).
If gParted don't list your device, unmount it externaly, by right click on the desktop USB drive icon, and select unmount volume, or similar.
Open gParted.
At the top right corner you can see the available devices list box. Select the correct one, generally is /dev/sdb.
Select the device, and delete the partitions. Then apply.
Go to the Device menu, and click "create new partition table".
Select msdos.
Create a new partition as FAT32 (Or what you consider better).
Apply changes.
When all done, close gParted, unplug your USB device, and plug in again to test it.
Test it in a Windows computer if you want.

Best regards.


I cannot boot UBUNTU 16.4 from my hard drive after installing with a USB stick

The possibilities are as follows:

1) You failed to remove the installation media when prompted to by the installer and your system is still set to boot from USB.

2) Your hard drive has failed and 1 is also true.

3) You neglected to verify the hash of your ISO and have managed to install a corrupted operating system.

These possibilities are in order of likelihood.


Hex/Decimal/Ascii Editor (Save Game Editor)

I haven't used anything like that in a long time, but here is a web page with quite a few possible choices: http://www.linuxlinks.com/Software/Editors/Hex/


Can I run games like Minecraft on Ubuntu Server?

By default, no. All modern games rely on there being a GUI present, otherwise they'll fail to execute. You'd have to install a desktop and other packages to get a GUI running. sudo apt install ubuntu-desktop should automatically install GNOME3 and the default packages you get installing normally. If you want to choose and pick what you want and keep it
very minimal you can run sudo apt-get install --no-install-recommends ubuntu-desktop. This should work, but don't quote me. I'd suggest backing stuff up in case if stuff breaks.

There's also a list of alternative desktop environments you can install, I'm not 100% sure if they'll provide needed packages, so use apt show packagenamehere for details and install what's needed. This list doesn't cover all of them.

XFCE: sudo apt install xfce4

LXDE: sudo apt install lxde

KDE (might be unstable): sudo apt install kubuntu-desktop

TL;DR sudo apt install ubuntu-desktop should install everything provided in a default install, though sudo apt-get install --no-install-recommends ubuntu-desktop might work for servers better as everything isn't installed at once and you can pick what to install.

I've never tried this personally so I cannot guarantee if this will work perfectly, again, backups are key.


Ubuntu wlan drivers installation. (NETWJORK W522U and ZyXEL AWD 2205) ubuntu 10.04

Okay, problem solved (about 6 months ago). I only installed Ubuntu 12.04, and it was working. It was too slow of cource, but with LXDE it is ok.


Can you switch apps to use while the HUD is up?

HUD doesn't behave this way any more. They changed it somewhere on the way from Precise to Trusty. Since then, the HUD only shows results from the currently focussed application.


Try this:

sudo apt purge mysql-*

Afterwards run:

sudo apt autoremove

To install MySQL again follow guide here.


How was the user's creation performed?

If the home folder of new user was not created, you can create like this:

sudo adduser <username>

Caution: This is not the same as the useradd command. But, it is easier and safer to use GNOME Control Center or users-admin.


ssmtp trying to use port 25 when configured for 587

Aragh...

I was trying to specify a subject with "-u" option. Don't know where I got that from probably another email utility.

ssmtp no subject works fine. Sorry about the noise.


Deleting files in Nautilus aka Files uses a lot more resources than a simple rm command. One reason is the use of so-called Recycle Bin, the files are only moved, and this trash has to be managed by the system. This takes time and resources
You've certainly run a service that indexes files. So if there are changes in the filesystem, then runs this service to update its databases. Even this takes time and resources.

I contend that the hard disk is just too slowly or improperly integrated into your system. 7200 RPM alone says nothing . Your SSD is certainly fast enough.

Check your both drives with

sudo hdparm -t /dev/sda
sudo hdparm -t /dev/sdb

and watch the IO rate with

sudo apt-get install iotop
sudo iotop

and read this for some optimizations.

Some examples from this source:

The Linux kernel deposits the data retrieved from the hard drive into a buffer. To determine the speed of the unadorned drive, you can use the

hdparm -t --direct /dev/sda

Some drive properties can be changed while the device is in operation; for example, most drives allow you to turn power management on and off. Just which functions hdparm can change and activate on a hard drive can be called up with

hdparm -I /dev/sda

and are found under Commands/features (Figure 1). All functions found there and marked with an asterisk are currently active, and hdparm can use the rest or at least activate them.

To speed up data transmission, a hard disk usually reads several sectors at the same time. How many it can deliver at the same time is revealed by

hdparm -I /dev/sda

and is listed after R/W multiple sector transfer: Max =. This value should also be found in the same line after Current =. If that is not the case, you can increase the value with:

hdparm -m16 /dev/sda

This instructs the hard drive always to deliver 16 sectors at once.

Curiously, some hard drives run slower with higher values: The hdparm man page mentions primarily older Caviar drives from Western Digital. In such cases, you should reduce the number of sectors again or even turn the function off completely, which is done with:

hdparm -m0 /dev/sda

Beyond this, modern drives can even retrieve a few sectors in advance (“read ahead”). To define how many, use the -a switch (Figure 4, top) – for example:

hdparm -a256 /dev/sda

Here, the drive will read the 256 sectors in advance that are most likely the next to be requested. Higher values speed up above all the reading of large files – at the cost, however, that reading smaller ones takes longer. The current setting is shown with

hdparm -a /dev/sda

Beyond that, many drives also possess a built-in, additional read-ahead function. As a rule, therefore, you can leave the setting at the default value.

How fast queries from the operating system reach the hard drive controller can be called up with

hdparm -c /dev/sda

The value should be 32-bit; you can force this value with the -c3 switch.
Many modern hard drives allow you to slow down the head movement. Although doing so will increase access times, it will also reduce the noise level. To find out whether your own hard drive offers this “acoustic mode,” you can use this command:

hdparm -M /dev/sda

If a number follows the equal sign, as shown in Figure 4 (bottom), the drive can be put into a quiet mode with:

hdparm -M 128 /dev/sda

To reach the highest speed, use the maximum value:

hdparm -M 254 /dev/sda

Values between 128 and 254 are allowed, resulting in a trade-off between noise level and speed. Incidentally, your Linux kernel must also support acoustic management, which should be the case for all current major distributions.

Some CD and DVD drives turn out to be more like turbines: Their high-speed rotation can hinder audio/video enjoyment. The

hdparm -E 4 /dev/sr0

command will provide relief. The parameter 4 determines speed, and /dev/sr0 specifies the DVD drive. This example slows drive reading speed ninefold.
With write-back caching, the hard drive first stores the data to be written in a buffer. In this way, it can accept data much faster, which in the end leads to a faster write speed. The

hdparm -W /dev/sda

command shows whether write-back caching is active with a 1 after the equals sign; otherwise, you can activate the function with the -W1 switch.

If hdparm will not allow this change, you need to make sure that write-back caching has been activated in the BIOS. However, this function is not recommended for all situations: In the case of a power outage, the data in the buffer would be lost permanently.

If a program sensitive to data loss – such as a database – is running on the system, you should turn off the write-back cache with the -W0 switch. Documentation for the PostgreSQL database even explicitly recommends that this be done.
If a hard disk or SSD doesn’t have anything to do for a certain period of time, it automatically enters sleep mode. This power-saving feature can be influenced with the -B parameter. Thus, using:

hdparm -B255 /dev/sda

would deactivate energy management; however, not all drives allow this.

Instead of 255, values between 1 and 254 are allowed. A higher value means more power is used but also promises higher performance or speed. Values between 1 and 128 allow the drive to shut down, whereas values from 129 to 254 forbid that from happening.

The most power can be saved with a value of 1; the highest rate of data transmission (I/O performance) is achieved with 254. You can call up the current value with:

hdparm -B /dev/sda

The specific effect the different values will have depends on the drive itself. However, you should keep in mind that too many shutdowns are not good for desktop hard drives: Each time it shuts off, the drive must park the heads, which increases wear and tear. Consequently, you shouldn’t wake your hard drive up every two seconds – which always takes more than two seconds to do.

You can set how many seconds of idleness the hard drive should wait before it goes to sleep with the

hdparm -S 128 /dev/sda

switch; however, this value here is not in seconds but a number between 1 and 253. The hard drive multiplies this value by another. The value chosen in the example, 128, lies between 1 and 240, for which the drive uses a factor of five. Consequently, it would shut down after 640 seconds of idleness.

From 241 and up, the multiplication factor increases steadily. At 251, the waiting period has increased to 5.5 hours. At 253, the value is preset by the manufacturer, usually between eight and 12 hours. The value 254 is left out; at 255, the drive will wait 21 minutes and 15 seconds. A value of 0 will deactivate sleep mode completely. To send the hard drive to sleep immediately, enter:

hdparm -y /dev/sda

With a capital Y, the drive will go into an even deeper state of sleep. Depending on the drive, the drive might only wake up from a deep sleep after a reset of the whole system.


Don't know where the command

sudo chmod -R 666 /home/rasmus/

is from. But that one pretty bad. It removes the executable bit on all folderes which is needed to list a directory or change to that directory. Furthermore, you gave read/write access on each file in your home directory to anyone. You maybe also want to fix that.

Since all your files and directories have 666 access rights, you could restore the directory setting as follows.

sudo find /home/rasmus -type d -exec chmod 755 "{}" \;


It's because Nautilus is out of date. Go to https://askubuntu.com/a/460497/299605 for instructions on updating it.


How do I get a Steam Controller working?

For Ubuntu releases older than 15.10

Recognizing the controller

Create a the udev file:

sudoedit /lib/udev/rules.d/99-steam-controller-perms.rules

then add the following contents, don't forget to use YOUR username in the file!

# This rule is needed for basic functionality of the controller in
# Steam and keyboard/mouse emulation
SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666"

# This rule is necessary for gamepad emulation; make sure you
# replace 'pgriffais' with the username of the user that runs Steam
KERNEL=="uinput", MODE="0660", GROUP="pgriffais", OPTIONS+="static_node=uinput"

Give the controller access to /dev/uinput

For quick and dirty, sudo chmod 666 /dev/uinput
For a workaround that survives reboots: sudo apt-get install python3-autopilot Then log out/in or reboot. This will add you to a group that has write access to /dev/uinput. This will add a few packages which you probably won't need, but you can remove them once the steam package update arrives.

See also:

https://bugs.launchpad.net/ubuntu/+source/steam/+bug/1498658
https://bugs.launchpad.net/ubuntu/+source/steam/+bug/1498655
http://steamcommunity.com/groups/steamuniverse/discussions/2/490123197947211023/


Ubuntu 20.04 LTS - Detecting 5GHz wifi takes long time

Ok, adding the correct country (FR in my case) in /etc/default/crda as explained here Wifi 5GHz does not work, my band tu is all disabled. I doesn't see my 5ghz router did the job; Now the computer connects instantly to the 5 GHz network.
(I'm now using 20.10 and no longer 20.04 but the problem was still there, and disappeared only after changing the country settings).
EDIT: actually, after a kernel upgrade, I had again to run the command 'sudo iw reg set FR' ...


Ubuntu 18.04.4 won't boot after Kernel update, stuck at loading initial ramdisk

i'm a new ubuntu user, i just want to share a link for you: https://unix.stackexchange.com/questions/553518/stuck-at-loading-initial-ramdisk-after-attempt-to-update-the-kernel

hope it will work.


What Licenses am I allowed to use when selling Ubuntu wallpapers?

As I already point out in my comment, the documentation isn't currently going to help you.

I would go in with the assumption that you can license a wallpaper under the same terms as most software (in that you can hold copyright, or a license to redistribute it and you can give people a license for it - this is all true in most civilised parts of the world) but you should confirm directly with Canonical that they'll accept a paid wallpaper package before you do anything.

That you're asking the question suggests that you might be thinking of a non-traditional license. Perhaps if you can expand on that, you might get a better answer... But if you're thinking of a "standard" commercial software license, I think you'll be fine.


Any success installing Rational Team Concert on Ubuntu 12.04

Looks like I have RTC Client 4.0 working on Ubuntu 12.10.

Need to install: apt-get install ia32-libs

Then following the steps here:
How do I install xulrunner?

with modification ie using i686 not the output from uname.

Then edit the eclipse.ini file:
-Dorg.eclipse.swt.browser.XULRunnerPath=/opt/xulrunner

It appears all works.

Hope that helps.


Ubuntu splash screen not showing at boot

sudo apt-get install v86d
gksudo gedit /etc/default/grub

search for-GRUB_GFXMODE=
below this you need to type: GRUB_GFXPAYLOAD_LINUX=yourresolutionhere

echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash
sudo update-grub2
sudo update-initramfs -u


Software center stopped working after I uninstalled kpackagekit

You might want to reinstall kpackagekit by opening up a terminal. It should be under "Applications" -> "System Tools" or "Accessories" -> "Terminal".

Now type in the following commands, pressing Enter after a new line:

sudo apt-get update
sudo apt-get install kpackagekit

This should reinstall kpackagekit along with its dependencies.