OpenStack Neutron Plugin for OpenContrail

I used this PPA from tcpcloud to install OpenContrail 2.20 on Ubuntu 12.04 and Ubuntu 14.04.

sudo add-apt-repository ppa:tcpcloud/contrail-2.20
sudo apt-get update

It need some manual resolution of library dependencies but worked out in the end.

May be you can try some other tcp cloud packages of Open Contrail.


Do changes in Gnome "Tweaks" require reboot to come into effect?

Whether a setting immediately takes effect or not depends. In many cases, a setting immediately takes effect. In other cases, you may need to log out and then log back in for the setting to take effect. None of the settings in gnome-tweaks should require you to reboot, however. Logging out and then back again is enough. Sometimes, it might be sufficient to restart gnome shell (i.e. press Alt+F2, type r and then enter). The latter only works if you are running Gnome Shell on Xorg, but not if you run Gnome Shell on Wayland. Xorg is the default for Ubuntu 18.04.


Compiling VirtualBox kernel modules failed Lubuntu 16.04

you should install dkms and build tools.  dpkg doesn't install dependencies for you, so I would say that it's a bad idea to use it to install debian packages by itself.

Sometimes, it's easier to just have apt-get fix the problem that you created, which installs missing dependencies after you ran dpk -i.  Then, remove and reinstall the virtualbox 5 package:

$ sudo apt-get -f install
$ dpkg -r virtualbox*.deb
$ dpkg -i virtualbox*.deb

The default virtualbox package requires many dependencies.  First, list the dependencies of the package you downloaded and then install them using apt-get:

$ dpkg -I virtualbox*.deb
$ sudo apt-get install dkms linux-header-generic ...

Then, you can proceed to install the package.

$ sudo dpkg -i  virtualbox*.deb

I suggest you use a PPA instead of using dpkg. (https://linuxpropaganda.wordpress.com/2016/07/07/install-virtualbox-from-ppa-in-xubuntu-16-04/)

$ wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc -O- | sudo apt-key add -
$ sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" >> /etc/apt/sources.list.d/virtualbox.list'
$ sudo apt-get update
$ sudo apt-get install virtualbox-5.2


Anyone have a writeup for recovering 19,10 ZFS pool correctly -- stuck in initrd

Obvious thing in that error that I hadn't given much thought: it's line 180 of the NEW grub.cfg (/boot/grub/grub.cfg.new) that is in error.

That line has an extra }. So I deleted that line, ran

grub-script-check grub.cfg.new

and - no error.

So I copied grub.cfg.new to grub.cfg and rebooted; and it's good. However, update-grub still seems to add the extra curly brace whenever it's run.


Ubuntu 14.04 doesn't boot, Sony Vaio VGN-NW11S

Three possible problems:

Memory
HD controller (or driver)
HD itself.

Two possible solutions:

As grub is still working, do the MemTest86+
Take the HD out of the computer, (that way you bypass the HD controller + driver) put it in an enclosure and hook it up to someone elses Linux PC and run fsck without mounting the drive!

If you need exact commands, report back here.


If I'm interpreting your question wrong, just let me know and I will edit to suit

What you're suggesting is definitely possible and is in fact easier with virtualised networking than traditional physical stuff (think VLANs in place of separate switches). In your example, you have br0 and br1. I'm going to assume that br0 is your service network and br1 is your management network. In that case, what you have sounds about right.

On your guest, you need two NICs, one connected to br0 (eth0 in your example) and configure applications on your guest (FTPD, syslogd, apache, whatever) to use eth0 (or to bind to eth0's address more accurately). Your guest's other NIC, eth1 should be configured with a static IP of its own, and configure applications like SSH to listen on eth1's address. You have now got the same concept as most network appliances.

Check that on your host you have a physical interface connected to your services network (let's call it net0 for clarity), and add it to the br0 bridge. Connect your host's other physical NIC (let's call it net1) to your management network (if you're using managed switches, that's just a matter of adding the ports to the right VLANs). Add net1 to br1 on the host, and you're good to go.

Coming from networking, I see what you mean, but in server-world it is a bit more manual to achieve the same effect.


How to copy a file from the terminal, then paste it on the browser?

In ranger on your desired file press yp. The full path of the file would be copied into your clipboard.
Then paste it anywhere you want in your browser like an upload field.

yp in ranger is equivalent to Ctrl+c   of GUI File Managers.


How do I use filenames that start with a dash "-" as command arguments?

Very frequently -- is used on the command-line to signal to a program that no more available command switches are going to be used. This is particularly useful if a file contains a dash, which the program would try to interpret as an option.

Without the --, there is an error generated:

$ pdfgrep -i posix -find.pdf -xorg.pdf

pdfgrep: invalid option -- 'f'
pdfgrep: invalid option -- 'd'
pdfgrep: invalid option -- '.'
pdfgrep: invalid option -- 'p'
pdfgrep: invalid option -- 'd'
pdfgrep: invalid option -- 'f'

With the -- used we have a successful command:

$ pdfgrep -i posix -- -find.pdf -xorg.pdf

-find.pdf: on the command line. Currently-implemented types are emacs (this is the default), posix-awk,
-find.pdf: posix-basic, posix-egrep and posix-extended.
-find.pdf: posix-basic, posix-egrep and posix-extended.
-find.pdf: posix-basic, posix-egrep and posix-extended.

pdfgrep is programmed to understand -- to mean that the following command-line arguments are not options. Most programs do the same, but not all programs understand --. For programs that don't, the solution is to prepend the filename with ./, like this:

 pdfgrep -i posix ./-find.pdf ./-xorg.pdf

This should work with any command, unless for some reason the command cannot accept a path, only a pure filename.

For a general introduction to the command-line, see this useful PDF.


A problem while operating HYPODD program

The problem is solved with me when I did the following:
1.change the dimensions in the hpoDD.inc file.
2. recompile the program using the "make" command.


How to install apple safari without using wine?

There is no native Safari for Linux, so your choices are either use the Windows version and run it with Wine or in a VirtualBox, or maybe run it with OSX in a VirtualBox.

Yet another option would be to use another WebKit-based browser such as Chromium or Konqueror as a "close enough" approximation of Safari - they do run natively on Linux but, well, they're not Safari :)


Deciding which node should have landscape

Simple fix, after maas is deployed, only power on and commission the machine you want to be the landscape server.  Deploy landscape then commission the rest of the machines after you're in landscape.

I had to do this myself as it kept picking one of the more powerful machines from MAAS.  Landscape will deploy properly with only 1 machine listed in MAAS.


Finger reader for hp Probook6560b not recogized

You should get to this link. May this will solve your problem:

https://wiki.ubuntu.com/ThinkFinger
http://www.ubuntu-unleashed.com/2008/04/get-your-fingerprint-reader-to-work-in.html

Edit : Hey type this code on your terminal : lsusb. There is a packaged called fprint available in this PPA However, if your device id does not appear in the list of "Supported" then your fingerprint is not supported. There is a Bug #285089 which details similar issue.


Is it possible to make scripts to automatically install programs?

You can write a script in a text editor, adding the sequence of apt-get commands you want to execute:

apt-get update && apt-get upgrade -y
apt-get dist-upgrade
apt-get remove --purge gnome gedit ...
apt-get autoremove -y
apt-get install xfce4 kate texlive-base ...

Then save the file. Now you can run it in a terminal (assuming you've saved it in your home directory):

[username@localhost ~] $ sudo sh my-script.sh


Ubuntu 14.04 | Reset password asking me to Retype new password twice. Ideally it should be once

change this line:

password        [success=1 default=ignore]      pam_unix.so obscure  sha512 minlen=8 remember=7 shadow

to:

password        [success=1 default=ignore]      pam_unix.so obscure use_authtok sha512 minlen=8 remember=7 shadow

I added use_authtok

When password changing enforce the module to set the new password to the one provided by a previously stacked password module.


python2.7: not found: Unable to install or remove any packages

Ooh, something has gone terribly wrong unpacking your python .deb. Try dpkg -i /var/cache/apt/archives/python2.7-minimal*deb and see if that fixes the dpkg error.


NTFS volume recognised as "Unallocated Space" but works with Windows

you can install ntfs configuration tools from ubuntu software to auto mounte ntfs volume , also ntfs partition can be writable with using this good tool, dont forget that after installation, open terminal and write "sudo mkdir -p /etc/hal/fdi/policy"


Have you created a modeline, for example with cvt? Because this kind of error is usually present if you have not.

An example here:

cvt 800 600 60

(width, height, refreshrate)

An example output:

# 800x600 59.86 Hz (CVT 0.48M3) hsync: 37.35 kHz; pclk: 38.25 MHz
Modeline "800x600_60.00"   38.25  800 832 912 1024  600 603 607 624 -hsync +vsync

You will get something different since you are using different numbers there, but then just copy the information after the word Modeline and replace it in the command you tried before

Like I do here

xrandr --newmode "800x600_60.00"   38.25  800 832 912 1024  600 603 607   624 -hsync +vsync

And then finally (added that DVI-I-0)

    xrandr --addmode DVI-I-0 800x600_60.00

And everything should work!

Source: https://wiki.ubuntu.com/X/Config/Resolution


Weird font kerning issue on Chrome and Firefox

The default font in Kubuntu is Noto Sans. As an experiment you may want to disable the Noto configuration and with that fall back to DejaVu Sans:
cd /etc/fonts/conf.avail
sudo mv 56-kubuntu-noto.conf 56-kubuntu-noto.conf.disabled


How can I create a zip archive of a whole directory via terminal without hidden files?

First of all if you don't have installed zip install it first as follows:

sudo apt-get install zip

Then for simply creating a zip file:

zip -r compressed_filename.zip foldername

If you want to exclude hidden files:

find /folder_path -path '*/.*' -prune -o -type f -print | zip ~/compressed_filename.zip -@

Excluding Files from a Zip Archive
(taken from http://osxdaily.com/2013/04/30/how-to-exclude-files-from-a-zip-archive/)

  The basics of file exclusion when creating a zip archive are centered
  around the -x flag, which is used to exclude files from the archive
  that match a specific name or pattern. At it’s most basic, it will
  look like this:

zip archive.zip files -x "ExcludeMe"

  Meaning you could exclude a single file, say it’s named “Nothanks.jpg”

zip archive.zip images/ -x "Nothanks.jpg"

  Let’s cover a few specific examples where this is useful.

  Exclude .DS_Store Files from Zip Archives

  This will prevent the typically invisible Mac metadata .DS_Store
  files from being included in a zip archive, which are bundled in by
  default:

zip -r archivename.zip archivedirectory -x "*.DS_Store"

  If the directory includes subdirectories however, you’ll want to use
  another variation of that command to exclude the the ds_store files
  from subdirectories as well:

zip -r archive.zip directory -x "*/\.DS_Store"

  Note: not all shells require the quotations for this command to work
  properly, but in the bash shell (the default for OS X) you will need
  to use the quotes for excluding with wildcards and patterns.

  Exclude Specific File Types from a Zip Archive

  With wildcards, you can also exclude all files of a certain type by
  focusing on the extension. For example, this command will zip an
  entire directory, minus any .jpg files:

zip -r archive.zip directory -x "*.jpg"

  That could be modified for any specific file extension or pattern
  matched in a file name.

  Exclude the .git or .svn Directory from a Zip Archive

  Zip a directory, minus .git and it’s contents:

zip -r zipdir.zip directorytozip -x "*.git*"

  Zip a folder, without including the .svn directory:

zip -r zipped.zip directory -x "*.svn*"

  Exclude All Hidden Files from a Zip Archive

  Since patterns and wildcards can be used, you could also exclude any
  or all invisible files and folders that are made so by being prefixed
  with a period, whether it’s a directory like .svn or an individual
  file like .bash_profile or .htaccess.

zip -r archivename.zip directorytozip -x "*.*"

  Or to exclude all invisible files from all subdirectories:

zip -r archive.zip directory -x "*/\.*"


Good to replace my python 2.7.6 with python 2.7.9?

You shall have a look at the Changelog for each Version between 2.7.6 to 2.7.9 to see which are actually the changes between the two versions of python:

Changelog for 2.7.9
Changelog for 2.7.8
Changelog for 2.7.7

I use python a lot and I never had problems that the python version of ubuntu is not the latest. When you want to use new features, then you should think about changing to python 3. In this case I recommend you to read Should I use Python 2 or Python 3 for my development activity?.


webserver accesses files from another disk

Yes, if you mount the drive and you include the path as an Alias.
The specific syntax for an Alias for Apache is covered here.
Also do note that the web server is gonna need read permission for the files it is accessing.


What does status pi of package mean in aptitude?

From the manpage:

Unless you pass the -F option, the output of aptitude search will
look something like this:

   i   apt                             - Advanced front-end for dpkg
   pi  apt-build                       - frontend to apt to build, optimize and in
   cp  apt-file                        - APT package searching utility -- command-
   ihA raptor-utils                    - Raptor RDF Parser utilities

Each search result is listed on a separate line. The first
character of each line indicates the current state of the package:
the most common states are p, meaning that no trace of the package
exists on the system, c, meaning that the package was deleted but
its configuration files remain on the system, i, meaning that the
package is installed, and v, meaning that the package is virtual.
The second character indicates the stored action (if any; otherwise
a blank space is displayed) to be performed on the package, with
the most common actions being i, meaning that the package will be
installed, d, meaning that the package will be deleted, and p,
meaning that the package and its configuration files will be
removed. If the third character is A, the package was automatically
installed.

As it says:

p as the first character: no trace of the package
exists on the system
i as the second character: the package will be
installed

Also see:

aptitude reference manual, Chapter 2, Section 2


Older Asus laptops have the same problem on Windows 8.1. The solution there is:

  go into Power Options, Edit Plan Settings of the active plan, set Change plan brightness to the maximum for both battery and plugged in. You can access the same setting under Change advanced power settings, Display, Display Brightness.

  You can still control the brightness using the keyboard. The control panel setting seems decoupled from the keyboard setting (I am guessing it is a driver issue that is at the root of the problem).

I haven't found a way to fix it on Ubuntu yet, but this might be a place to look.


Can't umount mnt/sys after mounting it with --bind for chroot

After thinking about what could be reading files there I found the culprit: vscode Remote-ssh plugin. Because I had a folder levels above mnt open on vscode, it was crawling indefinitely through all the files, and for some reason it never stopped reading things in mnt/sys, which is why it was always busy.
Solved this by killing the processes. In vscode there's an option to "Kill VS code server on host", then added **/mnt/** to the excluded paths.


Short answer - check the Installed field in the output of apt-cache policy :

testdir:$ apt-cache policy coreutils
coreutils:
  Installed: 8.21-1ubuntu5.1
  Candidate: 8.21-1ubuntu5.1
      Version table:
 *** 8.21-1ubuntu5.1 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
        100 /var/lib/dpkg/status
     8.21-1ubuntu5 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages


How can I setup SSH so that it is restricted to my local network?

You can restrict access to your ssh server in many ways.
IMO the most important is to use ssh keys and disable password authentication.
See the following wiki pages for details

https://help.ubuntu.com/community/SSH/OpenSSH/Keys
https://help.ubuntu.com/community/SSH/OpenSSH/Configuring#Disable_Password_Authentication

You can restrict access to a specific subnet in several ways. I will assume your ssh server is on subnet 192.168.0.0/16 with an ip address of 192.168.0.10 , adjust accordingly ;)
Router
One line of defense is to use a router. Be sure to disable UPnP and do not allow port forwarding.
SSH configuration
You can set several options in /etc/ssh/sshd_config. One is the listen address. If You set a listen address on your subnet. A private IP address is not routable over the internet.
ListenAddress 192.168.0.10

You can also use the AllowUsers
AllowUsers you@192.168.0.0/16

Somewhat related, you can also change the port
Port 1234

See: http://manpages.ubuntu.com/manpages/precise/man5/sshd_config.5.html
TCP wrapper
As outlined on the forums post, you can use TCP Wrapper . TCP wrapper uses 2 files, /etc/hosts.allow and /etc/hosts.deny
Edit /etc/hosts.allow and add your subnet
sshd : 192.168.0.

Edit /etc/hosts.deny , and deny all
ALL : ALL

See also: http://ubuntu-tutorials.com/2007/09/02/network-security-with-tcpwrappers-hostsallow-and-hostsdeny/
Firewall
Last you can firewall your server. You can use iptables, ufw, or gufw.
iptables
sudo iptables -I INPUT -p tcp --dport 22 -s 192.168.0.0/16 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 22 -j REJECT

Please do not use DROP in iptables.
ufw
sudo ufw allow from 192.168.0.0/16 to any port 22

UFW
IptablesHowTo

ufw has a graphical interface: gufw


Here's one that works:

from urllib import urlencode
from urllib2 import urlopen
try:
    #pg = urlopen("http://www.beans-r-us.biz/proces.html")
    pg = urlopen("http://beans.itcarlow.ie/prices.html")
except:
    pg = False
#if pg!=False:
if pg:
    text = pg.read().decode("utf8")
    where = text.find(">$")
    start_of_price = where + 2
    end_of_price = start_of_price + 4
    try:
        price = float(text[start_of_price:end_of_price])
    except:
        price = 'unknown.  Some error happened parsing the price...'
else:
    price = 'unknown.  Some error happened while getting the url...'
print "The current price of coffee is:", price

Slight improvement in that it handles the invalid URL a bit more gracefully...although not descriptively.

edit: change pg!=False to pg credit to Jo.  He's right that it's cleaner.  I thought it might make more sense to someone copy pasting code to see the false spelled out.


No audio in fresh installed Lubuntu 15.10

On my netbook I had similar issues.  If fixed them by installing Pulse Audio Volume Control, pavucontrol, from the Lubuntu Software Center.


What are some good vpns clients for Ubuntu Linux?

Take a look in that list. Some examples:

PRIVATE INTERNET ACCESS
TORGUARD IPVANISH
SLICKVPN
IVPN
PRIVATEVPN
PRQ
EXPRESSVPN
MULLVAD
BOLEHVPN
NORDVPN
TORRENTPRIVACY
PROXY.SH
HIDEIPVPN
BTGuard
OCTANEVPN
SMART
DNS PROXY

and so on...

You can easily use it with a gui interface as network-manager-openvpn, network-manager-pptp or network-manager-vpnc.

$ sudo apt-get install network-manager-openvpn network-manager-pptp network-manager-vpnc

For Gnome:

$ sudo apt-get install network-manager-openvpn-gnome network-manager-pptp-gnome network-manager-vpnc-gnome

And make a setup as required by your vpn provider. After that, restart your network:

# /etc/init.d/network-manager restart

I recently hired the SLICKVPN, and can recommend a lot !!


The programs that are installed by the yagiuda package are terminal programs so there isn't any yagiuda icon because they are run from the terminal. The following programs are run from a terminal: dipole first input mutual optimise output randtest selftest yagi.

For example the  program  yagi is one of a number of executable programs that forms part of a set of programs, collectively known as the Yagi-Uda project. For information about the usage of yagi run the following command which shows yagi's manual page:

man yagi


How to install Ubuntu on a laptop with soldered RAM module that has damaged cells

Note: For Ubuntu install help, please see here.

Note: Most high-end computer service shops can replace that defective 8G RAM chip(s) at minimal cost, and it would certainly be more reliable.

If you look in /etc/default/grub, you'll find a GRUB_BADRAM= parameter where you can identify what bad memory locations there are.

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

BADRAM setting in Grub2

The GRUB2 config file in Natty has a line for configuring kernel bad ram exclusions. So, I will assume that is the preferred way of mapping out a section of memory that is showing errors. The line I set was

GRUB_BADRAM="0x7DDF0000,0xffffc000"

The suggested way on every web site I could find was to set this was to run memtest86 and let it show you the BadRAM settings. memtest86 gave me a page of stuff I would have had to enter. I could see that all the addresses were in one 16K block, so I just wanted to map that 16K block out of action. Here is how I generated the correct entry.

The first parameter is easy. That is the base address of the bad memory. In my case, I could see that all the bad addresses were greater than 0x7DDF0000 and less than 0x7DDF4000. So, I took the beginning of the 16K block as my starting address.

The second parameter is a mask. You put 1s where the address range you want shares the same values and 0s where it will vary. This means you need to pick your address range such that only the low order bits vary. Looking at my address, the first part of the mask is easy. You want to start with 0xffff. For the next nibble, I will explain with bit maps. I want to range from 0000 to 0011. So, the mask for badram would be 1100 or a hex c. The last 3 nibbles need to be all 0s in the mask, since we want the entire range mapped out. So, we get a total result of 0xffffc000.

After setting this line in /etc/default/grub, I ran sudo update-grub and rebooted and my bad memory was no longer being used. No kernel patches are needed to map out bad memory using this method.

Source: https://help.ubuntu.com/community/BadRAM#BADRAM_setting_in_Grub2

Update #1:

If the system you are using already has (a) bad stick(s) of memory, you have two options: a) Put good memory in temporarily until you've built the patch b) If memory errors don't show up in lower memory, you can add the "mem=##MB" kernel option to temporarily disable memory above that point. Ex: According to memtest86, my stick of memory has errors between 315MB and 325MB. By adding "mem=314MB" I tell the kernel to pretend I only have 314MB. My system will be stable enough to build the patch, at which point I can pass a parameter to ONLY skip the section between 315MB and 325MB (this providing me 502MB of usable memory).

ie: Boot Ubuntu Live, at GRUB menu, hit e to enter edit mode, use the arrow keys to find "quiet splash", change to "quiet splash mem=2048MB", CTRL+x or F10 to continue booting.

Update #2:

To get memtest86, go to https://www.memtest86.com/ and download/run their free memtest to test your memory. Get at least one complete pass of all the 4/4 tests to confirm good memory. This may take many hours to complete.

Update #3:

Depending on WHERE your bad RAM is located, you might have a problem. Peter Cordes has a good idea. Remove the HDD. Put it into another computer. Install Ubuntu. Modify GRUB. Then return the HDD to the original laptop. Try and boot it.


In ubuntu matlab execution file cannot be run

That sounds like you are trying to run a Windows version of Matlab, which is not possible.

On your Matlab CD is an installer for the Linux version, use that one.


How do I open GNOME Tweak Tool from the terminal?

Once gnome-tweak-tools is installed, you can run it from the terminal writing:

gnome-tweaks


The files in /usr/lib/jni were all installed by various Ubuntu packages and they can be restored by reinstalling those packages. You can reinstall a package with a command like:

sudo apt-get install --reinstall <packagename>

where <packagename> is the name of the package you want to reinstall.

Figuring out which packages you need to reinstall might be a little tricky, because it looks like multiple packages install files in /usr/lib/jni. You can probably get a rough idea of the packages to reinstall with this command:

dpkg -l | grep jni

That will list the packages you have installed with jni in their names. I would start by reinstalling each of those packages and see if it fixes your problem.


Which is the correct GnuPG executable to use to configure Enigmail?

Enigmail wants the "gpg" command-line tool.  (gpg-agent is a helper tool, and I don't know what "gpg2" is - that's not present on my system.)

So, you want to give it:

/usr/bin/gpg


Persistence is saved in a file or partition named casper-rw, a persistent home file or partition named home-rw is also possible. A persistent install will save data, program installs, customized desktops, just about everything except some drivers which are loaded before the persistence file is read during boot, (NVidia graphics).

In a syslinux type install, (SDC, Unetbootin, Universal, Rufus, etc), the system resides in the root of the drive as does the casper-rw file. The filesystem for this partition is FAT32 thus maximum size for the persistence file is 4GB.

Prior to 14.04 syslinux type installs could also use a persistent casper-rw and home-rw partition. Persistent partitions no longer work except with grub2 type installs, (mkusb and the original MultiBootUSB).

Mkusb is easy to use, safe, versatile and will make a persistent partition of whatever size you want, it will then use remaining disk space to make a NTFS partition that is visible to both Linux and Windows.

Limitations, well you don't want to unplug a persistent pendrive while data is being written to persistence, luckily mkusb comes with persistence backup tools.


Solving "Failed to start Load Kernel Modules" with Network Unreachable

I did a clean install over my system partitions, keeping my home partition, because there were all kinds of messages about missing perl libraries when trying to configure the network.  Installed my most frequently used apps from the command line, and the config settings in my home partition meant that I am up and running again.


Can I install Ubuntu on MID TAB WMS8153?

You will find a list of supported ARM and other tablets here. Unfortunately, it's quite short, so I guess the answer is no.

However, there is an ARM version of Ubuntu, and you could try to install it following these instructions.


Going with an older version of Ubuntu is many times a bad idea. First because of the hardware support. Older versions have less hardware support and even less for newer existing hardware. Second is the security for it. Third the performance, stability and you can see where I am going with this.

Jump all that you will be happy to know that 12.04 will have Gnome Classic. You will be able to install it from one single package. It will look like the older version but enhanced with all the new updates for each app that Gnome Classic uses.

Just to add that the latest will receive more up to date stuff than an older version. This includes the kernel because 10.10 I think uses the 2.6.35 Kernel and ends on April 2012. The same date that 12.04 comes out with the 3.2 Kernel (Awesome version) and better support for Gnome Classic. Besides compiling the 3.x kernel to an older Ubuntu version includes having to start a domino effect of compilations between all apps to get them all working correctly at the end.

So for my suggestion. Stay with the one you are using until 12.04 comes out. Then install 12.04 and apply the Gnome Classic package. Logout, select Gnome Classic. Enjoy. You would get an updated Ubuntu with the Gnome Classic.

Here is some info about it:

http://www.webupd8.org/2012/02/more-classic-gnome-session-lands-in.html

http://jeremy.bicha.net/2012/02/11/ubuntu-classic-now-with-indicators/


Remmina remote terminal window is all black, although connection was successful

I discovered that the reason I was getting the black window was because there were 2 simultaneous users logged-into the host server.
It would not work (black display on client) if:
- 2 users were logged-in regardless of which user had the primary display, or
- only 1 user was logged-in but was screen-locked and had not been re-assigned the primary display (had not unlocked the display since the 2nd user had used the display).
Conversely, the remote display would work if:
- only 1 user was logged-in AND that user either [did not have screen lock engaged OR [had locked the screen AND no other user had logged-in since the user had engaged screen lock]].

I wonder if this is explained in a man page somewhere.


Script needed to copy data to a mounted storage device

You could use a script, running in the background, checking every (for example) 20 seconds if the disc is mounted. If it is, it runs an rsync job (once) to upload/update the files on the external disc.

The script below is an example, and so is the suggested rsync job. use man rsync for more information on rsync. It runs the backup job one single time after it is connected, waiting for the next time the disc is disconnected/connected, or when the script restarted.

How to use

Open the external disc or partition, right-click somewhere in the root directory of the disc and choose "properties" to see where the disc or partition is mounted (In the Location field of the nautilus properties window).
Copy the script below, paste it into an empty file and set the line:

mounted_volume = "/mountpoint/of/the/disc"

Set the right paths in the lines:

source_dir = "/path/to/source"
target_dir = "/path/to/destination"

Save it as copy_ifconnected.py, run it by the command (and keep it running in the background):

python3 /path/to/copy_ifconnected.py

If it does what you want, add it to your startup applications.

The script

#!/usr/bin/env python3

import subprocess
import time

mounted_volume = "/mountpoint/of/the/disc"

source_dir = "/path/to/source"
target_dir = "/path/to/destination"

rsync = "rsync -r -t"

curr_status = False

def run_backup():
    rsync_job = rsync+" "+source_dir+" "+target_dir
    subprocess.Popen(["/bin/bash", "-c", rsync_job])

while True:
    connected = subprocess.check_output(["lsblk"]).decode("utf-8")
    test1 = mounted_volume in connected; test2 = curr_status==True
    if test1 != test2:
        if test1 == True:
            run_backup()
            curr_status = True
        else:
            curr_status = False
    time.sleep(20)


On my new Dell XPS 13 I have found that the screen brightness makes a big difference to the battery life, and by default it was fixed on max brightness (ie. shortest possible battery life). Turning the brightness down to around 2/3 made a big difference. Could it be that under Windows it was not on max brightness, or had an adaptive brightness, but on Ubuntu it is fixed on max brightness? (I have yet to master adaptive brightness under Ubuntu but haven't tried very hard yet, only observed that the default GUI doesn't have an option.)


Based on vanadium's answer I found that indeed my mapping was blocked by conflicting mappings. To find those I used
gsettings list-recursively | grep "\['<Super>l'\]"
After that I disabled all with a command like the one given by vanadium.


Triple-boot - Ubuntu/Windows showing up but not Red Hat

If RedHat installed with LVM you need to install the lvm2 drivers in Ubuntu and mount the RedHat partition before running sudo update-grub.

sudo apt-get install lvm2


Is there an easy way to backup one large hard drive across several smaller hard drives?

Setup the three 1TB drives as a 3TB LVM2 volume group. Using Synaptic, install lvm2 and system-config-lvm, and review the mans. Also look at https://wiki.ubuntu.com/Lvm for an overview of lvm.

Use Clonezilla (clonezilla.org or Synaptic) for backup. It supports lvm2. One flaw in Clonezilla... it will NOT backup (clone) or restore to a smaller hard disk, even if the difference is only 1 block. You'll want to investigate partition backups/restores.

You may also need CD/DVD's of 1) Ubuntu 16.04.1, 2) Clonezilla, 3)boot-repair, and 4) Windows install disk (if you have a Windows partition).

All in all, the learning curve may be a little high, but it'll do the job.

Another easy way to do this is install both old and new 3TB disks on the computer, and see if Clonezilla can do a clone copy. If it can, because the destination disk is LARGER than the source disk (even by 1 block), it would be directly bootable after removing the original 3TB hard disk.

Cheers, Al


Can I resize the window width from a web app?

Thanks to the kindness of a developer, I can give some information to my questions.

I can't resize the window as a W3C standard operation; There isn't an explicit APIs for that, and generally move away from letting apps manage their sizes, to prepare for the desktop convergence.
You should assume that the shell will present you in an appopriate way; You must to add / obseve some viewport metadata at some point to know whether you are a side-stage app or a fullscreen one.

Best regards!


Do you mean this here ? :

gcc -c example.c

objcopy --change-address 0xE0000 -O ihex example.o example.hex


LibreOffice is really slow refreshing the UI

BINGO! I think I just found a clue on this issue --
This should be reported to the LibreOffice developers and I'll try to figure out how to do that as well:

I noticed that if I logged-out of my account then re-logged back in, the problem would immediately go away (ie, menus operating normally). I was shocked to see this, as I've never seen it work correctly before on this computer. I also noticed that upon rebooting/auto-login of my account, if I IMMEDIATELY launched LibreOffice, it would also seem to operate normal. But eventually it would become slow (ie, after closing LibreOffice and then later re-opening it on a new document).

This seems to indicate that maybe another background process is interfering somehow, or perhaps the LibreOffice components are not starting up in the correct sequence??

A workaround I've found that seems to be working consistently is to just turn on the quickstarter feature. That causes the components to load immediately upon login and perhaps they get priority over whatever else may be interfering.

Tool-> Options-> LibreOffice-> Memory-> [X] Enable systray Quickstarter

Hope this helps!


I prefer to believe you are requesting opinions.  My opinion would be that since you are using an LTS version, as am I, you should stick with what works until or unless you are sure you wish to upgrade.  As an LTS version 12.04 is supported for two and a half more years, and I have yet to be convinced there's anything I'll like more about 14.04.  Having said that, I do intend to install 14.04 fresh on another device in order to discover what's new.

On the off-chance you are actually requesting someone take responsibility for the success of your upgrade... I won't be that person.  There's risk in every upgrade, and even the most seasoned veteran will tell you to do a full backup first, at the very least.


Snappy Ubuntu Core: snap installation doesn't copy files

You should run the command as

# hello-world.showdev


If you use English (US) keyboard layout and you don't want to change it, the the fastest way would be to use Ctrl+Shift+U key combination and then type 20ac followed by Space(or Enter) which will turn into €.

Now if you want, for example, to change the $ sign (which you can type it using Shift+4 shortcut when you have an US English keyboard) with € sign, you can use the following command in terminal in terminal:

xmodmap -e "keycode  13 = 4 EuroSign 4 EuroSign"

From now you can type € using Shift+4 shortcut.

To switch back to $ sign, use:

xmodmap -e "keycode  13 = 4 dollar 4 dollar"

To get this change for every session, create a file called .xmodmap, with the following command:

xmodmap -pke > .xmodmap

Then, create a file called .xinitrc in your home directory, containing the following line/command:

xmodmap .xmodmap

In the same mode you can set any other key combination to type € symbol. Use xmodmap -pke command to see all keycodes and their map assignment.


VS Code open directory instead of system file manager in Ubuntu 19.10

I found a workaround to temporary solve the problem.

find
~/.local/share/applications/mimeapps.list
and be sure the inode/directory= was set to your file manager.

exemple:
inode/directory=nautilus-folder-handler.desktop;

same for file ~/.config/mimeapps.list

then find the code desktop file.
mine is in /usr/share/applications/code.desktop
and change the row

MimeType=text/plain;inode/directory;
to
MimeType=text/plain;

then do
$ sudo update-desktop-database

to me this work but if vscode is updated all reset to the initial behaviour.

The /usr/share/applications/code.desktop is revert to initial value.

So to make all more quickly I write a script:

 #!/bin/bash
 sudo sed -i "s/inode\/directory;//" /usr/share/applications/code.desktop
 sudo update-desktop-database

waiting for stable solution this may be acceptable

Update

I have put the script above in an after-upgrade-code.sh and change in this manner (I put it inside PATH env):

#!/bin/bash
UPDATED="$(tac /var/log/apt/history.log|sed '/End-Date/,$!d;/Start-Date/q'|tac|grep 'Upgrade.*code')"
if [[ ! -z $UPDATED ]]
then
  sudo sed -i "s/inode\/directory;//" /usr/share/applications/code.desktop
  sudo update-desktop-database
fi
exit 0

the I put it /etc/apt/apt.conf.d/100update:

Post-Invoke {"after-upgrade-code.sh";};

If last apt upgrade make change on code it will upgrade the code.desktop

Update

I have done some test and I not be sure if the postinvoke script work fine: the problem is that I not sure history.log was updated at Post-Invoke time, so the script can do noting if history is not updated.

This is version 2 and this will be trigger:

#!/bin/bash
CHECK="$(date '+%Y-%m-%d %H:%M')"
CHECK="${CHECK:0:-1}.*upgrade code"
UPDATED=$(sudo grep "$CHECK" /var/log/dpkg.log)
#UPDATED="$(tac /var/log/apt/history.log|sed '/End-Date/,$!d;/Start-Date/q'|tac|grep 'Upgrade.*code')"
if [[ ! -z $UPDATED ]]
then
  sudo sed -i "s/inode\/directory;//" /usr/share/applications/code.desktop
  sudo update-desktop-database
    echo "after-update-code is been executed"
else
    echo "after-update-code is been not executed"
fi
exit 0

This: CHECK="$(date '+%Y-%m-%d %H:%M')" get the date time taking only minute.
This: ${CHECK:0:-1} cut minute unit and leave the ten so
the grep: grep "$CHECK" /var/log/dpkg.log
check if an 'Code' upgrade was done in less then ten minute and if verified try to  update the code.desktop to avoid 'Code' will be use to open folder.

I have changed the hook trig:
sudo cat /etc/apt/apt.conf.d/100update
give:
DPkg::Post-Invoke {"/home/leonardo/sviluppo/script/after-upgrade-code.sh";};

Update

I have do a mistake writing the UPDATED wrong (UPTDATED), now is correct.

Uptate

Last version work: I have verified :-)


Installing Ubuntu16.04 on Lenovo G50-80, facing error

Probably you are facing bad image or unsuccessful transfer to usb. I would recomend to download again and create new flash drive. Use. unetbootin or in windows rufus to create the usb stick. I would recomend downloading torrent file instead of regular download. If you are using ubuntu for the usb creation, startup disk creator will do the trick.


Any way to get Nvidia Optimus card working on 14.04.1?

Yes, it works (at least for me on an Asus computer Nvidia Optimus with U 14.04).

Try this excellent guide

HTH


How to fix virtualbox's copy and paste problem?

Disclaimer:
This is a workaround, not a solution. It works with an Ubuntu host and Ubuntu client. It will not work with specialized network configurations on the VM side.

Description:

I've had problems with the clipboard in the past, and for me it's just too much of a bother to fix it. Instead, I have a script that I've put together that allows me to basically create a chat between the host and guest with netcat.

Making it happen:

Using a text editor, create a new plaintext file with the following contents. You can change the port number from 12354 to any open port.

#!/bin/bash
# DESC: vbox-chat allows you to send text back and forth between a VirtualBox
#     machine an Ubuntu host. This script must be started on the host first and then
#     on the client.
# ARGS: Pass "host" or "guest" as the first parameter when calling this script

port=12354

id="$1"
id=${id,,}
while [ $(grep -P "^(host|guest)$" <<< "$id" | wc -l) -eq 0 ]
do
    clear
    if [ "$id" == "" ]; then
        read -p "Is this the host or guest system (type host or guest): " id
        id=${id,,}
    fi
done

clear
[ "$id" == "host" ] && other="guest" || other="host"
echo -e "Type or paste text into this windo and press enter to have it show up on the\n$other machine\n"
if [ "$id" == "host" ]; then
    nc -l $port
else
    hostIP=$(route -n | grep -P "^0.0.0.0" | tr -s ' ' | cut -f2 -d ' ')
    nc $hostIP $port
fi

This script needs to be saved on both host and guest machines (I named it vm-chat.sh) and it needs to be executable (chmod +x /path/to/vm-chat.sh). Once you've done that:

On the host machine, navigate to your script in terminal and run ./vm-chat.sh host (This must be started before the guest instance)
On the guest machine, navigate to your script in terminal and run './vm-chat guest' (This must be started after the host instance)

Now you can type (or paste) anything you like in the host's terminal window, hit enter, and it will immediately be transferred to the guest's terminal window. Likewise, you can type (or paste) anything you like in the guest's terminal window, hit enter, and it will immediately be transferred to the host's terminal window.

Obviously, this is only going to work for text. If you want to be able to copy and paste files, you could convert them to base64 first, but it's probably not the best way to transfer files.

WARNING: All text is transferred over the virtual network between the host and guest in plaintext!


After long run ubuntu 14.04 is running slow

We can not come in to a conclusion as Ubuntu 14.04 OS long run is the main cause of the issue. check memory usage and disk performance of the machine using the below command and check

Memory usage checking during machine hang:

cat /proc/meminfo
 you need to install htop
$ htop
FOr GUI level monitoring

System > Administration > System monitor:

watch -n 5 free -m

Monitoring disk performance.

dstat -D hda
sudo hdparm -Tt /dev/sda

FOr GUI level monitoring

System -> Administration -> Disk Utility


Unable to locate package aclocal although automake is installed

The program aclocal is part of the automake package. You don't need to install it separately.


Looks like the Apache module for PHP is missing. Install the service using;

sudo apt-get install libapache2-mod-php5


How can I minimise the code needed to run this custom function?

There are several possible ways to simplify the code. Below are the solutions ordered by the amount of code:

printf and parameter substitution (no error checking)
xargs and parameter substitution (no error checking)
find and parameter substition only (no error checking)
fall-through case structure (Solves error checking issue )
Test logic, xargs, and parameter substitution
Bash function
Array, for-loop, test, and &&

printf and parameter substitution solution

A little known quality of the printf function is that if you call printf "%c" someString, it will print only the first character of that string. Thus, we can avoid using case statement with parameter expansion and printf like so:

xieerqi:$ cat someScript.sh
#!/bin/bash
find /etc -type $(printf "%c" $1 )

now execute:

xieerqi:$ sudo ./someScript.sh  directory | head
[sudo] password for xieerqi:
/etc
/etc/logrotate.d
/etc/apm
/etc/apm/event.d
/etc/apm/scripts.d
/etc/apm/resume.d
/etc/apm/suspend.d
/etc/speech-dispatcher
/etc/speech-dispatcher/modules
/etc/speech-dispatcher/clients

A limitation here is that we're forking a process to call printf, which the function solution avoids - function and case structure are all native bash tools.
xargs and parameter substitution

Using bash's parameter substitution we can chop off a substring from a variable (for example ${VAR:0:3} gives first 3 characters of VAR); in this case we want the first character for a type directory or file.  Then we can use xargs to pass that as parameter to find

echo ${1:0:1} | xargs -I {} find /etc -type  {}

The find man page mentions that for -type flag on Solaris there is something known as a door file, which is represented by the capital letter D, but since we're on Linux, we can say this is a limitation that is reasonable to ignore.

However, there is another danger in this code - if a user enters flower as the $1 parameter, this is still going to search for -type f, because we take first char of any string … In other words, there's no error checking.
find with parameter expansion

Taking parameter expansion even further, we can do this:

 find /etc -type ${1:0:1}

Basically , a one-liner with find command and a substring of the $1 variable. Also, no error-checking.
Fall-through case structure

The big issue with the last three methods is the error checking. They are good when you trust the user not to be a dummy, or just writing code for yourself. Now, in Java it's possible to write a switch statement that will run the same command for multiple cases if you just omit the break command. In bash that can be done as well with ;& terminator. Quote from man bash

  Using ;& in place of ;; causes execution to continue with the list associated with the next set of patterns.

All we have to do is test for the types, like "directory", "file", "block" and so on, and then use parameter substitution to chop off the first character. Like so

#!/bin/bash
case "$1" in
  "directory") ;&
  "file");&
  "block") find /etc -type  ${1:0:1} ;;
  *) exit 1 ;;
esac

5.Test logic, xargs, and parameter substitution

 Basic idea here is that we're sending $1 variable through pipe to `xargs`, which in turn substitutes it into test (again square brackets). `xargs` in turn builds the actual command that runs by replacing `{}` with whatever was passed to `xargs`.  As for test command, it's simple or statement,  `EXPRESSION -o EXPRESSION ` , where we test if string $1 is equal to either "file" or "directory string"

    echo "$1" | xargs -I {}  [ "{}" = "file" -o "{}" = "directory"  ] \
    && find /etc -type ${1:0:1}

 `xargs` is really useful when you need to process multiple argumens with the same command. Considering that in this case we only have one argument that needs to be processed with the same command , this can be simplified to

    [ "$1" = "file" -o "$1" = "directory"  ] && find /etc -type ${1:0:1}

Of course the big limitation is that if you test for more than one type, you need longer `[ EXPR1 -o EXPR2 ]` structure with multiple `-o` parts.

Function solution

find command can be placed into a function, which then can be called with positional parameters.

For instance:

function findStuff
{
 find /etc -type "$1"
}

Here's a small demo. Notice I am using sudo because for a lot of files in /etc regular users don't have read permissions

xieerqi:$ sudo ./someScript.sh directory | head
[sudo] password for xieerqi:
/etc
/etc/logrotate.d
/etc/apm
/etc/apm/event.d
/etc/apm/scripts.d
/etc/apm/resume.d
/etc/apm/suspend.d
/etc/speech-dispatcher
/etc/speech-dispatcher/modules
/etc/speech-dispatcher/clients

xieerqi:$ sudo ./someScript.sh file | head
[sudo] password for xieerqi:
/etc/hosts.deny
/etc/logrotate.d/speech-dispatcher
/etc/logrotate.d/pm-utils
/etc/logrotate.d/rsyslog
/etc/logrotate.d/yate
/etc/logrotate.d/apport
/etc/logrotate.d/apt
/etc/logrotate.d/consolekit
/etc/logrotate.d/fail2ban
/etc/logrotate.d/cups-daemon

xieerqi:$ cat someScript.sh
#!/bin/bash
function findStuff
{
 find /etc -type "$1"
}

case "$1" in
  "directory")findStuff d ;;
  "file") findStuff f;;
esac

Array, for-loop, test, and &&

Basic idea here - match user's input against a list, and if matched do something. We create an array of items to check for, have a test condition (square brackets by the way are alias to test command), and just run a loop to test the $1 variable. && operator allows executing command if and only if what's on the left of && was successful. So if we found a string that's in the array, we execute find command. The ${1:0:1} was discussed in previous examples - parameter expansion that chops - off the first character from our matched type. So this solution has error checking and whole-lot of code packed into just 3 lines (4 if you include #! line).

#!/bin/bash
array=("file" "directory" "block");
for TYPE in "${array[@]}"; do
   [ "$1" = "$TYPE"  ] && find /etc/ -type ${1:0:1};
done


How to make a simple fast and lightweight custom screen locker?

A tutorial to build a custom screen-lock

Install two packages by executing following commands:

sudo apt-get install xautolock xlockmore

Once installed enable xlock daemon on every time system starts by adding the entry to Startup Applications. Following steps will help:

Open Startup Applications:

Click Add button to open Add Startup Program window.

Then fill with xautolock -time 10 in Command text-box. It will lock the screen after every 10 minutes if the system is being idle for 10 minutes. 10 can be replaced by any natural number.  Click Add and then finally Close. Following screen will help:

(source: akamaihd.net)
That's it. A simple screen-lock is ready! :) Login and Logout to check whether it is working or not.
To stop the xlock daemon  i,e if don't want to lock the screen any more type followng command in terminal:

xautolock -exit

also remove the command under Starup Applications. Get more options and help by: man xautolock and man xlock.

Usage

Working can be checked by executing following command if above two packages are installed:

xautolock -time 1

If left idle for 1 minute the system will be locked. Actually the command runs the executes the xlock daemon which locks the system.

Feel free to edit it to make it more clear and interactive. Any types of comments and suggestions are most welcome.

Thank You!!


Is Vim-gnome FuzzyFinder plugin broken since Ubuntu 13.04?

I fixed the issue by downloading the latest version of FuzzyFinder (v4.2.2) as well as the dependency L9 Vim script library (v1.1).

I honestly have no idea why it would stop working after updating to Ubuntu 13.04 (from 12.10). As said in question, I unzip the same .vim/ archive I use between various OS and never had this issue. It was working in 12.10 this morning. I checked the archive for errors, there were none.

So I guess something must have changed in the Vim build or the environment in 13.04.


I deleted my resolv.conf how do I get it back or how do I create it again

/etc/resolv.conf is automatically generated upon reboot by resolvconf if its a symbolic link to /run/resolvconf/resolv.conf (the file resolvconf writes to), you don't need to create it or edit it. You can put your name servers in /etc/network/interfaces using the following syntax so that they get added to /etc/resolv.conf automatically:

dns-nameservers <IP_address> <IP_address> <IP_address>

For example:

dns-nameservers 8.8.8.8 8.8.4.4

you should add this line at the end of your static IP configuration block.

If you have removed the symlink /etc/resolv.conf, run sudo dpkg-reconfigure resolvconf and you will come up with a set of questions to set it right again. Now do a reboot or run the following:

sudo ifdown eth0 && sudo ifup eth0  ##Change interface name accordingly

Everything should be fine.


Error Updating: izx/askubuntu/ubuntu xenial Release' does not have a Release file

The PPA has no packages for the version of Ubuntu (16.04) you are running and so no Release file. The Release file is used to check the integrity of packages from a source, so APT treats this as a security issue and refuses to fetch anything.

Possible causes of having a broken PPA:

you recently upgraded and the PPA was not removed
you installed offline (I've experienced this strangely adding outdated PPAs to sources)
another user added the PPA without your knowledge

The best way to remove a PPA you have installed packages from is with ppa-purge which also removes any associated packages and attempts to return them to default versions

sudo apt install ppa-purge
sudo ppa-purge ppa:izx/askubuntu/ubuntu

But if you don't have any packages from the PPA (as in this case), you can simply use the add-apt-repository command with the -r remove flag:

sudo add-apt-repository -r ppa:izx/askubuntu/ubuntu

Or just delete the file for it in /etc/apt/sources.list.d


Will I lose my data if I downgrade to 14.04?

The application you are looking for is aptik. With this app you can backup yout current application LIST, ppa and their settings. You cannot backup your installed applications. But, since you backed up your application list and their settings, so, next time when you restore your applications, it will download all the previously installed applications, restore your ppas and apply the previous settings on them.


The key difference between static and shared libraries is that when static libraries are used every program has a copy of the parts of the library it uses.  With a shared library the code is stored separately.

Windows like Linux uses a mixture of statically linked and shared libraries.  In windows dll files are shared libraries in Linux the libraries usually have the extension .so

Programs written with static libraries are larger taking up more disk space.  Also If two or more running programs are using the same library functions then this code will be in RAM multiple times.  Depending on the complexity of the functions called this may mean more RAM is used and so may need to swap space more often.  There is an overhead in
calling a shared library so if the function is simple enough it may be more efficient in terms of RAM to have a static library.

If an error is discovered in a shared library then only the shared library needs to be updated.  If the same error is discovered in a static library then all programs that use it need to be re-compiled and updated.  On the other hand if a program is linked using static libraries there are no concerns about is the library available, and is it the correct version.

There are advantages and disadvantages to both approaches.

There is more information here

http://www.yolinux.com/TUTORIALS/LibraryArchives-StaticAndDynamic.html


I deleted MIME directories and update-mime-database doesn't work anymore! Help!

The /usr/share/mime directory and its /usr/share/mime/packages subdirectory are provided by package shared-mime-info so to fix the error it should be sufficient to re-install the package - either from your favorite GUI package manager or from the command line using

sudo apt-get install --reinstall shared-mime-info

If you want to restore /usr/share/mime-info and /usr/share/mimelnk as well, then they appear to belong to libreoffice-common

Other packages may have installed their own files underneath /usr/share/mime - to identify these, you can use

dpkg -S /usr/share/mime


How to show seconds on the clock in GNOME 3?

Not sure when this path changed, but as of Ubuntu 13.04 the seconds display can be set in the terminal with:

gsettings set org.gnome.desktop.interface clock-show-seconds true

To turn seconds display off:

gsettings set org.gnome.desktop.interface clock-show-seconds false

and checked with:

gsettings get org.gnome.desktop.interface clock-show-seconds


Another way I've solved this problem was by creating a symlink from the older library to the newer (in your case, from libpng12.so.0 to libpng16.so.0) No package installation necessary, although I remember that it may get broken again if libpng16 is updated, for example to libpng12.so.1


How to open encrypted partition, knowing the passphrase?

To access a drive encrypted with LUKS or dmcrypt:
First, open a terminal window and become root.  Type blkid to learn the device name of the partition you want.  (In your case you have already done this ;-)
Now for the magic bit:  Run
cryptsetup luksOpen <device file> <device-mapper name>

and type your password.  For example, you might do something like cryptsetup luksOpen /dev/sda1 mydrivethatineed.  With this command, the decrypted device would appear at /dev/mapper/mydrivethatineed.
Now you can go ahead and
mount /dev/mapper/<device-mapper name> /mnt

and your filesystem should appear under /mnt.
One last thing:  don't forget to unmount a crypto drive when you're done; otherwise, what's the point of crypto?  (Do note that the kernel unmounts everything and forgets all passphrases on shutdown.)  Unmount it with:
cryptsetup luksClose <device-mapper name>

and you should be set!


How can I sync my root gedit with my user gedit's preferences?

I think this is quite impossible because gedit manages its settings through gconf and to sync these it would require a gnome-settings-deamon running for root.


Is it possible to make GRUB2 look similar to burg?

Grub does have some theming capabilities - we already have a great Q&A that covers how to change the Grub background and changing the text menu colours:

Change boot entry names and grub background?
How can I get some nice eye candy themes for Grub?

However, to answer your very specific question, it is not possible to convert the text selection in Grub2 to Iconised symbols.  This is one of the reasons why BURG was created.

UbuntuForums has a great thread to cover Grub2 themes and more importantly screenshots showing the themes that can be achieved.

http://ubuntuforums.org/showthread.php?t=1823915

(post #61)

This screenshot was created by:

adding a background image
installing a grub-font
installing grub-icons for each OS (called a class)

I'm loathed to duplicate such a great tutorial here as per the first post in the thread.  Its pretty much self-explanatory on the steps you need to do.


How can I fetch random words from an electronic dictionary database or text file?

If the wordlist is a plain text file with one word per line, then one option is the shuf command e.g.

$ shuf -n5 /usr/share/dict/american-english
resuscitated
Lawson
concatenate
nonsmoker's
balmiest

See man shuf

SHUF(1)                          User Commands                         SHUF(1)

NAME
       shuf - generate random permutations

SYNOPSIS
       shuf [OPTION]... [FILE]
       shuf -e [OPTION]... [ARG]...
       shuf -i LO-HI [OPTION]...

DESCRIPTION
       Write a random permutation of the input lines to standard output.


How can I boot two of the same Ubuntu distribution from the same internal hard drive? (Installation choices?)

I dont't known why grub not detected second ubuntu, but you can add custom config into grub config, in to file named custom:

$ ls /etc/grub.d/
00_header        10_linux      20_memtest86+  30_uefi-firmware  41_custom
05_debian_theme  20_linux_xen  30_os-prober   40_custom         README

Check whats added for ubuntu 1 in config(placed in /boot/), make same in 40_custom but with actual uuids for ubunti 2

Run sudo update-grub after making changes.


How to change the default Desktop environment (That appears in the greeter) in 14.04

take a look in /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf for changing default session (to wipe out guest login,btw, you must modify /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf )


Dell Vostro 1520 wifi not working with Ubuntu 12.04

I have a Vostro 1520 on which I just upgraded to 12.04. Even though my wifi was working on 10.04, I have to re-do what I've done on 10.04... Here it is:

sudo rmmod dell_laptop

At this point, wireless indicator will light up and after a while, you'll be able to connect to the available wi-fi access points. However, the dell_laptop kernel module will get loaded again on bootup and hence, the fix is not permanent. Let's make it so:

echo 'blacklist dell_laptop' | sudo tee /etc/modprobe.d/blacklist-custom

Wireless should be working fine from now on.

It did on my laptop.

Hope this helps!


Why “which” returns none on some commands I can run?

I found which alias or which compgen etc returns nothing.

Both of those are shell builtins.  which knows nothing of shell builtins: it simply searches a path for executables.

For a more reliable result, use type.

$ type compgen
compgen is a shell builtin
$ type alias
alias is a shell builtin

type has better knowledge of what executes because it is a shell builtin.

Why which is unreliable

which often gives the wrong answer.  Observe:

$ type pwd
pwd is a shell builtin
$ which pwd
/bin/pwd

When you run pwd, without specifying an explicit path, the shell will execute its builtin, not the executable that which found.

Here are more examples of which giving the wrong answer:

$ type echo
echo is a shell builtin
$ which echo
/bin/echo
$ type [
[ is a shell builtin
$ which [
/usr/bin/[

Observe:

$ type /bin/echo
/bin/echo is /bin/echo

When you give an explicit path for echo, such as /bin/echo, then the shell would run that executable, not its builtin.  type knows that also, as you can see above.

How which works internally

On debian-like systems, which is a simple shell script,  The relevant part of which is:

   for ELEMENT in $PATH; do
    if [ -z "$ELEMENT" ]; then
     ELEMENT=.
    fi
    if [ -f "$ELEMENT/$PROGRAM" ] && [ -x "$ELEMENT/$PROGRAM" ]; then
     puts "$ELEMENT/$PROGRAM"
     RET=0
     [ "$ALLMATCHES" -eq 1 ] || break
    fi
   done

As you can see, it does a simple search along the PATH for an executable file of the name given.


You might have one of two issues:

Either a hardware issue and your laptop is having problems with the cable or circuit related to the keyboard or a misconfiguration of the keyboard layout when Ubuntu was installed or after it was installed.


How to set clutter flow permanent for pictures folder on maverick

This is not possible right now, but it is a planned feature.


Why does pretty much everything depend on gstreamer phonon backend?

Well, to answer my own question, it doesn't :)

What I completely failed to take into consideration when I asked this question was the important fact that I did a minimal install so lots (and I meant lots) of things were "automatically" added when I installed kde-plasma-desktop.  Plus the fact that I have no kubuntu-desktop or a variant of to keep things like alsa as a dependency.

So I did:

sudo apt-get install alsa-base

even though I knew it was already installed and that was all that was needed to mark alsa-base as manually installed and voilà!  Autoremove now only wants to remove the no longer required dependencies of gstreamer.


They're masked (hidden). The partition is mounted over the existing contents, which become inaccessible by normal means. They can be accessed by bind mounting the original directory elsewhere, or by other roundabout methods.

If you want to merge the contents, you need to use something like (see How do I use OverlayFS?, Example OverlayFS Usage). Otherwise, only the contents of the mount source are visible on the mountpoint.

Example of accessing the original contents using bind mounts:

$ ls foo
2017
$ sudo mount -t tmpfs none foo
$ ls -l foo
total 0
$ mkdir bar
$ sudo mount -o bind . bar
$ ls bar/foo
2017


Deluge: missing systray icon in XFCE Panel (Xubuntu)

Nevermind, I solved it.
I disabled "enable application indicator" and magically the tray icon showed in systray area.

Thank you anyway!


Why isn't cluster-SSH working on Ubuntu Server?

You are right: the problem is your Ubuntu Server doesn't have a GUI (or specifically, an X server)

Cluster-SSH is designed to use multiple xterms, which is only possible if an X server is running locally; if you are running cluster-SSH over SSH itself, then you'd need X forwarding enabled.

Setting up an X server in Windows isn't easy, and in any case, cluster-SSH with its multiple terminals wouldn't be very responsive if forwarded over the Internet.


How do I shutdown/restart bionic beaver?

Top right corner of the screen, click the 'down' arrow, and a popup appears.  This includes a standard sort of power icon, which can be used to shutdown the machine, or put it to sleep.


Running a script for it's subdirectories

Ok if your setup is like this:

Movies/Jan/movie1.mp4
Movies/Jan/movie2.mp4
Movies/Feb/movie3.mp4
Movies/Feb/movie4.mp4
Movies/march/movie5.mp4

Where Movies is your basedir. Then the following script will list all your movie files with full paths relative to the basedir.

for dir in $basedir/*/*
do
  for file in $dir/
  do
    echo $file
  done
done

Replace echo $file with your vcs command but try it like this first to make sure your getting the correct files.

This has no fault tolerance and will not recurse into sub directories. You might want to add a check that only video files are grabbed.


How to update IcedTea plugin for latest java

If you installed using a repository, you should be able to just use

sudo apt-get update

and

sudo apt-get upgrade

or

sudo apt-get install

the specific package (it will download the update if there is one in the repository). Otherwise go to the website you found the package from, then download and install it.


Disable network on remastered Ubuntu 13.04 Live-CD except for localhost

I assume it is searching for a wireless access point. Normally, Network Manager will not look for an ethernet connection if it can't detect a cable. I suggest you determine the wireless driver from the terminal command:

sudo lshw -C network

In many MacBooks, the driver will show as b43-pci-bridge. If this is your case, you actually want b43. Blacklist the wireless driver you found:

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

Add a new line at the end:

blacklist driver

...where driver is the wireless driver you found in lshw.

Then remaster.


how can I reinstall the codecs so I can play my videos back

Open Gnome Terminal to give you a command-line
Manully run vlc yourmovie.mpg from the terminal.
What debugging/error messages appear?

On the specific point of which packages the codecs live in.  The codecs for certain file-formats can be installed from installing the packages ubuntu-restricted-addons and ubuntu-restricted-extras.  You may manually install these packages from the Ubuntu Software Centre if you know that you are legally allowed to do so within the juristriction that you live.


Notes about my answer:

[a] I know nothing about plex.

[b] In the context of this question I'm assuming "plex" is also a user name.

[1] Right click the Share folder > Properties > Local Network Share and "unshare" the folder. Just undo everything you did here. Then run the following command to verify that you have no usershares:

net usershare info --long

[2] Edit /etc/samba/smb.conf and make your share definition look like this:

[sambashare]
path = /media/plex/Storage/Share
read only = no
guest ok = yes
force user = plex

[3] Save smb.conf

[4] Restart smbd:

sudo service smbd restart

[5] When you use Run from Windows 10 you can connect to this share using one of 2 ways. Using the ip address:

\\10.0.0.26\sambashare

Or using the mDNS name:

\\ubuntu-host-name.local\sambashare

Change "ubuntu-host-name" to the actual host name of your Ubuntu machine - and don't forget the ".local" at the end.


I just setup my Dell 7567 with dual boot for Windows 10 and Ubuntu 16.04. My setup involves keeping windows 10 in the ssd( Tiny 128 GB version) and installing Ubuntu on the Mechanical Drive( 1 Tb). Following are the steps I followed.

Disable Fast Boot and Hibernate on Windows 10.
Advanced startup, Enter BIOS and disable Secure Boot.
In the BIOS there should be an option called SATA Operation Mode,
switch that to AHCI( DEfault is RAID). Please Note: If the setting is
not available on your BIOS you might need a BIOS update.
Setup your Ubuntu 16.04 usb boot drive using rufus. Note: Create using
the 'MBR partiton scheme for BIOS or UEFI Computers' option.
Go to advanced Start Up and boot from the created USB.
Once installation starts go for 'Something Else' on the installation
window. Make sure the grub(bootloader) is installed in the drive with
your Windows installation. Create your root partition and swap area in
the new drive(Follow Tutorials).
Continue with installation and try to download third party updates
while installing( That will solve any driver issues with the graphics
card)
Reboot and you are good to go.


Thunderbird autofill: also look for domain names

There is currently no way to do this. Thunderbird's autocompletion can only match the beginning of each field of the contacts in your address book.

A bug has been reported and there are plans for improvement, but no solution has yet been released.

Note that there are some cases in which it may look like Thunderbird is performing substring matching, when really it is still just matching the beginning of other fields. For example, if you had the following contact in your address book,

  Email: john@theicecreamfactory.com
  Work Organization: Icecream Factory

typing icecream in the To field would autocomplete to john@theicecreamfactory.com, but only because it matches the beginning of Icecream Factory. This behavior may be what you remember seeing in the past.


Started W8/Ubuntu 12.04 dual boot but got scared. How can I make sure to just run Windows again like always?

1> Backup all your data and keep win8 recovery disk handy.
2> boot into ubuntu live cd and do a simple os-prober in terminal
3> does it show win8? If yes, then follow this link             https://help.ubuntu.com/community/Boot-Repair

else  there might be a risk factor. If u r not willing to risk your win8 partition, then simply delete the ubuntu partition from disk management to reclaim back your hard disk .space


How to make compiz consume less resources?

Install CCSM and de-select any nonessential effects plugins

To install Compizconfig settings manager open a terminal (ctrl + alt + T) and run this command (you can paste it into the terminal with ctrl + shift + v):

sudo apt-get install compizconfig-settings-manager python-compizconfig compiz-fusion-plugins-extra compiz-fusion-bcop compiz-fusion-plugins-main compizconfig-backend-gconf

Information regarding the usage of CCSM can be found here


I found solution, installed latest kernel and header files for it, then I run:
sudo /etc/init.d/vboxdrv setup


You can do:

echo #password | sudo -S #commmand

Replace #password with your password and #command with a command you want to execute.

EDIT 1: More secure way that takes a little bit of time
1) Run: "sudo apt-get install monodevelop"
2) Download https://www.dropbox.com/s/6917qfhc6mwc9jw/MountVolumens.tar.gz
3) Extract it where ever you want
4) Open "MountVolumens.sln" with monodevelop
5) At line 24 replace #password with your password
6) At line 25 write down all the commands you want to execute
7) Press Ctrl + F8
8) At line 24 remove your password
9) Go to the folder where you extracted the files, than go to "MountVolumens/bin/Debug", and there you should see a file called MountVolumens.exe
10) Copy it where ever you want, and create a sh script that just says "cd #location && mono MountVolumens.exe", replace #location with "MountVolumens.exe" folder location


Chrome crashes when I turn on/off fullscreen on Youtube and locks down the screen

I have opened a ticket on Chrome's issue tracker about this issue, but nothing has come out of it until now...

Turning off hardware acceleration does fix it, and so does using GNOME Shell instead of Unity in my case.

But both aren't fixes, just workarounds...


Quit specific GUI application showing “save the changes” dialogue box

Any of the POSIX signals you can send will close the application immediately.

You can use wmctrl:

wmctrl -c LibreOffice

Use -F to search strictly.

Notes

Very similar to How can I kill a specific X window
You can also try with xdottool
To kill a specific window you can list them wmctrl -l and then close it with wmctrl -ic ID.
Warn: If the process is stuck it may not notice that you closed the window. The window will be gone, but the process will still be there and possibly consume CPU and RAM.


Lets first check your file system for errors.

To check the file system on your Ubuntu partition...

boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type sudo fsck -f /
repeat the fsck command if there were errors
type reboot


Which file to associate with the Windows boot manager to load GRUB?

Try booting from USB again, then running the following command:

sudo grub-install /dev/sda (assuming /dev/sda is your hard drive)

This will cause the bootloader to search for all installed OS' and then add them to the list of operating systems present.


how do I reput the Gnome sound that sounds at the beginnig?

U haven't mention version of Ubuntu u installed.

For 11.X Go to

Ubuntu Tweak -> Login Settings -> Play sound at login

For 10.X Check this Reference


Chrome shutting down immediately on opening

Try to reset configuration, rename configuration file and try to open chrome again

sudo mv .config/google-chrome .config/google-chrome.bak


Why can't RhythmBox/Coherence see PS3 Media Server?

You may be seeing something that I am seeing, albeit from a different source (see question here). I was not able to see a uPnP share on my Win7 box with 10.04, but I was able to get it slightly working once with 10.10.

I have a large music share, and I am thinking that the uPnP plugin just isn't that efficient or fully baked to handle it.

I would try 10.10 and maybe your luck will be better.


This happened to me as well. At least in my case, stopping and starting Dropbox daemon from the terminal showed me a message

ImportError: libatomic.so.1: cannot open shared object file: No such file or directory

Based on this, I installed the libatomic1 Ubuntu package. Upon stopping and restarting the Dropbox daemon, the problem was solved. In fact, not only did Dropbox stop filling the temp_dirs directory, it removed it altogether.


Does an HP Proliant DL360 G9 is supported by Ubuntu (Any version)?

Yes, but only with the Smart Array disabled. According to the Ubuntu Hardware Certification Program:
The HP ProLiant DL360 Gen9 rack mount chassis with the components described below has been awarded the status of certified for Ubuntu.

Ubuntu 16.04 LTS 64-bit
This system was tested with 16.04 LTS, running the 4.4.0-15.31 kernel.
Certification notes
HP Dynamic Smart Array
System is certified with Dynamic Smart Array disabled.
To disable Dynamic Smart Array:

Press F9 to boot into RBSU

Navigate to System Options -> HP Dynamic Smart Array B320i and select disable

Go to System options -> SATA Controller options and select Legacy SATA or AHCI

Reboot the machine and now you will be able to install the OS.

Pre-Release Testing
This system was tested with a Pre-Release version of Ubuntu.
This certification is considered valid only for 60 days after this Ubuntu Release and must be re-tested with the GA release of Ubuntu to be considered permanently certified.
BIOS

HP: P89 (UEFI)

Ubuntu 14.04.1 LTS 64-bit
This system was tested with 14.04 LTS, running the 3.13.0-35.62 kernel.
Certification notes
HP ILO and MAAS

ILO firmware version 2.30 will not work with MAAS. To use this system in a MAAS environment you will need to update to the latest ILO firmware (greater than version 2.30).

If you are using ILO 2.20 or older, you are not affected by this issue. Please refer to HP for more information on updating ILO firmware.

BIOS

HP: P89 (UEFI)

This information can be viewed at http://www.ubuntu.com/certification/hardware/201409-15509/


/dev/md2 already in use and failed to start in degraded mode

I found the problem. Turns out that the raid card I used only has 4 external connections. So it would only recognize 4 drives in the raid at a time.


Create "virtual" LAN on laptop (not VLAN)

If you're using VMware all you need to do is assign these virtual machines to a virtual LAN that has not connection with VMware itself nor the host machine. This is called "LAN segments" and it's easy to find under the Network Interface settings of each  machine.

All you have to do is create a new LAN segment for the first machine,  then add the other ones to the same network:

This is similar to the host-only network but with the difference that machines can't contact the hosts nor other external networks (Internet) so it's like having a LAN with those machines only. Since there's not a DHCP server in this network, you'll have to add the IP's manually in each system.

If you want them to communicate with the host, you need the host-only setting. In this case, the host will have the lower IP, since it will act as a gateway (but without forwarding packets to other networks).


Alternative to Broadcom STA Wireless Driver

I just had a similar problem, these were my steps to fix it

Remove the STA driver from Additional Drivers
I typed in broadcom in ubuntu software center, clicked and uninstalled
Have your laptop attached to LAN
Install b43 (installer package for firmware for b43) (searched b43 and found it)
restart machine

  $sudo halt - p

login
restart network

  $sudo /etc/init.d/networking restart

check if its there

  $nm-tool

I see wlan0 but its unavailable

  $sudo ifconfig wlan0 up

looks like its working but no networks available

restart again
and wireless networks come to view. fixed

Try it and let me know


libgdal20 (2.2.3+dfsg-2) is available from universe repository:
sudo add-apt-repository universe
sudo apt update

The postgis package is available from postgresql repository and depend on libgdal20 provided by the universe repository.


Can I change apache web server user and group?

You can change the user apache runs as - from www-data to whatever fits you best. However, I wouldn't advise you to do that. Or at least you should select a dedicated user for apache - user that won't be used for anything else.

The better option is to make www-data user a member of xyz group. That way apache will be able to read/execute whatever needed (just don't forget that your directories in /var/www/ must have +x for the group, all scripts and files will be fine with +r for group).


What is mapping fiber channel upon install of 14.04?

It's part of your initrd and the multipathd should also be running at startup. So if you do end up changing your multipath.conf be sure to rebuild your ramdisk so the file is copied there as well. Otherwise weird race conditions can occur once you try to add LVM to the mix.

https://help.ubuntu.com/lts/serverguide/multipath-devices.html


where to save your files of php in ubuntu to load on server?

PHP is integrated into apache upon installation and so, there is no need to worry. You can put php code into .php files into the web server. Foe example, instead of using index.html, you should use index.php so you can put php code into it. Here's a sample piece of code that can be used and easily understood -

<!DOCTYPE html>
<html>
 <head>
  <title>Foo</title>
 </head>
 <body>
  <?php
    echo "Hello World!";
  ?>
 </body>
</html>

For managing your mySQL database, you may use the package phpmyadmin from the official repositories.

For more information, refer to the following links -

phpMyAdmin
PHP 5 tutorials

For Another interpretation of the question, refer to this question that was asked previously


How can I disable the auto-opening of a folder when using drag & drop in Nautilus?

As of Nautilus version 3.17.91, this bug has been fixed by adding an option to disable the "auto-open" behaviour. From the NEWS file:

Major changes in 3.17.91:
...
* Add a preference and disable by default automatic opening of folders while hovering on drag an drop operations (Carlos Soriano)

The default was subsequently changed to "enabled", restoring the "auto-open" behaviour for anyone who doesn't disable it explicitly.

Unfortunately this change wasn't in time to make it into Ubuntu 16.04, which ships with Nautilus 3.14.3. Ubuntu 16.10 shipped with version 3.20.3, so it and subsequent versions should have the option (at least until GNOME decide to remove it again in order to streamline the user experience).

I don't know whether this option is exposed in the GUI, but would expect not. In any case it should be possible to disable the behaviour from the command line with

gsettings set org.gnome.nautilus.preferences open-folder-on-dnd-hover false


Help with AMD Catalyst 15.9 and screen tearing Ubuntu 15.04

If you have hybrid Intel/AMD graphics, the display options will not be available in the Catalyst Control Center panel (including the "Tear Free" option which is available instead for AMD-only driven displays). For what I have understood, this is because with hybrid graphics setups the rendering job can be done by the dedicated (AMD) gpu, but compositing/displaying is always done by the integrated (Intel) gpu. I have a hybrid Intel/AMD configuration (Intel Broadwell/AMD Firepro m4150), I have the same tearing issues as yours when using the AMD gpu for rendering, I have tried Catalyst 15.3 and 15.9 drivers and...nothing. No display options in CCC. I am afraid that you have only two solutions to save your desktop from tearing: 1) using always the integrated gpu (on average intel linux drivers do a quite good job in 2d acceleration, with no tearing at all); 2) move from Catalyst to the Open Source Radeon drivers (however you will probably need to move away also from Unity and use some less "shiny" desktop environment, such as Xfce)


In /var/log/dpkg.log I found that fonts-arphic-uming and fonts-arphic-ukai are installed with Chinese language pack and they are not uninstalled when language pack is removed.

sudo apt-get purge fonts-arphic-ukai
sudo apt-get purge fonts-arphic-uming

Removing these two packages returned Ubuntu to it's original setup.


ftp client other than filezilla for Ubuntu 12.04

If you use Firefox, then try FireFTP.  FireFTP is a free, secure, cross-platform FTP client for Mozilla Firefox which provides easy and intuitive access to FTP servers.  You can download here.

Another one is FileRunner.  FileRunner is an X-Based FTP program. It gives you a windowed view of files on your local system and a remote system. It allows transferring multiple files at once, tagging of files, etc.

To install Filerunner, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install filerunner

Source:Ubuntugeek


Sometimes if you have the hibernate file, you'll still face this problem. Try removing it. To do that, run the command prompt as admin and run this :

powercfg -h off

If you only want read only access, heck this : http://techhamlet.com/2014/09/unable-to-access-windows-partitions-from-linux/ (Mount the partition as read only and it will work)


How to increase /root partition using GPARTED

We'll convert your partition-based swap, to a /swapfile. We'll delete the swap partition, and use that unallocated space to increase the / partition. You'll need to have a bootable Ubuntu Live DVD/USB to proceed.
Edit /etc/fstab...
To edit, use sudo -H gedit /etc/fstab or sudo pico /etc/fstab
and comment out this line:
UUID=xxxx-xxxx-xxxx-xxxx none  swap       sw       0       0

Save the edit and quit the editor
Boot to a Ubuntu Live DVD/USB
Start gparted.
Do a swapoff on the /dev/nvme0n1p6 partition
Delete the /dev/nvme0n1p6 partition, as it won't be used any more
Drag the right side of the /dev/nvme0n1p5 partition all the way right
Click the Apply button
Quit gparted
Reboot
Create a /swapfile...
Note: Incorrect use of the dd command can cause data loss. Suggest copy/paste.
In the terminal...
sudo dd if=/dev/zero of=/swapfile bs=1M count=4096

sudo chmod 600 /swapfile  # set proper file protections
sudo mkswap /swapfile     # init /swapfile
sudo swapon /swapfile     # turn on swap
free -h                   # confirm xxG RAM and 4G swap

Confirm this /swapfile line at the end of /etc/fstab... and confirm no other uncommented “swap” lines...
To edit, use sudo -H gedit /etc/fstab or sudo pico /etc/fstab
Note: Use SPACES, not TABS
/swapfile  none  swap  sw  0  0

reboot                    # reboot and verify operation


The "$" character is commonly referred to as the "dollar sign". I would pronounce each character of the variable name as follows:

$ - dollar sign
* - asterisk
? - question mark
# - pound (sign) or hash (symbol)
@ - at (symbol)

Occasionally, certain combinations have shortened forms. The opening characters of an executable script (#!) are pronounced as "shebang" or "hash bang". I'm not aware of shortened forms for any of your examples.


Let's start with the DNS issue first. You should have had to designate name servers for your domain with your domain registrar. (Some registrars also offer DNS services and provide tools for setting up basic DNS records - but I'll assume that isn't the case here.) The name server doesn't have to be the SOA (Start of Authority) for your domain; it just has to know where the SOA record is located. ISP's generally won't provide DNS service for accounts unless you are on a business account with static IPs, and even then they usually only have a PTR record provisioned for the IP/hostname of your server (leaving you to manage your DNS records internally). Thus, querying your ISP DNS for info on your domain will yield nothing.

If you are on a residential account with cable or DSL, you will need to look at using a dynamic DNS service like dyn.com to manage your DNS. Cable/DSL uses dynamic addressing on their networks and your public IP is subject to change over time. The service is relatively inexpensive, becomes the SOA of your domain DNS records, lets you create all the DNS records you would need (including MX records) and will direct requests for your domain to your server. You would then designate the dynamic DNS service name servers with your domain registrar.

Once that is addressed, you will probably face the problem that most ISP's block port 25 which is used for SMTP connections and on which Postfix relies for incoming and outgoing connections. In some cases you can get the ISP to drop the block on your account - but not always.

Once you have DNS pointed to your server and it's accessible to the outside world, then you can start working on the Postfix problem.


Why do I have to push my gpg key to ubuntu key server before using launchpad?

Ubuntu's (Debian) APT package management verifies package integrity by using GnuPG, a PGP implementation. For distributing keys, the regular public PGP keyservers are used. Any public key can be uploaded there for anyone to retrieve. By comparing the fingerprints on the key(s) you mention on Launchpad and the ones on the packages everyone including Launchpad itself can verify the software is indeed uploaded by you and hasn't change since it left your machine.

Ubuntu's key servers are synchronized with other Open PGP key servers.

I don't see why you would need to be uncomfortable uploading your key as it's just the public key (of course). If you don't want to share your real name, just create a second key with another name and use that one for Launchpad/debuild.


Dropbox not running after logging off: init.d vs. dropbox.py

I've been using the script at http://www.dropboxwiki.com/tips-and-tricks/install-dropbox-in-an-entirely-text-based-linux-environment which had been working previously, but when I check today it wasn't working.

Eventually I found that the line

DAEMON=.dropbox-dist/dropbox

needed changing to
DAEMON=.dropbox-dist/dropboxd

Now it works.


Windows 8 host, Virtual Machine with Ubuntu 15.10. Reinstall with more VRAM, is it possible ? Or...?

Question 1:

Yes you can "reinstall" by deleting the VM by right clicking on it in the VirtualBox Manager window and then creating a new VM in the same way.  Although this is unlikely to solve any problems you are having.

Question2:

Ubuntu has a Terminal window, not command prompt.  To open it press Ctrl + Alt + T

As for which to use: use command prompt if it's dealing with host side things, use the terminal if it's VM side things (installing software, opening/editing files)

**Side note: VirtualBox will only go up to 128MB for Video Memory, if you're wanting more than that you need to actually install it on a physical machine


The following could provide a solution if your usb drive uses a Linux filesystem. You will need to use the terminal.

First, make sure that you have unmounted your device.

sudo umount /dev/sdc

To check what kind of filesystem your device has, type in the following command:

sudo fdisk /dev/sdc

You will get a prompt that looks like this:

Command (m for help):

Next, you need to enter the p command. This will print the partition table for the device. At the bottom of the table, it should show you a range of fields that look roughly like this.

Device Boot    Start     End      Blocks    Id  System
/dev/sdc       2048   15158239    7578096   83  Linux

If your Id field says 83, and your System field says Linux, the following may help you. If not, I do not know how to solve your issue.

Everything written beyond this point assumes your Id field is 83 and your System field is Linux

You need to use the fsck command to repair your filesystem. If it is a Linux filesystem, it should have a directory called lost+found. This is where any recovered files will be stored.

sudo fsck /dev/sdc

Remount your device. Example:

sudo mount /dev/sdc /media/usr

If any of your files are recovered, you will find them in the lost+found directory of your usb drive.

Hope this was of some help.


If you install any kernel module without using dkms, you'll need to re-install it after each kernel upgrade.


Cannot use 'btrfs balance' to convert to raid1

To use the extra arguments with the balance command, you need to install a newer version of btrfs-tools than is available for Ubuntu 12.04.

It's pretty easy (see first answer) to compile a new version of btrfs-tools from the btrfs git repo. There are also binary packages from Debian sid or Ubuntu 12.10 that might work.


How can I specify a dependency between 2 versions of a package?

The operators for version dependencies are:

>>  Greater than, but not equal to
>=  Greater than or equal to
=
<=
<<

(note < and >, meaning <= and >= also work, but they're depricated)

So in order to declare your example, you'd add two dependencies:

Depends: python (>= 2.5), python (<< 2.7)

For a full description of dependency declarations, see the Debian Policy Manual, Chapter 7. If you want to take a look at some uses, see this random example.


NO NEED TO RE INSTALL!
You can use what is called a chroot to access your installed partition from a live CD. See How to chroot Ubuntu using Live CD to fix GRUB rescue prompt.
Basically how it works is you boot of the live CD and mount your Ubuntu install.  You run chroot, and you are dropped into a command prompt for the installed Ubuntu instance instead of the CD. The guide above should tells you what you need to do.


The difference between the normal and -updates versions is that the normal version is the stable version of the driver, while the -updates version receives experimental driver versions. The -updates driver is generally better for very new cards, but it does have the risk of not working at all, breaking the graphics completely until the driver is uninstalled.

So, if you have a newer card, go with 352.63 normal. It should work fine. If you have an older card, or the newer version doesn't work well, go with 340.96 normal. If you're feeling daring, use the -updates version to see if it works. If none of the drivers work, and you're not planning on intense gaming, stay with the generic Nouveau drivers.

I hope this is an adequate explanation. If not, leave a comment, and I'll attempt to expand.


Wireless down in dual boot of Ubuntu, but works on Windows side

After resuming from hibernation I could not reconnect to the same SSID however I was able to connect to other SSID in the area. I tried reseting the configs on my PC and changing the the wlan0 up and down. THen I decided to try the router anyways after trial and error I decided to change the broadcast channel from Auto to 3 and then my laptop connected.

i dont know why it worked but try changing the broadcast channel from the router. good luck


After updating Kubuntu 20.04 to the latest, login results in system halt

For my particular problem, the resolution was to purge all nvidia packages, and install nvidia-driver-435. No idea why this resolved it, but my system is working normally now.


Configure & Connect wireless network through the command line in Ubuntu 12.04

This short article helped me connect my 12.04 LTS server to my WPA2 PSK network: prupert @ WordPress . I run the server without desktop, so it demanded all cmd line.

I am paraphrasing a quick breakdown of the steps, but please click on the link for the full article:

(You Need to be connected to the network at this point)

Install The Software:

(You only need WPASupplicant if it is not an open network)
sudo apt-get install wireless-tools wpasupplicant

Activate your wireless network:

sudo ifconfig wlan0 up

To Check The Wireless Run:

iwconfig

Then:

sudo iwlist scan

(The sacn command should return visible wireless networks, but if it does not it is a sign that there are none visible or something is wrong with your HW/SW outside the scope of the linked article)

Run:
(To recieve you WiFi Key)

wpa_passphrase YOURSSID YOURWIFIPASSWORD

A Sample of The Resulting Text:
(As Provided by the Linked Article)

network={
ssid="YOURSSID"
#psk="YOURWIFIPASSWORD"
psk=fe727aa8b64ac9b3f54c72432da14faed933ea511ecab1 5bbc6c52e7522f709a
}

Copy the "psk" somewhere accessible, this is going to allow you to connect to your network.

Edit your interfaces file:

sudo nano /etc/network/interfaces

Append your WiFi network to the end of this file using the folling options and syntax:

auto wlan0     #change this to the name of your WiFi interface
iface wlan0 inet dhcp     #this is normally fine, if you want a static IP address replace “dhcp” with “static”
netmask 255.255.255.0     #change this as appropriate for your network, this value is usually right
gateway 192.168.1.1     #change this as appropriate for your network
address 192.168.1.100     #only needed for a static IP address
dns-nameservers 192.168.1.1     #only needed for a static IP address
wpa-driver wext     #you shouldn’t need to change this
wpa-ssid YOURSSID     #just type the name of your SSID here
wpa-ap-scan 1     #if the name of your SSID is hidden usually, type 2 instead of 1
wpa-proto WPA    #if you use WPA1 type WPA, if you use WPA2 type RSN
wpa-pairwise CCMP     #if you use AES type CCMP, if you use TKIP type TKIP
wpa-group CCMP     #if you use AES type CCMP, if you use TKIP type TKIP
wpa-key-mgmt WPA-PSK     #usually WPA-PSK (if you share a key) but sometimes WPA-EAP (for enterprises)
wpa-psk YOURHEXKEYFROMABOVE     #the hex key that you generated earlier

Example from Author of the linked article:

auto wlan0
iface wlan0 inet dhcp
netmask 255.255.255.0
gateway 192.168.1.1
wpa-driver wext
wpa-ssid MYPLACE
wpa-ap-scan 1
wpa-proto WPA
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
wpa-psk 71c81a844973ae7bb1243141e5caa7b6bb0e2d7eetcetcetc

You may now comment out the top of the Interfaces file, which will disable the ethernet. The author of the article reccommends this to prevent conflicts, but I decided not to as the only way that I can access my server interface is via PuTTY SSH, so I want to have a method of connection if the wireless is down, where I don't need to break out a mouse and monitor:
(Remove the "#" later if you need the ethernet connections to work again)

#auto eth0
#iface eth0 inet dhcp

Write Out the file and Save your Changes
Reboot your Machine

If this doesn't work, you may need to edit the Config file for the WPASupplicant program:

sudo nano /etc/wpa_supplicant.conf

You edit this file with much of the same information, except the wpa- piece:
(A sample below from the author of the linked document)

ap_scan=1
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="MYPLACE"
scan_ssid=0
psk=71c81a844973ae7bb1243141e5caa7b6bb0e2d7eetcetcetc
key_mgmt=WPA-PSK
proto=WPA
pairwise=CCMP
group=CCMP
}

"As far as I am aware, the options are the same. So, edit this file as necessary, make sure you add the ctrl_interface and network={ at the beginning and the } part at the end. Save it and try restarting again. If it still doesn’t work, then kick your PC, wish you had installed Windows 7 instead and go off and do some Googling. You’ll find the answer on the Ubuntu forums and you’ll be happy again.